From 4f90e1e90694b8ecbc09c6617cef236e5dd41f46 Mon Sep 17 00:00:00 2001 From: weizhiqiang <> Date: Fri, 30 Sep 2022 18:02:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=AD=97=E5=85=B8=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=9F=A5=E8=AF=A2=E4=BF=AE=E6=94=B9=EF=BC=8C=E5=BE=85?= =?UTF-8?q?=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/CodeModelGroupServiceImpl.java | 6 +++++ .../service/impl/CodeModelServiceImpl.java | 6 +++++ .../mapper/codedoc/CodeModelGroupMapper.xml | 27 ++++++++----------- .../mapper/codedoc/CodeModelMapper.xml | 9 +++---- .../service/impl/SysDictDataServiceImpl.java | 6 +++++ .../mapper/common/SysDictDataMapper.xml | 6 ++--- 6 files changed, 34 insertions(+), 26 deletions(-) diff --git a/skyeye-promote/skyeye-code-doc/src/main/java/com/skyeye/eve/service/impl/CodeModelGroupServiceImpl.java b/skyeye-promote/skyeye-code-doc/src/main/java/com/skyeye/eve/service/impl/CodeModelGroupServiceImpl.java index 4cc4c161..675f4a0e 100644 --- a/skyeye-promote/skyeye-code-doc/src/main/java/com/skyeye/eve/service/impl/CodeModelGroupServiceImpl.java +++ b/skyeye-promote/skyeye-code-doc/src/main/java/com/skyeye/eve/service/impl/CodeModelGroupServiceImpl.java @@ -14,6 +14,7 @@ import com.skyeye.common.util.ToolUtil; import com.skyeye.eve.dao.CodeModelGroupDao; import com.skyeye.eve.entity.codedoc.group.CodeModelGroupQueryDo; import com.skyeye.eve.service.CodeModelGroupService; +import com.skyeye.eve.service.IAuthUserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; @@ -41,6 +42,9 @@ public class CodeModelGroupServiceImpl implements CodeModelGroupService { @Value("${jdbc.database.name}") private String dbName; + @Autowired + private IAuthUserService iAuthUserService; + /** * 获取模板分组列表 * @@ -52,6 +56,8 @@ public class CodeModelGroupServiceImpl implements CodeModelGroupService { CodeModelGroupQueryDo codeModelGroupQuery = inputObject.getParams(CodeModelGroupQueryDo.class); Page pages = PageHelper.startPage(codeModelGroupQuery.getPage(), codeModelGroupQuery.getLimit()); List> beans = codeModelGroupDao.queryCodeModelGroupList(codeModelGroupQuery); + iAuthUserService.setNameByIdList(beans, "createId", "createName"); + iAuthUserService.setNameByIdList(beans, "lastUpdateId", "lastUpdateName"); outputObject.setBeans(beans); outputObject.settotal(pages.getTotal()); } diff --git a/skyeye-promote/skyeye-code-doc/src/main/java/com/skyeye/eve/service/impl/CodeModelServiceImpl.java b/skyeye-promote/skyeye-code-doc/src/main/java/com/skyeye/eve/service/impl/CodeModelServiceImpl.java index bb043186..08f2ae26 100644 --- a/skyeye-promote/skyeye-code-doc/src/main/java/com/skyeye/eve/service/impl/CodeModelServiceImpl.java +++ b/skyeye-promote/skyeye-code-doc/src/main/java/com/skyeye/eve/service/impl/CodeModelServiceImpl.java @@ -13,6 +13,7 @@ import com.skyeye.common.util.DateUtil; import com.skyeye.eve.dao.CodeModelDao; import com.skyeye.eve.entity.codedoc.model.CodeModelQueryDo; import com.skyeye.eve.service.CodeModelService; +import com.skyeye.eve.service.IAuthUserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -35,6 +36,9 @@ public class CodeModelServiceImpl implements CodeModelService { @Autowired private CodeModelDao codeModelDao; + @Autowired + private IAuthUserService iAuthUserService; + /** * 获取模板列表 * @@ -46,6 +50,8 @@ public class CodeModelServiceImpl implements CodeModelService { CodeModelQueryDo codeModelQuery = inputObject.getParams(CodeModelQueryDo.class); Page pages = PageHelper.startPage(codeModelQuery.getPage(), codeModelQuery.getLimit()); List> beans = codeModelDao.queryCodeModelList(codeModelQuery); + iAuthUserService.setNameByIdList(beans, "createId", "createName"); + iAuthUserService.setNameByIdList(beans, "lastUpdateId", "lastUpdateName"); outputObject.setBeans(beans); outputObject.settotal(pages.getTotal()); } diff --git a/skyeye-promote/skyeye-code-doc/src/main/resources/mapper/codedoc/CodeModelGroupMapper.xml b/skyeye-promote/skyeye-code-doc/src/main/resources/mapper/codedoc/CodeModelGroupMapper.xml index 856ebf22..3227caa2 100644 --- a/skyeye-promote/skyeye-code-doc/src/main/resources/mapper/codedoc/CodeModelGroupMapper.xml +++ b/skyeye-promote/skyeye-code-doc/src/main/resources/mapper/codedoc/CodeModelGroupMapper.xml @@ -8,16 +8,14 @@ a.group_name groupName, a.group_num groupNum, a.group_desc groupDesc, - CONCAT_WS('_', d.job_number, d.user_name) createName, + a.create_id createId, CONVERT(a.create_time, char) createTime, - CONCAT_WS('_', e.job_number, e.user_name) lastUpdateName, + a.last_update_id lastUpdateId, CONVERT(a.last_update_time, char) lastUpdateTime, (SELECT COUNT(*) FROM code_model b WHERE b.group_id = a.id) modelNum, (SELECT COUNT(*) FROM (SELECT COUNT(*), c.group_id FROM code_model_history c GROUP BY c.file_path) d WHERE d.group_id = a.id) useNum FROM code_model_group a - LEFT JOIN sys_eve_user_staff d ON a.create_id = d.user_id - LEFT JOIN sys_eve_user_staff e ON a.last_update_id = e.user_id AND a.group_name LIKE '%${groupName}%' @@ -52,16 +50,14 @@ COUNT(*) modelNum FROM code_model b - WHERE - b.group_id = #{id} + WHERE b.group_id = #{id} DELETE FROM code_model_group - WHERE - id = #{id} + WHERE id = #{id} @@ -112,7 +108,7 @@ b.TABLE_COMMENT AS tableComment FROM information_schema.COLUMNS a - LEFT JOIN information_schema.TABLES b ON a.TABLE_NAME = b.TABLE_NAME + LEFT JOIN information_schema.TABLES b ON a.TABLE_NAME = b.TABLE_NAME WHERE a.TABLE_SCHEMA = #{dbName} AND a.TABLE_NAME = #{tableName} GROUP BY a.COLUMN_NAME @@ -130,7 +126,7 @@ FROM code_model a WHERE a.group_id = #{groupId} - ORDER BY a.create_time DESC + ORDER BY a.create_time DESC \ No newline at end of file diff --git a/skyeye-promote/skyeye-code-doc/src/main/resources/mapper/codedoc/CodeModelMapper.xml b/skyeye-promote/skyeye-code-doc/src/main/resources/mapper/codedoc/CodeModelMapper.xml index 95c40af8..f349efc0 100644 --- a/skyeye-promote/skyeye-code-doc/src/main/resources/mapper/codedoc/CodeModelMapper.xml +++ b/skyeye-promote/skyeye-code-doc/src/main/resources/mapper/codedoc/CodeModelMapper.xml @@ -10,14 +10,12 @@ a.model_text modelText, a.model_type modelType, (SELECT COUNT(*) FROM code_model_history b WHERE b.model_id = a.id) useNum, - CONCAT_WS('_', d.job_number, d.user_name) createName, + a.create_id createId, CONVERT(a.create_time, char) createTime, - CONCAT_WS('_', e.job_number, e.user_name) lastUpdateName, + a.last_update_id lastUpdateId, CONVERT(a.last_update_time, char) lastUpdateTime FROM code_model a - LEFT JOIN sys_eve_user_staff d ON a.create_id = d.user_id - LEFT JOIN sys_eve_user_staff e ON a.last_update_id = e.user_id WHERE a.group_id = #{groupId} ORDER BY a.create_time DESC @@ -46,8 +44,7 @@ DELETE FROM code_model - WHERE - id = #{id} + WHERE id = #{id}