dev: app修改信息同步底座
parent
066c63b4d2
commit
a6428b701c
|
|
@ -3,6 +3,7 @@ package com.zcloud.basic.info.command;
|
|||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.cloud.commons.lang.StringUtils;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
|
|
@ -189,6 +190,19 @@ public class UserAddExe {
|
|||
userE.setPhone(userDO.getPhone());
|
||||
userGateway.updateByPhone(userE);
|
||||
|
||||
// 底座同步修改姓名和邮箱
|
||||
if(StringUtils.isNotEmpty(userDO.getName())){
|
||||
if(!userDO.getName().equals(cmd.getName()) || !userDO.getEmail().equals(cmd.getEmail())){
|
||||
UserE u = new UserE();
|
||||
u.setId(cmd.getId());
|
||||
u.setName(cmd.getName());
|
||||
u.setEmail(cmd.getEmail());
|
||||
u.setPhone(userDO.getPhone());
|
||||
userGateway.updateByAppGBS(u);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ public interface UserGateway {
|
|||
|
||||
Boolean updateByGBS(UserE userE);
|
||||
|
||||
Boolean updateByAppGBS(UserE userE);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -155,6 +155,19 @@ public class UserGatewayImpl implements UserGateway {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateByAppGBS(UserE userE) {
|
||||
com.jjb.saas.system.client.user.request.UserUpdateCmd updateCmd = new com.jjb.saas.system.client.user.request.UserUpdateCmd();
|
||||
updateCmd.setId(userE.getId());
|
||||
updateCmd.setAccount(userE.getPhone());
|
||||
updateCmd.setName(userE.getName());
|
||||
updateCmd.setEmail(userE.getEmail());
|
||||
log.info("GBS修改用户app信息开始,用户信息:{}", JSONUtil.toJsonStr(updateCmd));
|
||||
Response response = userFacade.update(updateCmd);
|
||||
log.info("GBS修改用户app信息结束,用户id:{},结果:{}", JSONUtil.toJsonStr(response));
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deletedUserById(Long id) {
|
||||
userRepository.deleteUserById(id);
|
||||
|
|
|
|||
Loading…
Reference in New Issue