|
@@ -69,10 +69,7 @@ public class JyPlatformServiceImpl extends ServiceImpl<IJyPlatformMapper, JyPlat
|
|
|
}
|
|
|
JyPlatform jyPlatform = null;
|
|
|
JyUser jyUser = null;
|
|
|
- jyUser = jyUserService.getByIdCard(param.getIdCard());
|
|
|
- if(jyUser != null && jyUser.getPlatformId() != null ){
|
|
|
- throw new BusinessException(ResultCode.ID_CARD_EXIT2);
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
if(param.getId() == null){ //创建平台自动生成平台访问地址
|
|
|
String uuid = UUID.randomUUID().toString().substring(0, 18).replace("-", "");
|
|
@@ -81,6 +78,10 @@ public class JyPlatformServiceImpl extends ServiceImpl<IJyPlatformMapper, JyPlat
|
|
|
if(jyPlatform != null){
|
|
|
throw new BusinessException(ResultCode.ID_CARD_EXIT);
|
|
|
}
|
|
|
+ jyUser = jyUserService.getByIdCard(param.getIdCard());
|
|
|
+ if(jyUser != null && jyUser.getPlatformId() != null ){
|
|
|
+ throw new BusinessException(ResultCode.ID_CARD_EXIT2);
|
|
|
+ }
|
|
|
jyPlatform = new JyPlatform();
|
|
|
BeanUtils.copyProperties(param,jyPlatform);
|
|
|
this.save(jyPlatform);
|
|
@@ -94,6 +95,10 @@ public class JyPlatformServiceImpl extends ServiceImpl<IJyPlatformMapper, JyPlat
|
|
|
if(jyPlatform2 != null && !jyPlatform2.getId().equals(jyPlatform.getId())){
|
|
|
throw new BusinessException(ResultCode.ID_CARD_EXIT);
|
|
|
}
|
|
|
+ jyUser = jyUserService.getByIdCard(param.getIdCard());
|
|
|
+ if(jyUser != null && jyUser.getPlatformId() != null && !jyUser.getPlatformId().equals(param.getId())){
|
|
|
+ throw new BusinessException(ResultCode.ID_CARD_EXIT2);
|
|
|
+ }
|
|
|
if(!param.getIdCard().equals(jyPlatform.getIdCard())){
|
|
|
JyUser jyUser1 = jyUserService.getByIdCard(jyPlatform.getIdCard());
|
|
|
if(jyUser1 != null){
|