Browse Source

//update channel

release_toaliyun_real
xhxu 4 years ago
parent
commit
eee8816ebe
2 changed files with 28 additions and 3 deletions
  1. +17
    -1
      mallinkCApi/src/main/java/com/iformall/controller/WxCouponController.java
  2. +11
    -2
      mallinkService/src/main/java/com/iformall/domain/vo/WxCouponChannelVo.java

+ 17
- 1
mallinkCApi/src/main/java/com/iformall/controller/WxCouponController.java View File

@@ -111,6 +111,7 @@ public class WxCouponController extends BaseController {
if (wxCouponCVo == null) {
return new ResultData(ErrorCode.COUPON_IS_EMPTY);
}
wxCouponCVo.setSalePrice(couponCVo.getSalePrice());
wxCouponCVo.setRemainInventory(couponCVo.getRemainInventory());
wxCouponCVo.setStatus(couponCVo.getStatus());
}
@@ -213,9 +214,18 @@ public class WxCouponController extends BaseController {
}
WxCouponCVo couponCVo = new WxCouponCVo();
if(cc.getChannelPrice() != null){
couponCVo.setSalePrice(cc.getChannelPrice());
}else{
couponCVo.setSalePrice(c.getSalePrice());
}
if(cc.getChannelStock() != null){
couponCVo.setRemainInventory(cc.getChannelStock());
}else{
couponCVo.setRemainInventory(c.getRemainInventory());
}
couponCVo.setId(cc.getId());
couponCVo.setCouponId(cc.getCouponId());
couponCVo.setRemainInventory(c.getRemainInventory());
couponCVo.setStatus(c.getStatus());
return couponCVo;
}
@@ -260,6 +270,12 @@ public class WxCouponController extends BaseController {
if(wxcv == null){
return null;
}
if(cc.getChannelPrice() != null){
wxcv.setSalePrice(cc.getChannelPrice());
}
if(cc.getChannelStock() != null){
wxcv.setRemainInventory(cc.getChannelStock());
}
wxcv.setId(cc.getId());
wxcv.setCouponId(cc.getCouponId());
wxcv.setTargetAd(cc.getTargetAd());


+ 11
- 2
mallinkService/src/main/java/com/iformall/domain/vo/WxCouponChannelVo.java View File

@@ -174,11 +174,20 @@ public class WxCouponChannelVo extends WxCouponChannel implements Serializable {
*/
public void setWxCoupon(WxCoupon c){
if(c != null){
this.setRemainInventory(c.getRemainInventory());
if(this.getChannelStock() == null){
this.setRemainInventory(c.getRemainInventory());
}else{
this.setRemainInventory(this.getChannelStock());
}
if(this.getChannelPrice() == null){
this.setSalePrice(c.getSalePrice());
}else{
this.setSalePrice(this.getChannelPrice());
}

this.setInventory(c.getInventory());
this.setCoverImg(c.getCoverImg());
this.setSubTitle(c.getSubTitle());
this.setSalePrice(c.getSalePrice());
this.setUsePrice(c.getUsePrice());
this.setPrice(c.getPrice());
this.setTailPrice(c.getTailPrice());


Loading…
Cancel
Save