| | |
| | | if (null == appUserId) { |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | TAppGift one = appGiftService.getOne(new LambdaQueryWrapper<TAppGift>().eq(TAppGift::getUserId, appUserId)); |
| | | |
| | | return ResultUtil.success(one == null ? 0 : one.getNum()); |
| | | Integer num = 0; |
| | | List<TAppGift> list = appGiftService.list(new LambdaQueryWrapper<TAppGift>().eq(TAppGift::getUserId, appUserId)); |
| | | for (TAppGift tAppGift : list) { |
| | | num += tAppGift.getNum(); |
| | | } |
| | | return ResultUtil.success(num); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |