From 286352155aae29d0a33be81e179fcb92e6ea0500 Mon Sep 17 00:00:00 2001 From: yq183 <645046984@qq.com> Date: Fri, 14 Mar 2025 16:52:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=20=20=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...rvice.java => RemoteLabelPostService.java} | 4 +- .../impl/BusinessAlertServiceImpl.java | 7 +--- .../controller/system/SysPostController.java | 14 +++---- .../org/dromara/system/domain/AiLabel.java | 4 +- .../{AiLablePost.java => AiLabelPost.java} | 6 +-- .../dromara/system/domain/bo/AiLabelBo.java | 2 +- ...{AiLablePostBo.java => AiLabelPostBo.java} | 8 ++-- ...{AiLablePostVo.java => AiLabelPostVo.java} | 8 ++-- .../dromara/system/domain/vo/AiLabelVo.java | 2 +- ...l.java => RemoteLabelPostServicelmpl.java} | 14 +++---- .../system/mapper/AiLabelPostMapper.java | 18 ++++++++ .../system/mapper/AiLablePostMapper.java | 20 --------- ...tService.java => IAiLabelPostService.java} | 21 +++++----- .../system/service/IAiLabelService.java | 4 +- .../system/service/ISysPostService.java | 6 +-- .../service/impl/AiLabelServiceImpl.java | 10 ++--- .../service/impl/AiLablePostServiceImpl.java | 42 +++++++++---------- .../service/impl/SysPostServiceImpl.java | 8 ++-- ...lePostMapper.xml => AiLabelPostMapper.xml} | 6 +-- 19 files changed, 96 insertions(+), 108 deletions(-) rename dk-api/api-system/src/main/java/org/dromara/system/api/{RemoteLablePostService.java => RemoteLabelPostService.java} (77%) rename dk-modules/system/src/main/java/org/dromara/system/domain/{AiLablePost.java => AiLabelPost.java} (84%) rename dk-modules/system/src/main/java/org/dromara/system/domain/bo/{AiLablePostBo.java => AiLabelPostBo.java} (80%) rename dk-modules/system/src/main/java/org/dromara/system/domain/vo/{AiLablePostVo.java => AiLabelPostVo.java} (78%) rename dk-modules/system/src/main/java/org/dromara/system/dubbo/{RemoteLablePostServicelmpl.java => RemoteLabelPostServicelmpl.java} (65%) create mode 100644 dk-modules/system/src/main/java/org/dromara/system/mapper/AiLabelPostMapper.java delete mode 100644 dk-modules/system/src/main/java/org/dromara/system/mapper/AiLablePostMapper.java rename dk-modules/system/src/main/java/org/dromara/system/service/{IAiLablePostService.java => IAiLabelPostService.java} (71%) rename dk-modules/system/src/main/resources/mapper/system/{AiLablePostMapper.xml => AiLabelPostMapper.xml} (52%) diff --git a/dk-api/api-system/src/main/java/org/dromara/system/api/RemoteLablePostService.java b/dk-api/api-system/src/main/java/org/dromara/system/api/RemoteLabelPostService.java similarity index 77% rename from dk-api/api-system/src/main/java/org/dromara/system/api/RemoteLablePostService.java rename to dk-api/api-system/src/main/java/org/dromara/system/api/RemoteLabelPostService.java index ca80427..5bfa201 100644 --- a/dk-api/api-system/src/main/java/org/dromara/system/api/RemoteLablePostService.java +++ b/dk-api/api-system/src/main/java/org/dromara/system/api/RemoteLabelPostService.java @@ -6,7 +6,7 @@ import java.util.List; * @auther yq * @data 2025/3/12 */ -public interface RemoteLablePostService { +public interface RemoteLabelPostService { /** @@ -16,6 +16,6 @@ public interface RemoteLablePostService { * @return 标签集合 * * */ - List selectLableByList(String postCode, Long deptId); + List selectLabelByList(String postCode, Long deptId); } diff --git a/dk-modules/business/src/main/java/org/dromara/business/service/impl/BusinessAlertServiceImpl.java b/dk-modules/business/src/main/java/org/dromara/business/service/impl/BusinessAlertServiceImpl.java index 67a90dd..d1d9aae 100644 --- a/dk-modules/business/src/main/java/org/dromara/business/service/impl/BusinessAlertServiceImpl.java +++ b/dk-modules/business/src/main/java/org/dromara/business/service/impl/BusinessAlertServiceImpl.java @@ -18,16 +18,13 @@ import org.dromara.common.core.utils.StreamUtils; import org.dromara.common.mybatis.core.page.PageQuery; import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.common.satoken.utils.LoginHelper; -import org.dromara.system.api.RemoteLablePostService; -import org.dromara.system.api.domain.vo.RemoteAiLabelPostVo; +import org.dromara.system.api.RemoteLabelPostService; import org.dromara.system.api.domain.vo.RemoteUserVo; -import org.dromara.system.api.model.PostDTO; import org.dromara.workflow.api.RemoteWorkflowService; import org.springframework.stereotype.Service; import java.lang.reflect.Method; import java.util.*; -import java.util.stream.Collectors; /** * 预警任务Service业务层处理 @@ -45,7 +42,7 @@ public class BusinessAlertServiceImpl implements IBusinessAlertService { RemoteWorkflowService remoteWorkflowService; @DubboReference - RemoteLablePostService remoteLablePostService; + RemoteLabelPostService remoteLablePostService; /** * 新增预警任务 diff --git a/dk-modules/system/src/main/java/org/dromara/system/controller/system/SysPostController.java b/dk-modules/system/src/main/java/org/dromara/system/controller/system/SysPostController.java index aba0a0b..6d580cb 100644 --- a/dk-modules/system/src/main/java/org/dromara/system/controller/system/SysPostController.java +++ b/dk-modules/system/src/main/java/org/dromara/system/controller/system/SysPostController.java @@ -2,7 +2,6 @@ package org.dromara.system.controller.system; import cn.dev33.satoken.annotation.SaCheckPermission; import cn.hutool.core.util.ObjectUtil; -import org.checkerframework.checker.units.qual.A; import org.dromara.common.core.constant.UserConstants; import org.dromara.common.core.domain.R; import org.dromara.common.excel.utils.ExcelUtil; @@ -11,13 +10,12 @@ import org.dromara.common.log.enums.BusinessType; import org.dromara.common.mybatis.core.page.PageQuery; import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.common.web.core.BaseController; -import org.dromara.system.domain.AiLablePost; import org.dromara.system.domain.bo.AiLablePostBindBo; -import org.dromara.system.domain.bo.AiLablePostBo; +import org.dromara.system.domain.bo.AiLabelPostBo; import org.dromara.system.domain.bo.SysPostBo; -import org.dromara.system.domain.vo.AiLablePostVo; +import org.dromara.system.domain.vo.AiLabelPostVo; import org.dromara.system.domain.vo.SysPostVo; -import org.dromara.system.service.IAiLablePostService; +import org.dromara.system.service.IAiLabelPostService; import org.dromara.system.service.ISysPostService; import jakarta.servlet.http.HttpServletResponse; import lombok.RequiredArgsConstructor; @@ -39,7 +37,7 @@ import java.util.List; public class SysPostController extends BaseController { private final ISysPostService postService; - private final IAiLablePostService aiLablePostService; + private final IAiLabelPostService aiLablePostService; /** * 获取岗位列表 @@ -80,7 +78,7 @@ public class SysPostController extends BaseController { @PostMapping("/bindLable") public void add(@Validated @RequestBody AiLablePostBindBo aiLablePostBindBo) { for (Long labelId : aiLablePostBindBo.getLableIdList()) { - AiLablePostBo ailablePost = new AiLablePostBo(); + AiLabelPostBo ailablePost = new AiLabelPostBo(); ailablePost.setPostId(aiLablePostBindBo.getPostId()); ailablePost.setLableId(labelId); aiLablePostService.insertByBo(ailablePost); @@ -92,7 +90,7 @@ public class SysPostController extends BaseController { */ @SaCheckPermission("system:post:list") @GetMapping("/lableList") - public TableDataInfo lableList(AiLablePostBo post, PageQuery pageQuery) { + public TableDataInfo lableList(AiLabelPostBo post, PageQuery pageQuery) { return postService.lableList(post, pageQuery); } diff --git a/dk-modules/system/src/main/java/org/dromara/system/domain/AiLabel.java b/dk-modules/system/src/main/java/org/dromara/system/domain/AiLabel.java index 5279510..fd21529 100644 --- a/dk-modules/system/src/main/java/org/dromara/system/domain/AiLabel.java +++ b/dk-modules/system/src/main/java/org/dromara/system/domain/AiLabel.java @@ -24,8 +24,8 @@ public class AiLabel { /** * id */ - @TableId(value = "lable_id") - private Long lableId; + @TableId(value = "label_id") + private Long labelId; /** * 标签名-英 diff --git a/dk-modules/system/src/main/java/org/dromara/system/domain/AiLablePost.java b/dk-modules/system/src/main/java/org/dromara/system/domain/AiLabelPost.java similarity index 84% rename from dk-modules/system/src/main/java/org/dromara/system/domain/AiLablePost.java rename to dk-modules/system/src/main/java/org/dromara/system/domain/AiLabelPost.java index d3f8422..6a03a06 100644 --- a/dk-modules/system/src/main/java/org/dromara/system/domain/AiLablePost.java +++ b/dk-modules/system/src/main/java/org/dromara/system/domain/AiLabelPost.java @@ -14,8 +14,8 @@ import java.io.Serial; * @date 2025-03-11 */ @Data -@TableName("ai_lable_post") -public class AiLablePost { +@TableName("ai_label_post") +public class AiLabelPost { @Serial private static final long serialVersionUID = 1L; @@ -25,7 +25,7 @@ public class AiLablePost { /** * 标签id */ - private Long lableId; + private Long labelId; /** * 岗位id diff --git a/dk-modules/system/src/main/java/org/dromara/system/domain/bo/AiLabelBo.java b/dk-modules/system/src/main/java/org/dromara/system/domain/bo/AiLabelBo.java index aada006..2b4fc9c 100644 --- a/dk-modules/system/src/main/java/org/dromara/system/domain/bo/AiLabelBo.java +++ b/dk-modules/system/src/main/java/org/dromara/system/domain/bo/AiLabelBo.java @@ -35,7 +35,7 @@ public class AiLabelBo { * id */ @NotNull(message = "id不能为空", groups = { EditGroup.class }) - private Long lableId; + private Long labelId; /** * 标签名-英 diff --git a/dk-modules/system/src/main/java/org/dromara/system/domain/bo/AiLablePostBo.java b/dk-modules/system/src/main/java/org/dromara/system/domain/bo/AiLabelPostBo.java similarity index 80% rename from dk-modules/system/src/main/java/org/dromara/system/domain/bo/AiLablePostBo.java rename to dk-modules/system/src/main/java/org/dromara/system/domain/bo/AiLabelPostBo.java index c53f2f5..3bf049a 100644 --- a/dk-modules/system/src/main/java/org/dromara/system/domain/bo/AiLablePostBo.java +++ b/dk-modules/system/src/main/java/org/dromara/system/domain/bo/AiLabelPostBo.java @@ -3,12 +3,10 @@ package org.dromara.system.domain.bo; import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonInclude; import org.dromara.common.core.validate.EditGroup; -import org.dromara.system.domain.AiLablePost; -import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.system.domain.AiLabelPost; import org.dromara.common.core.validate.AddGroup; import io.github.linpeilie.annotations.AutoMapper; import lombok.Data; -import lombok.EqualsAndHashCode; import jakarta.validation.constraints.*; import java.util.HashMap; @@ -21,8 +19,8 @@ import java.util.Map; * @date 2025-03-11 */ @Data -@AutoMapper(target = AiLablePost.class, reverseConvertGenerate = false) -public class AiLablePostBo { +@AutoMapper(target = AiLabelPost.class, reverseConvertGenerate = false) +public class AiLabelPostBo { /** * 标签id diff --git a/dk-modules/system/src/main/java/org/dromara/system/domain/vo/AiLablePostVo.java b/dk-modules/system/src/main/java/org/dromara/system/domain/vo/AiLabelPostVo.java similarity index 78% rename from dk-modules/system/src/main/java/org/dromara/system/domain/vo/AiLablePostVo.java rename to dk-modules/system/src/main/java/org/dromara/system/domain/vo/AiLabelPostVo.java index dda13be..9337118 100644 --- a/dk-modules/system/src/main/java/org/dromara/system/domain/vo/AiLablePostVo.java +++ b/dk-modules/system/src/main/java/org/dromara/system/domain/vo/AiLabelPostVo.java @@ -1,6 +1,6 @@ package org.dromara.system.domain.vo; -import org.dromara.system.domain.AiLablePost; +import org.dromara.system.domain.AiLabelPost; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import io.github.linpeilie.annotations.AutoMapper; import lombok.Data; @@ -17,8 +17,8 @@ import java.io.Serializable; */ @Data @ExcelIgnoreUnannotated -@AutoMapper(target = AiLablePost.class) -public class AiLablePostVo implements Serializable { +@AutoMapper(target = AiLabelPost.class) +public class AiLabelPostVo implements Serializable { @Serial private static final long serialVersionUID = 1L; @@ -27,7 +27,7 @@ public class AiLablePostVo implements Serializable { /** * 标签id */ - private Long lableId; + private Long labelId; private String labelCn; diff --git a/dk-modules/system/src/main/java/org/dromara/system/domain/vo/AiLabelVo.java b/dk-modules/system/src/main/java/org/dromara/system/domain/vo/AiLabelVo.java index 2f079ca..3280c78 100644 --- a/dk-modules/system/src/main/java/org/dromara/system/domain/vo/AiLabelVo.java +++ b/dk-modules/system/src/main/java/org/dromara/system/domain/vo/AiLabelVo.java @@ -28,7 +28,7 @@ public class AiLabelVo implements Serializable { * id */ // @ExcelProperty(value = "id") - private Long lableId; + private Long labelId; /** * 标签名-英 diff --git a/dk-modules/system/src/main/java/org/dromara/system/dubbo/RemoteLablePostServicelmpl.java b/dk-modules/system/src/main/java/org/dromara/system/dubbo/RemoteLabelPostServicelmpl.java similarity index 65% rename from dk-modules/system/src/main/java/org/dromara/system/dubbo/RemoteLablePostServicelmpl.java rename to dk-modules/system/src/main/java/org/dromara/system/dubbo/RemoteLabelPostServicelmpl.java index 2fe5f83..fd28541 100644 --- a/dk-modules/system/src/main/java/org/dromara/system/dubbo/RemoteLablePostServicelmpl.java +++ b/dk-modules/system/src/main/java/org/dromara/system/dubbo/RemoteLabelPostServicelmpl.java @@ -3,11 +3,11 @@ package org.dromara.system.dubbo; import lombok.RequiredArgsConstructor; import org.apache.dubbo.config.annotation.DubboService; import org.dromara.common.core.utils.MapstructUtils; -import org.dromara.system.api.RemoteLablePostService; +import org.dromara.system.api.RemoteLabelPostService; import org.dromara.system.api.domain.vo.RemoteAiLabelPostVo; -import org.dromara.system.domain.vo.AiLablePostVo; +import org.dromara.system.domain.vo.AiLabelPostVo; import org.dromara.system.domain.vo.SysPostVo; -import org.dromara.system.service.IAiLablePostService; +import org.dromara.system.service.IAiLabelPostService; import org.dromara.system.service.ISysPostService; import org.springframework.stereotype.Service; @@ -21,16 +21,16 @@ import java.util.List; @RequiredArgsConstructor @Service @DubboService -public class RemoteLablePostServicelmpl implements RemoteLablePostService { +public class RemoteLabelPostServicelmpl implements RemoteLabelPostService { private final ISysPostService sysPostService; - private final IAiLablePostService aiLablePostService; + private final IAiLabelPostService aiLabelPostService; @Override - public List selectLableByList(String postCode, Long deptId) { + public List selectLabelByList(String postCode, Long deptId) { SysPostVo sysPostVo = sysPostService.selectLableByList(postCode, deptId); if(sysPostVo != null){ - List aiLablePostVos = aiLablePostService.queryListByLable(sysPostVo.getPostId()); + List aiLablePostVos = aiLabelPostService.queryListByLabel(sysPostVo.getPostId()); return MapstructUtils.convert(aiLablePostVos, RemoteAiLabelPostVo.class); } return new ArrayList<>(); diff --git a/dk-modules/system/src/main/java/org/dromara/system/mapper/AiLabelPostMapper.java b/dk-modules/system/src/main/java/org/dromara/system/mapper/AiLabelPostMapper.java new file mode 100644 index 0000000..d01058e --- /dev/null +++ b/dk-modules/system/src/main/java/org/dromara/system/mapper/AiLabelPostMapper.java @@ -0,0 +1,18 @@ +package org.dromara.system.mapper; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; +import org.dromara.system.domain.AiLabelPost; +import org.dromara.system.domain.vo.AiLabelPostVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 职能-标签关系Mapper接口 + * + * @author LionLi + * @date 2025-03-11 + */ +public interface AiLabelPostMapper extends BaseMapperPlus { + Page selectAiLabelPostPage(@Param("page") Page page, @Param("ew") QueryWrapper wrapper); +} diff --git a/dk-modules/system/src/main/java/org/dromara/system/mapper/AiLablePostMapper.java b/dk-modules/system/src/main/java/org/dromara/system/mapper/AiLablePostMapper.java deleted file mode 100644 index b2ba80c..0000000 --- a/dk-modules/system/src/main/java/org/dromara/system/mapper/AiLablePostMapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.dromara.system.mapper; - -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.ibatis.annotations.Param; -import org.dromara.system.domain.AiLablePost; -import org.dromara.system.domain.bo.AiLablePostBo; -import org.dromara.system.domain.vo.AiLablePostVo; -import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; - -/** - * 职能-标签关系Mapper接口 - * - * @author LionLi - * @date 2025-03-11 - */ -public interface AiLablePostMapper extends BaseMapperPlus { - Page selectAiLablePostPage(@Param("page") Page page, @Param("ew") QueryWrapper wrapper); -} diff --git a/dk-modules/system/src/main/java/org/dromara/system/service/IAiLablePostService.java b/dk-modules/system/src/main/java/org/dromara/system/service/IAiLabelPostService.java similarity index 71% rename from dk-modules/system/src/main/java/org/dromara/system/service/IAiLablePostService.java rename to dk-modules/system/src/main/java/org/dromara/system/service/IAiLabelPostService.java index 00ead53..845dec2 100644 --- a/dk-modules/system/src/main/java/org/dromara/system/service/IAiLablePostService.java +++ b/dk-modules/system/src/main/java/org/dromara/system/service/IAiLabelPostService.java @@ -1,8 +1,7 @@ package org.dromara.system.service; -import org.dromara.system.domain.AiLablePost; -import org.dromara.system.domain.vo.AiLablePostVo; -import org.dromara.system.domain.bo.AiLablePostBo; +import org.dromara.system.domain.bo.AiLabelPostBo; +import org.dromara.system.domain.vo.AiLabelPostVo; import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.common.mybatis.core.page.PageQuery; @@ -15,15 +14,15 @@ import java.util.List; * @author LionLi * @date 2025-03-11 */ -public interface IAiLablePostService { +public interface IAiLabelPostService { /** * 查询职能-标签关系 * - * @param lableId 主键 + * @param labelId 主键 * @return 职能-标签关系 */ - AiLablePostVo queryById(Long lableId); + AiLabelPostVo queryById(Long labelId); /** * 分页查询职能-标签关系列表 @@ -32,7 +31,7 @@ public interface IAiLablePostService { * @param pageQuery 分页参数 * @return 职能-标签关系分页列表 */ - TableDataInfo queryPageList(AiLablePostBo bo, PageQuery pageQuery); + TableDataInfo queryPageList(AiLabelPostBo bo, PageQuery pageQuery); /** * 查询符合条件的职能-标签关系列表 @@ -40,7 +39,7 @@ public interface IAiLablePostService { * @param bo 查询条件 * @return 职能-标签关系列表 */ - List queryList(AiLablePostBo bo); + List queryList(AiLabelPostBo bo); /** * 新增职能-标签关系 @@ -48,7 +47,7 @@ public interface IAiLablePostService { * @param bo 职能-标签关系 * @return 是否新增成功 */ - Boolean insertByBo(AiLablePostBo bo); + Boolean insertByBo(AiLabelPostBo bo); /** * 修改职能-标签关系 @@ -56,7 +55,7 @@ public interface IAiLablePostService { * @param bo 职能-标签关系 * @return 是否修改成功 */ - Boolean updateByBo(AiLablePostBo bo); + Boolean updateByBo(AiLabelPostBo bo); /** * 校验并批量删除职能-标签关系信息 @@ -67,5 +66,5 @@ public interface IAiLablePostService { */ Boolean deleteWithValidByIds(Collection ids, Boolean isValid); - List queryListByLable(Long postId); + List queryListByLabel(Long postId); } diff --git a/dk-modules/system/src/main/java/org/dromara/system/service/IAiLabelService.java b/dk-modules/system/src/main/java/org/dromara/system/service/IAiLabelService.java index 8d3d4ff..b3cba0b 100644 --- a/dk-modules/system/src/main/java/org/dromara/system/service/IAiLabelService.java +++ b/dk-modules/system/src/main/java/org/dromara/system/service/IAiLabelService.java @@ -20,10 +20,10 @@ public interface IAiLabelService { /** * 查询ai 识别类型 * - * @param lableId 主键 + * @param labelId 主键 * @return ai 识别类型 */ - AiLabelVo queryById(Long lableId); + AiLabelVo queryById(Long labelId); List allList(); diff --git a/dk-modules/system/src/main/java/org/dromara/system/service/ISysPostService.java b/dk-modules/system/src/main/java/org/dromara/system/service/ISysPostService.java index 38c36e0..1a3fec5 100644 --- a/dk-modules/system/src/main/java/org/dromara/system/service/ISysPostService.java +++ b/dk-modules/system/src/main/java/org/dromara/system/service/ISysPostService.java @@ -2,9 +2,9 @@ package org.dromara.system.service; import org.dromara.common.mybatis.core.page.PageQuery; import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.system.domain.bo.AiLablePostBo; +import org.dromara.system.domain.bo.AiLabelPostBo; import org.dromara.system.domain.bo.SysPostBo; -import org.dromara.system.domain.vo.AiLablePostVo; +import org.dromara.system.domain.vo.AiLabelPostVo; import org.dromara.system.domain.vo.SysPostVo; import java.util.List; @@ -19,7 +19,7 @@ public interface ISysPostService { TableDataInfo selectPagePostList(SysPostBo post, PageQuery pageQuery); - TableDataInfo lableList(AiLablePostBo bo, PageQuery pageQuery); + TableDataInfo lableList(AiLabelPostBo bo, PageQuery pageQuery); /** * 查询岗位信息集合 * diff --git a/dk-modules/system/src/main/java/org/dromara/system/service/impl/AiLabelServiceImpl.java b/dk-modules/system/src/main/java/org/dromara/system/service/impl/AiLabelServiceImpl.java index 6a1ba3f..40e019c 100644 --- a/dk-modules/system/src/main/java/org/dromara/system/service/impl/AiLabelServiceImpl.java +++ b/dk-modules/system/src/main/java/org/dromara/system/service/impl/AiLabelServiceImpl.java @@ -35,17 +35,17 @@ public class AiLabelServiceImpl implements IAiLabelService { /** * 查询ai 识别类型 * - * @param lableId 主键 + * @param labelId 主键 * @return ai 识别类型 */ @Override - public AiLabelVo queryById(Long lableId){ - return baseMapper.selectVoById(lableId); + public AiLabelVo queryById(Long labelId){ + return baseMapper.selectVoById(labelId); } @Override public List allList() { - return baseMapper.selectVoList().stream().sorted(Comparator.comparing(AiLabelVo::getLableId)).toList(); + return baseMapper.selectVoList().stream().sorted(Comparator.comparing(AiLabelVo::getLabelId)).toList(); } /** @@ -96,7 +96,7 @@ public class AiLabelServiceImpl implements IAiLabelService { validEntityBeforeSave(add); boolean flag = baseMapper.insert(add) > 0; if (flag) { - bo.setLableId(add.getLableId()); + bo.setLabelId(add.getLabelId()); } return flag; } diff --git a/dk-modules/system/src/main/java/org/dromara/system/service/impl/AiLablePostServiceImpl.java b/dk-modules/system/src/main/java/org/dromara/system/service/impl/AiLablePostServiceImpl.java index d672325..ac8e27c 100644 --- a/dk-modules/system/src/main/java/org/dromara/system/service/impl/AiLablePostServiceImpl.java +++ b/dk-modules/system/src/main/java/org/dromara/system/service/impl/AiLablePostServiceImpl.java @@ -8,13 +8,13 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import lombok.RequiredArgsConstructor; +import org.dromara.system.domain.AiLabelPost; +import org.dromara.system.domain.vo.AiLabelPostVo; import org.dromara.system.mapper.AiLabelMapper; import org.springframework.stereotype.Service; -import org.dromara.system.domain.bo.AiLablePostBo; -import org.dromara.system.domain.vo.AiLablePostVo; -import org.dromara.system.domain.AiLablePost; -import org.dromara.system.mapper.AiLablePostMapper; -import org.dromara.system.service.IAiLablePostService; +import org.dromara.system.domain.bo.AiLabelPostBo; +import org.dromara.system.mapper.AiLabelPostMapper; +import org.dromara.system.service.IAiLabelPostService; import java.util.List; import java.util.Map; @@ -28,9 +28,9 @@ import java.util.Collection; */ @RequiredArgsConstructor @Service -public class AiLablePostServiceImpl implements IAiLablePostService { +public class AiLablePostServiceImpl implements IAiLabelPostService { - private final AiLablePostMapper baseMapper; + private final AiLabelPostMapper baseMapper; private final AiLabelMapper aiLabelMapper; /** @@ -40,7 +40,7 @@ public class AiLablePostServiceImpl implements IAiLablePostService { * @return 职能-标签关系 */ @Override - public AiLablePostVo queryById(Long lableId){ + public AiLabelPostVo queryById(Long lableId){ return baseMapper.selectVoById(lableId); } @@ -52,10 +52,10 @@ public class AiLablePostServiceImpl implements IAiLablePostService { * @return 职能-标签关系分页列表 */ @Override - public TableDataInfo queryPageList(AiLablePostBo bo, PageQuery pageQuery) { + public TableDataInfo queryPageList(AiLabelPostBo bo, PageQuery pageQuery) { QueryWrapper queryWrapper = new QueryWrapper(); queryWrapper.eq("a.post_id", bo.getPostId()); - Page result = baseMapper.selectAiLablePostPage(pageQuery.build(), queryWrapper); + Page result = baseMapper.selectAiLabelPostPage(pageQuery.build(), queryWrapper); return TableDataInfo.build(result); } @@ -66,14 +66,14 @@ public class AiLablePostServiceImpl implements IAiLablePostService { * @return 职能-标签关系列表 */ @Override - public List queryList(AiLablePostBo bo) { - LambdaQueryWrapper lqw = buildQueryWrapper(bo); + public List queryList(AiLabelPostBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); return baseMapper.selectVoList(lqw); } - private LambdaQueryWrapper buildQueryWrapper(AiLablePostBo bo) { + private LambdaQueryWrapper buildQueryWrapper(AiLabelPostBo bo) { Map params = bo.getParams(); - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); return lqw; } @@ -84,12 +84,12 @@ public class AiLablePostServiceImpl implements IAiLablePostService { * @return 是否新增成功 */ @Override - public Boolean insertByBo(AiLablePostBo bo) { - AiLablePost add = MapstructUtils.convert(bo, AiLablePost.class); + public Boolean insertByBo(AiLabelPostBo bo) { + AiLabelPost add = MapstructUtils.convert(bo, AiLabelPost.class); validEntityBeforeSave(add); boolean flag = baseMapper.insert(add) > 0; if (flag) { - bo.setLableId(add.getLableId()); + bo.setLableId(add.getLabelId()); } return flag; } @@ -101,8 +101,8 @@ public class AiLablePostServiceImpl implements IAiLablePostService { * @return 是否修改成功 */ @Override - public Boolean updateByBo(AiLablePostBo bo) { - AiLablePost update = MapstructUtils.convert(bo, AiLablePost.class); + public Boolean updateByBo(AiLabelPostBo bo) { + AiLabelPost update = MapstructUtils.convert(bo, AiLabelPost.class); validEntityBeforeSave(update); return baseMapper.updateById(update) > 0; } @@ -110,7 +110,7 @@ public class AiLablePostServiceImpl implements IAiLablePostService { /** * 保存前的数据校验 */ - private void validEntityBeforeSave(AiLablePost entity){ + private void validEntityBeforeSave(AiLabelPost entity){ //TODO 做一些数据校验,如唯一约束 } @@ -130,7 +130,7 @@ public class AiLablePostServiceImpl implements IAiLablePostService { } @Override - public List queryListByLable(Long postId) { + public List queryListByLabel(Long postId) { return List.of(); } } diff --git a/dk-modules/system/src/main/java/org/dromara/system/service/impl/SysPostServiceImpl.java b/dk-modules/system/src/main/java/org/dromara/system/service/impl/SysPostServiceImpl.java index 7bbf7f9..2a16881 100644 --- a/dk-modules/system/src/main/java/org/dromara/system/service/impl/SysPostServiceImpl.java +++ b/dk-modules/system/src/main/java/org/dromara/system/service/impl/SysPostServiceImpl.java @@ -14,15 +14,13 @@ import org.dromara.common.core.utils.StringUtils; import org.dromara.common.mybatis.core.page.PageQuery; import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.common.mybatis.helper.DataBaseHelper; -import org.dromara.system.domain.AiLablePost; import org.dromara.system.domain.SysDept; import org.dromara.system.domain.SysPost; import org.dromara.system.domain.SysUserPost; -import org.dromara.system.domain.bo.AiLablePostBo; +import org.dromara.system.domain.bo.AiLabelPostBo; import org.dromara.system.domain.bo.SysPostBo; -import org.dromara.system.domain.vo.AiLablePostVo; +import org.dromara.system.domain.vo.AiLabelPostVo; import org.dromara.system.domain.vo.SysPostVo; -import org.dromara.system.mapper.AiLablePostMapper; import org.dromara.system.mapper.SysDeptMapper; import org.dromara.system.mapper.SysPostMapper; import org.dromara.system.mapper.SysUserPostMapper; @@ -53,7 +51,7 @@ public class SysPostServiceImpl implements ISysPostService { } @Override - public TableDataInfo lableList(AiLablePostBo bo, PageQuery pageQuery) { + public TableDataInfo lableList(AiLabelPostBo bo, PageQuery pageQuery) { return aiLablePostService.queryPageList(bo,pageQuery); } diff --git a/dk-modules/system/src/main/resources/mapper/system/AiLablePostMapper.xml b/dk-modules/system/src/main/resources/mapper/system/AiLabelPostMapper.xml similarity index 52% rename from dk-modules/system/src/main/resources/mapper/system/AiLablePostMapper.xml rename to dk-modules/system/src/main/resources/mapper/system/AiLabelPostMapper.xml index 62ac66d..979d018 100644 --- a/dk-modules/system/src/main/resources/mapper/system/AiLablePostMapper.xml +++ b/dk-modules/system/src/main/resources/mapper/system/AiLabelPostMapper.xml @@ -2,9 +2,9 @@ - + - + SELECT *,a.label_cn as ,label_en FROM ai_lable_post p inner JOIN ai_label a ON p.label_id = a.label_id ${ew.customSqlSegment}