Browse Source

fix

master
niohe·erbao 1 year ago
parent
commit
d61d531352
3 changed files with 39 additions and 15 deletions
  1. +19
    -15
      pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertUserInfoAssembler.java
  2. +1
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/RegionWrapperAssembler.java
  3. +19
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/validate/DingQrLoginException.java

+ 19
- 15
pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertUserInfoAssembler.java View File

@@ -290,22 +290,26 @@ public class ExpertUserInfoAssembler {
}

for (ExpertMetaApply expertMetaApply : expertMetaApplyList) {
String applyType = expertMetaApply.getApplyType();
RegionDtoMapKey regionDtoMapKey = new RegionDtoMapKey();
regionDtoMapKey.setRegionCode(expertMetaApply.getRegionCode());
regionDtoMapKey.setRegionLevel(expertMetaApply.getRegionLevel());
ExpertApplyTypeEnum typeEnum = ExpertApplyTypeEnum.of(applyType);
switch (typeEnum) {
case EXPERT_INTENTION_LEAVE: {
set.remove(regionDtoMapKey);
}
break;
case EXPERT_INTENTION_JOIN: {
set.add(regionDtoMapKey);
}
break;
default:
String regionCode = expertMetaApply.getRegionCode();
Integer regionLevel = expertMetaApply.getRegionLevel();
if (Objects.nonNull(regionLevel) && StringUtils.isNotBlank(regionCode)) {
String applyType = expertMetaApply.getApplyType();
RegionDtoMapKey regionDtoMapKey = new RegionDtoMapKey();
regionDtoMapKey.setRegionCode(regionCode);
regionDtoMapKey.setRegionLevel(regionLevel);
ExpertApplyTypeEnum typeEnum = ExpertApplyTypeEnum.of(applyType);
switch (typeEnum) {
case EXPERT_INTENTION_LEAVE: {
set.remove(regionDtoMapKey);
}
break;
case EXPERT_INTENTION_JOIN: {
set.add(regionDtoMapKey);
}
break;
default:
break;
}
}
}
return set.stream().map(r -> {


+ 1
- 0
pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/RegionWrapperAssembler.java View File

@@ -35,5 +35,6 @@ public class RegionWrapperAssembler {
.ge(ExpertMetaApply::getRegionLevel, parentRegionTreeLevel));
}
}
wrapperQuery.orderByDesc(ExpertMetaApply::getUpdateOn);
}
}

+ 19
- 0
pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/validate/DingQrLoginException.java View File

@@ -0,0 +1,19 @@
package com.ningdatech.pmapi.user.security.auth.validate;

/**
* @author liuxinxin
* @date 2023/3/24 上午11:47
*/

public class DingQrLoginException extends RuntimeException {

private Integer code;

private String message;

public DingQrLoginException(int code, String message) {
this.code = code;
this.message = message;
}

}

Loading…
Cancel
Save