Browse Source

优惠券制作时间查询无效

Guos 1 week ago
parent
commit
295ec53dac

+ 9 - 4
fs-service/src/main/resources/mapper/hisStore/FsStoreCouponScrmMapper.xml

@@ -39,10 +39,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="packageCateIds != null  and packageCateIds != ''"> and package_cate_ids = #{packageCateIds}</if>
             <if test="type != null "> and type = #{type}</if>
             <if test="isDel != null "> and is_del = #{isDel}</if>
-            <if test="beginTime != null and beginTime != ''">
-            and date_format(create_time,'%y%m%d') &gt;= date_format(#{beginTime},'%y%m%d') </if>
-            <if test="endTime != null and endTime != ''">
-            and date_format(create_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d') </if>
+            <if test="params != null">
+                <if test="params.beginTime != null and params.beginTime != ''">
+                    and date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
+                </if>
+                <if test="params.endTime != null and params.endTime != ''">
+                    and date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
+                </if>
+            </if>
+
         </where>
         order by coupon_price
     </select>