浏览代码

修改积分明细,退款时为过期后续无需生成过期记录

zhangxin 1 月之前
父节点
当前提交
a6521526c7
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      yami-shop-service/src/main/resources/mapper/PointsRecordMapper.xml

+ 1 - 3
yami-shop-service/src/main/resources/mapper/PointsRecordMapper.xml

@@ -68,11 +68,9 @@
     </select>
     <select id="findPage" resultType="com.yami.shop.bean.model.PointsRecord">
         select * from (
-
         select id,user_id,channel_id,order_number,points_id,`code`,parent_code,points,variable_points,points_type,points_audit,expiry_date,creation_date,currently_available_points from tz_points_record where channel_id = #{platform}  and user_id = #{userId}
         UNION ALL
-        SELECT id,user_id,channel_id,order_number,points_id,`code`,parent_code,(points-IFNULL(variable_points,0)) AS points,variable_points, 4 as points_type,points_audit,expiry_date,creation_date,currently_available_points from tz_points_record where channel_id = #{platform}  and user_id = #{userId} and expiry_date &lt;=NOW() and points-IFNULL(variable_points,0) >0 and points_type =3
-
+        SELECT id,user_id,channel_id,order_number,points_id,`code`,parent_code,points,variable_points, 4 as points_type,points_audit,expiry_date,creation_date,currently_available_points from tz_points_record where channel_id = #{platform}  and user_id = #{userId} and expiry_date &lt;=creation_date and points>0 and points_type =3
         ) a
         order by a.creation_date DESC,a.order_number