| | |
| | | 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(); |
| | |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | TAppGift one = appGiftService.getOne(new LambdaQueryWrapper<TAppGift>().eq(TAppGift::getUserId, appUserId)); |
| | | Boolean b = false; |
| | | Integer i = 0; |
| | | if (one != null && one.getNum() > 0) { |
| | | i = appGiftService.weeksOfAddHours(packetId, appUserId, one.getNum()); |
| | | |
| | | } |
| | | if (i == 1) { |
| | | // 送完清0 |
| | |
| | | } |
| | | |
| | | return ResultUtil.success(istuService.updateById(tStudent)); |
| | | |
| | | // return ResultUtil.success(istuService.commitEditStudentInfo(stu,userIdFormRedis)); |
| | | } catch (Exception e) { |
| | | return ResultUtil.runErr(); |
| | | } |
| | |
| | | }) |
| | | public ResultUtil<List<StuMedalVo>> queryStuMedal(Integer stuId) { |
| | | try { |
| | | |
| | | |
| | | Integer appUserId = tokenUtil.getUserIdFormRedis(); |
| | | if (null == appUserId) { |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return ResultUtil.success(honorService.queryHonorDetails(stuId)); |
| | | return ResultUtil.success(honorService.queryHonorDetails(appUserId)); |
| | | } catch (Exception e) { |
| | | return ResultUtil.runErr(); |
| | | } |