| | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/startCource/weeksOfCourseDetailsList") |
| | | @ApiOperation(value = "上课首页-课程列表2.0", tags = {"APP-开始上课"}) |
| | | @ApiOperation(value = "上课首页-课程列表", tags = {"APP-开始上课"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | @ApiImplicitParam(value = "查询时间yyyy-MM-dd", name = "time", required = true, dataType = "string"), |
| | |
| | | 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 |
| | |
| | | vo.setStuPhone(ToolUtil.isEmpty(sts.getPhone()) ? "" : sts.getPhone()); |
| | | vo.setIdCard(ToolUtil.isEmpty(sts.getIdCard()) ? "" : sts.getIdCard()); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | vo.setBirthday(simpleDateFormat.format(sts.getBirthday())); |
| | | vo.setStuName(sts.getName()); |
| | | vo.setStuAge(DateUtil.age(sts.getBirthday())); |
| | | if (sts.getBirthday()!=null){ |
| | | vo.setStuAge(DateUtil.age(sts.getBirthday())); |
| | | vo.setBirthday(simpleDateFormat.format(sts.getBirthday())); |
| | | } |
| | | vo.setStuHeight(sts.getHeight()); |
| | | vo.setStuWeight(sts.getWeight()); |
| | | vo.setIsNot(sts.getIsDefault()); |
| | |
| | | } |
| | | return ResultUtil.success(stuListVos); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | 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(); |
| | | } |
| | |
| | | if (null == appUserId) { |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return ResultUtil.success(honorService.queryStuOfMedalData(stuId)); |
| | | return ResultUtil.success(honorService.queryStuOfMedalData(stuId, appUserId)); |
| | | } catch (Exception e) { |
| | | return ResultUtil.runErr(); |
| | | } |