Commit 22eab725 authored by zhangfeng's avatar zhangfeng

bugfix(member): 用户礼品查询修改

parent 8c7fd97b
......@@ -358,14 +358,22 @@ public class RewardServiceImpl extends AbstractService<RewardMapper, RewardDO> i
rewardDOLambdaQuery.eq(RewardDO::getNodeId, reqVO.getNodeId());
} else {
UserRespDTO user = memberUserApi.getUser(reqVO.getMemberId());
Integer userCity = user.getCity();
if (userCity == null) {
userCity = 0;
}
Integer userCountry = user.getCountry();
if (userCountry == null) {
userCountry = 130;
}
List<WarehouseDO> warehouseList;
// 根据用户城市获取
warehouseList = warehouseMapper.selectList(new LambdaQueryWrapperX<WarehouseDO>().eq(WarehouseDO::getShi, user.getCity().longValue()));
appRewardListBackVO.setCity(user.getCity().longValue());
appRewardListBackVO.setCountry(user.getCountry().longValue());
warehouseList = warehouseMapper.selectList(new LambdaQueryWrapperX<WarehouseDO>().eq(WarehouseDO::getShi, userCity.longValue()));
appRewardListBackVO.setCity(userCity.longValue());
appRewardListBackVO.setCountry(userCountry.longValue());
if (CollectionUtil.isEmpty(warehouseList)) {
// 根据用户国家获取
warehouseList = warehouseMapper.selectList(new LambdaQueryWrapperX<WarehouseDO>().eq(WarehouseDO::getGuojia, user.getCountry().longValue()));
warehouseList = warehouseMapper.selectList(new LambdaQueryWrapperX<WarehouseDO>().eq(WarehouseDO::getGuojia, userCountry.longValue()));
appRewardListBackVO.setCity(null);
}
// 国家和城市都获取不到
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment