| | |
| | | package com.dsh.account.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.account.model.vo.classDetails.classInsVo.StuDetailsReq; |
| | | import com.dsh.account.util.DateUtil; |
| | | import com.dsh.account.entity.TStudent; |
| | |
| | | import com.dsh.account.model.vo.classDetails.classInsVo.StuPhysicalVo; |
| | | import com.dsh.account.service.TAppUserService; |
| | | import com.dsh.account.service.TStudentService; |
| | | import com.dsh.account.util.ToolUtil; |
| | | import io.swagger.annotations.*; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/stu/queryStudentData") |
| | | @ApiOperation(value = "根据登录用户ID查询学员信息", tags = {"用户——学员信息"}, notes = "") |
| | | @ApiOperation(value = "根据登录用户ID查询学员信息", tags = {"APP-用户学员信息"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "用户id", name = "id", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取学员测试报告 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/stu/queryPhysical") |
| | | @ApiOperation(value = "获取学员测试报告", tags = {"APP-获取学员测试报告"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "学员id", name = "id", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public StuPhysicalVo getStuPhysicalInfo(@RequestBody Integer stuID){ |
| | | StuPhysicalVo vo = new StuPhysicalVo(); |
| | | TStudent tStudent = istuService.selectById(stuID); |
| | | TStudent tStudent = istuService.getById(stuID); |
| | | if (ToolUtil.isNotEmpty(tStudent)){ |
| | | vo.setBmi(tStudent.getBmi()); |
| | | vo.setUrl(tStudent.getLateralSurface()); |
| | | vo.setHeight(tStudent.getHeight()); |
| | | vo.setWeight(tStudent.getWeight()); |
| | | } |
| | | return vo; |
| | | } |
| | | |
| | |
| | | student.setBmi(multiply.doubleValue()); |
| | | student.setInsertTime(new Date()); |
| | | student.setState(1); |
| | | istuService.insert(student); |
| | | istuService.save(student); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PostMapping("/stu/listOfStu") |
| | | public List<StuListVo> queryStuList(@RequestBody Integer appUserID){ |
| | | List<StuListVo> stuListVos = new ArrayList<>(); |
| | | List<TStudent> tStudents = istuService.selectList(new EntityWrapper<TStudent>() |
| | | List<TStudent> tStudents = istuService.list(new QueryWrapper<TStudent>() |
| | | .eq("appUserId",appUserID)); |
| | | if (tStudents.size() > 0){ |
| | | tStudents.forEach(sts -> { |