From 2db501d36d509d7214ee1afc425661ae674d129a Mon Sep 17 00:00:00 2001 From: zhangml Date: Fri, 16 Sep 2022 10:15:31 +0800 Subject: [PATCH 01/10] =?UTF-8?q?:sparkles:=20=E4=BC=98=E5=8C=96=E9=83=A8?= =?UTF-8?q?=E9=97=A8=E7=BA=A7=E8=81=94=E5=92=8C=E9=BB=98=E8=AE=A4=20#I5R3Q?= =?UTF-8?q?L?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/organization/department/edit.vue | 6 ++++++ .../impl/SystemAuthDeptServiceImpl.java | 4 ++++ .../mapper/system/SystemAuthDeptMapper.java | 19 +++++++++++++++++++ 3 files changed, 29 insertions(+) diff --git a/admin/src/views/organization/department/edit.vue b/admin/src/views/organization/department/edit.vue index 53112cd1..02438837 100644 --- a/admin/src/views/organization/department/edit.vue +++ b/admin/src/views/organization/department/edit.vue @@ -126,6 +126,12 @@ const { optionsData } = useDictOptions<{ } }) +watch(optionsData, (arr) => { + if (arr.dept) { + formData.pid = arr.dept[0].id + } +}) + const handleSubmit = async () => { await formRef.value?.validate() mode.value == 'edit' ? await deptEdit(formData) : await deptAdd(formData) diff --git a/server/like-admin/src/main/java/com/mdd/admin/service/system/impl/SystemAuthDeptServiceImpl.java b/server/like-admin/src/main/java/com/mdd/admin/service/system/impl/SystemAuthDeptServiceImpl.java index 2b2c4522..11167569 100644 --- a/server/like-admin/src/main/java/com/mdd/admin/service/system/impl/SystemAuthDeptServiceImpl.java +++ b/server/like-admin/src/main/java/com/mdd/admin/service/system/impl/SystemAuthDeptServiceImpl.java @@ -14,6 +14,7 @@ import com.mdd.common.utils.ArrayUtil; import com.mdd.common.utils.TimeUtil; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.ArrayList; @@ -162,6 +163,7 @@ class SystemAuthDeptServiceImpl implements ISystemAuthDeptService { * @author fzr * @param systemAuthDeptParam 参数 */ + @Transactional(rollbackFor = Exception.class) @Override public void edit(SystemAuthDeptParam systemAuthDeptParam) { SystemAuthDept model = systemAuthDeptMapper.selectOne( @@ -185,6 +187,8 @@ class SystemAuthDeptServiceImpl implements ISystemAuthDeptService { model.setIsStop(systemAuthDeptParam.getIsStop()); model.setUpdateTime(System.currentTimeMillis() / 1000); systemAuthDeptMapper.updateById(model); + //级联更新自己状态 + systemAuthDeptMapper.updateChilder(systemAuthDeptParam.getIsStop(),model.getId()); } /** diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthDeptMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthDeptMapper.java index 68e8dcc4..a975ba70 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthDeptMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthDeptMapper.java @@ -3,10 +3,29 @@ package com.mdd.common.mapper.system; import com.mdd.common.core.basics.IBaseMapper; import com.mdd.common.entity.system.SystemAuthDept; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Update; /** * 系统岗位Mapper */ @Mapper public interface SystemAuthDeptMapper extends IBaseMapper { + + /** + * 级联更新部门状态 + * @param stopStatus + * @param id + * @return + */ + @Update(value = "WITH recursive temp AS (SELECT id, pid\n" + + " FROM la_system_auth_dept\n" + + " WHERE id = #{id}\n" + " UNION ALL\n" + + " SELECT u.id, u.pid\n" + + " FROM la_system_auth_dept u,\n" + + " temp t\n" + + " WHERE u.pid = t.id and u.is_stop <> #{stopStatus})\n" + + "update la_system_auth_dept set is_stop = #{stopStatus}\n" + + "where id in (select id from temp)") + void updateChilder(@Param("stopStatus") int stopStatus, @Param("id") Integer id); } -- Gitee From 78db1ace6db75d777080dbc7eedcd3abcfc6216b Mon Sep 17 00:00:00 2001 From: hawk <317642196@qq.com> Date: Wed, 21 Sep 2022 23:20:13 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90=E5=99=A8=E5=AF=BC=E5=85=A5=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=A1=A8=EF=BC=8C=E7=BC=96=E8=BE=91=E5=AD=97=E6=AE=B5=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E5=85=BC=E5=AE=B9mysql8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mdd/generator/mapper/GenTableMapper.java | 2 +- .../mdd/generator/service/impl/GenerateServiceImpl.java | 6 +++--- .../src/main/java/com/mdd/generator/util/GenUtil.java | 9 +++++---- .../src/main/java/com/mdd/generator/vo/DbTableVo.java | 1 + 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/server/like-generator/src/main/java/com/mdd/generator/mapper/GenTableMapper.java b/server/like-generator/src/main/java/com/mdd/generator/mapper/GenTableMapper.java index 36746426..d88d8971 100644 --- a/server/like-generator/src/main/java/com/mdd/generator/mapper/GenTableMapper.java +++ b/server/like-generator/src/main/java/com/mdd/generator/mapper/GenTableMapper.java @@ -54,7 +54,7 @@ public interface GenTableMapper extends IBaseMapper { "#{name}" + "", ""}) - List> selectDbTableListByNames(String[] tableNames); + List selectDbTableListByNames(String[] tableNames); /** * 根据表名查询列信息 diff --git a/server/like-generator/src/main/java/com/mdd/generator/service/impl/GenerateServiceImpl.java b/server/like-generator/src/main/java/com/mdd/generator/service/impl/GenerateServiceImpl.java index e3c71f84..ce2b3afe 100644 --- a/server/like-generator/src/main/java/com/mdd/generator/service/impl/GenerateServiceImpl.java +++ b/server/like-generator/src/main/java/com/mdd/generator/service/impl/GenerateServiceImpl.java @@ -187,8 +187,8 @@ public class GenerateServiceImpl implements IGenerateService { @Transactional public void importTable(String[] tableNames) { try { - List> tables = genTableMapper.selectDbTableListByNames(tableNames); - for (Map map : tables) { + List tables = genTableMapper.selectDbTableListByNames(tableNames); + for (DbTableVo map : tables) { // 生成表信息 GenTable table = new GenTable(); GenUtil.initTable(table, map); @@ -196,7 +196,7 @@ public class GenerateServiceImpl implements IGenerateService { // 生成列信息 if (row > 0) { - String tableName = map.get("table_name"); + String tableName = map.getTableName(); List genTableColumns = genTableMapper.selectDbTableColumnsByName(tableName); for (GenTableColumn column : genTableColumns) { GenUtil.initColumn(column, table); diff --git a/server/like-generator/src/main/java/com/mdd/generator/util/GenUtil.java b/server/like-generator/src/main/java/com/mdd/generator/util/GenUtil.java index 24b44c79..3c4c505d 100644 --- a/server/like-generator/src/main/java/com/mdd/generator/util/GenUtil.java +++ b/server/like-generator/src/main/java/com/mdd/generator/util/GenUtil.java @@ -9,6 +9,7 @@ import com.mdd.generator.constant.JavaConstants; import com.mdd.generator.constant.SqlConstants; import com.mdd.generator.entity.GenTable; import com.mdd.generator.entity.GenTableColumn; +import com.mdd.generator.vo.DbTableVo; import org.apache.commons.lang3.RegExUtils; import java.util.Arrays; @@ -23,12 +24,12 @@ public class GenUtil { * @param table 表 * @param map 参数 */ - public static void initTable(GenTable table, Map map) { - String tableName = map.get("table_name"); - String tableDesc = map.get("table_comment"); + public static void initTable(GenTable table, DbTableVo map) { + String tableName = map.getTableName(); + String tableDesc = map.getTableComment(); table.setTableName(tableName); table.setTableComment(tableDesc); - table.setAuthorName(map.getOrDefault("author_name", "")); + table.setAuthorName(map.getAuthorName()); table.setEntityName(GenUtil.toClassName(tableName)); table.setModuleName(GenUtil.toModuleName(tableName)); table.setFunctionName(GenUtil.replaceText(tableDesc)); diff --git a/server/like-generator/src/main/java/com/mdd/generator/vo/DbTableVo.java b/server/like-generator/src/main/java/com/mdd/generator/vo/DbTableVo.java index 17036fc0..99526825 100644 --- a/server/like-generator/src/main/java/com/mdd/generator/vo/DbTableVo.java +++ b/server/like-generator/src/main/java/com/mdd/generator/vo/DbTableVo.java @@ -14,6 +14,7 @@ public class DbTableVo implements Serializable { private String tableName; // 表的名称 private String tableComment; // 表的描述 + private String authorName; // 作者名称 private String createTime; // 创建时间 private String updateTime; // 更新时间 -- Gitee From 6dc8cc78a23afe70b7d907f0a9f7fe3b0142893c Mon Sep 17 00:00:00 2001 From: TinyAnts Date: Thu, 22 Sep 2022 09:39:24 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E8=B0=83=E6=95=B4SQL=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/install.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/install.sql b/sql/install.sql index 209ec750..dbccc6e3 100644 --- a/sql/install.sql +++ b/sql/install.sql @@ -543,7 +543,7 @@ INSERT INTO `la_system_config` VALUES (15, 'website', 'shopName', 'LikeAdmin开 INSERT INTO `la_system_config` VALUES (16, 'website', 'shopLogo', '/api/static/shop_logo.png', 1631255140, 1631255140); INSERT INTO `la_system_config` VALUES (17, 'protocol', 'service', '{\"name\":\"服务协议\",\"content\":\"\"}', 1660620367, 1660620367); INSERT INTO `la_system_config` VALUES (18, 'protocol', 'privacy', '{\"name\":\"隐私协议\",\"content\":\"\"}', 1660620367, 1660620367); -INSERT INTO `la_system_config` VALUES (19, 'tabbar', 'style', '{\"defaultColor\":\"#481F1F\",\"selectedColor\":\"#961D1D\"}', 1660620367, 1662544900); +INSERT INTO `la_system_config` VALUES (19, 'tabbar', 'style', '{\"defaultColor\":\"#4A5DFF\",\"selectedColor\":\"#EA5455\"}', 1660620367, 1662544900); INSERT INTO `la_system_config` VALUES (20, 'search', 'isHotSearch', '0', 1660620367, 1662546997); INSERT INTO `la_system_config` VALUES (30, 'h5_channel', 'status', '1', 1660620367, 1660620367); INSERT INTO `la_system_config` VALUES (31, 'h5_channel', 'close', '0', 1660620367, 1660620367); -- Gitee From a70c5f6fc3675b259197dc82e8a4355cd61d727c Mon Sep 17 00:00:00 2001 From: hawk <317642196@qq.com> Date: Fri, 23 Sep 2022 07:55:01 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E4=B8=8D=E6=9B=B4=E6=96=B0=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 6 ++++- admin/.env.development | 2 +- .../resources/application-pro-example.yml | 24 ------------------- .../src/main/resources/application.yml | 2 +- .../src/main/resources/log4j2-spring.xml | 2 +- 5 files changed, 8 insertions(+), 28 deletions(-) delete mode 100644 server/like-admin/src/main/resources/application-pro-example.yml diff --git a/.gitignore b/.gitignore index e1f1d407..8f45c815 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,8 @@ application-dev.yml application-pro.yml application-dem.yml application-prod.yml -application-test.yml \ No newline at end of file +application-test.yml +.env.development +application-pro-example.yml +application-remote.yml +application.yml diff --git a/admin/.env.development b/admin/.env.development index ee70684f..20369441 100644 --- a/admin/.env.development +++ b/admin/.env.development @@ -1,4 +1,4 @@ NODE_ENV = 'development' # 请求域名 -VITE_APP_BASE_URL='https://likeadmin-java.yixiangonline.com' \ No newline at end of file +VITE_APP_BASE_URL='http://localhost:8082' diff --git a/server/like-admin/src/main/resources/application-pro-example.yml b/server/like-admin/src/main/resources/application-pro-example.yml deleted file mode 100644 index f036cf79..00000000 --- a/server/like-admin/src/main/resources/application-pro-example.yml +++ /dev/null @@ -1,24 +0,0 @@ -# 项目配置 -like: - upload-directory: /www/uploads/likeadmin-java/ # 上传目录 - -# 框架配置 -spring: - # 数据源配置 - datasource: - url: jdbc:mysql://localhost:3306/【库名称】?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false - type: com.zaxxer.hikari.HikariDataSource # 数据源类型 - driver-class-name: com.mysql.jdbc.Driver # MySql的驱动 - username: root # 数据库账号 - password: root # 数据库密码 - # Redis配置 - redis: - host: localhost # Redis服务地址 - port: 6379 # Redis端口 - password: # Redis密码 - database: 0 # 数据库索引 - -# Mybatis-plus配置 【是否开启SQL日志输出】 -#mybatis-plus: -# configuration: -# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl \ No newline at end of file diff --git a/server/like-admin/src/main/resources/application.yml b/server/like-admin/src/main/resources/application.yml index 2c5b311b..a0a09065 100644 --- a/server/like-admin/src/main/resources/application.yml +++ b/server/like-admin/src/main/resources/application.yml @@ -9,7 +9,7 @@ server: # 框架配置 spring: profiles: - active: dev + active: pro mvc: static-path-pattern: /api/static/** # 数据源配置 diff --git a/server/like-admin/src/main/resources/log4j2-spring.xml b/server/like-admin/src/main/resources/log4j2-spring.xml index afe77105..7b86706f 100644 --- a/server/like-admin/src/main/resources/log4j2-spring.xml +++ b/server/like-admin/src/main/resources/log4j2-spring.xml @@ -6,7 +6,7 @@ - + -- Gitee From 04a5d121a82e5de2b91d1569d73e69481a45061f Mon Sep 17 00:00:00 2001 From: hawk <317642196@qq.com> Date: Fri, 23 Sep 2022 07:56:15 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90=E5=99=A8=E7=BC=96=E8=BE=91=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=A1=A8=EF=BC=8C=E4=B8=8D=E8=83=BD=E4=BF=9D=E5=AD=98java?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mdd/generator/service/impl/GenerateServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/server/like-generator/src/main/java/com/mdd/generator/service/impl/GenerateServiceImpl.java b/server/like-generator/src/main/java/com/mdd/generator/service/impl/GenerateServiceImpl.java index ce2b3afe..17cc0e26 100644 --- a/server/like-generator/src/main/java/com/mdd/generator/service/impl/GenerateServiceImpl.java +++ b/server/like-generator/src/main/java/com/mdd/generator/service/impl/GenerateServiceImpl.java @@ -248,6 +248,7 @@ public class GenerateServiceImpl implements IGenerateService { GenTableColumn column = genTableColumnMapper.selectById(id); column.setColumnComment(item.get("columnComment")); column.setJavaField(item.get("javaField")); + column.setJavaType(item.get("javaType")); column.setIsRequired(Integer.parseInt(item.get("isRequired"))); column.setIsInsert(Integer.parseInt(item.get("isInsert"))); column.setIsEdit(Integer.parseInt(item.get("isEdit"))); -- Gitee From a6d3ffb01610f486766f5ba3e3793b452117b817 Mon Sep 17 00:00:00 2001 From: hawk <317642196@qq.com> Date: Fri, 23 Sep 2022 08:11:23 +0800 Subject: [PATCH 06/10] =?UTF-8?q?Revert=20"=E4=BF=AE=E5=A4=8D=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=94=9F=E6=88=90=E5=99=A8=E7=BC=96=E8=BE=91=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=A1=A8=EF=BC=8C=E4=B8=8D=E8=83=BD=E4=BF=9D=E5=AD=98?= =?UTF-8?q?java=E7=B1=BB=E5=9E=8B"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 04a5d121a82e5de2b91d1569d73e69481a45061f. --- .../java/com/mdd/generator/service/impl/GenerateServiceImpl.java | 1 - 1 file changed, 1 deletion(-) diff --git a/server/like-generator/src/main/java/com/mdd/generator/service/impl/GenerateServiceImpl.java b/server/like-generator/src/main/java/com/mdd/generator/service/impl/GenerateServiceImpl.java index 17cc0e26..ce2b3afe 100644 --- a/server/like-generator/src/main/java/com/mdd/generator/service/impl/GenerateServiceImpl.java +++ b/server/like-generator/src/main/java/com/mdd/generator/service/impl/GenerateServiceImpl.java @@ -248,7 +248,6 @@ public class GenerateServiceImpl implements IGenerateService { GenTableColumn column = genTableColumnMapper.selectById(id); column.setColumnComment(item.get("columnComment")); column.setJavaField(item.get("javaField")); - column.setJavaType(item.get("javaType")); column.setIsRequired(Integer.parseInt(item.get("isRequired"))); column.setIsInsert(Integer.parseInt(item.get("isInsert"))); column.setIsEdit(Integer.parseInt(item.get("isEdit"))); -- Gitee From ee8636ec54e22f2759e539d4177a2a21a607d817 Mon Sep 17 00:00:00 2001 From: hawk <317642196@qq.com> Date: Fri, 23 Sep 2022 08:31:46 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90=E5=99=A8=E7=BC=96=E8=BE=91=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=A1=A8=EF=BC=8C=E4=B8=8D=E8=83=BD=E4=BF=9D=E5=AD=98java?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mdd/generator/service/impl/GenerateServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/server/like-generator/src/main/java/com/mdd/generator/service/impl/GenerateServiceImpl.java b/server/like-generator/src/main/java/com/mdd/generator/service/impl/GenerateServiceImpl.java index ce2b3afe..17cc0e26 100644 --- a/server/like-generator/src/main/java/com/mdd/generator/service/impl/GenerateServiceImpl.java +++ b/server/like-generator/src/main/java/com/mdd/generator/service/impl/GenerateServiceImpl.java @@ -248,6 +248,7 @@ public class GenerateServiceImpl implements IGenerateService { GenTableColumn column = genTableColumnMapper.selectById(id); column.setColumnComment(item.get("columnComment")); column.setJavaField(item.get("javaField")); + column.setJavaType(item.get("javaType")); column.setIsRequired(Integer.parseInt(item.get("isRequired"))); column.setIsInsert(Integer.parseInt(item.get("isInsert"))); column.setIsEdit(Integer.parseInt(item.get("isEdit"))); -- Gitee From 5faf6aa301013c6e9078ca53922d678619d22929 Mon Sep 17 00:00:00 2001 From: hawk <317642196@qq.com> Date: Fri, 23 Sep 2022 09:36:26 +0800 Subject: [PATCH 08/10] =?UTF-8?q?Revert=20"=E4=B8=8D=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E9=85=8D=E7=BD=AE"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit a70c5f6fc3675b259197dc82e8a4355cd61d727c. --- .gitignore | 6 +---- admin/.env.development | 2 +- .../resources/application-pro-example.yml | 24 +++++++++++++++++++ .../src/main/resources/application.yml | 2 +- .../src/main/resources/log4j2-spring.xml | 2 +- 5 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 server/like-admin/src/main/resources/application-pro-example.yml diff --git a/.gitignore b/.gitignore index 8f45c815..e1f1d407 100644 --- a/.gitignore +++ b/.gitignore @@ -7,8 +7,4 @@ application-dev.yml application-pro.yml application-dem.yml application-prod.yml -application-test.yml -.env.development -application-pro-example.yml -application-remote.yml -application.yml +application-test.yml \ No newline at end of file diff --git a/admin/.env.development b/admin/.env.development index 20369441..ee70684f 100644 --- a/admin/.env.development +++ b/admin/.env.development @@ -1,4 +1,4 @@ NODE_ENV = 'development' # 请求域名 -VITE_APP_BASE_URL='http://localhost:8082' +VITE_APP_BASE_URL='https://likeadmin-java.yixiangonline.com' \ No newline at end of file diff --git a/server/like-admin/src/main/resources/application-pro-example.yml b/server/like-admin/src/main/resources/application-pro-example.yml new file mode 100644 index 00000000..f036cf79 --- /dev/null +++ b/server/like-admin/src/main/resources/application-pro-example.yml @@ -0,0 +1,24 @@ +# 项目配置 +like: + upload-directory: /www/uploads/likeadmin-java/ # 上传目录 + +# 框架配置 +spring: + # 数据源配置 + datasource: + url: jdbc:mysql://localhost:3306/【库名称】?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false + type: com.zaxxer.hikari.HikariDataSource # 数据源类型 + driver-class-name: com.mysql.jdbc.Driver # MySql的驱动 + username: root # 数据库账号 + password: root # 数据库密码 + # Redis配置 + redis: + host: localhost # Redis服务地址 + port: 6379 # Redis端口 + password: # Redis密码 + database: 0 # 数据库索引 + +# Mybatis-plus配置 【是否开启SQL日志输出】 +#mybatis-plus: +# configuration: +# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl \ No newline at end of file diff --git a/server/like-admin/src/main/resources/application.yml b/server/like-admin/src/main/resources/application.yml index a0a09065..2c5b311b 100644 --- a/server/like-admin/src/main/resources/application.yml +++ b/server/like-admin/src/main/resources/application.yml @@ -9,7 +9,7 @@ server: # 框架配置 spring: profiles: - active: pro + active: dev mvc: static-path-pattern: /api/static/** # 数据源配置 diff --git a/server/like-admin/src/main/resources/log4j2-spring.xml b/server/like-admin/src/main/resources/log4j2-spring.xml index 7b86706f..afe77105 100644 --- a/server/like-admin/src/main/resources/log4j2-spring.xml +++ b/server/like-admin/src/main/resources/log4j2-spring.xml @@ -6,7 +6,7 @@ - + -- Gitee From b2cf624380cc5a55083d5f04ae78834a9fef9449 Mon Sep 17 00:00:00 2001 From: hawk <317642196@qq.com> Date: Fri, 23 Sep 2022 09:40:01 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E5=8F=96=E6=B6=88=E6=9B=B4=E6=96=B0javaT?= =?UTF-8?q?ype?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mdd/generator/service/impl/GenerateServiceImpl.java | 1 - 1 file changed, 1 deletion(-) diff --git a/server/like-generator/src/main/java/com/mdd/generator/service/impl/GenerateServiceImpl.java b/server/like-generator/src/main/java/com/mdd/generator/service/impl/GenerateServiceImpl.java index 17cc0e26..ce2b3afe 100644 --- a/server/like-generator/src/main/java/com/mdd/generator/service/impl/GenerateServiceImpl.java +++ b/server/like-generator/src/main/java/com/mdd/generator/service/impl/GenerateServiceImpl.java @@ -248,7 +248,6 @@ public class GenerateServiceImpl implements IGenerateService { GenTableColumn column = genTableColumnMapper.selectById(id); column.setColumnComment(item.get("columnComment")); column.setJavaField(item.get("javaField")); - column.setJavaType(item.get("javaType")); column.setIsRequired(Integer.parseInt(item.get("isRequired"))); column.setIsInsert(Integer.parseInt(item.get("isInsert"))); column.setIsEdit(Integer.parseInt(item.get("isEdit"))); -- Gitee From 808cda3277305f3f7d56ef703ea7f58bbdaf39d5 Mon Sep 17 00:00:00 2001 From: Ants Date: Fri, 23 Sep 2022 07:00:25 +0000 Subject: [PATCH 10/10] =?UTF-8?q?=E5=9B=9E=E9=80=80=20'Pull=20Request=20!8?= =?UTF-8?q?=20:=20=E5=A4=84=E7=90=86iss=20=E4=BC=98=E5=8C=96=E5=BB=BA?= =?UTF-8?q?=E8=AE=AE'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/organization/department/edit.vue | 6 ------ .../impl/SystemAuthDeptServiceImpl.java | 4 ---- .../mapper/system/SystemAuthDeptMapper.java | 19 ------------------- 3 files changed, 29 deletions(-) diff --git a/admin/src/views/organization/department/edit.vue b/admin/src/views/organization/department/edit.vue index 3dec91d1..70b5e584 100644 --- a/admin/src/views/organization/department/edit.vue +++ b/admin/src/views/organization/department/edit.vue @@ -125,12 +125,6 @@ const { optionsData } = useDictOptions<{ } }) -watch(optionsData, (arr) => { - if (arr.dept) { - formData.pid = arr.dept[0].id - } -}) - const handleSubmit = async () => { await formRef.value?.validate() mode.value == 'edit' ? await deptEdit(formData) : await deptAdd(formData) diff --git a/server/like-admin/src/main/java/com/mdd/admin/service/system/impl/SystemAuthDeptServiceImpl.java b/server/like-admin/src/main/java/com/mdd/admin/service/system/impl/SystemAuthDeptServiceImpl.java index 33f9c1dc..b9afdde1 100644 --- a/server/like-admin/src/main/java/com/mdd/admin/service/system/impl/SystemAuthDeptServiceImpl.java +++ b/server/like-admin/src/main/java/com/mdd/admin/service/system/impl/SystemAuthDeptServiceImpl.java @@ -14,7 +14,6 @@ import com.mdd.common.utils.ArrayUtil; import com.mdd.common.utils.TimeUtil; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.*; @@ -160,7 +159,6 @@ class SystemAuthDeptServiceImpl implements ISystemAuthDeptService { * @author fzr * @param systemAuthDeptParam 参数 */ - @Transactional(rollbackFor = Exception.class) @Override public void edit(SystemAuthDeptParam systemAuthDeptParam) { SystemAuthDept model = systemAuthDeptMapper.selectOne( @@ -184,8 +182,6 @@ class SystemAuthDeptServiceImpl implements ISystemAuthDeptService { model.setIsStop(systemAuthDeptParam.getIsStop()); model.setUpdateTime(System.currentTimeMillis() / 1000); systemAuthDeptMapper.updateById(model); - //级联更新自己状态 - systemAuthDeptMapper.updateChilder(systemAuthDeptParam.getIsStop(),model.getId()); } /** diff --git a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthDeptMapper.java b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthDeptMapper.java index a975ba70..68e8dcc4 100644 --- a/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthDeptMapper.java +++ b/server/like-common/src/main/java/com/mdd/common/mapper/system/SystemAuthDeptMapper.java @@ -3,29 +3,10 @@ package com.mdd.common.mapper.system; import com.mdd.common.core.basics.IBaseMapper; import com.mdd.common.entity.system.SystemAuthDept; import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.apache.ibatis.annotations.Update; /** * 系统岗位Mapper */ @Mapper public interface SystemAuthDeptMapper extends IBaseMapper { - - /** - * 级联更新部门状态 - * @param stopStatus - * @param id - * @return - */ - @Update(value = "WITH recursive temp AS (SELECT id, pid\n" - + " FROM la_system_auth_dept\n" - + " WHERE id = #{id}\n" + " UNION ALL\n" - + " SELECT u.id, u.pid\n" - + " FROM la_system_auth_dept u,\n" - + " temp t\n" - + " WHERE u.pid = t.id and u.is_stop <> #{stopStatus})\n" - + "update la_system_auth_dept set is_stop = #{stopStatus}\n" - + "where id in (select id from temp)") - void updateChilder(@Param("stopStatus") int stopStatus, @Param("id") Integer id); } -- Gitee