小程序分销记录shopId可为空
This commit is contained in:
parent
8bd9b29b7a
commit
d96e4f304d
|
|
@ -60,14 +60,17 @@ public class MkDistributionFlowServiceImpl extends ServiceImpl<MkDistributionFlo
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> distributionFlow(long userId, String startTime, String endTime, Long shopId, String status) {
|
public Map<String, Object> distributionFlow(long userId, String startTime, String endTime, Long shopId, String status) {
|
||||||
ShopUser shopUserInfo = shopUserService.getShopUserInfo(shopId, userId);
|
ShopUser shopUserInfo = null;
|
||||||
|
if (shopId != null) {
|
||||||
|
shopUserInfo = shopUserService.getShopUserInfo(shopId, userId);
|
||||||
|
}
|
||||||
PageHelper.startPage(PageUtil.buildPageHelp());
|
PageHelper.startPage(PageUtil.buildPageHelp());
|
||||||
List<MkDistributionFlowVO> list = mapper.pageInfo(shopId, StrUtil.isBlank(startTime) ? null : DateUtil.parseLocalDateTime(startTime),
|
List<MkDistributionFlowVO> list = mapper.pageInfo(shopId, StrUtil.isBlank(startTime) ? null : DateUtil.parseLocalDateTime(startTime),
|
||||||
StrUtil.isBlank(endTime) ? null : DateUtil.parseLocalDateTime(endTime), status,null, shopUserInfo.getId(), null);
|
StrUtil.isBlank(endTime) ? null : DateUtil.parseLocalDateTime(endTime), status,null, shopUserInfo == null ? null : shopUserInfo.getId(), null);
|
||||||
Page<MkDistributionFlowVO> page = PageUtil.convert(new PageInfo<>(list));
|
Page<MkDistributionFlowVO> page = PageUtil.convert(new PageInfo<>(list));
|
||||||
Map<String, Object> map = BeanUtil.beanToMap(page);
|
Map<String, Object> map = BeanUtil.beanToMap(page);
|
||||||
map.put("totalAmount", mapper.totalAmount(shopId, StrUtil.isBlank(startTime) ? null : DateUtil.parseLocalDateTime(startTime),
|
map.put("totalAmount", mapper.totalAmount(shopId, StrUtil.isBlank(startTime) ? null : DateUtil.parseLocalDateTime(startTime),
|
||||||
StrUtil.isBlank(endTime) ? null : DateUtil.parseLocalDateTime(endTime), status,null, shopUserInfo.getId(), null));
|
StrUtil.isBlank(endTime) ? null : DateUtil.parseLocalDateTime(endTime), status,null, shopUserInfo == null ? null : shopUserInfo.getId(), null));
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue