From d4cf14b5b867822a6de5b068df491deb828be47b Mon Sep 17 00:00:00 2001 From: zhangml Date: Fri, 16 Sep 2022 10:15:31 +0800 Subject: [PATCH 1/3] =?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 f1d13624..2f2be211 100644 --- a/admin/src/views/organization/department/edit.vue +++ b/admin/src/views/organization/department/edit.vue @@ -125,6 +125,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 744b4338..49ae65ce 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 6150677e7dd4ea22a93db1b4535d39ac15fec024 Mon Sep 17 00:00:00 2001 From: zhangml Date: Fri, 16 Sep 2022 13:30:12 +0800 Subject: [PATCH 2/3] =?UTF-8?q?:sparkles:=20=E4=BC=98=E5=8C=96=E5=A4=8D?= =?UTF-8?q?=E5=88=B6=E5=8A=9F=E8=83=BD=20#I5QLCG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/src/views/channel/weapp.vue | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/admin/src/views/channel/weapp.vue b/admin/src/views/channel/weapp.vue index a7077ebd..79280eb9 100644 --- a/admin/src/views/channel/weapp.vue +++ b/admin/src/views/channel/weapp.vue @@ -58,7 +58,7 @@
- 复制 + 复制
小程序账号登录微信公众平台,点击开发>开发设置->服务器域名,填写https协议域名 @@ -71,7 +71,7 @@
- 复制 + 复制
小程序账号登录微信公众平台,点击开发>开发设置->服务器域名,填写wss协议域名 @@ -84,7 +84,7 @@
- 复制 + 复制
小程序账号登录微信公众平台,点击开发>开发设置->服务器域名,填写https协议域名 @@ -97,7 +97,7 @@
- 复制 + 复制
小程序账号登录微信公众平台,点击开发>开发设置->服务器域名,填写https协议域名 @@ -110,7 +110,7 @@
- 复制 + 复制
小程序账号登录微信公众平台,点击开发>开发设置->服务器域名,填写udp协议域名 @@ -126,7 +126,7 @@
- 复制 + 复制
小程序账号登录微信公众平台,点击开发>开发设置->业务域名,填写业务域名 @@ -161,6 +161,19 @@ const formData = reactive({ }) const { copy } = useClipboard() + +const copyClick = async (msg: any) => { + try { + //复制 + await copy(msg) + feedback.msgSuccess('复制成功') + } catch (e) { + //复制失败 + feedback.msgSuccess('复制失败') + console.error(e) + } +} + const getDetail = async () => { const data = await getWeappConfig() for (const key in formData) { -- Gitee From 9c58f33d349b6b89022f0e04e1053aaaec27e0fd Mon Sep 17 00:00:00 2001 From: mlzhang <1371582736@qq.com> Date: Wed, 21 Sep 2022 21:52:19 +0800 Subject: [PATCH 3/3] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8Dbug=20#I5S8LO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/src/views/setting/search/index.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/admin/src/views/setting/search/index.vue b/admin/src/views/setting/search/index.vue index 89471f4e..d5421ea5 100644 --- a/admin/src/views/setting/search/index.vue +++ b/admin/src/views/setting/search/index.vue @@ -163,6 +163,7 @@ getData() margin: 0 6px 6px 0; display: inline-block; background-color: #f4f4f4; + word-break: break-all; } } } -- Gitee