userId 为null处理
This commit is contained in:
@@ -72,15 +72,16 @@ public class TbShopUserServiceImpl implements TbShopUserService {
|
||||
shopUserInfoVo.setTelephone(tbShopUser.getTelephone());
|
||||
shopUserInfoVo.setTotalScore(0);
|
||||
});
|
||||
}
|
||||
|
||||
if (shopUserInfoVo.getUserId() == null) {
|
||||
shopUserInfoVo.setUserId(0);
|
||||
}
|
||||
}
|
||||
shopUserInfoVo.setOrderNumber(0);
|
||||
} else {
|
||||
Integer orderNumber = tbOrderInfoRepository.countByUserIdAndStatusAndShopId(shopUserInfoVo.getUserId().toString(), criteria.getShopId());
|
||||
shopUserInfoVo.setOrderNumber(Objects.isNull(orderNumber) ? 0 : orderNumber);
|
||||
}
|
||||
shopUserInfoVo.setInMoney(tbShopUserRepository.sumAmount(shopUserInfoVo.getId()));
|
||||
|
||||
}
|
||||
|
||||
return PageUtil.toPlusPage(iPage.getRecords(), Integer.valueOf(iPage.getTotal() + ""));
|
||||
@@ -213,7 +214,6 @@ public class TbShopUserServiceImpl implements TbShopUserService {
|
||||
}
|
||||
|
||||
|
||||
|
||||
TbShopUser tbShopUser = tbShopUserRepository.getById(Integer.valueOf(map.get("id") + ""));
|
||||
if (ObjectUtil.isNull(tbShopUser)) {
|
||||
throw new BadRequestException("不存在的会员信息");
|
||||
@@ -228,7 +228,6 @@ public class TbShopUserServiceImpl implements TbShopUserService {
|
||||
}
|
||||
|
||||
|
||||
|
||||
String type = map.get("type").toString();
|
||||
TbShopUserFlow flow = new TbShopUserFlow();
|
||||
|
||||
@@ -258,8 +257,6 @@ public class TbShopUserServiceImpl implements TbShopUserService {
|
||||
tbShopUserFlowMapper.insert(flow);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user