wuxw пре 5 година
родитељ
комит
da35a0f2fe

+ 82 - 86
java110-db/src/main/resources/mapper/community/ActivitiesTypeServiceDaoImplMapper.xml

@@ -5,111 +5,107 @@
 <mapper namespace="activitiesTypeServiceDaoImpl">
 <mapper namespace="activitiesTypeServiceDaoImpl">
 
 
 
 
-
-
-
     <!-- 保存信息分类信息 add by wuxw 2018-07-03 -->
     <!-- 保存信息分类信息 add by wuxw 2018-07-03 -->
     <insert id="saveActivitiesTypeInfo" parameterType="Map">
     <insert id="saveActivitiesTypeInfo" parameterType="Map">
         insert into activities_type(
         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>
     </insert>
 
 
 
 
-
     <!-- 查询信息分类信息 add by wuxw 2018-07-03 -->
     <!-- 查询信息分类信息 add by wuxw 2018-07-03 -->
     <select id="getActivitiesTypeInfo" parameterType="Map" resultType="Map">
     <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>
     </select>
 
 
 
 
-
-
     <!-- 修改信息分类信息 add by wuxw 2018-07-03 -->
     <!-- 修改信息分类信息 add by wuxw 2018-07-03 -->
     <update id="updateActivitiesTypeInfo" parameterType="Map">
     <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>
     </update>
 
 
     <!-- 查询信息分类数量 add by wuxw 2018-07-03 -->
     <!-- 查询信息分类数量 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>
 </mapper>