xiaoyong931011
2023-09-11 790ed3c2799b395cc2b51c7c070c8a73cd9203a1
src/main/resources/mapper/modules/MallMemberCouponMapper.xml
@@ -4,11 +4,21 @@
    <select id="selectListInPage" resultType="cc.mrbird.febs.mall.vo.MallMemberCouponVo">
        select
        a.*
        a.*,
               b.cost_amount costAmount,
               b.real_amount realAmount
        from mall_member_coupon a
        left join mall_goods_coupon b on b.id = a.coupon_id
        <where>
            a.member_id=#{record.memberId}
            <if test="record.state != null and record.state != ''">
            <if test="record.state == 1">
                and a.state=#{record.state}
                and a.expire_time &gt;= #{record.expireTime}
            </if>
            <if test="record.state == 2">
                and a.state=#{record.state}
            </if>
            <if test="record.state == 3">
                and a.state=#{record.state}
            </if>
            <if test="record.goodsId != null and record.goodsId != ''">
@@ -18,4 +28,11 @@
        order by a.CREATED_TIME desc
    </select>
    <select id="selectListByExpireTime" resultType="cc.mrbird.febs.mall.entity.MallMemberCoupon">
        select
            a.*
        from mall_member_coupon a
        where a.expire_time &lt;= #{date}
    </select>
</mapper>