From aaed5eb300548c497d3297b8be88ec82cab7fd0d Mon Sep 17 00:00:00 2001 From: WendyYang Date: Thu, 17 Aug 2023 17:28:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=93=E5=AE=B6=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E5=A2=9E=E5=8A=A0=E6=9D=A1=E7=BA=BF=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ningda-generator/pom.xml | 2 +- pmapi/pom.xml | 11 +---------- .../expert/assembler/ExpertInfoCmdAssembler.java | 1 + .../expert/assembler/ExpertUserInfoAssembler.java | 11 ++++++----- .../pmapi/expert/entity/ExpertGovBusinessStrip.java | 10 ++++++++++ .../pmapi/expert/model/ExpertJobInfo.java | 5 +++++ .../pmapi/expert/model/cmd/ExpertInfoModifyCmd.java | 3 +++ .../expert/model/dto/ExpertFullInfoAllDTO.java | 3 +++ .../service/IExpertGovBusinessStripService.java | 8 +++++++- .../expert/service/impl/ExpertInfoServiceImpl.java | 21 +++++++++++++++++++-- .../pmapi/gov/model/vo/GovBusinessStripVO.java | 2 +- pom.xml | 8 +------- 12 files changed, 58 insertions(+), 27 deletions(-) diff --git a/ningda-generator/pom.xml b/ningda-generator/pom.xml index e2362fc..61c61c4 100644 --- a/ningda-generator/pom.xml +++ b/ningda-generator/pom.xml @@ -19,7 +19,7 @@ com.baomidou mybatis-plus-generator - 3.5.1 + 3.5.3.2 org.freemarker diff --git a/pmapi/pom.xml b/pmapi/pom.xml index 1f06fe5..7aaae44 100644 --- a/pmapi/pom.xml +++ b/pmapi/pom.xml @@ -128,11 +128,7 @@ org.springframework.boot spring-boot-starter-test - - - org.mapstruct - mapstruct - 1.5.3.Final + test @@ -141,11 +137,6 @@ 3.10.3 - org.mapstruct - mapstruct-processor - 1.5.3.Final - - org.springframework.boot spring-boot-configuration-processor diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertInfoCmdAssembler.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertInfoCmdAssembler.java index 224d990..b34e3fb 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertInfoCmdAssembler.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertInfoCmdAssembler.java @@ -254,6 +254,7 @@ public class ExpertInfoCmdAssembler { expertInfoModifyCmd.setExpertIntentionWorkRegionInfo(expertIntentionWorkRegionInfo); expertInfoModifyCmd.setExpertAvoidCompanyList(expertAvoidCompanyList); expertInfoModifyCmd.setExpertInfoSensitiveFieldCheckBO(expertInfoSensitiveFieldCheckBO); + expertInfoModifyCmd.setBusinessStrips(expertJobInfo.getBusinessStrips()); return expertInfoModifyCmd; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertUserInfoAssembler.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertUserInfoAssembler.java index 859d5bd..c6f6ccb 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertUserInfoAssembler.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertUserInfoAssembler.java @@ -1,6 +1,7 @@ package com.ningdatech.pmapi.expert.assembler; +import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONObject; @@ -9,13 +10,11 @@ import com.ningdatech.pmapi.common.enumeration.BoolDisplayEnum; import com.ningdatech.pmapi.common.helper.RegionCacheHelper; import com.ningdatech.pmapi.common.model.FileBasicInfo; import com.ningdatech.pmapi.expert.constant.ExpertApplyTypeEnum; -import com.ningdatech.pmapi.expert.entity.ExpertAvoidCompany; -import com.ningdatech.pmapi.expert.entity.ExpertIntentionWorkRegion; -import com.ningdatech.pmapi.expert.entity.ExpertMetaApply; -import com.ningdatech.pmapi.expert.entity.ExpertUserFullInfo; +import com.ningdatech.pmapi.expert.entity.*; import com.ningdatech.pmapi.expert.model.*; import com.ningdatech.pmapi.expert.model.dto.*; import com.ningdatech.pmapi.expert.model.vo.ExpertFullInfoVO; +import com.ningdatech.pmapi.gov.model.vo.GovBusinessStripVO; import com.ningdatech.pmapi.meta.constant.DictExpertInfoTypeEnum; import com.ningdatech.pmapi.meta.constant.ExpertTagEnum; import com.ningdatech.pmapi.meta.helper.DictionaryCache; @@ -256,7 +255,8 @@ public class ExpertUserInfoAssembler { List expertDictionaryList, List intentionWorkRegionList, List expertMetaApplyList, - List expertAvoidCompanyList) { + List expertAvoidCompanyList, + List businessStrips) { ExpertUserFullInfoDTO expertFullInfoDto = buildExpertUserFullInfoDTO(expertUserFullInfo); List expertDicts = buildExpertDictionaryDTOList(expertDictionaryList); List expertTags = buildExpertTagDTOList(expertTagList); @@ -273,6 +273,7 @@ public class ExpertUserInfoAssembler { expertFullInfoAll.setExpertIntentionWorkRegionInfo(intentionWorkRegions); expertFullInfoAll.setExpertApplyIntentionWorkRegionInfo(applyIntentionWorkRegions); expertFullInfoAll.setExpertAvoidCompanyList(expertAvoidCompanyDTOList); + expertFullInfoAll.setBusinessStrips(BeanUtil.copyToList(businessStrips, GovBusinessStripVO.class)); return expertFullInfoAll; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/entity/ExpertGovBusinessStrip.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/entity/ExpertGovBusinessStrip.java index 31f8cb7..ff5d292 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/entity/ExpertGovBusinessStrip.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/entity/ExpertGovBusinessStrip.java @@ -1,10 +1,13 @@ package com.ningdatech.pmapi.expert.entity; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import lombok.Data; import java.io.Serializable; +import java.time.LocalDateTime; /** *

@@ -28,4 +31,11 @@ public class ExpertGovBusinessStrip implements Serializable { private String businessStripName; private Long expertUserId; + + @TableField(fill = FieldFill.INSERT) + private LocalDateTime createOn; + + @TableField(fill = FieldFill.INSERT) + private Long createBy; + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/ExpertJobInfo.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/ExpertJobInfo.java index ae5c920..b2249e9 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/ExpertJobInfo.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/ExpertJobInfo.java @@ -1,5 +1,6 @@ package com.ningdatech.pmapi.expert.model; +import com.ningdatech.pmapi.gov.model.vo.GovBusinessStripVO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -88,4 +89,8 @@ public class ExpertJobInfo { @NotBlank @ApiModelProperty("工作经历") private String experience; + + @ApiModelProperty("专家条线") + private List businessStrips; + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/cmd/ExpertInfoModifyCmd.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/cmd/ExpertInfoModifyCmd.java index 978d955..f13c1ed 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/cmd/ExpertInfoModifyCmd.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/cmd/ExpertInfoModifyCmd.java @@ -3,6 +3,7 @@ package com.ningdatech.pmapi.expert.model.cmd; import com.ningdatech.pmapi.expert.model.bo.ExpertInfoSensitiveFieldCheckBO; import com.ningdatech.pmapi.expert.model.dto.*; +import com.ningdatech.pmapi.gov.model.vo.GovBusinessStripVO; import lombok.Data; import java.util.List; @@ -35,4 +36,6 @@ public class ExpertInfoModifyCmd { private ExpertInfoSensitiveFieldCheckBO expertInfoSensitiveFieldCheckBO; private ModifyApplyExtraInfoDTO modifyApplyExtraInfo; + + private List businessStrips; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/dto/ExpertFullInfoAllDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/dto/ExpertFullInfoAllDTO.java index c7a2d90..0613820 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/dto/ExpertFullInfoAllDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/model/dto/ExpertFullInfoAllDTO.java @@ -1,5 +1,6 @@ package com.ningdatech.pmapi.expert.model.dto; +import com.ningdatech.pmapi.gov.model.vo.GovBusinessStripVO; import lombok.Data; import java.util.List; @@ -35,5 +36,7 @@ public class ExpertFullInfoAllDTO { */ private List expertAvoidCompanyList; + private List businessStrips; + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/IExpertGovBusinessStripService.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/IExpertGovBusinessStripService.java index b6bb813..7174149 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/IExpertGovBusinessStripService.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/IExpertGovBusinessStripService.java @@ -2,8 +2,8 @@ package com.ningdatech.pmapi.expert.service; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.ningdatech.pmapi.expert.entity.ExpertGovBusinessStrip; import com.baomidou.mybatisplus.extension.service.IService; +import com.ningdatech.pmapi.expert.entity.ExpertGovBusinessStrip; import java.util.Collection; import java.util.List; @@ -25,4 +25,10 @@ public interface IExpertGovBusinessStripService extends IService query = Wrappers.lambdaQuery(ExpertGovBusinessStrip.class) + .eq(ExpertGovBusinessStrip::getExpertUserId, userId); + return remove(query); + } + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertInfoServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertInfoServiceImpl.java index 4000df0..feffb1d 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertInfoServiceImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertInfoServiceImpl.java @@ -1,5 +1,6 @@ package com.ningdatech.pmapi.expert.service.impl; +import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.PhoneUtil; import com.alibaba.fastjson.JSONObject; @@ -76,6 +77,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { private final IExpertSensitiveInfoModifyDetailRecordService iExpertSensitiveInfoModifyDetailRecordService; private final IUserInfoService userInfoService; private final YxtCallOrSmsHelper yxtCallOrSmsHelper; + private final IExpertGovBusinessStripService expertGovBusinessStripService; @Value("${login.url:}") private String loginUrl; @@ -319,8 +321,10 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { List expertAvoidCompanyList = iExpertAvoidCompanyService .list(Wrappers.lambdaQuery(ExpertAvoidCompany.class).eq(ExpertAvoidCompany::getUserId, userId)); + List businessStrips = expertGovBusinessStripService.listByUserIds(Collections.singletonList(userId)); + return ExpertUserInfoAssembler.buildExpertFullInfoAllDTO(expertUserFullInfo, expertTagList, expertDictionaryList - , expertIntentionWorkRegionList, expertMetaApplyList, expertAvoidCompanyList); + , expertIntentionWorkRegionList, expertMetaApplyList, expertAvoidCompanyList, businessStrips); } @@ -454,6 +458,8 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { List expertTagList = iExpertTagService.list(Wrappers.lambdaQuery(ExpertTag.class) .in(ExpertTag::getUserId, userIds)); Map> expertTagListMap = CollUtils.group(expertTagList, ExpertTag::getUserId); + List businessStrips = expertGovBusinessStripService.listByUserIds(userIds); + Map> stripMap = CollUtils.group(businessStrips, ExpertGovBusinessStrip::getExpertUserId); // 所有专家字典字段 List expertDictionaryList = iExpertDictionaryService.list(Wrappers.lambdaQuery(ExpertDictionary.class) .in(ExpertDictionary::getUserId, userIds)); @@ -478,7 +484,8 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { expertDictMap.getOrDefault(w.getUserId(), Collections.emptyList()), intentionRegionMap.getOrDefault(w.getUserId(), Collections.emptyList()), metaApplyMap.getOrDefault(w.getUserId(), Collections.emptyList()), - avoidInfoMap.getOrDefault(w.getUserId(), Collections.emptyList()))) + avoidInfoMap.getOrDefault(w.getUserId(), Collections.emptyList()), + stripMap.getOrDefault(w.getUserId(), Collections.emptyList()))) .collect(Collectors.toList()); } @@ -551,6 +558,16 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { // 重新保存 iExpertAvoidCompanyService.saveBatch(saveExpertAvoidCompanyList); } + // 保存专家条线 + expertGovBusinessStripService.removeByUserId(userId); + if (CollUtil.isNotEmpty(cmd.getBusinessStrips())) { + List strips = CollUtils.convert(cmd.getBusinessStrips(), w -> { + ExpertGovBusinessStrip strip = BeanUtil.copyProperties(w, ExpertGovBusinessStrip.class); + strip.setExpertUserId(userId); + return strip; + }); + expertGovBusinessStripService.saveBatch(strips); + } // 敏感字段申请 ExpertInfoSensitiveFieldCheckBO expertInfoSensitiveFieldCheckBO = cmd.getExpertInfoSensitiveFieldCheckBO(); ModifyApplyExtraInfoDTO modifyApplyExtraInfo = cmd.getModifyApplyExtraInfo(); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/gov/model/vo/GovBusinessStripVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/gov/model/vo/GovBusinessStripVO.java index 291153a..5189107 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/gov/model/vo/GovBusinessStripVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/gov/model/vo/GovBusinessStripVO.java @@ -9,7 +9,7 @@ import lombok.Data; * @since 2023-03-08 */ @Data -@ApiModel(value = "条线VO", description = "") +@ApiModel(value = "条线VO") public class GovBusinessStripVO { @ApiModelProperty("条线code") diff --git a/pom.xml b/pom.xml index 98d83fe..ef68ce9 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 1.8 3.7.0 1.2.8 - 3.5.1 + 3.5.3.2 3.0.0 3.0.3 1.2.83 @@ -51,12 +51,6 @@ fastjson ${fastjson.version} - - - nl.basjes.parse.useragent - yauaa - ${useragent.yauaa} - org.springframework.boot spring-boot-dependencies