Преглед изворни кода

fix press batch

release_toaliyun_real
zhengfangyuan пре 3 година
родитељ
комит
3b909509e2
2 измењених фајлова са 27 додато и 9 уклоњено
  1. +23
    -9
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxPressBatchController.java
  2. +4
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxPressBatchItem.java

+ 23
- 9
mallinkAdmin/src/main/java/com/iformall/controller/market/WxPressBatchController.java Прегледај датотеку

@@ -104,16 +104,30 @@ public class WxPressBatchController extends BaseController {
if (null == id) {
return new ResultData(Result.ERROR,"参数错误");
}
List<Long> couponIdList = wxPressBatchService.getItemCouponIdList(id, getTenantInfo().getTenantId());
WxCoupon record = new WxCoupon();
record.updateTenantInfo(getTenantInfo());
if (null != couponIdList && couponIdList.size() > 0 ) {
record.setIds(couponIdList);
}else {
record.setId(0L);
TenantEntity tenantEntity = getTenantInfo();
List<WxPressBatchItem> items = wxPressBatchService.getItemList(id, tenantEntity.getTenantId());
if (null != items && items.size() > 0 ) {
List<Long> couponIdList = wxPressBatchService.getItemCouponIdList(id, tenantEntity.getTenantId());
WxCoupon record = new WxCoupon();
record.updateTenantInfo(getTenantInfo());
if (null != couponIdList && couponIdList.size() > 0 ) {
record.setIds(couponIdList);
}else {
record.setId(0L);
}
List<WxCoupon> list = wxCouponService.list(record);
Map<Long,WxCoupon> couponMap = new HashMap<Long,WxCoupon>();
if (null != list && list.size() > 0 ) {
for (WxCoupon c : list) {
couponMap.put(c.getId(), c);
}
}
for (WxPressBatchItem pbi : items) {
WxCoupon coupon = couponMap.get(pbi.getCouponId());
pbi.setCoupon(coupon);
}
}
List<WxCoupon> list = wxCouponService.list(record);
return new ResultData(list);
return new ResultData(items);
}
@ApiOperation("删除接口")


+ 4
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxPressBatchItem.java Прегледај датотеку

@@ -1,5 +1,6 @@
package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.iformall.domain.po.base.TenantEntity;
import lombok.Data;
@@ -27,4 +28,7 @@ public class WxPressBatchItem extends TenantEntity {
private Date createDate;
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate")
private Date updateDate;
@TableField(exist = false)
private WxCoupon coupon;
}

Loading…
Откажи
Сачувај