From 55985d42ef0ec3d9a62b46184d0bb3f191100a6c Mon Sep 17 00:00:00 2001
From: 张天森 <1292933220@qq.com>
Date: 星期一, 17 十月 2022 17:28:27 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/huacheng_test' into huacheng_test

---
 flower_city/src/main/resources/mapper/ClassifyAdministrationMapper.xml          |    5 ++++-
 flower_city/src/main/resources/mapper/RoleManagementMapper.xml                  |    2 +-
 flower_city/src/main/java/com/dg/core/db/gen/entity/ClassifyAdministration.java |    5 +++++
 flower_city/src/main/resources/mapper/SysUserMapper.xml                         |   20 ++++++++++----------
 flower_city/src/main/resources/mapper/AgreementMapper.xml                       |    7 +++++--
 flower_city/src/main/java/com/dg/core/controller/AgreementController.java       |    5 ++++-
 6 files changed, 29 insertions(+), 15 deletions(-)

diff --git a/flower_city/src/main/java/com/dg/core/controller/AgreementController.java b/flower_city/src/main/java/com/dg/core/controller/AgreementController.java
index c3ae491..9999a16 100644
--- a/flower_city/src/main/java/com/dg/core/controller/AgreementController.java
+++ b/flower_city/src/main/java/com/dg/core/controller/AgreementController.java
@@ -13,6 +13,7 @@
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import java.time.LocalDateTime;
 import java.util.List;
 
 @Api(tags = {"相关协议接口"})
@@ -51,7 +52,9 @@
     @ApiOperation(value = "修改相关附件",response = Agreement.class)
     @PostMapping(value = "/update")
     @Authorization
-    public ResultData update(@RequestBody Agreement agreement,@CurrentUser SysUser sysUse){
+    public ResultData update(@RequestBody Agreement agreement,@CurrentUser SysUser sysUse)
+    {
+        agreement.setUpdateTime(LocalDateTime.now());
         agreement.setUpdateUserId(sysUse.getUserId().toString());
         return agreementService.update(agreement);
     }
diff --git a/flower_city/src/main/java/com/dg/core/db/gen/entity/ClassifyAdministration.java b/flower_city/src/main/java/com/dg/core/db/gen/entity/ClassifyAdministration.java
index 7a4a8a8..4779476 100644
--- a/flower_city/src/main/java/com/dg/core/db/gen/entity/ClassifyAdministration.java
+++ b/flower_city/src/main/java/com/dg/core/db/gen/entity/ClassifyAdministration.java
@@ -77,4 +77,9 @@
     @ApiModelProperty(name = "ClassifyAdministrationEntityList", value = "下级分类")
     private List<ClassifyAdministration> ClassifyAdministrationEntityList;
 
+    @TableField(exist = false)
+    @ApiModelProperty(name = "transactNum", value = "办理事项数量")
+    private String transactNum;
+    
+
 }
diff --git a/flower_city/src/main/resources/mapper/AgreementMapper.xml b/flower_city/src/main/resources/mapper/AgreementMapper.xml
index 5caedd8..eb55d52 100644
--- a/flower_city/src/main/resources/mapper/AgreementMapper.xml
+++ b/flower_city/src/main/resources/mapper/AgreementMapper.xml
@@ -14,9 +14,12 @@
     <sql id="selectAgreement">
         select id,agreement,
                (select user_name from automessage_sys_user where user_id=a.update_user_id)updateUserName,
-               update_user_id,create_time,
+               update_user_id,
+               create_time,
+               update_time,
                (select user_name from automessage_sys_user where user_id=a.create_user_id)createUserName,
-               create_user_id,agreement_content FROM automessage_agreement a
+               create_user_id,agreement_content
+        FROM automessage_agreement a
    </sql>
 
     <select id="selectConfigList" resultMap="AgreementResult">
diff --git a/flower_city/src/main/resources/mapper/ClassifyAdministrationMapper.xml b/flower_city/src/main/resources/mapper/ClassifyAdministrationMapper.xml
index f6e0456..c833b0a 100644
--- a/flower_city/src/main/resources/mapper/ClassifyAdministrationMapper.xml
+++ b/flower_city/src/main/resources/mapper/ClassifyAdministrationMapper.xml
@@ -22,7 +22,10 @@
             parent_id,
             (select ca.classify_name from automessage_classify_administration as ca where ca.id= automessage_classify_administration.parent_id) as parentName,
             classify_name,
-            classify_icon
+            classify_icon,
+            (IF(classify_grade = '2',(SELECT count(id) FROM automessage_transaction_event WHERE automessage_transaction_event.classify_id=automessage_classify_administration.id),
+                (SELECT count(id) FROM automessage_transaction_event WHERE automessage_transaction_event.classify_id in (SELECT id FROM automessage_classify_administration
+                WHERE automessage_classify_administration.parent_id=automessage_transaction_event.classify_id))))  as  transactNum
         FROM
             automessage_classify_administration
     </sql>
diff --git a/flower_city/src/main/resources/mapper/RoleManagementMapper.xml b/flower_city/src/main/resources/mapper/RoleManagementMapper.xml
index cd3f599..5ac0cde 100644
--- a/flower_city/src/main/resources/mapper/RoleManagementMapper.xml
+++ b/flower_city/src/main/resources/mapper/RoleManagementMapper.xml
@@ -80,7 +80,7 @@
             <if test="updateUserId != null and updateUserId != '' ">update_user_id=#{updateUserId},</if>
             update_time=sysdate()
         </set>
-        where  id= #{Id}
+        where  id= #{id}
     </update>
 
     <delete id="deleteConfigById" parameterType="string">
diff --git a/flower_city/src/main/resources/mapper/SysUserMapper.xml b/flower_city/src/main/resources/mapper/SysUserMapper.xml
index d77e63b..3184f85 100644
--- a/flower_city/src/main/resources/mapper/SysUserMapper.xml
+++ b/flower_city/src/main/resources/mapper/SysUserMapper.xml
@@ -131,16 +131,16 @@
     <select id="selectListByDepartmentId"  resultMap="SysUserResult">
         <include refid="selectSysUserVo"/>
          <where>
-             user_type=2 and status=0
-        <if test="list!=null">
-            and  department_id in
-            <foreach collection="list" item="id" index="index" open="(" close=")" separator=",">
-                #{id}
-            </foreach>
-         </if>
-         <if test="classifyIdFront!=null and classifyIdFront!='' and classifyIdAfter!=null and classifyIdAfter!=''">
-            and (master_ids like concat('%',#{classifyIdFront}, '%') or master_ids like concat('%',#{classifyIdAfter}, '%'))
-         </if>
+            user_type=2 and status=0
+            <if test="list!=null">
+                and  department_id in
+                <foreach collection="list" item="id" index="index" open="(" close=")" separator=",">
+                    #{id}
+                </foreach>
+             </if>
+             <if test="classifyIdFront!=null and classifyIdFront!='' and classifyIdAfter!=null and classifyIdAfter!=''">
+                and (master_ids like concat('%',#{classifyIdFront}, '%') or master_ids like concat('%',#{classifyIdAfter}, '%'))
+             </if>
 
          </where>
          order by transaction_num

--
Gitblit v1.7.1