|
|
|
@@ -1,5 +1,6 @@ |
|
|
|
package com.iformall.service.impl; |
|
|
|
|
|
|
|
import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
@@ -34,6 +35,8 @@ public class WxPressBatchServiceImpl implements WxPressBatchService { |
|
|
|
WxOrderPressMapper wxOrderPressMapper; |
|
|
|
@Autowired |
|
|
|
WxOrderMapper wxOrderMapper; |
|
|
|
@Autowired |
|
|
|
WxCouponMapper wxCouponMapper; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@@ -43,6 +46,23 @@ public class WxPressBatchServiceImpl implements WxPressBatchService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageInfo<WxPressBatch> listAsPage(WxPressBatch record, Integer pageIndex, Integer pageSize) { |
|
|
|
if (!StringUtils.isBlank(record.getCouponName())) { |
|
|
|
WxCoupon cq = new WxCoupon(); |
|
|
|
cq.updateTenantInfo(record); |
|
|
|
cq.setTitle(StringUtils.trimToNull(record.getCouponName())); |
|
|
|
List<Long> cids = wxCouponMapper.findIdList(cq); |
|
|
|
if (null == cids || cids.size() <= 0 ) { |
|
|
|
record.setId(0L); |
|
|
|
}else { |
|
|
|
List<Long> ids = wxPressBatchItemMapper.getBatchIdList(cids, record.getTenantId(), record.getStatus()); |
|
|
|
if (null == ids || ids.size() <= 0) { |
|
|
|
record.setId(0L); |
|
|
|
}else { |
|
|
|
record.setIds(ids); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxPressBatchMapper.findList(record)); |
|
|
|
} |
|
|
|
|
|
|
|
|