|
@@ -14,12 +14,16 @@ import com.abi.qms.platform.dao.mapper.FlowQueryRecordFlowMapper;
|
|
|
import com.abi.qms.platform.dao.mapper.FlowQueryRecordMapper;
|
|
|
import com.abi.qms.platform.dao.vo.result.FlowQueryRecordInfoVo;
|
|
|
import com.abi.qms.platform.dao.vo.result.ListFlowQueryRecordVO;
|
|
|
+import com.abi.qms.platform.dao.vo.result.WxListFlowQueryRecordVO;
|
|
|
import com.abi.qms.platform.dto.req.AddFlowQueryRecordReq;
|
|
|
import com.abi.qms.platform.dto.req.ExportFlowQueryRecordReq;
|
|
|
import com.abi.qms.platform.dto.req.PageListFlowQueryRecordReq;
|
|
|
+import com.abi.qms.platform.dto.req.WxPageListFlowQueryRecordReq;
|
|
|
import com.abi.qms.platform.dto.res.ExportFlowQueryRecordRes;
|
|
|
import com.abi.qms.platform.dto.res.GetFlowQueryRecordInfo;
|
|
|
import com.abi.qms.platform.dto.res.PageListFlowQueryRecordRes;
|
|
|
+import com.abi.qms.platform.dto.res.WxPageListFlowQueryRecordRes;
|
|
|
+import com.abi.qms.platform.feign.SkuFeign;
|
|
|
import com.abi.qms.platform.infrastructure.util.AssertUtil;
|
|
|
import com.abi.qms.platform.infrastructure.util.PageUtil;
|
|
|
import com.abi.qms.platform.service.FlowQueryRecordBoxStackService;
|
|
@@ -29,6 +33,7 @@ import com.abi.task.common.utils.PojoConverterUtils;
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -54,6 +59,8 @@ public class FlowQueryRecordServiceImpl implements IFlowQueryRecordService {
|
|
|
@Autowired
|
|
|
private FlowQueryRecordBoxStackMapper queryRecordBoxStackMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private SkuFeign skuFeign;
|
|
|
|
|
|
/**
|
|
|
* 分页查询列表
|
|
@@ -220,6 +227,30 @@ public class FlowQueryRecordServiceImpl implements IFlowQueryRecordService {
|
|
|
return flowQueryRecordBeanList;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 微信分页查询列表
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public WxPageListFlowQueryRecordRes wxPageListQuery(WxPageListFlowQueryRecordReq req) {
|
|
|
+ IPage<WxListFlowQueryRecordVO> pageResult = flowQueryRecordMapper.wxPageListQuery(PageUtil.createPage(req),req);
|
|
|
+ List<WxListFlowQueryRecordVO> recordList = pageResult.getRecords();
|
|
|
+ recordList.forEach(record -> {
|
|
|
+ String skuCode = record.getSkuCode();
|
|
|
+ if (StringUtils.isNotBlank(skuCode)) {
|
|
|
+ SkuFeign.Sku sku = skuFeign.getSkuByCode(record.getSkuCode());
|
|
|
+ if (sku != null) {
|
|
|
+ record.setSkuName(sku.getSkuName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ WxPageListFlowQueryRecordRes res = new WxPageListFlowQueryRecordRes();
|
|
|
+ PageUtil.copyPageInfo(res, pageResult);
|
|
|
+ List<WxPageListFlowQueryRecordRes.FlowQueryRecordBean> flowQueryRecordBeanList = PojoConverterUtils.copyList(recordList, WxPageListFlowQueryRecordRes.FlowQueryRecordBean.class);
|
|
|
+ res.setFlowQueryRecordList(flowQueryRecordBeanList);
|
|
|
+
|
|
|
+ return res;
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 校验-新增流向查询记录请求内容
|