| | |
| | | <!-- 保存商家购买记录表信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveCouponDetailInfo" parameterType="Map"> |
| | | insert into coupon_detail( |
| | | buy_price,coupon_name,amount,buy_count,actual_price,validity_day,pool_id,detail_id,shop_id,order_id |
| | | buy_price,coupon_name,amount,buy_count,actual_price,validity_day,pool_id,detail_id,shop_id,order_id,shop_name |
| | | ) values ( |
| | | #{buyPrice},#{couponName},#{amount},#{buyCount},#{actualPrice},#{validityDay},#{poolId},#{detailId},#{shopId},#{orderId} |
| | | #{buyPrice},#{couponName},#{amount},#{buyCount},#{actualPrice},#{validityDay},#{poolId},#{detailId},#{shopId},#{orderId},#{shopName} |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | select t.buy_price,t.buy_price buyPrice,t.coupon_name,t.coupon_name couponName,t.amount,t.buy_count,t.buy_count |
| | | buyCount,t.actual_price,t.actual_price actualPrice,t.validity_day,t.validity_day validityDay,t.pool_id,t.pool_id |
| | | poolId,t.detail_id,t.detail_id detailId,t.status_cd,t.status_cd statusCd,t.shop_id,t.shop_id |
| | | shopId,t.order_id orderId |
| | | shopId,t.order_id orderId,t.create_time createTime,t.shop_name shopName |
| | | from coupon_detail t |
| | | where 1 =1 |
| | | <if test="buyPrice !=null and buyPrice != ''"> |
| | |
| | | </if> |
| | | <if test="buyCount !=null and buyCount != ''"> |
| | | and t.buy_count= #{buyCount} |
| | | </if> |
| | | <if test="shopName !=null and shopName != ''"> |
| | | and t.shop_name= #{shopName} |
| | | </if> |
| | | <if test="shopNameLike !=null and shopNameLike != ''"> |
| | | and t.shop_name like concat('%',#{shopNameLike},'%') |
| | | </if> |
| | | <if test="actualPrice !=null and actualPrice != ''"> |
| | | and t.actual_price= #{actualPrice} |
| | |
| | | <if test="orderId !=null and orderId != ''"> |
| | | , t.order_id= #{orderId} |
| | | </if> |
| | | <if test="shopName !=null and shopName != ''"> |
| | | , t.shop_name= #{shopName} |
| | | </if> |
| | | <if test="buyCount !=null and buyCount != ''"> |
| | | , t.buy_count= #{buyCount} |
| | | </if> |
| | |
| | | <if test="couponName !=null and couponName != ''"> |
| | | and t.coupon_name= #{couponName} |
| | | </if> |
| | | <if test="shopName !=null and shopName != ''"> |
| | | and t.shop_name= #{shopName} |
| | | </if> |
| | | <if test="shopNameLike !=null and shopNameLike != ''"> |
| | | and t.shop_name like concat('%',#{shopNameLike},'%') |
| | | </if> |
| | | <if test="amount !=null and amount != ''"> |
| | | and t.amount= #{amount} |
| | | </if> |