Browse Source

SQL优化

limeng 1 year ago
parent
commit
075b183dc9

+ 7 - 7
mybusiness/src/main/resources/mapper/zhsq_qk/fangjian/ZhsqFangjianMapper.xml

@@ -117,15 +117,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         WHERE
         WHERE
         zhsq_fangjian.del_flag = '0'
         zhsq_fangjian.del_flag = '0'
         <if test="exportIds != null  and exportIds != ''"> and fj_id in (${exportIds})</if>
         <if test="exportIds != null  and exportIds != ''"> and fj_id in (${exportIds})</if>
-<!--        <if test="dyId != null "> and dy_id = #{dyId}</if>-->
+        <if test="dyId != null "> and zhsq_fangjian.dy_id = #{dyId}</if>
         <if test="fjName != null  and fjName != ''"> and fj_name like concat('%', #{fjName}, '%')</if>
         <if test="fjName != null  and fjName != ''"> and fj_name like concat('%', #{fjName}, '%')</if>
         <if test="fjLc != null  and fjLc != ''"> and fj_lc = #{fjLc}</if>
         <if test="fjLc != null  and fjLc != ''"> and fj_lc = #{fjLc}</if>
-        <if test="jdId != null "> and jd_id = #{jdId}</if>
-        <if test="jdName != null  and jdName != ''"> and jd_name like concat('%', #{jdName}, '%')</if>
-        <if test="sqId != null "> and sq_id = #{sqId}</if>
-        <if test="sqName != null  and sqName != ''"> and sq_name like concat('%', #{sqName}, '%')</if>
-        <if test="wgId != null "> and wg_id = #{wgId}</if>
-        <if test="wgName != null  and wgName != ''"> and wg_name like concat('%', #{wgName}, '%')</if>
+        <if test="jdId != null "> and zhsq_fangjian.jd_id = #{jdId}</if>
+        <if test="jdName != null  and jdName != ''"> and zhsq_fangjian.jd_name like concat('%', #{jdName}, '%')</if>
+        <if test="sqId != null "> and zhsq_fangjian.sq_id = #{sqId}</if>
+        <if test="sqName != null  and sqName != ''"> and zhsq_fangjian.sq_name like concat('%', #{sqName}, '%')</if>
+        <if test="wgId != null "> and zhsq_fangjian.wg_id = #{wgId}</if>
+        <if test="wgName != null  and wgName != ''"> and zhsq_fangjian.wg_name like concat('%', #{wgName}, '%')</if>
         <if test="updateId != null "> and update_id = #{updateId}</if>
         <if test="updateId != null "> and update_id = #{updateId}</if>
         <if test="fjSfpf != null  and fjSfpf != ''"> and fj_sfpf = #{fjSfpf}</if>
         <if test="fjSfpf != null  and fjSfpf != ''"> and fj_sfpf = #{fjSfpf}</if>
         <if test="fjSfydxs != null  and fjSfydxs != ''"> and fj_sfydxs = #{fjSfydxs}</if>
         <if test="fjSfydxs != null  and fjSfydxs != ''"> and fj_sfydxs = #{fjSfydxs}</if>