From 781c2e20a4bb844dae3f4eafbf5f0e494b942ea8 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期四, 25 五月 2023 18:07:08 +0800
Subject: [PATCH] optimize

---
 java110-db/src/main/resources/mapper/community/ActivitiesTypeServiceDaoImplMapper.xml |  168 +++++++++++++++++++++++++++----------------------------
 1 files changed, 82 insertions(+), 86 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/community/ActivitiesTypeServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/community/ActivitiesTypeServiceDaoImplMapper.xml
old mode 100644
new mode 100755
index 0d661ea..6f75772
--- a/java110-db/src/main/resources/mapper/community/ActivitiesTypeServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/community/ActivitiesTypeServiceDaoImplMapper.xml
@@ -5,111 +5,107 @@
 <mapper namespace="activitiesTypeServiceDaoImpl">
 
 
-
-
-
     <!-- 淇濆瓨淇℃伅鍒嗙被淇℃伅 add by wuxw 2018-07-03 -->
     <insert id="saveActivitiesTypeInfo" parameterType="Map">
         insert into activities_type(
-type_desc,type_cd,type_name,defalut_show,community_id,seq
-) values (
-#{typeDesc},#{typeCd},#{typeName},#{defaultShow},#{communityId},#{seq}
-)
+        type_desc,type_cd,type_name,defalut_show,community_id,seq
+        ) values (
+        #{typeDesc},#{typeCd},#{typeName},#{defaultShow},#{communityId},#{seq}
+        )
     </insert>
-
 
 
     <!-- 鏌ヨ淇℃伅鍒嗙被淇℃伅 add by wuxw 2018-07-03 -->
     <select id="getActivitiesTypeInfo" parameterType="Map" resultType="Map">
-        select  t.type_desc,t.type_desc typeDesc,t.type_cd,t.type_cd typeCd,t.type_name,t.type_name typeName,t.defalut_show,t.defalut_show defaultShow,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.seq 
-from activities_type t 
-where 1 =1 
-<if test="typeDesc !=null and typeDesc != ''">
-   and t.type_desc= #{typeDesc}
-</if> 
-<if test="typeCd !=null and typeCd != ''">
-   and t.type_cd= #{typeCd}
-</if> 
-<if test="typeName !=null and typeName != ''">
-   and t.type_name= #{typeName}
-</if> 
-<if test="defaultShow !=null and defaultShow != ''">
-   and t.defalut_show= #{defaultShow}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="seq !=null and seq != ''">
-   and t.seq= #{seq}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.type_desc,t.type_desc typeDesc,t.type_cd,t.type_cd typeCd,t.type_name,t.type_name typeName,t.defalut_show,t.defalut_show defaultShow,t.status_cd,t.status_cd
+        statusCd,t.community_id,t.community_id communityId,t.seq
+        from activities_type t
+        where 1 =1
+        <if test="typeDesc !=null and typeDesc != ''">
+            and t.type_desc= #{typeDesc}
+        </if>
+        <if test="typeCd !=null and typeCd != ''">
+            and t.type_cd= #{typeCd}
+        </if>
+        <if test="typeName !=null and typeName != ''">
+            and t.type_name= #{typeName}
+        </if>
+        <if test="defaultShow !=null and defaultShow != ''">
+            and t.defalut_show= #{defaultShow}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="seq !=null and seq != ''">
+            and t.seq= #{seq}
+        </if>
+        order by t.seq asc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
     </select>
 
 
-
-
     <!-- 淇敼淇℃伅鍒嗙被淇℃伅 add by wuxw 2018-07-03 -->
     <update id="updateActivitiesTypeInfo" parameterType="Map">
-        update  activities_type t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="typeDesc !=null and typeDesc != ''">
-, t.type_desc= #{typeDesc}
-</if> 
-<if test="typeName !=null and typeName != ''">
-, t.type_name= #{typeName}
-</if> 
-<if test="defaultShow !=null and defaultShow != ''">
-, t.defalut_show= #{defaultShow}
-</if> 
-<if test="communityId !=null and communityId != ''">
-, t.community_id= #{communityId}
-</if> 
-<if test="seq !=null and seq != ''">
-, t.seq= #{seq}
-</if> 
- where 1=1 <if test="typeCd !=null and typeCd != ''">
-and t.type_cd= #{typeCd}
-</if> 
+        update activities_type t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="typeDesc !=null and typeDesc != ''">
+            , t.type_desc= #{typeDesc}
+        </if>
+        <if test="typeName !=null and typeName != ''">
+            , t.type_name= #{typeName}
+        </if>
+        <if test="defaultShow !=null and defaultShow != ''">
+            , t.defalut_show= #{defaultShow}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            , t.community_id= #{communityId}
+        </if>
+        <if test="seq !=null and seq != ''">
+            , t.seq= #{seq}
+        </if>
+        where 1=1
+        <if test="typeCd !=null and typeCd != ''">
+            and t.type_cd= #{typeCd}
+        </if>
 
     </update>
 
     <!-- 鏌ヨ淇℃伅鍒嗙被鏁伴噺 add by wuxw 2018-07-03 -->
-     <select id="queryActivitiesTypesCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from activities_type t 
-where 1 =1 
-<if test="typeDesc !=null and typeDesc != ''">
-   and t.type_desc= #{typeDesc}
-</if> 
-<if test="typeCd !=null and typeCd != ''">
-   and t.type_cd= #{typeCd}
-</if> 
-<if test="typeName !=null and typeName != ''">
-   and t.type_name= #{typeName}
-</if> 
-<if test="defaultShow !=null and defaultShow != ''">
-   and t.defalut_show= #{defaultShow}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="seq !=null and seq != ''">
-   and t.seq= #{seq}
-</if> 
+    <select id="queryActivitiesTypesCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from activities_type t
+        where 1 =1
+        <if test="typeDesc !=null and typeDesc != ''">
+            and t.type_desc= #{typeDesc}
+        </if>
+        <if test="typeCd !=null and typeCd != ''">
+            and t.type_cd= #{typeCd}
+        </if>
+        <if test="typeName !=null and typeName != ''">
+            and t.type_name= #{typeName}
+        </if>
+        <if test="defaultShow !=null and defaultShow != ''">
+            and t.defalut_show= #{defaultShow}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="seq !=null and seq != ''">
+            and t.seq= #{seq}
+        </if>
 
 
-     </select>
+    </select>
 
 </mapper>

--
Gitblit v1.8.0