diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxCardInfo.java b/mallinkService/src/main/java/com/iformall/domain/po/WxCardInfo.java index 952d6eb0f..3a73b4c43 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxCardInfo.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxCardInfo.java @@ -20,7 +20,10 @@ public class WxCardInfo implements Serializable { protected List ids; @Transient protected String sortColumns; - + + /**券ID*/ + @io.swagger.annotations.ApiModelProperty(value = "券ID", name = "couponId") + private Long couponId; /**微信订单号-购买类储值卡时的订单号*/ @io.swagger.annotations.ApiModelProperty(value="微信订单号-购买类储值卡时的订单号",name="transactionId") private String transactionId; @@ -51,6 +54,7 @@ public class WxCardInfo implements Serializable { public static enum Field { Id_ASC("`id` ASC"),Id_DESC("`id` DESC") + ,CouponId_ASC("`coupon_id` ASC"),CouponId_DESC("`coupon_id` DESC") ,TransactionId_ASC("`transaction_id` ASC"),TransactionId_DESC("`transaction_id` DESC") ,Amount_ASC("`amount` ASC"),Amount_DESC("`amount` DESC") ,RemainingAmount_ASC("`remaining_amount` ASC"),RemainingAmount_DESC("`remaining_amount` DESC") diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java index 7590ea27e..78bee00cd 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java @@ -511,6 +511,7 @@ public class WxOrderServiceImpl implements WxOrderService { WxCardInfo cardInfo = new WxCardInfo(); cardInfo.setId(couponOrder.getId()); + cardInfo.setCouponId(order.getProductId()); cardInfo.setTransactionId(payOrder.getTransactionId()); cardInfo.setAmount(coupon.getPrice()); cardInfo.setRemainingAmount(coupon.getPrice()); diff --git a/mallinkService/src/main/resources/mapper/WxCardInfoMapper.xml b/mallinkService/src/main/resources/mapper/WxCardInfoMapper.xml index 221c26217..3b3b6a7d4 100644 --- a/mallinkService/src/main/resources/mapper/WxCardInfoMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCardInfoMapper.xml @@ -3,6 +3,7 @@ + @@ -14,7 +15,7 @@ - `id`,`transaction_id`,`amount`,`remaining_amount`,`service_fee_amount`,`share_fee_amount`,`remaining_share_fee_amount`,`create_date`,`update_date` + `id`,`coupon_id`,`transaction_id`,`amount`,`remaining_amount`,`service_fee_amount`,`share_fee_amount`,`remaining_share_fee_amount`,`create_date`,`update_date` @@ -22,7 +23,10 @@ and `id` = #{id} - + + and `coupon_id` like concat('%', #{couponId},'%') + + and `transaction_id` like concat('%', #{transactionId},'%')