java110
2020-11-28 35c9ebccecb76cbd8e76ed0f68ce0e248e9c370f
优化代码
2个文件已修改
123 ■■■■ 已修改文件
java110-db/src/main/resources/mapper/common/LogSystemErrorServiceDaoImplMapper.xml 113 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/community/RoomServiceDaoImplMapper.xml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/common/LogSystemErrorServiceDaoImplMapper.xml
@@ -5,84 +5,79 @@
<mapper namespace="logSystemErrorServiceDaoImpl">
    <!-- 保存系统异常信息 add by wuxw 2018-07-03 -->
    <insert id="saveLogSystemErrorInfo" parameterType="Map">
        insert into log_system_error(
msg,err_type,err_id
) values (
#{msg},#{errType},#{errId}
)
        msg,err_type,err_id
        ) values (
        #{msg},#{errType},#{errId}
        )
    </insert>
    <!-- 查询系统异常信息 add by wuxw 2018-07-03 -->
    <select id="getLogSystemErrorInfo" parameterType="Map" resultType="Map">
        select  t.msg,t.err_type,t.err_type errType,t.err_id,t.err_id errId,t.status_cd,t.status_cd statusCd
from log_system_error t
where 1 =1
<if test="msg !=null and msg != ''">
   and t.msg= #{msg}
</if>
<if test="errType !=null and errType != ''">
   and t.err_type= #{errType}
</if>
<if test="errId !=null and errId != ''">
   and t.err_id= #{errId}
</if>
<if test="statusCd !=null and statusCd != ''">
   and t.status_cd= #{statusCd}
</if>
order by t.create_time desc
<if test="page != -1 and page != null ">
   limit #{page}, #{row}
</if>
        select t.msg,t.err_type,t.err_type errType,t.err_id,t.err_id errId,t.status_cd,t.status_cd statusCd
        from log_system_error t
        where 1 =1
        <if test="msg !=null and msg != ''">
            and t.msg= #{msg}
        </if>
        <if test="errType !=null and errType != ''">
            and t.err_type= #{errType}
        </if>
        <if test="errId !=null and errId != ''">
            and t.err_id= #{errId}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
        order by t.create_time desc
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>
    </select>
    <!-- 修改系统异常信息 add by wuxw 2018-07-03 -->
    <update id="updateLogSystemErrorInfo" parameterType="Map">
        update  log_system_error t set t.status_cd = #{statusCd}
<if test="newBId != null and newBId != ''">
,t.b_id = #{newBId}
</if>
<if test="msg !=null and msg != ''">
, t.msg= #{msg}
</if>
<if test="errType !=null and errType != ''">
, t.err_type= #{errType}
</if>
 where 1=1 <if test="errId !=null and errId != ''">
and t.err_id= #{errId}
</if>
        update log_system_error t set t.status_cd = #{statusCd}
        <if test="newBId != null and newBId != ''">
            ,t.b_id = #{newBId}
        </if>
        <if test="msg !=null and msg != ''">
            , t.msg= #{msg}
        </if>
        <if test="errType !=null and errType != ''">
            , t.err_type= #{errType}
        </if>
        where 1=1
        <if test="errId !=null and errId != ''">
            and t.err_id= #{errId}
        </if>
    </update>
    <!-- 查询系统异常数量 add by wuxw 2018-07-03 -->
     <select id="queryLogSystemErrorsCount" parameterType="Map" resultType="Map">
        select  count(1) count
from log_system_error t
where 1 =1
<if test="msg !=null and msg != ''">
   and t.msg= #{msg}
</if>
<if test="errType !=null and errType != ''">
   and t.err_type= #{errType}
</if>
<if test="errId !=null and errId != ''">
   and t.err_id= #{errId}
</if>
<if test="statusCd !=null and statusCd != ''">
   and t.status_cd= #{statusCd}
</if>
    <select id="queryLogSystemErrorsCount" parameterType="Map" resultType="Map">
        select count(1) count
        from log_system_error t
        where 1 =1
        <if test="msg !=null and msg != ''">
            and t.msg= #{msg}
        </if>
        <if test="errType !=null and errType != ''">
            and t.err_type= #{errType}
        </if>
        <if test="errId !=null and errId != ''">
            and t.err_id= #{errId}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
     </select>
    </select>
</mapper>
java110-db/src/main/resources/mapper/community/RoomServiceDaoImplMapper.xml
@@ -702,10 +702,12 @@
        AND u.`floor_id` = f.`floor_id`
        AND u.`status_cd` = '0'
        AND f.`status_cd` = '0'
        AND borr.`status_cd` = '0'
        AND t.`status_cd` = '0'
        AND bo.`status_cd` = '0'
        AND bo.`owner_type_cd` = '1001'
        <if test="statusCd !=null and statusCd != ''">
            and borr.`status_cd` = #{statusCd}
        </if>
        <if test="sex !=null ">
            and bo.sex= #{sex}
        </if>
@@ -715,9 +717,9 @@
        <if test="link !=null and link != ''">
            and bo.link= #{link}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and bo.status_cd= #{statusCd}
        </if>
        <!--        <if test="statusCd !=null and statusCd != ''">-->
        <!--            and bo.status_cd= #{statusCd}-->
        <!--        </if>-->
        <if test="remark !=null and remark != ''">
            and bo.remark= #{remark}
        </if>