Compare commits
No commits in common. "8f6f14369537cf96785c95c8ddc266c32c43418a" and "5b09bfdfaf07d1a6d06a67e69fc8b7f1dd53c2d2" have entirely different histories.
8f6f143695
...
5b09bfdfaf
|
|
@ -177,10 +177,9 @@ public class UserAddExe {
|
||||||
throw new BizException("该用户存在多家未离职信息,不能修改人员流动状态");
|
throw new BizException("该用户存在多家未离职信息,不能修改人员流动状态");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
userE.setPhone(userDO.getPhone());
|
}
|
||||||
userGateway.updateByPhone(userE);
|
userGateway.update(userE);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -98,32 +98,11 @@ public class UserUpdateExe {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
;
|
|
||||||
CorpInfoDO corpInfoDO = corpInfoRepository.getById(userDO.getCorpinfoId());
|
|
||||||
if(corpInfoDO != null){
|
|
||||||
if(corpInfoDO.getType() == CorpTypeEnum.serviceProvider.getCode()
|
|
||||||
|| corpInfoDO.getType() == CorpTypeEnum.cargoOwner.getCode()
|
|
||||||
|| corpInfoDO.getType() == CorpTypeEnum.portUnit.getCode()){
|
|
||||||
// 相关方
|
|
||||||
boolean res = userGateway.updateByPhone(userE);
|
|
||||||
// 保存履职记录
|
|
||||||
if (!res) {
|
|
||||||
throw new BizException("修改失败");
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
// 企业端/监管端
|
|
||||||
boolean res = userGateway.update(userE);
|
boolean res = userGateway.update(userE);
|
||||||
// 保存履职记录
|
// 保存履职记录
|
||||||
if (!res) {
|
if (!res) {
|
||||||
throw new BizException("修改失败");
|
throw new BizException("修改失败");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}else {
|
|
||||||
throw new BizException("未找到该用户所属企业");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* if (transferPositionFlag) {
|
/* if (transferPositionFlag) {
|
||||||
//保存用户变更记录
|
//保存用户变更记录
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,6 @@ public interface UserGateway {
|
||||||
*/
|
*/
|
||||||
Boolean update(UserE userE);
|
Boolean update(UserE userE);
|
||||||
|
|
||||||
Boolean updateByPhone(UserE userE);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -65,35 +65,6 @@ public class UserGatewayImpl implements UserGateway {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Boolean updateByPhone(UserE userE) {
|
|
||||||
UserDO d = new UserDO();
|
|
||||||
|
|
||||||
d.setUserAvatarUrl(userE.getUserAvatarUrl());
|
|
||||||
d.setName(userE.getName());
|
|
||||||
d.setUserIdCard(userE.getUserIdCard());
|
|
||||||
d.setNation(userE.getNation());
|
|
||||||
d.setNationName(userE.getNationName());
|
|
||||||
d.setCurrentAddress(userE.getCurrentAddress());
|
|
||||||
d.setLocationAddress(userE.getLocationAddress());
|
|
||||||
d.setCulturalLevel(userE.getCulturalLevel());
|
|
||||||
d.setCulturalLevelName(userE.getCulturalLevelName());
|
|
||||||
d.setPoliticalAffiliation(userE.getPoliticalAffiliation());
|
|
||||||
d.setPoliticalAffiliationName(userE.getPoliticalAffiliationName());
|
|
||||||
d.setMaritalStatus(userE.getMaritalStatus());
|
|
||||||
d.setMaritalStatusName(userE.getMaritalStatusName());
|
|
||||||
if(userE.getFlowFlag() != null){
|
|
||||||
d.setFlowFlag(userE.getFlowFlag());
|
|
||||||
}
|
|
||||||
d.setEmail(userE.getEmail());
|
|
||||||
|
|
||||||
UpdateWrapper<UserDO> updateWrapper = new UpdateWrapper<>();
|
|
||||||
updateWrapper.eq("phone", userE.getPhone());
|
|
||||||
|
|
||||||
userRepository.update(d, updateWrapper);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deletedUserById(Long id) {
|
public void deletedUserById(Long id) {
|
||||||
userRepository.deleteUserById(id);
|
userRepository.deleteUserById(id);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue