小程序分销记录shopId可为空
This commit is contained in:
parent
8bd9b29b7a
commit
d96e4f304d
|
|
@ -60,14 +60,17 @@ public class MkDistributionFlowServiceImpl extends ServiceImpl<MkDistributionFlo
|
|||
|
||||
@Override
|
||||
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());
|
||||
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));
|
||||
Map<String, Object> map = BeanUtil.beanToMap(page);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue