chunping 3 anni fa
parent
commit
e1aca66023

+ 9 - 0
mp-service/src/main/java/com/qs/mp/channel/domain/ChannelCouponVerifyLog.java

@@ -1,5 +1,7 @@
 package com.qs.mp.channel.domain;
 
+import com.alibaba.fastjson.annotation.JSONField;
+import com.alibaba.fastjson.serializer.SerializerFeature;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
@@ -45,6 +47,12 @@ public class ChannelCouponVerifyLog implements Serializable {
   @TableField("verify_code")
   private String verifyCode;
 
+  /**
+   * 标题
+   */
+  @TableField("title")
+  private String title;
+
   /**
    * 优惠类型;1代金券、2折扣券、3兑换券
    */
@@ -85,6 +93,7 @@ public class ChannelCouponVerifyLog implements Serializable {
    * 结算状态;1待结算 2已结算
    */
   @TableField("settle_status")
+  @JSONField(serialzeFeatures = SerializerFeature.WriteEnumUsingToString)
   private CouponSettleStatusEnum settleStatus;
 
   /**

+ 1 - 0
mp-service/src/main/java/com/qs/mp/channel/service/impl/ChannelCouponVerifyLogServiceImpl.java

@@ -65,6 +65,7 @@ public class ChannelCouponVerifyLogServiceImpl extends ServiceImpl<ChannelCoupon
     verifyLog.setChannelId(channelId);
     verifyLog.setUserCouponId(userCoupon.getId());
     verifyLog.setVerifyCode(userCoupon.getVerifyCode());
+    verifyLog.setTitle(coupon.getTitle());
     verifyLog.setDiscountType(coupon.getDiscountType());
     verifyLog.setDiscount(coupon.getDiscount());
     verifyLog.setDistributeTime(userCoupon.getCreatedTime());

+ 2 - 1
mp-service/src/main/resources/mapper/channel/ChannelCouponVerifyLogMapper.xml

@@ -8,6 +8,7 @@
         <result column="channel_id" property="channelId" />
         <result column="user_coupon_id" property="userCouponId" />
         <result column="verify_code" property="verifyCode" />
+        <result column="title" property="title" />
         <result column="discount_type" property="discountType" />
         <result column="discount" property="discount" />
         <result column="distribute_time" property="distributeTime" />
@@ -21,7 +22,7 @@
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, channel_id, user_coupon_id, verify_code, discount_type, discount, distribute_time, valid_start, valid_end, verify_time, settle_status, created_time, updated_time
+        id, channel_id, user_coupon_id, verify_code, title, discount_type, discount, distribute_time, valid_start, valid_end, verify_time, settle_status, created_time, updated_time
     </sql>
 
 </mapper>