bug
parent
323a05bcfe
commit
face3d5355
|
|
@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||
import com.jjb.saas.system.client.user.request.UserAddCmd;
|
||||
import com.zcloud.gbscommon.utils.MD5;
|
||||
import com.zcloud.gbscommon.utils.Sm2Util;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.qinan.safetyeval.client.api.AccountApi;
|
||||
import org.qinan.safetyeval.client.co.AccountCO;
|
||||
import org.qinan.safetyeval.client.dto.*;
|
||||
|
|
@ -30,6 +32,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
* @author safety-eval
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class AccountExecutor implements AccountApi {
|
||||
|
||||
@Lazy
|
||||
|
|
@ -118,10 +121,12 @@ public class AccountExecutor implements AccountApi {
|
|||
userAddCmd.setAccount(result.getAccount());
|
||||
userAddCmd.setTenantId(result.getTenantId());
|
||||
userAddCmd.setName(result.getUserName());
|
||||
if (result.getPassword() != null) {
|
||||
defPassword = result.getPassword();
|
||||
String pas = defPassword;
|
||||
if (StringUtils.isNotBlank(result.getPassword())) {
|
||||
pas = result.getPassword();
|
||||
}
|
||||
String encrypt = Sm2Util.encryptHex(MD5.md5(defPassword), publicKey);
|
||||
log.info("同步用户密码:{}", pas);
|
||||
String encrypt = Sm2Util.encryptHex(MD5.md5(pas), publicKey);
|
||||
userAddCmd.setPassword(encrypt);
|
||||
try {
|
||||
gbsUserFacadeClient.add(userAddCmd);
|
||||
|
|
@ -129,7 +134,7 @@ public class AccountExecutor implements AccountApi {
|
|||
// 回滚数据, 清除account表示数据,orgInfo数据
|
||||
orgInfoMapper.delete(new LambdaQueryWrapper<OrgInfoDO>()
|
||||
.eq(OrgInfoDO::getCreateId, result.getId()));
|
||||
accountDomainService.delete(result.getId());
|
||||
|
||||
throw new BizException(ErrorCode.GBS_USER_SYNC_ERROR);
|
||||
}
|
||||
return SingleResponse.success(toCO(result));
|
||||
|
|
|
|||
Loading…
Reference in New Issue