优惠券

This commit is contained in:
2025-07-24 19:46:55 +08:00
parent f0fd0db313
commit 727c9bacfa
11 changed files with 223 additions and 3 deletions

View File

@@ -5,4 +5,18 @@
resultType="com.ycwl.basic.model.pc.couponRecord.entity.CouponRecordEntity">
select * from coupon_record where member_id = #{memberId} and coupon_id in (select id from coupon where scenic_id = #{scenicId} and FIND_IN_SET(#{goodsId},config_ids))
</select>
<select id="queryByMemberIdAndFaceId"
resultType="com.ycwl.basic.model.pc.couponRecord.entity.CouponRecordEntity">
select * from coupon_record where member_id = #{memberId} and face_id = #{faceId}
</select>
<select id="queryByMemberIdAndFaceIdAndType"
resultType="com.ycwl.basic.model.pc.couponRecord.entity.CouponRecordEntity">
select cr.*
from coupon_record cr
inner join coupon c on cr.coupon_id = c.id
where cr.member_id = #{memberId} and cr.face_id = #{faceId} and c.type = #{type}
limit 1
</select>
</mapper>