|  |  |  | 
|---|
|  |  |  | 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 | 
|---|
|  |  |  | 
|---|
|  |  |  | 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> | 
|---|