From f84ca1d210822f7f362d83db77f819b6ab46794a Mon Sep 17 00:00:00 2001 From: liuxinxin Date: Wed, 22 Feb 2023 16:17:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E7=AE=A1=E7=90=86/=E5=AD=97?= =?UTF-8?q?=E5=85=B8=E7=AE=A1=E7=90=86/=E6=A0=87=E7=AD=BEcache/=E5=AD=97?= =?UTF-8?q?=E5=85=B8cache?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/common/constant/BoolDisplayEnum.java | 32 +++ .../com/ningdatech/pmapi/common/util/BizUtils.java | 6 + .../controller/ExpertDictionaryController.java | 20 -- .../controller/MetaDictionaryController.java | 20 -- .../pmapi/dictionary/entity/ExpertDictionary.java | 39 --- .../pmapi/dictionary/entity/MetaDictionary.java | 50 ---- .../dictionary/mapper/ExpertDictionaryMapper.java | 16 -- .../dictionary/mapper/ExpertDictionaryMapper.xml | 5 - .../dictionary/mapper/MetaDictionaryMapper.java | 16 -- .../dictionary/mapper/MetaDictionaryMapper.xml | 5 - .../service/IExpertDictionaryService.java | 16 -- .../dictionary/service/IMetaDictionaryService.java | 16 -- .../service/impl/ExpertDictionaryServiceImpl.java | 20 -- .../service/impl/MetaDictionaryServiceImpl.java | 20 -- .../pmapi/expert/entity/ExpertUserFullInfo.java | 2 +- .../meta/assembler/MetaDictionaryAssembler.java | 36 +++ .../pmapi/meta/assembler/MetaTagAssembler.java | 62 +++++ .../pmapi/meta/constant/DictAllTypeEnum.java | 53 ++++ .../meta/constant/DictExpertInfoTypeEnum.java | 70 +++++ .../pmapi/meta/constant/ExpertTagEnum.java | 51 ++++ .../ningdatech/pmapi/meta/constant/TagConst.java | 21 ++ .../controller/ExpertDictionaryController.java | 20 ++ .../pmapi/meta/controller/ExpertTagController.java | 20 ++ .../meta/controller/MetaDictionaryController.java | 20 ++ .../pmapi/meta/controller/MetaTagController.java | 20 ++ .../meta/controller/MetaTagManageController.java | 79 ++++++ .../pmapi/meta/helper/DictionaryCache.java | 49 ++++ .../com/ningdatech/pmapi/meta/helper/TagCache.java | 55 ++++ .../meta/helper/basic/AbstractDictionaryCache.java | 54 ++++ .../pmapi/meta/helper/basic/AbstractTagsCache.java | 97 +++++++ .../meta/helper/impl/DictionaryCacheImpl.java | 40 +++ .../pmapi/meta/helper/impl/TagsCacheImpl.java | 105 ++++++++ .../ningdatech/pmapi/meta/manage/MetaManage.java | 289 +++++++++++++++++++++ .../pmapi/meta/mapper/ExpertDictionaryMapper.java | 16 ++ .../pmapi/meta/mapper/ExpertDictionaryMapper.xml | 5 + .../pmapi/meta/mapper/ExpertTagMapper.java | 16 ++ .../pmapi/meta/mapper/ExpertTagMapper.xml | 5 + .../pmapi/meta/mapper/MetaDictionaryMapper.java | 16 ++ .../pmapi/meta/mapper/MetaDictionaryMapper.xml | 5 + .../pmapi/meta/mapper/MetaTagMapper.java | 16 ++ .../ningdatech/pmapi/meta/mapper/MetaTagMapper.xml | 5 + .../pmapi/meta/model/ExpertRegionInfo.java | 36 +++ .../pmapi/meta/model/bo/RegionContainsBO.java | 24 ++ .../pmapi/meta/model/dto/DictionaryDTO.java | 40 +++ .../ningdatech/pmapi/meta/model/dto/TagDTO.java | 37 +++ .../pmapi/meta/model/dto/TagTreeDTO.java | 42 +++ .../pmapi/meta/model/entity/ExpertDictionary.java | 38 +++ .../pmapi/meta/model/entity/ExpertTag.java | 38 +++ .../pmapi/meta/model/entity/MetaDictionary.java | 50 ++++ .../pmapi/meta/model/entity/MetaTag.java | 43 +++ .../pmapi/meta/model/po/AddDictionaryRequest.java | 37 +++ .../pmapi/meta/model/po/AddTagTypeRequest.java | 20 ++ .../pmapi/meta/model/po/DictionaryListRequest.java | 19 ++ .../pmapi/meta/model/po/ReqTagListPO.java | 14 + .../pmapi/meta/model/po/TagListRequest.java | 14 + .../pmapi/meta/model/po/TagQueryRequest.java | 24 ++ .../pmapi/meta/model/vo/DictionaryListVO.java | 25 ++ .../pmapi/meta/model/vo/DictionaryVO.java | 49 ++++ .../ningdatech/pmapi/meta/model/vo/TagListVO.java | 41 +++ .../ningdatech/pmapi/meta/model/vo/TagTreeVO.java | 58 +++++ .../ningdatech/pmapi/meta/model/vo/TagTypeVO.java | 23 ++ .../meta/service/IExpertDictionaryService.java | 16 ++ .../pmapi/meta/service/IExpertTagService.java | 16 ++ .../pmapi/meta/service/IMetaDictionaryService.java | 22 ++ .../pmapi/meta/service/IMetaTagService.java | 21 ++ .../service/impl/ExpertDictionaryServiceImpl.java | 20 ++ .../meta/service/impl/ExpertTagServiceImpl.java | 20 ++ .../service/impl/MetaDictionaryServiceImpl.java | 32 +++ .../meta/service/impl/MetaTagServiceImpl.java | 33 +++ .../meta/validate/TagListRequestValidator.java | 31 +++ .../pmapi/tag/controller/ExpertTagController.java | 20 -- .../pmapi/tag/controller/MetaTagController.java | 20 -- .../com/ningdatech/pmapi/tag/entity/ExpertTag.java | 39 --- .../com/ningdatech/pmapi/tag/entity/MetaTag.java | 44 ---- .../pmapi/tag/mapper/ExpertTagMapper.java | 16 -- .../pmapi/tag/mapper/ExpertTagMapper.xml | 5 - .../ningdatech/pmapi/tag/mapper/MetaTagMapper.java | 16 -- .../ningdatech/pmapi/tag/mapper/MetaTagMapper.xml | 5 - .../pmapi/tag/service/IExpertTagService.java | 16 -- .../pmapi/tag/service/IMetaTagService.java | 16 -- .../tag/service/impl/ExpertTagServiceImpl.java | 20 -- .../pmapi/tag/service/impl/MetaTagServiceImpl.java | 20 -- 82 files changed, 2147 insertions(+), 481 deletions(-) create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/common/constant/BoolDisplayEnum.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/dictionary/controller/ExpertDictionaryController.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/dictionary/controller/MetaDictionaryController.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/dictionary/entity/ExpertDictionary.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/dictionary/entity/MetaDictionary.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/dictionary/mapper/ExpertDictionaryMapper.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/dictionary/mapper/ExpertDictionaryMapper.xml delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/dictionary/mapper/MetaDictionaryMapper.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/dictionary/mapper/MetaDictionaryMapper.xml delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/dictionary/service/IExpertDictionaryService.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/dictionary/service/IMetaDictionaryService.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/dictionary/service/impl/ExpertDictionaryServiceImpl.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/dictionary/service/impl/MetaDictionaryServiceImpl.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/assembler/MetaDictionaryAssembler.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/assembler/MetaTagAssembler.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/constant/DictAllTypeEnum.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/constant/DictExpertInfoTypeEnum.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/constant/ExpertTagEnum.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/constant/TagConst.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/controller/ExpertDictionaryController.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/controller/ExpertTagController.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/controller/MetaDictionaryController.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/controller/MetaTagController.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/controller/MetaTagManageController.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/DictionaryCache.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/TagCache.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/basic/AbstractDictionaryCache.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/basic/AbstractTagsCache.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/impl/DictionaryCacheImpl.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/impl/TagsCacheImpl.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/manage/MetaManage.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/ExpertDictionaryMapper.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/ExpertDictionaryMapper.xml create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/ExpertTagMapper.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/ExpertTagMapper.xml create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/MetaDictionaryMapper.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/MetaDictionaryMapper.xml create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/MetaTagMapper.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/MetaTagMapper.xml create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/model/ExpertRegionInfo.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/model/bo/RegionContainsBO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/model/dto/DictionaryDTO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/model/dto/TagDTO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/model/dto/TagTreeDTO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/model/entity/ExpertDictionary.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/model/entity/ExpertTag.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/model/entity/MetaDictionary.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/model/entity/MetaTag.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/AddDictionaryRequest.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/AddTagTypeRequest.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/DictionaryListRequest.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/ReqTagListPO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/TagListRequest.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/TagQueryRequest.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/model/vo/DictionaryListVO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/model/vo/DictionaryVO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/model/vo/TagListVO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/model/vo/TagTreeVO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/model/vo/TagTypeVO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/service/IExpertDictionaryService.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/service/IExpertTagService.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/service/IMetaDictionaryService.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/service/IMetaTagService.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/service/impl/ExpertDictionaryServiceImpl.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/service/impl/ExpertTagServiceImpl.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/service/impl/MetaDictionaryServiceImpl.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/service/impl/MetaTagServiceImpl.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meta/validate/TagListRequestValidator.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/tag/controller/ExpertTagController.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/tag/controller/MetaTagController.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/tag/entity/ExpertTag.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/tag/entity/MetaTag.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/tag/mapper/ExpertTagMapper.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/tag/mapper/ExpertTagMapper.xml delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/tag/mapper/MetaTagMapper.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/tag/mapper/MetaTagMapper.xml delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/tag/service/IExpertTagService.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/tag/service/IMetaTagService.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/tag/service/impl/ExpertTagServiceImpl.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/tag/service/impl/MetaTagServiceImpl.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/constant/BoolDisplayEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/constant/BoolDisplayEnum.java new file mode 100644 index 0000000..d4ab72f --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/constant/BoolDisplayEnum.java @@ -0,0 +1,32 @@ +package com.ningdatech.pmapi.common.constant; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * @author liuxinxin + * @date 2022/7/26 上午9:21 + */ +@AllArgsConstructor +@Getter +public enum BoolDisplayEnum { + + /** + * true + */ + Y, + + /** + * false + */ + N; + + public static boolean judgeBoolean(String key) { + return Y.name().equals(key); + } + + public static BoolDisplayEnum judgeBoolean(boolean key) { + return key ? Y : N; + } + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/util/BizUtils.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/util/BizUtils.java index 7343207..66d8e18 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/util/BizUtils.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/util/BizUtils.java @@ -8,6 +8,7 @@ import org.springframework.util.NumberUtils; import java.util.Arrays; import java.util.Collections; import java.util.List; +import java.util.UUID; import java.util.function.Consumer; import java.util.stream.Collectors; @@ -63,4 +64,9 @@ public class BizUtils { } return result; } + + public static String uuid32() { + return UUID.randomUUID().toString().replace("-", ""); + } + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/controller/ExpertDictionaryController.java b/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/controller/ExpertDictionaryController.java deleted file mode 100644 index 80d63a7..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/controller/ExpertDictionaryController.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ningdatech.pmapi.dictionary.controller; - - -import org.springframework.web.bind.annotation.RequestMapping; - -import org.springframework.stereotype.Controller; - -/** - *

- * 前端控制器 - *

- * - * @author Liuxinxin - * @since 2023-02-22 - */ -@Controller -@RequestMapping("/pmapi.dictionary/expert-dictionary") -public class ExpertDictionaryController { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/controller/MetaDictionaryController.java b/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/controller/MetaDictionaryController.java deleted file mode 100644 index 6bb2a01..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/controller/MetaDictionaryController.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ningdatech.pmapi.dictionary.controller; - - -import org.springframework.web.bind.annotation.RequestMapping; - -import org.springframework.stereotype.Controller; - -/** - *

- * 前端控制器 - *

- * - * @author Liuxinxin - * @since 2023-02-22 - */ -@Controller -@RequestMapping("/pmapi.dictionary/meta-dictionary") -public class MetaDictionaryController { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/entity/ExpertDictionary.java b/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/entity/ExpertDictionary.java deleted file mode 100644 index e5f5181..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/entity/ExpertDictionary.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.ningdatech.pmapi.dictionary.entity; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import java.io.Serializable; -import java.time.LocalDateTime; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - *

- * - *

- * - * @author Liuxinxin - * @since 2023-02-22 - */ -@Data -@TableName("expert_dictionary") -@ApiModel(value = "ExpertDictionary对象", description = "") -public class ExpertDictionary implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(type = IdType.AUTO) - private Long id; - - private LocalDateTime createOn; - - private LocalDateTime updateOn; - - private String dictionaryCode; - - private String expertInfoField; - - private Long userId; -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/entity/MetaDictionary.java b/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/entity/MetaDictionary.java deleted file mode 100644 index 7bf2183..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/entity/MetaDictionary.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.ningdatech.pmapi.dictionary.entity; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import io.swagger.annotations.ApiModel; -import lombok.Data; - -import java.io.Serializable; -import java.time.LocalDateTime; - -/** - *

- * - *

- * - * @author Liuxinxin - * @since 2023-02-22 - */ -@Data -@TableName("meta_dictionary") -@ApiModel(value = "MetaDictionary对象", description = "") -public class MetaDictionary implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(type = IdType.AUTO) - private Long id; - - private LocalDateTime createOn; - - private LocalDateTime updateOn; - - private String dictionaryType; - - private String dictionaryCode; - - private String dictionaryName; - - private String dictionaryDescribe; - - private Integer sortValue; - - private Long createBy; - - private String readonly; - - private Long updateBy; - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/mapper/ExpertDictionaryMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/mapper/ExpertDictionaryMapper.java deleted file mode 100644 index 8066d56..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/mapper/ExpertDictionaryMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ningdatech.pmapi.dictionary.mapper; - -import com.ningdatech.pmapi.dictionary.entity.ExpertDictionary; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - *

- * Mapper 接口 - *

- * - * @author Liuxinxin - * @since 2023-02-22 - */ -public interface ExpertDictionaryMapper extends BaseMapper { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/mapper/ExpertDictionaryMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/mapper/ExpertDictionaryMapper.xml deleted file mode 100644 index 2b2971c..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/mapper/ExpertDictionaryMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/mapper/MetaDictionaryMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/mapper/MetaDictionaryMapper.java deleted file mode 100644 index b02222c..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/mapper/MetaDictionaryMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ningdatech.pmapi.dictionary.mapper; - -import com.ningdatech.pmapi.dictionary.entity.MetaDictionary; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - *

- * Mapper 接口 - *

- * - * @author Liuxinxin - * @since 2023-02-22 - */ -public interface MetaDictionaryMapper extends BaseMapper { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/mapper/MetaDictionaryMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/mapper/MetaDictionaryMapper.xml deleted file mode 100644 index 6541927..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/mapper/MetaDictionaryMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/service/IExpertDictionaryService.java b/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/service/IExpertDictionaryService.java deleted file mode 100644 index a10655b..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/service/IExpertDictionaryService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ningdatech.pmapi.dictionary.service; - -import com.ningdatech.pmapi.dictionary.entity.ExpertDictionary; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - *

- * 服务类 - *

- * - * @author Liuxinxin - * @since 2023-02-22 - */ -public interface IExpertDictionaryService extends IService { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/service/IMetaDictionaryService.java b/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/service/IMetaDictionaryService.java deleted file mode 100644 index 47a1ab6..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/service/IMetaDictionaryService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ningdatech.pmapi.dictionary.service; - -import com.ningdatech.pmapi.dictionary.entity.MetaDictionary; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - *

- * 服务类 - *

- * - * @author Liuxinxin - * @since 2023-02-22 - */ -public interface IMetaDictionaryService extends IService { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/service/impl/ExpertDictionaryServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/service/impl/ExpertDictionaryServiceImpl.java deleted file mode 100644 index f9025cc..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/service/impl/ExpertDictionaryServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ningdatech.pmapi.dictionary.service.impl; - -import com.ningdatech.pmapi.dictionary.entity.ExpertDictionary; -import com.ningdatech.pmapi.dictionary.mapper.ExpertDictionaryMapper; -import com.ningdatech.pmapi.dictionary.service.IExpertDictionaryService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -/** - *

- * 服务实现类 - *

- * - * @author Liuxinxin - * @since 2023-02-22 - */ -@Service -public class ExpertDictionaryServiceImpl extends ServiceImpl implements IExpertDictionaryService { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/service/impl/MetaDictionaryServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/service/impl/MetaDictionaryServiceImpl.java deleted file mode 100644 index 882c55a..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/dictionary/service/impl/MetaDictionaryServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ningdatech.pmapi.dictionary.service.impl; - -import com.ningdatech.pmapi.dictionary.entity.MetaDictionary; -import com.ningdatech.pmapi.dictionary.mapper.MetaDictionaryMapper; -import com.ningdatech.pmapi.dictionary.service.IMetaDictionaryService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -/** - *

- * 服务实现类 - *

- * - * @author Liuxinxin - * @since 2023-02-22 - */ -@Service -public class MetaDictionaryServiceImpl extends ServiceImpl implements IMetaDictionaryService { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/entity/ExpertUserFullInfo.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/entity/ExpertUserFullInfo.java index a6af778..26842c2 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/entity/ExpertUserFullInfo.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/entity/ExpertUserFullInfo.java @@ -93,7 +93,7 @@ public class ExpertUserFullInfo implements Serializable { private String regionCode; - private String regionLevel; + private Integer regionLevel; private String recommendedWay; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/assembler/MetaDictionaryAssembler.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/assembler/MetaDictionaryAssembler.java new file mode 100644 index 0000000..e1f1521 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/assembler/MetaDictionaryAssembler.java @@ -0,0 +1,36 @@ +package com.ningdatech.pmapi.meta.assembler; + + +import com.ningdatech.pmapi.meta.model.entity.MetaDictionary; +import com.ningdatech.pmapi.meta.model.dto.DictionaryDTO; +import com.ningdatech.pmapi.meta.model.vo.DictionaryVO; + +/** + * @author liuxinxin + * @date 2022/7/22 上午10:53 + */ + +public class MetaDictionaryAssembler { + + public static DictionaryDTO toDictionaryDTO(MetaDictionary dictionaryManage) { + DictionaryDTO dictionaryDTO = new DictionaryDTO(); + dictionaryDTO.setDescribe(dictionaryManage.getDictionaryDescribe()); + dictionaryDTO.setDictionaryCode(dictionaryManage.getDictionaryCode()); + dictionaryDTO.setDictionaryType(dictionaryManage.getDictionaryType()); + dictionaryDTO.setName(dictionaryManage.getDictionaryName()); + dictionaryDTO.setReadonly(dictionaryManage.getReadonly()); + dictionaryDTO.setSortValue(dictionaryManage.getSortValue()); + return dictionaryDTO; + } + + public static DictionaryVO toDictionaryVO(DictionaryDTO dictionaryDTO) { + DictionaryVO dictionaryVO = new DictionaryVO(); + dictionaryVO.setDescribe(dictionaryDTO.getDescribe()); + dictionaryVO.setDictionaryCode(dictionaryDTO.getDictionaryCode()); + dictionaryVO.setDictionaryType(dictionaryDTO.getDictionaryType()); + dictionaryVO.setName(dictionaryDTO.getName()); + dictionaryVO.setReadonly(dictionaryDTO.getReadonly()); + dictionaryVO.setSortValue(dictionaryDTO.getSortValue()); + return dictionaryVO; + } +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/assembler/MetaTagAssembler.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/assembler/MetaTagAssembler.java new file mode 100644 index 0000000..2491eb4 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/assembler/MetaTagAssembler.java @@ -0,0 +1,62 @@ +package com.ningdatech.pmapi.meta.assembler; + +import com.ningdatech.pmapi.meta.model.entity.MetaTag; +import com.ningdatech.pmapi.meta.model.dto.TagDTO; +import com.ningdatech.pmapi.meta.model.dto.TagTreeDTO; +import com.ningdatech.pmapi.meta.model.vo.TagTreeVO; +import org.apache.commons.collections4.CollectionUtils; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +/** + * @author liuxinxin + * @date 2022/7/22 上午9:57 + */ + +public class MetaTagAssembler { + + public static TagDTO toTagDTO(MetaTag metaTagManage) { + TagDTO tagDTO = new TagDTO(); + tagDTO.setParentCode(metaTagManage.getParentCode()); + tagDTO.setTagCode(metaTagManage.getTagCode()); + tagDTO.setTagLevel(metaTagManage.getTagLevel()); + tagDTO.setTagName(metaTagManage.getTagName()); + return tagDTO; + } + + public static List toTagTreeDTOList(List tagDTOList) { + if (CollectionUtils.isEmpty(tagDTOList)) { + return new ArrayList<>(); + } + return tagDTOList.stream().map(MetaTagAssembler::toTagTreeDTO).collect(Collectors.toList()); + + } + + public static TagTreeDTO toTagTreeDTO(TagDTO tagDTO) { + TagTreeDTO tagTreeDTO = new TagTreeDTO(); + tagTreeDTO.setParentCode(tagDTO.getParentCode()); + tagTreeDTO.setTagCode(tagDTO.getTagCode()); + tagTreeDTO.setTagLevel(tagDTO.getTagLevel()); + tagTreeDTO.setTagName(tagDTO.getTagName()); + return tagTreeDTO; + } + + public static List toTagTreeVOList(List tagTreeDTOList) { + List tagTreeVOList = new ArrayList<>(); + for (TagTreeDTO tagTreeDTO : tagTreeDTOList) { + TagTreeVO tagTreeVO = new TagTreeVO(); + tagTreeVO.setTagLevel(tagTreeDTO.getTagLevel()); + tagTreeVO.setTagName(tagTreeDTO.getTagName()); + tagTreeVO.setParentCode(tagTreeDTO.getParentCode()); + tagTreeVO.setTagCode(tagTreeDTO.getTagCode()); + tagTreeVO.setUnionCode(tagTreeDTO.getTagName() + "##" + tagTreeDTO.getTagCode()); + if (CollectionUtils.isNotEmpty(tagTreeDTO.getChildren())) { + tagTreeVO.setChildren(toTagTreeVOList(tagTreeDTO.getChildren())); + } + tagTreeVOList.add(tagTreeVO); + } + return tagTreeVOList; + } +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/constant/DictAllTypeEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/constant/DictAllTypeEnum.java new file mode 100644 index 0000000..25d6310 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/constant/DictAllTypeEnum.java @@ -0,0 +1,53 @@ +package com.ningdatech.pmapi.meta.constant; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import org.apache.commons.lang3.StringUtils; + +/** + * @author liuxinxin + * @date 2022/7/21 下午6:08 + */ +@AllArgsConstructor +@Getter +public enum DictAllTypeEnum { + + // 政治面貌 + POLITICAL("political"), + // 专家来源 + EXPERT_SOURCE("expert_source"), + // 学历 + EDU("edu"), + // 学位 + DEGREE("degree"), + // 在职状态 + JOB_STATUS("job_status"), + // 行政职级 + ADMINISTRATIVE_RANK("administrative_rank"), + // 内外围(专家类型) + EXPERT_TYPE("expert_type"), + // 单位类型 + COMPANY_ATTRIBUTE("company_attribute"), + // 职称级别 + TITLE_LEVEL("title_level"), + // 通知类型 + NOTICE_TYPE("notice_type"), + // 会议类型 + MEETING_TYPE("meeting_type"); + + private final String key; + + + public static boolean contains(String key) { + if (StringUtils.isBlank(key)) { + return false; + } + for (DictAllTypeEnum typeEnum : DictAllTypeEnum.values()) { + if (typeEnum.key.equals(key)) { + return true; + } + } + return false; + } + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/constant/DictExpertInfoTypeEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/constant/DictExpertInfoTypeEnum.java new file mode 100644 index 0000000..d8b1962 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/constant/DictExpertInfoTypeEnum.java @@ -0,0 +1,70 @@ +package com.ningdatech.pmapi.meta.constant; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import org.apache.commons.lang3.StringUtils; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author liuxinxin + * @date 2022/7/21 下午6:08 + */ +@AllArgsConstructor +@Getter +public enum DictExpertInfoTypeEnum { + + // 政治面貌 + POLITICAL("political"), + // 学历 + EDU("edu"), + // 学位 + DEGREE("degree"), + // 在职状态 + JOB_STATUS("job_status"), + // 行政职级 + ADMINISTRATIVE_RANK("administrative_rank"), + // 内外围(专家类型) + EXPERT_TYPE("expert_type"), + // 单位类型 + COMPANY_ATTRIBUTE("company_attribute"), + // 职称级别 + TITLE_LEVEL("title_level"), + // 推荐方式 + RECOMMENDED_WAY("recommended_way"); + + + private final String key; + + public static List getAll() { + List dictionaryList = new ArrayList<>(); + DictExpertInfoTypeEnum[] values = DictExpertInfoTypeEnum.values(); + for (DictExpertInfoTypeEnum typeEnum : values) { + dictionaryList.add(typeEnum.key); + } + return dictionaryList; + } + + public static boolean contains(String key) { + if (StringUtils.isBlank(key)) { + return false; + } + for (DictExpertInfoTypeEnum typeEnum : DictExpertInfoTypeEnum.values()) { + if (typeEnum.key.equals(key)) { + return true; + } + } + return false; + } + + public static DictExpertInfoTypeEnum of(String key) { + for (DictExpertInfoTypeEnum statusEnum : DictExpertInfoTypeEnum.values()) { + if (statusEnum.key.equals(key)) { + return statusEnum; + } + } + throw new IllegalArgumentException(String.format("Illegal DictionaryExpertInfoTypeEnum = %s", key)); + } + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/constant/ExpertTagEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/constant/ExpertTagEnum.java new file mode 100644 index 0000000..79ca540 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/constant/ExpertTagEnum.java @@ -0,0 +1,51 @@ +package com.ningdatech.pmapi.meta.constant; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import org.apache.commons.lang3.StringUtils; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author liuxinxin + * @date 2022/7/22 上午11:13 + */ +@AllArgsConstructor +@Getter +public enum ExpertTagEnum { + + // 专家来源 + EXPERT_SOURCE("expert_source"), + // 擅长方向 + GOOD_AT("good_at"), + // 技术专长 + TECHNICAL_EXPERTISE("technical_expertise"), + // 行业领域 + INDUSTRY_SECTOR("industry_sector"), + // 其他 + OTHER("other"); + + private final String key; + + public static List getAll() { + List tagList = new ArrayList<>(); + ExpertTagEnum[] values = ExpertTagEnum.values(); + for (ExpertTagEnum fieldEnum : values) { + tagList.add(fieldEnum.key); + } + return tagList; + } + + public static boolean contains(String key) { + if (StringUtils.isBlank(key)) { + return false; + } + for (ExpertTagEnum fieldEnum : ExpertTagEnum.values()) { + if (fieldEnum.key.equals(key)) { + return true; + } + } + return false; + } +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/constant/TagConst.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/constant/TagConst.java new file mode 100644 index 0000000..fd0cc27 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/constant/TagConst.java @@ -0,0 +1,21 @@ +package com.ningdatech.pmapi.meta.constant; + +/** + * @author liuxinxin + * @date 2022/8/27 下午1:49 + */ + +public class TagConst { + + private TagConst() { + } + + /** + * 标签类型顶级时 parent_code 为 -1 + */ + public static final String TAG_ROOT_PARENT_CODE = "-1"; + + public static final Long TAG_ROOT_LEVEL = 1L; + + public static final String TAG_CREATOR = "管理员"; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/controller/ExpertDictionaryController.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/controller/ExpertDictionaryController.java new file mode 100644 index 0000000..cff8529 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/controller/ExpertDictionaryController.java @@ -0,0 +1,20 @@ +package com.ningdatech.pmapi.meta.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.stereotype.Controller; + +/** + *

+ * 前端控制器 + *

+ * + * @author Liuxinxin + * @since 2023-02-22 + */ +@Controller +@RequestMapping("/pmapi.dictionary/expert-dictionary") +public class ExpertDictionaryController { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/controller/ExpertTagController.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/controller/ExpertTagController.java new file mode 100644 index 0000000..67e9574 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/controller/ExpertTagController.java @@ -0,0 +1,20 @@ +package com.ningdatech.pmapi.meta.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.stereotype.Controller; + +/** + *

+ * 前端控制器 + *

+ * + * @author Liuxinxin + * @since 2023-02-22 + */ +@Controller +@RequestMapping("/pmapi.tag/expert-tag") +public class ExpertTagController { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/controller/MetaDictionaryController.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/controller/MetaDictionaryController.java new file mode 100644 index 0000000..030cffd --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/controller/MetaDictionaryController.java @@ -0,0 +1,20 @@ +package com.ningdatech.pmapi.meta.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.stereotype.Controller; + +/** + *

+ * 前端控制器 + *

+ * + * @author Liuxinxin + * @since 2023-02-22 + */ +@Controller +@RequestMapping("/pmapi.dictionary/meta-dictionary") +public class MetaDictionaryController { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/controller/MetaTagController.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/controller/MetaTagController.java new file mode 100644 index 0000000..49bec9c --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/controller/MetaTagController.java @@ -0,0 +1,20 @@ +package com.ningdatech.pmapi.meta.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.stereotype.Controller; + +/** + *

+ * 前端控制器 + *

+ * + * @author Liuxinxin + * @since 2023-02-22 + */ +@Controller +@RequestMapping("/pmapi.tag/meta-tag") +public class MetaTagController { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/controller/MetaTagManageController.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/controller/MetaTagManageController.java new file mode 100644 index 0000000..913d51f --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/controller/MetaTagManageController.java @@ -0,0 +1,79 @@ +package com.ningdatech.pmapi.meta.controller; + + +import com.ningdatech.pmapi.meta.manage.MetaManage; +import com.ningdatech.pmapi.meta.model.po.AddTagTypeRequest; +import com.ningdatech.pmapi.meta.model.po.ReqTagListPO; +import com.ningdatech.pmapi.meta.model.po.TagQueryRequest; +import com.ningdatech.pmapi.meta.model.vo.TagListVO; +import com.ningdatech.pmapi.meta.model.vo.TagTreeVO; +import com.ningdatech.pmapi.meta.model.vo.TagTypeVO; +import com.ningdatech.pmapi.meta.validate.TagListRequestValidator; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; +import java.util.List; + +/** + *

+ * 前端控制器 + *

+ * + * @author liuxinxin + * @since 2022-07-21 + */ +@RestController +@Validated +@RequiredArgsConstructor +@RequestMapping("/api/v1/meta") +@Api(value = "MetaController", tags = "基础数据接口") +public class MetaTagManageController { + + /** + * 专家标签的缓存时间设置为5分钟,单位秒 + */ + private static final Long MAX_AGE = 5 * 60L; + /** + * max-age=86400 + */ + private static final String MAX_AGE_STR = "max-age=" + MAX_AGE; + private final MetaManage metaManage; + + @PostMapping("/tag") + @ApiOperation("获取专家标签的树状结构") + public List getRegionTree(HttpServletResponse response, @RequestBody ReqTagListPO request) { + response.setHeader("Cache-Control", MAX_AGE_STR); + TagListRequestValidator.tagListRequestValidator(request); + return metaManage.getTagTree(request); + } + + @PostMapping("/tag/query") + @ApiOperation("标签查询接口") + public List tagQuery(@Valid @RequestBody TagQueryRequest tagQueryRequest) { + return metaManage.tagQuery(tagQueryRequest); + } + + @PostMapping("/tag-tyoe/list") + @ApiOperation("获取标签分类列表") + public List tagTypeList() { + return metaManage.tagTypeList(); + } + + @PostMapping("/add/tag-type") + @ApiOperation("新增标签分类") + public void addTagType(@Valid @RequestBody AddTagTypeRequest request) { + metaManage.addTagType(request); + } + + @PostMapping("/remove/tag/{tagCode}") + @ApiOperation("删除标签") + public void removeTagName(@PathVariable String tagCode) { + metaManage.removeTagName(tagCode); + } + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/DictionaryCache.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/DictionaryCache.java new file mode 100644 index 0000000..35c251c --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/DictionaryCache.java @@ -0,0 +1,49 @@ +package com.ningdatech.pmapi.meta.helper; + + + +import com.ningdatech.pmapi.meta.constant.DictAllTypeEnum; +import com.ningdatech.pmapi.meta.model.dto.DictionaryDTO; + +import java.util.List; + +/** + * @author liuxinxin + * @date 2022/12/22 上午11:03 + */ + +public interface DictionaryCache { + + /** + * 根据字典类型枚举 获取 字典列表 + * + * @param dictionaryType + * @return + */ + List getDictionaryListByDictionaryType(DictAllTypeEnum dictionaryType); + + /** + * 根据字典类型 获取 字典列表 + * + * @param dictionaryType + * @return + */ + List getDictionaryListByDictionaryType(String dictionaryType); + + /** + * 根据字典类型、字典编码 获取 字典实体 + * + * @param dictionaryType + * @param code + * @return + */ + DictionaryDTO getDictionaryByDictionaryType(DictAllTypeEnum dictionaryType, String code); + + /** + * 根据字典编码 获取 字典实体 + * + * @param dictionaryCode + * @return + */ + DictionaryDTO getByCode(String dictionaryCode); +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/TagCache.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/TagCache.java new file mode 100644 index 0000000..70cc7a5 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/TagCache.java @@ -0,0 +1,55 @@ +package com.ningdatech.pmapi.meta.helper; + + +import com.ningdatech.pmapi.meta.model.dto.TagDTO; +import com.ningdatech.pmapi.meta.model.dto.TagTreeDTO; + +import java.util.List; +import java.util.Map; + +/** + * @author liuxinxin + * @date 2022/12/22 上午11:56 + */ + +public interface TagCache { + + /** + * @param level 最多几级标签 + * @param rootTagCode 根标签类型及对应的字段类型 + * @return + */ + TagTreeDTO getTagTreeDTO(int level, String rootTagCode); + + /** + * 根据标签编码获取 实体类 + * + * @param tagCode + * @return + */ + TagDTO getByTagCode(String tagCode); + + /** + * 导入原专家库数据使用 + * + * @return + */ + Map getNameTagDtoMap(); + + /** + * 获取所有子节点包含当前节点 + * + * @param code 标签编码 + * @return + */ + List listChildren(String code); + + /** + * 获取所有子节点包含当前节点的编码 + * + * @param code 标签编码 + * @return + */ + List listChildrenCodes(String code); + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/basic/AbstractDictionaryCache.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/basic/AbstractDictionaryCache.java new file mode 100644 index 0000000..bd4773e --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/basic/AbstractDictionaryCache.java @@ -0,0 +1,54 @@ +package com.ningdatech.pmapi.meta.helper.basic; + +import com.github.benmanes.caffeine.cache.Caffeine; +import com.github.benmanes.caffeine.cache.LoadingCache; +import com.ningdatech.pmapi.meta.service.IMetaDictionaryService; +import com.ningdatech.pmapi.meta.constant.DictAllTypeEnum; +import com.ningdatech.pmapi.meta.helper.DictionaryCache; +import com.ningdatech.pmapi.meta.model.dto.DictionaryDTO; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + +/** + * @author liuxinxin + * @date 2022/12/22 上午11:03 + */ +public abstract class AbstractDictionaryCache implements InitializingBean, DictionaryCache { + + @Autowired + private IMetaDictionaryService iMetaDictionaryService; + + protected Map dictionaryMap; + protected LoadingCache> dictionaryCacheHelper; + + @Override + public void afterPropertiesSet() { + dictionaryCacheHelper = Caffeine.newBuilder().expireAfterWrite(10, TimeUnit.MINUTES) + .refreshAfterWrite(5, TimeUnit.MINUTES).build(key -> { + List dictionaryDTOList = iMetaDictionaryService.queryAll(); + dictionaryMap = buildCateMap(dictionaryDTOList); + Map> dictionaryTypeListMap = dictionaryDTOList.stream().collect(Collectors.groupingBy(DictionaryDTO::getDictionaryType)); + return dictionaryTypeListMap.get(key); + }); + warmUp(); + } + + private Map buildCateMap(List dictionaryDTOList) { + Map dictionaryDtoMap = new ConcurrentHashMap<>(128); + dictionaryDTOList.forEach(dictionaryDTO -> dictionaryDtoMap.put(dictionaryDTO.getDictionaryCode(), dictionaryDTO)); + return dictionaryDtoMap; + } + + private void warmUp() { + for (DictAllTypeEnum typeEnum : DictAllTypeEnum.values()) { + dictionaryCacheHelper.get(typeEnum.getKey()); + } + } + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/basic/AbstractTagsCache.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/basic/AbstractTagsCache.java new file mode 100644 index 0000000..b360c0e --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/basic/AbstractTagsCache.java @@ -0,0 +1,97 @@ +package com.ningdatech.pmapi.meta.helper.basic; + +import cn.hutool.core.lang.Assert; +import com.github.benmanes.caffeine.cache.Caffeine; +import com.github.benmanes.caffeine.cache.LoadingCache; +import com.ningdatech.pmapi.meta.assembler.MetaTagAssembler; +import com.ningdatech.pmapi.meta.helper.TagCache; +import com.ningdatech.pmapi.meta.model.dto.TagDTO; +import com.ningdatech.pmapi.meta.model.dto.TagTreeDTO; +import com.ningdatech.pmapi.meta.service.IMetaTagService; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + +/** + * @author liuxinxin + * @date 2022/12/22 上午11:56 + */ +public abstract class AbstractTagsCache implements InitializingBean, TagCache { + + protected static final int MAX_LEVEL = 4; + + @Autowired + private IMetaTagService iMetaTagService; + + protected LoadingCache> tagsCache; + + protected Map tagDtoMap; + + @Override + public void afterPropertiesSet() { + tagsCache = Caffeine.newBuilder().expireAfterWrite(10, TimeUnit.MINUTES) + .refreshAfterWrite(5, TimeUnit.MINUTES) + .build(key -> { + // 查询全部 + List tagDTOList = iMetaTagService.queryAll(); + // TODO 临时关闭校验 +// Assert.isTrue(CollectionUtils.isNotEmpty(tagDTOList), "MetaTags queryAll is Empty"); + tagDtoMap = buildCateMap(tagDTOList); + List tagInLevel = tagDTOList.stream().filter(tagDto -> { + // 只过滤出小于等于level的tag + if (Objects.isNull(tagDto.getTagLevel())) { + return false; + } + return Integer.parseInt(key) >= tagDto.getTagLevel(); + }).collect(Collectors.toList()); + List treeDtos = MetaTagAssembler.toTagTreeDTOList(tagInLevel); + return toTreeStructure(treeDtos); + }); + warmUp(); + } + + private Map buildCateMap(List tagDTOList) { + Map tagDtoMapTemp = new ConcurrentHashMap<>(1024); + tagDTOList.forEach(tagDTO -> tagDtoMapTemp.put(tagDTO.getTagCode(), tagDTO)); + return tagDtoMapTemp; + } + + private List toTreeStructure(List rootList) { + List nodeList = new ArrayList<>(); + for (TagTreeDTO tagTreeDTO : rootList) { + if ("-1".equals(tagTreeDTO.getParentCode()) || Objects.isNull(tagTreeDTO.getParentCode())) { + nodeList.add(tagTreeDTO); + } + tagTreeDTO.setChildren(getChildren(tagTreeDTO.getTagCode(), rootList)); + } + return nodeList; + } + + public void warmUp() { + for (int level = 1; level <= MAX_LEVEL; level++) { + tagsCache.get(level + ""); + } + } + + protected List getChildren(String tagCode, List list) { + List childList = new ArrayList<>(); + for (TagTreeDTO tagTreeDTO : list) { + if (tagCode.equals(tagTreeDTO.getParentCode())) { + childList.add(tagTreeDTO); + } + } + for (TagTreeDTO tagTreeDTO : childList) { + tagTreeDTO.setChildren(getChildren(tagTreeDTO.getTagCode(), list)); + } + if (CollectionUtils.isEmpty(childList)) { + return Collections.emptyList(); + } + return childList; + } + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/impl/DictionaryCacheImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/impl/DictionaryCacheImpl.java new file mode 100644 index 0000000..944fa1d --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/impl/DictionaryCacheImpl.java @@ -0,0 +1,40 @@ +package com.ningdatech.pmapi.meta.helper.impl; + +import com.ningdatech.pmapi.meta.constant.DictAllTypeEnum; +import com.ningdatech.pmapi.meta.helper.basic.AbstractDictionaryCache; +import com.ningdatech.pmapi.meta.model.dto.DictionaryDTO; +import org.springframework.stereotype.Component; + +import java.util.List; +import java.util.Objects; + +/** + * @author liuxinxin + * @date 2022/7/22 上午10:47 + */ +@Component +public class DictionaryCacheImpl extends AbstractDictionaryCache { + + @Override + public List getDictionaryListByDictionaryType(DictAllTypeEnum dictionaryType) { + return dictionaryCacheHelper.get(dictionaryType.getKey()); + } + + @Override + public List getDictionaryListByDictionaryType(String dictionaryType) { + return dictionaryCacheHelper.get(dictionaryType); + } + + @Override + public DictionaryDTO getDictionaryByDictionaryType(DictAllTypeEnum dictionaryType, String code) { + return Objects.requireNonNull(dictionaryCacheHelper.get(dictionaryType.getKey())) + .stream().filter(w -> w.getDictionaryCode().equals(code)) + .findFirst().orElse(null); + } + + @Override + public DictionaryDTO getByCode(String dictionaryCode) { + return dictionaryMap.get(dictionaryCode); + } + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/impl/TagsCacheImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/impl/TagsCacheImpl.java new file mode 100644 index 0000000..b952ba6 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/impl/TagsCacheImpl.java @@ -0,0 +1,105 @@ +package com.ningdatech.pmapi.meta.helper.impl; + +import cn.hutool.core.bean.BeanUtil; +import com.ningdatech.basic.exception.BizException; +import com.ningdatech.basic.util.CollUtils; +import com.ningdatech.pmapi.meta.helper.basic.AbstractTagsCache; +import com.ningdatech.pmapi.meta.model.dto.TagDTO; +import com.ningdatech.pmapi.meta.model.dto.TagTreeDTO; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author liuxinxin + * @date 2022/7/22 上午9:51 + * 标签树 + */ +@Slf4j +@Component +public class TagsCacheImpl extends AbstractTagsCache { + + @Override + public TagTreeDTO getTagTreeDTO(int level, String rootTagCode) { + List tagTreeDtos = tagsCache.get(level + ""); + for (TagTreeDTO tagTreeDTO : tagTreeDtos) { + if (tagTreeDTO.getTagCode().equals(rootTagCode)) { + return tagTreeDTO; + } + } + throw new BizException("rootTagCode not exist"); + } + + @Override + public TagDTO getByTagCode(String tagCode) { + return tagDtoMap.get(tagCode); + } + + /** + * 导入原专家库数据使用 + * + * @return + */ + @Override + public Map getNameTagDtoMap() { + Map nameTagDtoMap = new HashMap<>(1024); + for (String key : tagDtoMap.keySet()) { + nameTagDtoMap.put(tagDtoMap.get(key).getTagName(), tagDtoMap.get(key)); + } + return nameTagDtoMap; + } + + + /** + * 获取所有子节点包含当前节点 + * + * @param code 标签编码 + * @return java.util.List + * @author WendyYang + **/ + @Override + public List listChildren(String code) { + List allTree = tagsCache.get(String.valueOf(MAX_LEVEL)); + assert allTree != null; + List children = getChildren(code, allTree); + TagDTO tagDTO = tagDtoMap.get(code); + TagTreeDTO rootNode = BeanUtil.copyProperties(tagDTO, TagTreeDTO.class); + rootNode.setChildren(children); + return treeToList(rootNode); + } + + /** + * 获取所有子节点包含当前节点的编码 + * + * @param code 标签编码 + * @return java.util.List + * @author WendyYang + **/ + @Override + public List listChildrenCodes(String code) { + return CollUtils.fieldList(listChildren(code), TagTreeDTO::getTagCode); + } + + /** + * tree -> list + * + * @param tagTreeDTO 树节点 + * @return java.util.List + * @author WendyYang + **/ + private List treeToList(TagTreeDTO tagTreeDTO) { + List result = new ArrayList<>(); + result.add(tagTreeDTO); + if (tagTreeDTO.getChildren() != null && tagTreeDTO.getChildren().size() > 0) { + tagTreeDTO.getChildren().forEach(node -> { + result.addAll(treeToList(node)); + }); + } + return result; + } + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/manage/MetaManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/manage/MetaManage.java new file mode 100644 index 0000000..0e17c41 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/manage/MetaManage.java @@ -0,0 +1,289 @@ +package com.ningdatech.pmapi.meta.manage; + +import cn.hutool.core.collection.CollUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; +import com.baomidou.mybatisplus.core.toolkit.StringUtils; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.ningdatech.basic.exception.BizException; +import com.ningdatech.basic.util.CollUtils; +import com.ningdatech.pmapi.common.constant.BoolDisplayEnum; +import com.ningdatech.pmapi.common.util.BizUtils; +import com.ningdatech.pmapi.meta.model.entity.ExpertDictionary; +import com.ningdatech.pmapi.meta.model.entity.MetaDictionary; +import com.ningdatech.pmapi.meta.service.IExpertDictionaryService; +import com.ningdatech.pmapi.meta.service.IMetaDictionaryService; +import com.ningdatech.pmapi.meta.assembler.MetaDictionaryAssembler; +import com.ningdatech.pmapi.meta.assembler.MetaTagAssembler; +import com.ningdatech.pmapi.meta.constant.DictExpertInfoTypeEnum; +import com.ningdatech.pmapi.meta.constant.ExpertTagEnum; +import com.ningdatech.pmapi.meta.constant.TagConst; +import com.ningdatech.pmapi.meta.model.entity.ExpertTag; +import com.ningdatech.pmapi.meta.model.entity.MetaTag; +import com.ningdatech.pmapi.meta.helper.DictionaryCache; +import com.ningdatech.pmapi.meta.helper.TagCache; +import com.ningdatech.pmapi.meta.model.dto.DictionaryDTO; +import com.ningdatech.pmapi.meta.model.dto.TagTreeDTO; +import com.ningdatech.pmapi.meta.model.po.*; +import com.ningdatech.pmapi.meta.model.vo.*; +import com.ningdatech.pmapi.meta.service.IExpertTagService; +import com.ningdatech.pmapi.meta.service.IMetaTagService; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; + +import java.time.LocalDateTime; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @author liuxinxin + * @date 2023/2/22 下午2:34 + */ +@Component +@RequiredArgsConstructor +public class MetaManage { + + // private final RegionCache regionCache; + private final DictionaryCache dictionaryCache; + private final TagCache tagCache; + private final IMetaDictionaryService metaDictionaryManageService; + private final IExpertDictionaryService iExpertDictionaryService; + private final IMetaTagService iMetaTagManageService; + private final IExpertTagService iExpertTagService; + +// public List getRegionTree() { +// List regionTreeDtos = regionCache.getAll(); +// return MetaRegionAssembler.toRegionTreeVOList(regionTreeDtos); +// } + + public List getDictionaryList(DictionaryListRequest request) { + List dictionaryTypeList = request.getDictionaryTypeList(); + if (CollectionUtils.isEmpty(dictionaryTypeList)) { + dictionaryTypeList = DictExpertInfoTypeEnum.getAll(); + } + + List dictionaryListVos = new ArrayList<>(); + for (String dictionaryType : dictionaryTypeList) { + DictionaryListVO dictionaryListVO = new DictionaryListVO(); + dictionaryListVO.setDictionaryName(dictionaryType); + List dictionaryList = dictionaryCache.getDictionaryListByDictionaryType(dictionaryType); + List dictionaryVOList = dictionaryList.stream() + .map(MetaDictionaryAssembler::toDictionaryVO).collect(Collectors.toList()); + dictionaryListVO.setDictionaryList(dictionaryVOList); + dictionaryListVos.add(dictionaryListVO); + } + return dictionaryListVos; + } + + public List commonDictList(DictionaryListRequest request) { + List result = new ArrayList<>(); + if (request.getAllDict()) { + Map> groupByType = CollUtils.group(metaDictionaryManageService.list(), MetaDictionary::getDictionaryType); + groupByType.forEach((k, v) -> { + DictionaryListVO dictionaryListVO = new DictionaryListVO(); + dictionaryListVO.setDictionaryName(k); + List dictionaryVOList = v.stream() + .map(w -> { + DictionaryVO vo = new DictionaryVO(); + vo.setDescribe(w.getDictionaryDescribe()); + vo.setDictionaryCode(w.getDictionaryCode()); + vo.setDictionaryType(w.getDictionaryType()); + vo.setName(w.getDictionaryName()); + vo.setReadonly(w.getReadonly()); + vo.setSortValue(w.getSortValue()); + return vo; + }).collect(Collectors.toList()); + dictionaryListVO.setDictionaryList(dictionaryVOList); + result.add(dictionaryListVO); + }); + } else { + List dictionaryTypeList = request.getDictionaryTypeList(); + for (String dictionaryType : dictionaryTypeList) { + DictionaryListVO dictionaryListVO = new DictionaryListVO(); + dictionaryListVO.setDictionaryName(dictionaryType); + List dictionaryList = dictionaryCache.getDictionaryListByDictionaryType(dictionaryType); + List dictionaryVOList = dictionaryList.stream() + .map(MetaDictionaryAssembler::toDictionaryVO).collect(Collectors.toList()); + dictionaryListVO.setDictionaryList(dictionaryVOList); + result.add(dictionaryListVO); + } + } + return result; + } + + public List getTagTree(ReqTagListPO request) { + List rootTagCodeList = request.getRootTagCodeList(); + if (CollectionUtils.isEmpty(rootTagCodeList)) { + rootTagCodeList = ExpertTagEnum.getAll(); + } + List tagTreeDTOList = new ArrayList<>(); + for (String rootTagCode : rootTagCodeList) { + TagTreeDTO tagTreeDTO = tagCache.getTagTreeDTO(4, rootTagCode); + if (Objects.nonNull(tagTreeDTO)) { + tagTreeDTOList.add(tagTreeDTO); + } + } + return MetaTagAssembler.toTagTreeVOList(tagTreeDTOList); + } + + + /** + * 专家管理员才能调用 + * + * @param addDictionaryRequest + */ + @Transactional(rollbackFor = Exception.class) + public void addDictionary(AddDictionaryRequest addDictionaryRequest) { + String dictionaryType = addDictionaryRequest.getDictionaryType(); + boolean contains = DictExpertInfoTypeEnum.contains(dictionaryType); + if (!contains) { + throw BizException.wrap("无效的专家字典类型:%s", dictionaryType); + } + String name = addDictionaryRequest.getName(); + Integer sortValue = addDictionaryRequest.getSortValue(); + LambdaQueryWrapper eq = Wrappers.lambdaQuery(MetaDictionary.class).eq(MetaDictionary::getDictionaryType, dictionaryType); + List dictionaryManageList = metaDictionaryManageService.list(eq); + + MetaDictionary saveRecord = new MetaDictionary(); + saveRecord.setCreateOn(LocalDateTime.now()); + saveRecord.setDictionaryName(name); + saveRecord.setUpdateOn(LocalDateTime.now()); + saveRecord.setDictionaryCode(BizUtils.uuid32()); + saveRecord.setDictionaryType(dictionaryType); + saveRecord.setReadonly(BoolDisplayEnum.N.name()); + saveRecord.setSortValue(sortValue); + + List saveRecordList = new ArrayList<>(); + saveRecordList.add(saveRecord); + for (MetaDictionary metaDictionary : dictionaryManageList) { + if (metaDictionary.getSortValue() >= sortValue) { + metaDictionary.setSortValue(metaDictionary.getSortValue() + 1); + } + saveRecordList.add(metaDictionary); + } + boolean remove = metaDictionaryManageService + .remove(Wrappers.lambdaQuery(MetaDictionary.class).eq(MetaDictionary::getDictionaryType, dictionaryType)); + if (remove) { + metaDictionaryManageService.saveBatch(saveRecordList); + } + } + + public void removeDictionary(String dictionaryCode) { + LambdaUpdateWrapper eq = Wrappers.lambdaUpdate(MetaDictionary.class) + .eq(MetaDictionary::getDictionaryCode, dictionaryCode); + MetaDictionary one = metaDictionaryManageService.getOne(eq); + if (Objects.isNull(one)) { + throw BizException.wrap("字典值不存在"); + } + if (BoolDisplayEnum.judgeBoolean(one.getReadonly())) { + throw BizException.wrap("内置字典值无法删除"); + } + List expertDictionaryList = iExpertDictionaryService.list(Wrappers.lambdaQuery(ExpertDictionary.class).eq(ExpertDictionary::getDictionaryCode, dictionaryCode)); + if (CollUtil.isNotEmpty(expertDictionaryList)) { + throw BizException.wrap("该字典值已被使用无法删除"); + } + metaDictionaryManageService.removeById(one); + } + + public void addTagType(AddTagTypeRequest request) { + String tagName = request.getTagName(); + LambdaQueryWrapper in = Wrappers.lambdaQuery(MetaTag.class) + .in(MetaTag::getTagName, tagName) + .in(MetaTag::getParentCode, TagConst.TAG_ROOT_PARENT_CODE); + List list = iMetaTagManageService.list(in); + if (CollectionUtils.isNotEmpty(list)) { + throw BizException.wrap("该标签类型已存在"); + } + MetaTag saveRecord = new MetaTag(); + saveRecord.setCreateOn(LocalDateTime.now()); + saveRecord.setUpdateOn(LocalDateTime.now()); + saveRecord.setParentCode(TagConst.TAG_ROOT_PARENT_CODE); + saveRecord.setTagCode(BizUtils.uuid32()); + saveRecord.setTagName(tagName); + saveRecord.setTagLevel(TagConst.TAG_ROOT_LEVEL); + iMetaTagManageService.save(saveRecord); + } + + public void removeTagName(String tagCode) { + LambdaQueryWrapper eq = Wrappers.lambdaQuery(ExpertTag.class) + .eq(ExpertTag::getTagCode, tagCode); + List expertTagList = iExpertTagService.list(eq); + if (CollectionUtils.isNotEmpty(expertTagList)) { + throw BizException.wrap("该标签正在使用无法删除"); + } + LambdaQueryWrapper queryWrapper = Wrappers.lambdaQuery(MetaTag.class).eq(MetaTag::getParentCode, tagCode); + List list = iMetaTagManageService.list(queryWrapper); + if (CollectionUtils.isNotEmpty(list)) { + throw BizException.wrap("该标签存在子标签无法删除"); + } + LambdaQueryWrapper metaTagManageLambdaQueryWrapper = Wrappers.lambdaQuery(MetaTag.class).eq(MetaTag::getTagCode, tagCode); + MetaTag one = iMetaTagManageService.getOne(metaTagManageLambdaQueryWrapper); + if (Objects.nonNull(one)) { + iMetaTagManageService.removeById(one); + } + } + + public List tagTypeList() { + LambdaQueryWrapper eq = Wrappers.lambdaQuery(MetaTag.class).eq(MetaTag::getParentCode, TagConst.TAG_ROOT_PARENT_CODE); + List list = iMetaTagManageService.list(eq); + return list.stream().map(r -> { + TagTypeVO tagTypeVO = new TagTypeVO(); + tagTypeVO.setTagCode(r.getTagCode()); + tagTypeVO.setTagLevel(r.getTagLevel()); + tagTypeVO.setTagName(r.getTagName()); + tagTypeVO.setTagName(r.getTagName()); + return tagTypeVO; + }).collect(Collectors.toList()); + } + + public List tagQuery(TagQueryRequest tagQueryRequest) { + String parentCode = tagQueryRequest.getParentCode(); + if (StringUtils.isBlank(parentCode)) { + parentCode = TagConst.TAG_ROOT_PARENT_CODE; + } + LambdaQueryWrapper eq = Wrappers.lambdaQuery(MetaTag.class) + .eq(MetaTag::getParentCode, parentCode); + List list = iMetaTagManageService.list(eq); + + List tagCodeList = CollUtils.fieldList(list, MetaTag::getTagCode); + Map> hasChildrenMap = new HashMap<>(16); + Map> useFrequencyMap = new HashMap<>(16); + if (CollectionUtils.isNotEmpty(tagCodeList)) { + List childrenMetaTagList = iMetaTagManageService.list(Wrappers.lambdaQuery(MetaTag.class) + .in(MetaTag::getParentCode, tagCodeList)); + hasChildrenMap = CollUtils.group(childrenMetaTagList, MetaTag::getParentCode); + + List expertTagList = iExpertTagService.list(Wrappers.lambdaQuery(ExpertTag.class) + .in(ExpertTag::getTagCode, tagCodeList)); + useFrequencyMap = CollUtils.group(expertTagList, ExpertTag::getTagCode); + } + + Map> finalHasChildrenMap = hasChildrenMap; + Map> finalUseFrequencyMap = useFrequencyMap; + return list.stream().map(r -> { + TagListVO tagListVO = new TagListVO(); + tagListVO.setCreateTime(r.getCreateOn()); + tagListVO.setCreator(TagConst.TAG_CREATOR); + tagListVO.setTagLevel(r.getTagLevel()); + tagListVO.setTagCode(r.getTagCode()); + tagListVO.setTagName(r.getTagName()); + List metaTagManages = finalHasChildrenMap.get(r.getTagCode()); + if (CollUtil.isNotEmpty(metaTagManages)) { + tagListVO.setIsLeaf(false); + tagListVO.setHasChildren(true); + } else { + tagListVO.setIsLeaf(true); + tagListVO.setHasChildren(false); + } + long useFrequency = 0; + List expertTagList = finalUseFrequencyMap.get(r.getTagCode()); + if (CollUtil.isNotEmpty(expertTagList)) { + useFrequency = expertTagList.size(); + } + tagListVO.setUseFrequency(useFrequency); + return tagListVO; + }).collect(Collectors.toList()); + } +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/ExpertDictionaryMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/ExpertDictionaryMapper.java new file mode 100644 index 0000000..b15fc12 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/ExpertDictionaryMapper.java @@ -0,0 +1,16 @@ +package com.ningdatech.pmapi.meta.mapper; + +import com.ningdatech.pmapi.meta.model.entity.ExpertDictionary; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * Mapper 接口 + *

+ * + * @author Liuxinxin + * @since 2023-02-22 + */ +public interface ExpertDictionaryMapper extends BaseMapper { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/ExpertDictionaryMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/ExpertDictionaryMapper.xml new file mode 100644 index 0000000..5bbce65 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/ExpertDictionaryMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/ExpertTagMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/ExpertTagMapper.java new file mode 100644 index 0000000..ae93928 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/ExpertTagMapper.java @@ -0,0 +1,16 @@ +package com.ningdatech.pmapi.meta.mapper; + +import com.ningdatech.pmapi.meta.model.entity.ExpertTag; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * Mapper 接口 + *

+ * + * @author Liuxinxin + * @since 2023-02-22 + */ +public interface ExpertTagMapper extends BaseMapper { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/ExpertTagMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/ExpertTagMapper.xml new file mode 100644 index 0000000..017d58f --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/ExpertTagMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/MetaDictionaryMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/MetaDictionaryMapper.java new file mode 100644 index 0000000..da9a0f4 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/MetaDictionaryMapper.java @@ -0,0 +1,16 @@ +package com.ningdatech.pmapi.meta.mapper; + +import com.ningdatech.pmapi.meta.model.entity.MetaDictionary; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * Mapper 接口 + *

+ * + * @author Liuxinxin + * @since 2023-02-22 + */ +public interface MetaDictionaryMapper extends BaseMapper { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/MetaDictionaryMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/MetaDictionaryMapper.xml new file mode 100644 index 0000000..516061f --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/MetaDictionaryMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/MetaTagMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/MetaTagMapper.java new file mode 100644 index 0000000..fcb8fc5 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/MetaTagMapper.java @@ -0,0 +1,16 @@ +package com.ningdatech.pmapi.meta.mapper; + +import com.ningdatech.pmapi.meta.model.entity.MetaTag; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * Mapper 接口 + *

+ * + * @author Liuxinxin + * @since 2023-02-22 + */ +public interface MetaTagMapper extends BaseMapper { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/MetaTagMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/MetaTagMapper.xml new file mode 100644 index 0000000..0476da7 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/mapper/MetaTagMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/ExpertRegionInfo.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/ExpertRegionInfo.java new file mode 100644 index 0000000..37c17ed --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/ExpertRegionInfo.java @@ -0,0 +1,36 @@ +package com.ningdatech.pmapi.meta.model; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @author liuxinxin + * @date 2022/7/25 下午2:43 + */ +@Data +@ApiModel("专家区域信息") +public class ExpertRegionInfo { + + /** + * 区域编码 + */ + @NotBlank + @ApiModelProperty("区域编码") + private String regionCode; + + /** + * 区域级别 + */ + @NotBlank + @ApiModelProperty("区域级别") + private Integer regionLevel; + + /** + * 区域名称 + */ + @ApiModelProperty("区域名称") + private String regionName; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/bo/RegionContainsBO.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/bo/RegionContainsBO.java new file mode 100644 index 0000000..a07aee7 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/bo/RegionContainsBO.java @@ -0,0 +1,24 @@ +package com.ningdatech.pmapi.meta.model.bo; + +import lombok.Data; + +import java.util.List; + +/** + * @author liuxinxin + * @date 2022/7/26 下午4:48 + */ +@Data +public class RegionContainsBO { + + /** + * 最高级节点级别 + */ + private Integer parentRegionTreeLevel; + + /** + * 所有区域码列表 + */ + private List containsRegionCodeList; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/dto/DictionaryDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/dto/DictionaryDTO.java new file mode 100644 index 0000000..7030775 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/dto/DictionaryDTO.java @@ -0,0 +1,40 @@ +package com.ningdatech.pmapi.meta.model.dto; + +import lombok.Data; + +/** + * @author liuxinxin + * @date 2022/7/22 上午10:49 + */ +@Data +public class DictionaryDTO { + + private String dictionaryType; + + /** + * 编码 随机数处理 + */ + private String dictionaryCode; + + /** + * 名称 + */ + private String name; + + /** + * 描述 + */ + private String describe; + + /** + * 排序 + */ + private Integer sortValue; + + /** + * 是否内置,内置不可删除 + */ + private String readonly; + +} + diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/dto/TagDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/dto/TagDTO.java new file mode 100644 index 0000000..1cbc019 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/dto/TagDTO.java @@ -0,0 +1,37 @@ +package com.ningdatech.pmapi.meta.model.dto; + +import lombok.Data; + +/** + * @author liuxinxin + * @date 2022/7/22 上午9:53 + */ +@Data +public class TagDTO { + + /** + * 标签 编码 + * 根标签
擅长方向 good_at + * 技术专长 technical_expertise + * 行业领域 industry_sector + * 其他 other + */ + private String tagCode; + + /** + * 标签名称 + */ + private String tagName; + + /** + * 标签级别 + */ + private Long tagLevel; + + /** + * 标签父级id + * 当parent_tag_code 为 -1 时为顶级标签 + */ + private String parentCode; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/dto/TagTreeDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/dto/TagTreeDTO.java new file mode 100644 index 0000000..6aa437a --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/dto/TagTreeDTO.java @@ -0,0 +1,42 @@ +package com.ningdatech.pmapi.meta.model.dto; + +import lombok.Data; + +import java.util.List; + +/** + * @author liuxinxin + * @date 2022/7/22 上午9:53 + */ +@Data +public class TagTreeDTO { + + + /** + * 标签 编码 + * 根标签
擅长方向 good_at + * 技术专长 technical_expertise + * 行业领域 industry_sector + * 其他 other + */ + private String tagCode; + + /** + * 标签名称 + */ + private String tagName; + + /** + * 标签级别 + */ + private Long tagLevel; + + /** + * 标签父级id + * 当parent_tag_code 为 -1 时为顶级标签 + */ + private String parentCode; + + + private List children; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/entity/ExpertDictionary.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/entity/ExpertDictionary.java new file mode 100644 index 0000000..a6d5b42 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/entity/ExpertDictionary.java @@ -0,0 +1,38 @@ +package com.ningdatech.pmapi.meta.model.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.time.LocalDateTime; +import io.swagger.annotations.ApiModel; +import lombok.Data; + +/** + *

+ * + *

+ * + * @author Liuxinxin + * @since 2023-02-22 + */ +@Data +@TableName("expert_dictionary") +@ApiModel(value = "ExpertDictionary对象", description = "") +public class ExpertDictionary implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(type = IdType.AUTO) + private Long id; + + private LocalDateTime createOn; + + private LocalDateTime updateOn; + + private String dictionaryCode; + + private String expertInfoField; + + private Long userId; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/entity/ExpertTag.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/entity/ExpertTag.java new file mode 100644 index 0000000..e9abc27 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/entity/ExpertTag.java @@ -0,0 +1,38 @@ +package com.ningdatech.pmapi.meta.model.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.time.LocalDateTime; +import io.swagger.annotations.ApiModel; +import lombok.Data; + +/** + *

+ * + *

+ * + * @author Liuxinxin + * @since 2023-02-22 + */ +@TableName("expert_tag") +@Data +@ApiModel(value = "ExpertTag对象", description = "") +public class ExpertTag implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(type = IdType.AUTO) + private Long id; + + private LocalDateTime createOn; + + private LocalDateTime updateOn; + + private Long userId; + + private String tagCode; + + private String expertInfoField; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/entity/MetaDictionary.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/entity/MetaDictionary.java new file mode 100644 index 0000000..ed67e4b --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/entity/MetaDictionary.java @@ -0,0 +1,50 @@ +package com.ningdatech.pmapi.meta.model.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * + *

+ * + * @author Liuxinxin + * @since 2023-02-22 + */ +@Data +@TableName("meta_dictionary") +@ApiModel(value = "MetaDictionary对象", description = "") +public class MetaDictionary implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(type = IdType.AUTO) + private Long id; + + private LocalDateTime createOn; + + private LocalDateTime updateOn; + + private String dictionaryType; + + private String dictionaryCode; + + private String dictionaryName; + + private String dictionaryDescribe; + + private Integer sortValue; + + private Long createBy; + + private String readonly; + + private Long updateBy; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/entity/MetaTag.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/entity/MetaTag.java new file mode 100644 index 0000000..c3d770e --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/entity/MetaTag.java @@ -0,0 +1,43 @@ +package com.ningdatech.pmapi.meta.model.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.time.LocalDateTime; +import io.swagger.annotations.ApiModel; +import lombok.Data; + +/** + *

+ * + *

+ * + * @author Liuxinxin + * @since 2023-02-22 + */ +@Data +@TableName("meta_tag") +@ApiModel(value = "MetaTag对象", description = "") +public class MetaTag implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(type = IdType.AUTO) + private Long id; + + private LocalDateTime createOn; + + private LocalDateTime updateOn; + + private String tagName; + + private Long tagLevel; + + private String parentCode; + + private String tagType; + + private String tagCode; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/AddDictionaryRequest.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/AddDictionaryRequest.java new file mode 100644 index 0000000..3814f48 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/AddDictionaryRequest.java @@ -0,0 +1,37 @@ +package com.ningdatech.pmapi.meta.model.po; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + +/** + * @author liuxinxin + * @date 2022/8/25 上午11:10 + */ +@Data +@ApiModel("新增字典值") +public class AddDictionaryRequest { + + @ApiModelProperty(value = "字典类型") + @NotBlank + private String dictionaryType; + + /** + * 名称 + */ + @ApiModelProperty(value = "名称") + @NotBlank + private String name; + + /** + * 排序 + */ + @ApiModelProperty(value = "排序") + @NotNull + private Integer sortValue; + + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/AddTagTypeRequest.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/AddTagTypeRequest.java new file mode 100644 index 0000000..4de8c34 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/AddTagTypeRequest.java @@ -0,0 +1,20 @@ +package com.ningdatech.pmapi.meta.model.po; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @author liuxinxin + * @date 2022/8/27 上午10:17 + */ +@ApiModel(description = "新增标签分类") +@Data +public class AddTagTypeRequest { + + @ApiModelProperty("标签分类名") + @NotBlank + private String tagName; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/DictionaryListRequest.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/DictionaryListRequest.java new file mode 100644 index 0000000..879d896 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/DictionaryListRequest.java @@ -0,0 +1,19 @@ +package com.ningdatech.pmapi.meta.model.po; + +import lombok.Data; + +import java.util.List; + +/** + * @author liuxinxin + * @date 2022/7/21 下午6:05 + */ +@Data +public class DictionaryListRequest { + + private List dictionaryTypeList; + + private Boolean allDict = false; + + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/ReqTagListPO.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/ReqTagListPO.java new file mode 100644 index 0000000..178756f --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/ReqTagListPO.java @@ -0,0 +1,14 @@ +package com.ningdatech.pmapi.meta.model.po; + +import lombok.Data; + +import java.util.List; + +/** + * @author liuxinxin + * @date 2022/7/22 下午2:43 + */ +@Data +public class ReqTagListPO { + private List rootTagCodeList; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/TagListRequest.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/TagListRequest.java new file mode 100644 index 0000000..a6b996a --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/TagListRequest.java @@ -0,0 +1,14 @@ +package com.ningdatech.pmapi.meta.model.po; + +import lombok.Data; + +import java.util.List; + +/** + * @author liuxinxin + * @date 2022/7/22 下午2:43 + */ +@Data +public class TagListRequest { + private List rootTagCodeList; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/TagQueryRequest.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/TagQueryRequest.java new file mode 100644 index 0000000..aab5309 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/po/TagQueryRequest.java @@ -0,0 +1,24 @@ +package com.ningdatech.pmapi.meta.model.po; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author liuxinxin + * @date 2022/8/27 下午2:30 + */ +@Data +@ApiModel(description = "标签查询request") +public class TagQueryRequest { +// +// @ApiModelProperty("标签类型") +// private Long tagType; +// +// @ApiModelProperty("标签名") +// private String tagName; + + @ApiModelProperty("父级标签编码") + private String parentCode; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/vo/DictionaryListVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/vo/DictionaryListVO.java new file mode 100644 index 0000000..0efaa33 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/vo/DictionaryListVO.java @@ -0,0 +1,25 @@ +package com.ningdatech.pmapi.meta.model.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.ToString; + +import java.util.List; + +/** + * @author liuxinxin + * @date 2022/7/21 下午6:13 + */ +@Data +@ToString(callSuper = true) +@ApiModel(value = "DictionaryListVO", description = "字典列表结构VO") +public class DictionaryListVO { + + @ApiModelProperty(value = "字典名称") + private String dictionaryName; + + @ApiModelProperty(value = "字典选项名称") + private List dictionaryList; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/vo/DictionaryVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/vo/DictionaryVO.java new file mode 100644 index 0000000..777f453 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/vo/DictionaryVO.java @@ -0,0 +1,49 @@ +package com.ningdatech.pmapi.meta.model.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author liuxinxin + * @date 2022/7/22 上午11:26 + */ +@Data +@ApiModel(value = "DictionaryListVO", description = "字典结构VO") +public class DictionaryVO { + + + @ApiModelProperty(value = "字典类型") + private String dictionaryType; + + /** + * 编码 随机数处理 + */ + @ApiModelProperty(value = "编码") + private String dictionaryCode; + + /** + * 名称 + */ + @ApiModelProperty(value = "名称") + private String name; + + /** + * 描述 + */ + @ApiModelProperty(value = "描述") + private String describe; + + /** + * 排序 + */ + @ApiModelProperty(value = "排序") + private Integer sortValue; + + /** + * 是否内置,内置不可删除 + */ + @ApiModelProperty(value = "是否内置,内置不可删除") + private String readonly; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/vo/TagListVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/vo/TagListVO.java new file mode 100644 index 0000000..f26ddc0 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/vo/TagListVO.java @@ -0,0 +1,41 @@ +package com.ningdatech.pmapi.meta.model.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * @author liuxinxin + * @date 2022/8/27 下午2:35 + */ +@Data +@ApiModel(description = "标签列表展示") +public class TagListVO { + + @ApiModelProperty(value = "标签 编码") + private String tagCode; + + @ApiModelProperty(value = "标签名称") + private String tagName; + + @ApiModelProperty(value = "标签级别") + private Long tagLevel; + + @ApiModelProperty(value = "使用频次") + private Long useFrequency; + + @ApiModelProperty(value = "创建时间") + private LocalDateTime createTime; + + @ApiModelProperty(value = "创建人") + private String creator; + + @ApiModelProperty(value = "是否为叶子节点") + private Boolean isLeaf; + + @ApiModelProperty(value = "是否有子集") + private Boolean hasChildren; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/vo/TagTreeVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/vo/TagTreeVO.java new file mode 100644 index 0000000..ba87646 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/vo/TagTreeVO.java @@ -0,0 +1,58 @@ +package com.ningdatech.pmapi.meta.model.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.ToString; + +import java.util.List; + +/** + * @author liuxinxin + * @date 2022/7/22 下午2:27 + */ +@Data +@ToString(callSuper = true) +@ApiModel(value = "TagTreeVO", description = "标签树状结构VO") +public class TagTreeVO { + + /** + * 标签 编码 + * 根标签
擅长方向 good_at + * 技术专长 technical_expertise + * 行业领域 industry_sector + * 其他 other + */ + @ApiModelProperty(value = " * 标签 编码\n" + + " * 根标签\u2028擅长方向 good_at\n" + + " * 技术专长 technical_expertise\n" + + " * 行业领域 industry_sector\n" + + " * 其他 other") + private String tagCode; + + /** + * 标签名称 + */ + @ApiModelProperty(value = "标签名称") + private String tagName; + + /** + * 标签级别 + */ + @ApiModelProperty(value = "标签级别") + private Long tagLevel; + + /** + * 标签父级id + * 当parent_tag_code 为 -1 时为顶级标签 + */ + @ApiModelProperty(value = " * 标签父级id\n" + + " * 当parent_tag_code 为 -1 时为顶级标签") + private String parentCode; + + @ApiModelProperty(value = "子节点标签") + private List children; + + @ApiModelProperty(value = "联合唯一字段方便页面使用(tagName##tagCode)") + private String unionCode; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/vo/TagTypeVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/vo/TagTypeVO.java new file mode 100644 index 0000000..255bf0b --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/model/vo/TagTypeVO.java @@ -0,0 +1,23 @@ +package com.ningdatech.pmapi.meta.model.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author liuxinxin + * @date 2022/8/27 下午2:20 + */ +@Data +@ApiModel(description = "标签类型VO") +public class TagTypeVO { + + @ApiModelProperty(value = "标签编码") + private String tagCode; + + @ApiModelProperty(value = "标签名称") + private String tagName; + + @ApiModelProperty(value = "标签级别") + private Long tagLevel; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/IExpertDictionaryService.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/IExpertDictionaryService.java new file mode 100644 index 0000000..9ea3a35 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/IExpertDictionaryService.java @@ -0,0 +1,16 @@ +package com.ningdatech.pmapi.meta.service; + +import com.ningdatech.pmapi.meta.model.entity.ExpertDictionary; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 服务类 + *

+ * + * @author Liuxinxin + * @since 2023-02-22 + */ +public interface IExpertDictionaryService extends IService { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/IExpertTagService.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/IExpertTagService.java new file mode 100644 index 0000000..74e2e8a --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/IExpertTagService.java @@ -0,0 +1,16 @@ +package com.ningdatech.pmapi.meta.service; + +import com.ningdatech.pmapi.meta.model.entity.ExpertTag; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 服务类 + *

+ * + * @author Liuxinxin + * @since 2023-02-22 + */ +public interface IExpertTagService extends IService { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/IMetaDictionaryService.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/IMetaDictionaryService.java new file mode 100644 index 0000000..4745147 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/IMetaDictionaryService.java @@ -0,0 +1,22 @@ +package com.ningdatech.pmapi.meta.service; + +import com.ningdatech.pmapi.meta.model.entity.MetaDictionary; +import com.baomidou.mybatisplus.extension.service.IService; +import com.ningdatech.pmapi.meta.model.dto.DictionaryDTO; + +import java.util.List; + +/** + *

+ * 服务类 + *

+ * + * @author Liuxinxin + * @since 2023-02-22 + */ +public interface IMetaDictionaryService extends IService { + + List queryAll(); + + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/IMetaTagService.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/IMetaTagService.java new file mode 100644 index 0000000..862fe70 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/IMetaTagService.java @@ -0,0 +1,21 @@ +package com.ningdatech.pmapi.meta.service; + +import com.ningdatech.pmapi.meta.model.entity.MetaTag; +import com.baomidou.mybatisplus.extension.service.IService; +import com.ningdatech.pmapi.meta.model.dto.TagDTO; + +import java.util.List; + +/** + *

+ * 服务类 + *

+ * + * @author Liuxinxin + * @since 2023-02-22 + */ +public interface IMetaTagService extends IService { + + List queryAll(); + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/impl/ExpertDictionaryServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/impl/ExpertDictionaryServiceImpl.java new file mode 100644 index 0000000..346f4ec --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/impl/ExpertDictionaryServiceImpl.java @@ -0,0 +1,20 @@ +package com.ningdatech.pmapi.meta.service.impl; + +import com.ningdatech.pmapi.meta.model.entity.ExpertDictionary; +import com.ningdatech.pmapi.meta.mapper.ExpertDictionaryMapper; +import com.ningdatech.pmapi.meta.service.IExpertDictionaryService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 服务实现类 + *

+ * + * @author Liuxinxin + * @since 2023-02-22 + */ +@Service +public class ExpertDictionaryServiceImpl extends ServiceImpl implements IExpertDictionaryService { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/impl/ExpertTagServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/impl/ExpertTagServiceImpl.java new file mode 100644 index 0000000..891089f --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/impl/ExpertTagServiceImpl.java @@ -0,0 +1,20 @@ +package com.ningdatech.pmapi.meta.service.impl; + +import com.ningdatech.pmapi.meta.model.entity.ExpertTag; +import com.ningdatech.pmapi.meta.mapper.ExpertTagMapper; +import com.ningdatech.pmapi.meta.service.IExpertTagService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 服务实现类 + *

+ * + * @author Liuxinxin + * @since 2023-02-22 + */ +@Service +public class ExpertTagServiceImpl extends ServiceImpl implements IExpertTagService { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/impl/MetaDictionaryServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/impl/MetaDictionaryServiceImpl.java new file mode 100644 index 0000000..e55df9e --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/impl/MetaDictionaryServiceImpl.java @@ -0,0 +1,32 @@ +package com.ningdatech.pmapi.meta.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ningdatech.pmapi.meta.model.entity.MetaDictionary; +import com.ningdatech.pmapi.meta.mapper.MetaDictionaryMapper; +import com.ningdatech.pmapi.meta.service.IMetaDictionaryService; +import com.ningdatech.pmapi.meta.assembler.MetaDictionaryAssembler; +import com.ningdatech.pmapi.meta.model.dto.DictionaryDTO; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.stream.Collectors; + +/** + *

+ * 服务实现类 + *

+ * + * @author Liuxinxin + * @since 2023-02-22 + */ +@Service +public class MetaDictionaryServiceImpl extends ServiceImpl implements IMetaDictionaryService { + + @Override + public List queryAll() { + List dictionaryList = this.lambdaQuery().ne(MetaDictionary::getId, -1).list(); + List dictionaryDTOList = dictionaryList.stream().map(MetaDictionaryAssembler::toDictionaryDTO).collect(Collectors.toList()); + return dictionaryDTOList; + } + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/impl/MetaTagServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/impl/MetaTagServiceImpl.java new file mode 100644 index 0000000..c60de04 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/service/impl/MetaTagServiceImpl.java @@ -0,0 +1,33 @@ +package com.ningdatech.pmapi.meta.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ningdatech.pmapi.meta.assembler.MetaTagAssembler; +import com.ningdatech.pmapi.meta.model.entity.MetaTag; +import com.ningdatech.pmapi.meta.mapper.MetaTagMapper; +import com.ningdatech.pmapi.meta.model.dto.TagDTO; +import com.ningdatech.pmapi.meta.service.IMetaTagService; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.stream.Collectors; + +/** + *

+ * 服务实现类 + *

+ * + * @author Liuxinxin + * @since 2023-02-22 + */ +@Service +public class MetaTagServiceImpl extends ServiceImpl implements IMetaTagService { + + + @Override + public List queryAll() { + List allTags = this.lambdaQuery().ne(MetaTag::getId, -1).list(); + List allTagDTOList = allTags.stream().map(MetaTagAssembler::toTagDTO).collect(Collectors.toList()); + return allTagDTOList; + } + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meta/validate/TagListRequestValidator.java b/pmapi/src/main/java/com/ningdatech/pmapi/meta/validate/TagListRequestValidator.java new file mode 100644 index 0000000..836c3c6 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meta/validate/TagListRequestValidator.java @@ -0,0 +1,31 @@ +package com.ningdatech.pmapi.meta.validate; + + +import com.ningdatech.basic.exception.BizException; +import com.ningdatech.pmapi.meta.constant.ExpertTagEnum; +import com.ningdatech.pmapi.meta.model.po.ReqTagListPO; +import org.apache.commons.collections4.CollectionUtils; + +import java.util.List; + +/** + * @author liuxinxin + * @date 2022/7/22 下午2:44 + */ + +public class TagListRequestValidator { + + private TagListRequestValidator() { + } + + public static void tagListRequestValidator(ReqTagListPO request) { + List rootTagCodeList = request.getRootTagCodeList(); + if (CollectionUtils.isNotEmpty(rootTagCodeList)) { + for (String rootTagCode : rootTagCodeList) { + if (!ExpertTagEnum.contains(rootTagCode)) { + throw new BizException("Illegal rootTagCode:" + rootTagCode); + } + } + } + } +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/tag/controller/ExpertTagController.java b/pmapi/src/main/java/com/ningdatech/pmapi/tag/controller/ExpertTagController.java deleted file mode 100644 index c284fb8..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/tag/controller/ExpertTagController.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ningdatech.pmapi.tag.controller; - - -import org.springframework.web.bind.annotation.RequestMapping; - -import org.springframework.stereotype.Controller; - -/** - *

- * 前端控制器 - *

- * - * @author Liuxinxin - * @since 2023-02-22 - */ -@Controller -@RequestMapping("/pmapi.tag/expert-tag") -public class ExpertTagController { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/tag/controller/MetaTagController.java b/pmapi/src/main/java/com/ningdatech/pmapi/tag/controller/MetaTagController.java deleted file mode 100644 index 84fd5d1..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/tag/controller/MetaTagController.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ningdatech.pmapi.tag.controller; - - -import org.springframework.web.bind.annotation.RequestMapping; - -import org.springframework.stereotype.Controller; - -/** - *

- * 前端控制器 - *

- * - * @author Liuxinxin - * @since 2023-02-22 - */ -@Controller -@RequestMapping("/pmapi.tag/meta-tag") -public class MetaTagController { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/tag/entity/ExpertTag.java b/pmapi/src/main/java/com/ningdatech/pmapi/tag/entity/ExpertTag.java deleted file mode 100644 index d409abf..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/tag/entity/ExpertTag.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.ningdatech.pmapi.tag.entity; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import java.io.Serializable; -import java.time.LocalDateTime; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - *

- * - *

- * - * @author Liuxinxin - * @since 2023-02-22 - */ -@TableName("expert_tag") -@Data -@ApiModel(value = "ExpertTag对象", description = "") -public class ExpertTag implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(type = IdType.AUTO) - private Long id; - - private LocalDateTime createOn; - - private LocalDateTime updateOn; - - private Long userId; - - private String tagCode; - - private String expertInfoField; -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/tag/entity/MetaTag.java b/pmapi/src/main/java/com/ningdatech/pmapi/tag/entity/MetaTag.java deleted file mode 100644 index cc4b52a..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/tag/entity/MetaTag.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.ningdatech.pmapi.tag.entity; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import java.io.Serializable; -import java.time.LocalDateTime; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - *

- * - *

- * - * @author Liuxinxin - * @since 2023-02-22 - */ -@Data -@TableName("meta_tag") -@ApiModel(value = "MetaTag对象", description = "") -public class MetaTag implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(type = IdType.AUTO) - private Long id; - - private LocalDateTime createOn; - - private LocalDateTime updateOn; - - private String tagName; - - private Long tagLevel; - - private String parentCode; - - private String tagType; - - private String tagCode; - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/tag/mapper/ExpertTagMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/tag/mapper/ExpertTagMapper.java deleted file mode 100644 index 01a1bf2..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/tag/mapper/ExpertTagMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ningdatech.pmapi.tag.mapper; - -import com.ningdatech.pmapi.tag.entity.ExpertTag; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - *

- * Mapper 接口 - *

- * - * @author Liuxinxin - * @since 2023-02-22 - */ -public interface ExpertTagMapper extends BaseMapper { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/tag/mapper/ExpertTagMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/tag/mapper/ExpertTagMapper.xml deleted file mode 100644 index d705269..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/tag/mapper/ExpertTagMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/tag/mapper/MetaTagMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/tag/mapper/MetaTagMapper.java deleted file mode 100644 index 3e7a783..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/tag/mapper/MetaTagMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ningdatech.pmapi.tag.mapper; - -import com.ningdatech.pmapi.tag.entity.MetaTag; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - *

- * Mapper 接口 - *

- * - * @author Liuxinxin - * @since 2023-02-22 - */ -public interface MetaTagMapper extends BaseMapper { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/tag/mapper/MetaTagMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/tag/mapper/MetaTagMapper.xml deleted file mode 100644 index 2b3f916..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/tag/mapper/MetaTagMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/tag/service/IExpertTagService.java b/pmapi/src/main/java/com/ningdatech/pmapi/tag/service/IExpertTagService.java deleted file mode 100644 index 4970bb6..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/tag/service/IExpertTagService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ningdatech.pmapi.tag.service; - -import com.ningdatech.pmapi.tag.entity.ExpertTag; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - *

- * 服务类 - *

- * - * @author Liuxinxin - * @since 2023-02-22 - */ -public interface IExpertTagService extends IService { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/tag/service/IMetaTagService.java b/pmapi/src/main/java/com/ningdatech/pmapi/tag/service/IMetaTagService.java deleted file mode 100644 index ce9005b..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/tag/service/IMetaTagService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ningdatech.pmapi.tag.service; - -import com.ningdatech.pmapi.tag.entity.MetaTag; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - *

- * 服务类 - *

- * - * @author Liuxinxin - * @since 2023-02-22 - */ -public interface IMetaTagService extends IService { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/tag/service/impl/ExpertTagServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/tag/service/impl/ExpertTagServiceImpl.java deleted file mode 100644 index d62ceef..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/tag/service/impl/ExpertTagServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ningdatech.pmapi.tag.service.impl; - -import com.ningdatech.pmapi.tag.entity.ExpertTag; -import com.ningdatech.pmapi.tag.mapper.ExpertTagMapper; -import com.ningdatech.pmapi.tag.service.IExpertTagService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -/** - *

- * 服务实现类 - *

- * - * @author Liuxinxin - * @since 2023-02-22 - */ -@Service -public class ExpertTagServiceImpl extends ServiceImpl implements IExpertTagService { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/tag/service/impl/MetaTagServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/tag/service/impl/MetaTagServiceImpl.java deleted file mode 100644 index 458b843..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/tag/service/impl/MetaTagServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ningdatech.pmapi.tag.service.impl; - -import com.ningdatech.pmapi.tag.entity.MetaTag; -import com.ningdatech.pmapi.tag.mapper.MetaTagMapper; -import com.ningdatech.pmapi.tag.service.IMetaTagService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -/** - *

- * 服务实现类 - *

- * - * @author Liuxinxin - * @since 2023-02-22 - */ -@Service -public class MetaTagServiceImpl extends ServiceImpl implements IMetaTagService { - -}