Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # safety-eval-app/src/main/java/org/qinan/safetyeval/app/executor/AccountExecutor.javadev
commit
00b3d4cf5f
|
|
@ -4,7 +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 groovy.util.logging.Slf4j;
|
||||
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.*;
|
||||
|
|
@ -31,6 +32,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
* @author safety-eval
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class AccountExecutor implements AccountApi {
|
||||
|
||||
@Lazy
|
||||
|
|
@ -119,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);
|
||||
|
|
@ -130,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));
|
||||
|
|
@ -144,6 +148,7 @@ public class AccountExecutor implements AccountApi {
|
|||
|
||||
@Override
|
||||
public SingleResponse<Integer> checkTerminalType() {
|
||||
log.info("同步用户信息:{}", AuthUserContextAdapter.getCurrentUser());
|
||||
System.err.println(AuthUserContextAdapter.getCurrentUser());
|
||||
AccountEntity accountEntity = accountDomainService.get(AuthUserContextAdapter.getCurrentUserId());
|
||||
if (accountEntity == null || accountEntity.getType() == null) {
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
|||
domainQuery.setPageNum(query.getCurrent());
|
||||
domainQuery.setPageSize(query.getSize());
|
||||
domainQuery.setTenantId(AuthUserContextAdapter.getCurrentTenantId());
|
||||
domainQuery.setFilingNo(query.getFilingNo());
|
||||
domainQuery.setId(query.getId());
|
||||
domainQuery.setFilingUnitName(query.getFilingUnitName());
|
||||
domainQuery.setFilingTerritoryCode(query.getFilingTerritoryCode());
|
||||
domainQuery.setFilingStatusCode(query.getFilingStatusCode());
|
||||
|
|
@ -183,7 +183,7 @@ public class QualFilingChangeExecutor implements QualFilingChangeApi {
|
|||
domainQuery.setPageNum(query.getCurrent());
|
||||
domainQuery.setPageSize(query.getSize());
|
||||
domainQuery.setOrgId(ThreadLocalUserInfoAdapter.getOrgId());
|
||||
domainQuery.setFilingNo(query.getFilingNo());
|
||||
domainQuery.setId(query.getId());
|
||||
domainQuery.setFilingUnitName(query.getFilingUnitName());
|
||||
domainQuery.setFilingTerritoryCode(query.getFilingTerritoryCode());
|
||||
domainQuery.setFilingStatusCode(query.getFilingStatusCode());
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ public class QualFilingChangePageQuery extends BasePageQuery {
|
|||
private Long orgId;
|
||||
|
||||
@ApiModelProperty(value = "备案编号")
|
||||
private String filingNo;
|
||||
// private String filingNo;
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "备案单位")
|
||||
private String filingUnitName;
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ public class QualFilingChangeQuery {
|
|||
/** 备案编号 */
|
||||
private String filingNo;
|
||||
|
||||
private Long id;
|
||||
|
||||
/** 备案单位 */
|
||||
private String filingUnitName;
|
||||
|
||||
|
|
|
|||
|
|
@ -122,6 +122,9 @@ public class QualFilingChangeGatewayImpl implements QualFilingChangeGateway {
|
|||
if (StringUtils.hasText(query.getFilingNo())) {
|
||||
wrapper.like(QualFilingChangeDO::getFilingNo, query.getFilingNo());
|
||||
}
|
||||
if (query.getId() != null) {
|
||||
wrapper.eq(QualFilingChangeDO::getId, query.getId());
|
||||
}
|
||||
if (StringUtils.hasText(query.getFilingUnitName())) {
|
||||
wrapper.like(QualFilingChangeDO::getFilingUnitName, query.getFilingUnitName());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,6 +100,9 @@
|
|||
<if test="query.filingNo != null and query.filingNo != ''">
|
||||
AND qfc.filing_no LIKE CONCAT('%', #{query.filingNo}, '%')
|
||||
</if>
|
||||
<if test="query.id != null ">
|
||||
AND qfc.id = #{query.id}
|
||||
</if>
|
||||
<if test="query.filingUnitName != null and query.filingUnitName != ''">
|
||||
AND qfc.filing_unit_name LIKE CONCAT('%', #{query.filingUnitName}, '%')
|
||||
</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue