zhangkaikai 2 роки тому
батько
коміт
6da5767fe2

+ 6 - 0
mp-service/src/main/java/com/qs/mp/admin/domain/vo/TicketAwardsPrizeVO.java

@@ -115,6 +115,12 @@ public class TicketAwardsPrizeVO {
   @ApiModelProperty("排序权重")
   private Integer sortWeight;
 
+  /**
+   * 优惠卷详情
+   */
+  @ApiModelProperty(value = "优惠卷详情")
+  private String couponDetail;
+
   public String getAwardsLabelPicUrl() {
     AwardsLabelEnum awardsLabelEnum = AwardsLabelEnum.getByValue(this.awardsLabel);
     if (Objects.nonNull(awardsLabelEnum)) {

+ 2 - 0
mp-service/src/main/resources/mapper/admin/TicketAwardsPrizeMapper.xml

@@ -31,11 +31,13 @@
             if(t2.prize_type = 'goods' AND t3.title is not null,t3.title,t2.title) as title,
             if(t2.prize_type = 'goods' AND t3.title is not null,t3.pic_url,t2.pic_url) as pic_url,
             if(t2.prize_type = 'goods' AND t3.value is not null,t3.value,t2.value) as value,
+            if(t4.coupon_detail is not null, t3.coupon_detail, '') as coupon_detail,
             t1.*,
             t2.*
         from mp_ticket_awards t1
         left join mp_ticket_awards_prize t2 on t1.awards_id = t2.awards_id
         left join mp_goods t3 on t2.ref_id = t3.goods_id
+        left join mp_coupon t4 on t2.ref_id = t4.coupon_id
             ${ew.customSqlSegment}
     </select>