Browse Source

[储值卡][新增]:卡信息添加券ID

release_toaliyun_real
Stormeye Wu 7 years ago
parent
commit
8ee7c4b470
3 changed files with 12 additions and 3 deletions
  1. +5
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxCardInfo.java
  2. +1
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java
  3. +6
    -2
      mallinkService/src/main/resources/mapper/WxCardInfoMapper.xml

+ 5
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxCardInfo.java View File

@@ -20,7 +20,10 @@ public class WxCardInfo implements Serializable {
protected List<Long> ids; protected List<Long> ids;
@Transient @Transient
protected String sortColumns; protected String sortColumns;

/**券ID*/
@io.swagger.annotations.ApiModelProperty(value = "券ID", name = "couponId")
private Long couponId;
/**微信订单号-购买类储值卡时的订单号*/ /**微信订单号-购买类储值卡时的订单号*/
@io.swagger.annotations.ApiModelProperty(value="微信订单号-购买类储值卡时的订单号",name="transactionId") @io.swagger.annotations.ApiModelProperty(value="微信订单号-购买类储值卡时的订单号",name="transactionId")
private String transactionId; private String transactionId;
@@ -51,6 +54,7 @@ public class WxCardInfo implements Serializable {
public static enum Field public static enum Field
{ {
Id_ASC("`id` ASC"),Id_DESC("`id` DESC") 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") ,TransactionId_ASC("`transaction_id` ASC"),TransactionId_DESC("`transaction_id` DESC")
,Amount_ASC("`amount` ASC"),Amount_DESC("`amount` DESC") ,Amount_ASC("`amount` ASC"),Amount_DESC("`amount` DESC")
,RemainingAmount_ASC("`remaining_amount` ASC"),RemainingAmount_DESC("`remaining_amount` DESC") ,RemainingAmount_ASC("`remaining_amount` ASC"),RemainingAmount_DESC("`remaining_amount` DESC")


+ 1
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java View File

@@ -511,6 +511,7 @@ public class WxOrderServiceImpl implements WxOrderService {


WxCardInfo cardInfo = new WxCardInfo(); WxCardInfo cardInfo = new WxCardInfo();
cardInfo.setId(couponOrder.getId()); cardInfo.setId(couponOrder.getId());
cardInfo.setCouponId(order.getProductId());
cardInfo.setTransactionId(payOrder.getTransactionId()); cardInfo.setTransactionId(payOrder.getTransactionId());
cardInfo.setAmount(coupon.getPrice()); cardInfo.setAmount(coupon.getPrice());
cardInfo.setRemainingAmount(coupon.getPrice()); cardInfo.setRemainingAmount(coupon.getPrice());


+ 6
- 2
mallinkService/src/main/resources/mapper/WxCardInfoMapper.xml View File

@@ -3,6 +3,7 @@
<mapper namespace="com.iformall.mapper.WxCardInfoMapper"> <mapper namespace="com.iformall.mapper.WxCardInfoMapper">
<resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCardInfo"> <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCardInfo">
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="coupon_id" jdbcType="VARCHAR" property="couponId" />
<result column="transaction_id" jdbcType="VARCHAR" property="transactionId" /> <result column="transaction_id" jdbcType="VARCHAR" property="transactionId" />
<result column="amount" jdbcType="INTEGER" property="amount" /> <result column="amount" jdbcType="INTEGER" property="amount" />
<result column="remaining_amount" jdbcType="INTEGER" property="remainingAmount" /> <result column="remaining_amount" jdbcType="INTEGER" property="remainingAmount" />
@@ -14,7 +15,7 @@
</resultMap> </resultMap>
<sql id="allColumns"> <sql id="allColumns">
`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`
</sql> </sql>


<sql id="dynamicWhereConditions"> <sql id="dynamicWhereConditions">
@@ -22,7 +23,10 @@
<if test=" null != id "> <if test=" null != id ">
and `id` = #{id} and `id` = #{id}
</if> </if>
<if test=" null != transactionId ">
<if test=" null != couponId ">
and `coupon_id` like concat('%', #{couponId},'%')
</if>
<if test=" null != transactionId ">
and `transaction_id` like concat('%', #{transactionId},'%') and `transaction_id` like concat('%', #{transactionId},'%')
</if> </if>
<if test=" null != amount "> <if test=" null != amount ">


Loading…
Cancel
Save