浏览代码

修改sql

Longlin 5 年之前
父节点
当前提交
a88050eda1
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      whepi-web/src/main/resources/mapper/JmTuangouMemberMapper.xml

+ 4 - 3
whepi-web/src/main/resources/mapper/JmTuangouMemberMapper.xml

@@ -59,9 +59,7 @@
         INNER JOIN sys_uptown_unit c on c.unit_id=b.unit_id
         INNER JOIN sys_uptown_unit c on c.unit_id=b.unit_id
         INNER JOIN sys_uptown u on u.uptown_id = c.uptown_id
         INNER JOIN sys_uptown u on u.uptown_id = c.uptown_id
         where a.user_id in (select user_id from jm_buy where jm_id=#{JmId})
         where a.user_id in (select user_id from jm_buy where jm_id=#{JmId})
-        <if test="queryProperties!=null and queryProperties!=''">
-            and u.uptown_name like concat('%',#{queryProperties},'%')
-        </if>
+
         ) y
         ) y
         on a.user_id=y.user_id
         on a.user_id=y.user_id
         LEFT JOIN
         LEFT JOIN
@@ -70,6 +68,9 @@
         ) z
         ) z
         on a.jm_id=z.jm_id
         on a.jm_id=z.jm_id
         where a.jm_id=#{JmId} and a.buy_status=1
         where a.jm_id=#{JmId} and a.buy_status=1
+        <if test="queryProperties!=null and queryProperties!=''">
+            and y.uptown_name like concat('%',#{queryProperties},'%')
+        </if>
     </select>
     </select>
 
 
 </mapper>
 </mapper>