Browse Source

申请撤销

master
liuxinxin 1 year ago
parent
commit
f285d86fff
2 changed files with 17 additions and 2 deletions
  1. +0
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/expert/controller/ExpertMetaApplyController.java
  2. +17
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertMetaApplyManage.java

+ 0
- 1
pmapi/src/main/java/com/ningdatech/pmapi/expert/controller/ExpertMetaApplyController.java View File

@@ -58,5 +58,4 @@ public class ExpertMetaApplyController {
} }





} }

+ 17
- 1
pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertMetaApplyManage.java View File

@@ -241,9 +241,25 @@ public class ExpertMetaApplyManage {




public void metaApplyRevoke(Long applyId) { public void metaApplyRevoke(Long applyId) {

Long userId = LoginUserUtil.getUserId();
ExpertMetaApply expertMetaApply = iMetaApplyService.getById(applyId);
if (Objects.isNull(expertMetaApply)) {
throw new BizException("apply not exist");
}
if (!expertMetaApply.getUserId().equals(userId)) {
throw new BizException("has not right to operate");
}
String applyStatus = expertMetaApply.getApplyStatus();
ExpertApplyStatusEnum expertApplyStatusEnum = ExpertApplyStatusEnum.of(applyStatus);
if (!ExpertApplyStatusEnum.PENDING_REVIEW.equals(expertApplyStatusEnum)) {
throw new BizException("apply is already deal");
}
expertMetaApply.setApplyStatus(ExpertApplyStatusEnum.REVOKED.getKey());
expertMetaApply.setUpdateOn(LocalDateTime.now());
iMetaApplyService.updateById(expertMetaApply);
} }



private void buildIntentionApplyDisplayVO(MetaApplyResultVo metaApplyResultVo, ExpertMetaApply metaApply, ExpertApplyTypeEnum applyTypeEnum) { private void buildIntentionApplyDisplayVO(MetaApplyResultVo metaApplyResultVo, ExpertMetaApply metaApply, ExpertApplyTypeEnum applyTypeEnum) {
String regionCode = metaApply.getRegionCode(); String regionCode = metaApply.getRegionCode();
Integer regionLevel = metaApply.getRegionLevel(); Integer regionLevel = metaApply.getRegionLevel();


Loading…
Cancel
Save