nickchange
2023-11-17 a9564eae9f0169ca39329b2f14a8f13d13358a0a
cloud-server-account/src/main/java/com/dsh/account/controller/ClassDetailsController.java
@@ -70,13 +70,13 @@
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil<ClassInfoVo> queryCouponRecord(){
    public ResultUtil<ClassInfoVo> queryCouponRecord(Integer stuId){
        try {
            Integer userIdFormRedis = tokenUtil.getUserIdFormRedis();
            if(null == userIdFormRedis){
                return ResultUtil.tokenErr();
            }
            return ResultUtil.success(tappuService.queryUserOfStus(userIdFormRedis));
            return ResultUtil.success(tappuService.queryUserOfStus(stuId,userIdFormRedis));
        }catch (Exception e){
            e.printStackTrace();
            return ResultUtil.runErr();
@@ -201,7 +201,10 @@
        if (ToolUtil.isNotEmpty(tStudent)){
            vo.setBmi(tStudent.getBmi());
            vo.setBodyStatus(BMIBodyUtil.getBodyStatus(tStudent.getBmi()));
            vo.setUrl(tStudent.getLateralSurface());
            if (tStudent.getLateralSurface()!=null) {
                String[] split = tStudent.getLateralSurface().split(";");
                vo.setUrls(split);
            }
            vo.setHeight(tStudent.getHeight());
            vo.setWeight(tStudent.getWeight());
        }
@@ -350,6 +353,12 @@
            }
            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
            Double height = stu.getHeight();
            Double squareHeight = Math.pow(height/100, 2);
            Double weight = stu.getWeight();
            Double bim = weight/squareHeight;
            TStudent tStudent = new TStudent();
            tStudent.setId(stu.getStuId());
            tStudent.setBirthday(format.parse(stu.getBirthday()));
@@ -360,6 +369,7 @@
            tStudent.setSex(stu.getSex());
            tStudent.setName(stu.getName());
            tStudent.setIdCard(stu.getIdCard());
            tStudent.setBmi(bim);
          return  ResultUtil.success(istuService.updateById(tStudent));
//            return ResultUtil.success(istuService.commitEditStudentInfo(stu,userIdFormRedis));