|
@@ -173,9 +173,12 @@ public class JySceneUserAuthServiceImpl extends ServiceImpl<IJySceneUserAuthMapp
|
|
|
throw new BusinessException(ResultCode.JY_ID_NO_EXIST);
|
|
|
}
|
|
|
JySceneUserAuth jySceneUserAuth = jySceneUserAuthService.getByNumAndJyUserId(jyUser.getId(), param.getNum());
|
|
|
- if(jySceneUserAuth != null){
|
|
|
+ if(jySceneUserAuth != null && param.getCanDel() != 1){
|
|
|
throw new BusinessException(ResultCode.SCENE_AUTH_EXITS);
|
|
|
}
|
|
|
+ if(jySceneUserAuth != null && param.getCanDel() == 1){
|
|
|
+ param.setId(jySceneUserAuth.getId());
|
|
|
+ }
|
|
|
Long sceneUserId = pro == null ? plus.getUserId():pro.getUserId();
|
|
|
|
|
|
if(sceneUserId.equals(jyUser.getUserId())){
|
|
@@ -197,7 +200,7 @@ public class JySceneUserAuthServiceImpl extends ServiceImpl<IJySceneUserAuthMapp
|
|
|
|
|
|
param.setJyUserId(jyUser.getId());
|
|
|
param.setAuthorId(sceneJyUser.getId());
|
|
|
- this.save(param);
|
|
|
+ this.saveOrUpdate(param);
|
|
|
|
|
|
}
|
|
|
|