KKSU
2024-04-11 763d28cd26010a7e5bd382da2292e64d76de6535
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cc.mrbird.febs.mall.mapper.CouponGoodsMapper">
 
    <select id="selectByGoodId" resultType="java.lang.Long">
        select a.coupon_id
        from coupon_goods a
        where goods_id = #{id}
    </select>
 
    <select id="selectByCouponId" resultType="java.lang.Long">
        select a.goods_id
        from coupon_goods a
        where coupon_id = #{id}
    </select>
 
    <select id="selectByGoodIdAndCouponId" resultType="cc.mrbird.febs.mall.entity.CouponGoods">
        select a.*
        from coupon_goods a
        where goods_id = #{goodsId}
        and coupon_id = #{couponId}
    </select>
 
    <select id="selectByGoodIdList" resultType="java.lang.Long">
        select a.coupon_id
        from coupon_goods a
        where goods_id IN
        <foreach collection = "list" item = "item"  separator=","  open = "(" close = ")" >
            #{item}
        </foreach >
    </select>
 
</mapper>