浏览代码

1.查询条件调整

yuanliang 1 年之前
父节点
当前提交
dfddf0659b
共有 1 个文件被更改,包括 4 次插入5 次删除
  1. 4 5
      mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml

+ 4 - 5
mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml

@@ -1424,19 +1424,18 @@
               where status_ = 'SUCCESS'
                 and group_type_ = 'VIP'
                 and type_ = 'SMALL_CLASS_TO_BUY'
-                and find_in_set(activity_id_, #{v1})
+                and find_in_set(activity_id_, #{param.v1})
               union
               select user_id_, organ_id_
               from student_payment_order
               where status_ = 'SUCCESS'
                 and group_type_ = 'VIP'
                 and type_ = 'SMALL_CLASS_TO_BUY'
-                and find_in_set(activity_id_, #{v2})
+                and find_in_set(activity_id_, #{param.v2})
               union
               SELECT user_id_, organ_id_
               FROM student_payment_order
               WHERE status_ = 'SUCCESS'
-                AND find_in_set(organ_id_, #{param.organId})
                 AND group_type_ = 'LIVE'
                 AND type_ = 'LIVE_GROUP_BUY'
                 AND find_in_set(music_group_id_, #{param.theoryLive})
@@ -1452,8 +1451,7 @@
               from student_payment_order t
                        LEFT join sell_order so on t.order_no_ = so.order_no_
               where t.status_ = 'SUCCESS'
-                and find_in_set(so.goods_id_, #{param1.goodId})
-                and find_in_set(t.organ_id_, #{param.organId})
+                and find_in_set(so.goods_id_, #{param.goodId})
                 and t.pay_time_ between #{param.startPayTime} and #{param.endPayTime}
               union
               select user_id_
@@ -1470,6 +1468,7 @@
                 and group_type_ = 'VIP'
                 and type_ = 'SMALL_CLASS_TO_BUY'
                 and find_in_set(activity_id_, #{param.theory})) t
+        where find_in_set(t.organ_id_, #{param.organId})
         group by organ_id_
     </select>
 </mapper>