|
|
@@ -8,9 +8,9 @@
|
|
|
<!-- 保存商家购买记录表信息 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>
|
|
|
|
|
|
@@ -20,7 +20,7 @@
|
|
|
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 != ''">
|
|
|
@@ -35,6 +35,12 @@
|
|
|
<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>
|
|
|
@@ -82,6 +88,9 @@
|
|
|
<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>
|
|
|
@@ -115,6 +124,12 @@
|
|
|
<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>
|