puzhibing
2023-07-14 21a9ec4a797e26e49a14f386e054da3cb0afc376
cloud-server-activity/src/main/resources/mapper/UserCouponMapper.xml
@@ -13,8 +13,6 @@
        DATE_FORMAT(b.endTime, '%Y-%m-%d') as endTime
        from t_user_coupon a
        left join t_coupon b on (a.couponId = b.id)
        where a.`status` = 1 and b.type != 3 and a.userId = #{uid} and (
        b.useScope = 1 or (b.useScope = 2 and provinceCode = #{provinceCode} and cityCode = #{cityCode})
        or (b.useScope = 3 and b.id in (select couponId from t_coupon_store where storeId = #{storeId})))
        where a.`status` = 1 and b.type != 3 and a.userId = #{uid} and (b.useScope = 1 or (b.useScope = 2 and provinceCode = #{provinceCode} and cityCode = #{cityCode}) or (b.useScope = 3 and b.id in (select couponId from t_coupon_store where storeId = #{storeId})))
    </select>
</mapper>