店铺信息不存在
This commit is contained in:
@@ -64,8 +64,10 @@ public class UserContoller {
|
|||||||
@GetMapping("/shopUserInfo")
|
@GetMapping("/shopUserInfo")
|
||||||
public Result shopUserInfo(@RequestParam("userId") String userId, @RequestHeader("openId") String openId, @RequestParam("shopId") String shopId) throws Exception {
|
public Result shopUserInfo(@RequestParam("userId") String userId, @RequestHeader("openId") String openId, @RequestParam("shopId") String shopId) throws Exception {
|
||||||
TbShopUser shopUser = new TbShopUser();
|
TbShopUser shopUser = new TbShopUser();
|
||||||
TbShopInfo tbShopInfo = shopInfoMapper.selectByPrimaryKey(Integer.valueOf(shopId));
|
TbShopInfo tbShopInfo = new TbShopInfo();
|
||||||
if (StringUtils.isNotBlank(shopId) && !shopId.equals("null")) {
|
if (StringUtils.isNotBlank(shopId) && !shopId.equals("null")) {
|
||||||
|
tbShopInfo = shopInfoMapper.selectByPrimaryKey(Integer.valueOf(shopId));
|
||||||
|
if(tbShopInfo!=null){
|
||||||
shopUser = shopUserMapper.selectByUserIdAndShopId(userId, shopId);
|
shopUser = shopUserMapper.selectByUserIdAndShopId(userId, shopId);
|
||||||
if (ObjectUtil.isEmpty(shopUser)) {
|
if (ObjectUtil.isEmpty(shopUser)) {
|
||||||
TbUserInfo tbUserInfo = userInfoMapper.selectByPrimaryKey(Integer.valueOf(userId));
|
TbUserInfo tbUserInfo = userInfoMapper.selectByPrimaryKey(Integer.valueOf(userId));
|
||||||
@@ -98,6 +100,9 @@ public class UserContoller {
|
|||||||
// shopUserMapper.updateByPrimaryKey(shopUser);
|
// shopUserMapper.updateByPrimaryKey(shopUser);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
|
return Result.fail("店铺信息不存在");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
shopUser.setAmount(BigDecimal.ZERO);
|
shopUser.setAmount(BigDecimal.ZERO);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user