diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxCouponMerchant.java b/mallinkService/src/main/java/com/iformall/domain/po/WxCouponMerchant.java index 757e6cdca..350580655 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxCouponMerchant.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxCouponMerchant.java @@ -41,8 +41,8 @@ public class WxCouponMerchant implements Serializable { /***/ - @io.swagger.annotations.ApiModelProperty(value="",name="couponId") - private Long couponId; + @io.swagger.annotations.ApiModelProperty(value="",name="productId") + private Long productId; /***/ @io.swagger.annotations.ApiModelProperty(value="",name="merchantId") private Long merchantId; @@ -64,11 +64,11 @@ public class WxCouponMerchant implements Serializable { public Long getCouponId() { - return couponId; + return productId; } - public void setCouponId(Long couponId) { - this.couponId = couponId; + public void setCouponId(Long productId) { + this.productId = productId; } public Long getMerchantId() { @@ -114,7 +114,7 @@ public class WxCouponMerchant implements Serializable { public static enum Field { Id_ASC("`id` ASC"),Id_DESC("`id` DESC") - ,CouponId_ASC("`coupon_id` ASC"),CouponId_DESC("`coupon_id` DESC") + ,ProductId_ASC("`product_id` ASC"),ProductId_DESC("`product_id` DESC") ,MerchantId_ASC("`merchant_id` ASC"),MerchantId_DESC("`merchant_id` DESC") ,Parameter_ASC("`parameter` ASC"),Parameter_DESC("`description` DESC") ,CreateDate_ASC("`create_date` ASC"),CreateDate_DESC("`create_date` DESC") diff --git a/mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantVo.java b/mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantVo.java index c9696c0ee..70286b4e4 100644 --- a/mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantVo.java +++ b/mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantVo.java @@ -1,34 +1,20 @@ package com.iformall.domain.vo; -import com.iformall.domain.po.WxCouponOrder; -import com.iformall.domain.po.WxOrder; - import javax.persistence.Id; -import javax.persistence.Transient; -import java.util.Date; -import java.util.List; - -public class WxMerchantVo extends WxCouponOrder{ - - /** - * - */ - private static final long serialVersionUID = 6687954932922444531L; +public class WxMerchantVo{ + private static final long serialVersionUID = 6687964942922444531L; @Id protected Long id; - public Long getId() { return id; } - public void setId(Long id) { this.id = id; } - /*发券商户信息*/ /*商户图片**/ @io.swagger.annotations.ApiModelProperty(value="商户图片",name="imgUrl") diff --git a/mallinkService/src/main/java/com/iformall/domain/vo/WxOrderCouponVo.java b/mallinkService/src/main/java/com/iformall/domain/vo/WxOrderCouponVo.java index 7d6643312..b052e27f0 100644 --- a/mallinkService/src/main/java/com/iformall/domain/vo/WxOrderCouponVo.java +++ b/mallinkService/src/main/java/com/iformall/domain/vo/WxOrderCouponVo.java @@ -1,29 +1,20 @@ package com.iformall.domain.vo; -import com.iformall.domain.po.WxCouponOrder; -import com.iformall.domain.po.WxOrder; - -import javax.persistence.Id; -import javax.persistence.Transient; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import java.util.Date; import java.util.List; -public class WxOrderCouponVo extends WxCouponOrder{ + +@JsonIgnoreProperties(value = {"handler"}) +public class WxOrderCouponVo { /** * */ - private static final long serialVersionUID = 6687954932922444531L; + private static final long serialVersionUID = 6687964932922444531L; - - @Id protected Long id; - @Transient - protected List ids; - @Transient - protected String sortColumns; - public Long getId() { return id; } @@ -32,18 +23,6 @@ public class WxOrderCouponVo extends WxCouponOrder{ this.id = id; } - public String getSortColumns() { - return sortColumns; - } - - public List getIds() { - return ids; - } - - public void setIds(List ids) { - this.ids = ids; - } - /* 基础购买到的券信息 */ @@ -59,7 +38,7 @@ public class WxOrderCouponVo extends WxCouponOrder{ /*商户ID**/ /*产品ID**/ - @io.swagger.annotations.ApiModelProperty(value="券ID",name="productId") + @io.swagger.annotations.ApiModelProperty(value="产品ID",name="productId") private Long productId; /*0: 付款 1: 退款**/ @io.swagger.annotations.ApiModelProperty(value="0: 付款 1: 退款",name="paymentType") @@ -122,7 +101,7 @@ public class WxOrderCouponVo extends WxCouponOrder{ private String remark; /*发券商户信息*/ - @io.swagger.annotations.ApiModelProperty(value="商户图片",name="imgUrl") + @io.swagger.annotations.ApiModelProperty(value="商户列表",name="merchantVoList") private List merchantVoList; @@ -272,70 +251,4 @@ public class WxOrderCouponVo extends WxCouponOrder{ remark = _remark; } - public static enum Field - { - Id_ASC("`id` ASC"),Id_DESC("`id` DESC") - ,OrderNumber_ASC("`order_number` ASC"),OrderNumber_DESC("`order_number` DESC") - ,TenantId_ASC("`tenant_id` ASC"),TenantId_DESC("`tenant_id` DESC") - ,CUserId_ASC("`c_user_id` ASC"),CUserId_DESC("`c_user_id` DESC") - ,CouponId_ASC("`product_id` ASC"),CouponId_DESC("`product_id` DESC") - ,PaymentType_ASC("`payment_type` ASC"),PaymentType_DESC("`payment_type` DESC") - ,Payment_ASC("`payment` ASC"),Payment_DESC("`payment` DESC") - ,PaymentTime_ASC("`payment_time` ASC"),PaymentTime_DESC("`payment_time` DESC") - ,OrderStatus_ASC("`order_status` ASC"),OrderStatus_DESC("`order_status` DESC") - ,CreateDate_ASC("`create_date` ASC"),CreateDate_DESC("`create_date` DESC") - ,UpdateDate_ASC("`update_date` ASC"),UpdateDate_DESC("`update_date` DESC") - ,Detail_ASC("`detail` ASC"),Detail_DESC("`detail` DESC") - ; - private String value; - Field(String value){ - this.value = value; - } - public String getValue() { - return value; - } - public void setCol(String value) { - this.value = value; - } - @Override - public String toString() { - return this.getValue(); - } - } - - public void setSortColumns(WxOrder.Field... fields) - { - if (fields == null || fields.length == 0) { - return; - } - for (int k = 0; k < fields.length; k++) { - if (fields[k] == null) { - return; - } - } - StringBuilder sb = new StringBuilder(fields[0].toString()); - for (int k = 1; k < fields.length; k++) { - sb.append(","); - sb.append(fields[k].toString()); - } - this.sortColumns = sb.toString(); - } - - public void setSortColumns(String sortColumns) - { - if (sortColumns == null || "".equals(sortColumns.trim())) { - return; - } - if (sortColumns.contains(",")) { - String[] cols = sortColumns.split(","); - java.util.List fList = new java.util.ArrayList(); - for (int k = 0; k < cols.length; k++) { - fList.add(WxOrder.Field.valueOf(cols[k])); - } - this.setSortColumns(fList.toArray(new WxOrder.Field[fList.size()])); - } else { - this.setSortColumns(WxOrder.Field.valueOf(sortColumns)); - } - } - } diff --git a/mallinkService/src/main/resources/mapper/WxCouponMerchantMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponMerchantMapper.xml index 1cd77b31e..84f589fe5 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponMerchantMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponMerchantMapper.xml @@ -3,7 +3,7 @@ - + @@ -23,8 +23,8 @@ - - and `coupon_id` = #{couponId} + + and `product_id` = #{productId} @@ -62,5 +62,36 @@ - + + m.id, + m.img_url,m.name,m.link_phone,m.status, + s.addr,s.shop_number,s.baidu_poi, + mb.building_name,mf.floor_name + + + + + + + + + + + + + + + + + diff --git a/mallinkService/src/main/resources/mapper/WxOrderMapper.xml b/mallinkService/src/main/resources/mapper/WxOrderMapper.xml index 260a9cf18..c8ca93c68 100644 --- a/mallinkService/src/main/resources/mapper/WxOrderMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxOrderMapper.xml @@ -133,24 +133,14 @@ o.id,o.order_number,o.tenant_id,o.c_user_id,o.product_id,o.payment_type,o.payment,o.payment_time,o.order_status,o.create_date,o.update_date, - co.cover_img,co.title,co.sub_title,co.sale_price,co.use_price,co.price,co.unit, + c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.unit - - m.name - o.id,o.order_number,o.tenant_id,o.c_user_id,o.product_id,o.payment_type,o.payment,o.payment_time,o.order_status,o.create_date,o.update_date, - co.type,co.cover_img,co.title,co.sub_title,co.sale_price,co.use_price,co.price,co.unit,co.detail,co.remark, - c.id as coupon_order_id,c.coupon_order_status - - - - m.id, - m.img_url,m.name,m.link_phone,m.status, - s.addr,s.shop_number,s.baidu_poi, - mb.building_name,mf.floor_name, + c.type,c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.unit,c.detail,c.remark, + co.id as coupon_order_id,co.coupon_order_status @@ -181,45 +171,18 @@ - + javaType="java.util.ArrayList" + select="com.iformall.mapper.WxCouponMerchantMapper.findMerchantVoList" > - - - - - - - - - - - - - - - - -