winter 2 лет назад
Родитель
Сommit
f0f95f43ee
2 измененных файлов: 19 добавлений и 1 удалений
  1. +3
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxLevelConfigCoupon.java
  2. +16
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxLevelConfigServiceImpl.java

+ 3
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxLevelConfigCoupon.java Просмотреть файл

@@ -21,6 +21,9 @@ public class WxLevelConfigCoupon extends BaseTenantEntity {
private Long levelId;
@io.swagger.annotations.ApiModelProperty(value="券编号",name="couponId")
private Long couponId;
@io.swagger.annotations.ApiModelProperty(value="券编号",name="couponId")
@TableField(exist = false)
private String couponName;
@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate")
private Date createDate;
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate")


+ 16
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxLevelConfigServiceImpl.java Просмотреть файл

@@ -6,6 +6,7 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.iformall.common.IdWorker;
import com.iformall.domain.dto.WxCUserBasicInfoDto;
import com.iformall.domain.po.WxCoupon;
import com.iformall.domain.po.WxLevelConfig;
import com.iformall.domain.po.WxLevelConfigCoupon;
import com.iformall.domain.po.WxLevelMerchant;
@@ -13,6 +14,7 @@ import com.iformall.domain.po.base.BaseEntity;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.WxLevelMerchantCVo;
import com.iformall.mapper.WxCUserBasicInfoMapper;
import com.iformall.mapper.WxCouponMapper;
import com.iformall.mapper.WxLevelConfigCouponMapper;
import com.iformall.mapper.WxLevelConfigMapper;
import com.iformall.mapper.WxLevelMerchantMapper;
@@ -44,6 +46,9 @@ public class WxLevelConfigServiceImpl implements WxLevelConfigService {
@Autowired
WxLevelConfigCouponMapper wxLevelConfigCouponMapper;
@Autowired
WxCouponMapper wxCouponMapper;

@Autowired
WxLevelMerchantMapper wxLevelMerchantapper;
@@ -86,7 +91,17 @@ public class WxLevelConfigServiceImpl implements WxLevelConfigService {
WxLevelConfigCoupon cc = new WxLevelConfigCoupon();
cc.updateTenantInfo(l);
cc.setLevelId(l.getId());
l.setCoupons(wxLevelConfigCouponMapper.findList(cc));
List<WxLevelConfigCoupon> coupons = wxLevelConfigCouponMapper.findList(cc);
if (null != coupons && coupons.size() > 0 ) {
for (int j = 0 ; j < coupons.size(); j++) {
WxLevelConfigCoupon wlcc = coupons.get(j);
WxCoupon c = wxCouponMapper.selectById(wlcc.getCouponId(),record.getTenantId());
if (null != c) {
wlcc.setCouponName(c.getTitle());
}
}
}
l.setCoupons(coupons);
}
return page;
}


Загрузка…
Отмена
Сохранить