lisy
2023-07-05 20cc9b22e1cdb93d081c6596ec762e9f928e208a
cloud-server-account/src/main/java/com/dsh/account/controller/ClassDetailsController.java
@@ -6,11 +6,13 @@
import com.dsh.account.feignclient.competition.model.PurchaseRecordVo;
import com.dsh.account.model.vo.classDetails.classInsVo.*;
import com.dsh.account.model.vo.commentDetail.StuCommentsVo;
import com.dsh.account.model.vo.medalDetail.GongVo;
import com.dsh.account.model.vo.medalDetail.StuMedalVo;
import com.dsh.account.model.vo.sourceDetail.CouponStuAvailableVo;
import com.dsh.account.model.vo.sourceDetail.CourseDetailsOfContinuationResp;
import com.dsh.account.model.vo.sourceDetail.RecordTimeRequest;
import com.dsh.account.service.EvaluateStudentService;
import com.dsh.account.service.StudentHonorService;
import com.dsh.account.service.TAppUserService;
import com.dsh.account.service.TStudentService;
import com.dsh.account.util.DateUtil;
@@ -51,12 +53,15 @@
    private EvaluateStudentService evalstuService;
    @Autowired
    private StudentHonorService honorService;
    @Autowired
    private TokenUtil tokenUtil;
    @ResponseBody
    @PostMapping("/base/startCource/queryStudentData")
    @PostMapping("/api/startCource/queryStudentData")
    @ApiOperation(value = "上课首页", tags = {"APP-开始上课"})
    @ApiImplicitParams({
            @ApiImplicitParam(value = "经度值", name = "longitude", required = true, dataType = "String"),
@@ -78,7 +83,7 @@
    @ResponseBody
    @PostMapping("/base/startCource/queryPhysical")
    @PostMapping("/api/startCource/queryPhysical")
    @ApiOperation(value = "获取学员测试报告", tags = {"APP-开始上课"})
    @ApiImplicitParams({
            @ApiImplicitParam(value = "学员id", name = "id", required = true, dataType = "int"),
@@ -100,7 +105,7 @@
     * 添加学员信息
     */
    @ResponseBody
    @PostMapping("/base/startCource/addData")
    @PostMapping("/api/startCource/addData")
    @ApiOperation(value = "添加学员信息", tags = {"APP-开始上课"})
    @ApiImplicitParams({
            @ApiImplicitParam(value = "学员信息", name = "stu", required = true, dataType = "int"),
@@ -124,7 +129,7 @@
     * 该APP用户下的学员列表
     */
    @ResponseBody
    @PostMapping("/base/startCource/listOfStu")
    @PostMapping("/api/startCource/listOfStu")
    @ApiOperation(value = "学员列表", tags = {"APP-开始上课"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
@@ -149,6 +154,7 @@
                    vo.setStuHeight(sts.getHeight());
                    vo.setStuWeight(sts.getWeight());
                    vo.setIsNot(sts.getIsDefault());
                    stuListVos.add(vo);
                });
            }
            return ResultUtil.success(stuListVos);
@@ -157,11 +163,37 @@
        }
    }
    /**
     * 切换学员
     */
    @ResponseBody
    @PostMapping("/api/startCource/switchStu")
    @ApiOperation(value = "切换学员", tags = {"APP-开始上课"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
            @ApiImplicitParam(value = "学员id", name = "stuId", required = true, dataType = "int"),
    })
    public ResultUtil<List<StuListVo>> dealSwitchStudents(@RequestBody Integer stuId){
        try {
            Integer userIdFormRedis = tokenUtil.getUserIdFormRedis();
            if(null == userIdFormRedis){
                return ResultUtil.tokenErr();
            }
            return ResultUtil.success(istuService.switchStudentActions(userIdFormRedis,stuId));
        }catch (Exception e){
            return ResultUtil.runErr();
        }
    }
    /**
     * 课时详情
     */
    @ResponseBody
    @PostMapping("/base/startCource/lessonDetails")
    @PostMapping("/api/startCource/lessonDetails")
    @ApiOperation(value = "课时详情", tags = {"APP-开始上课"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
@@ -188,7 +220,7 @@
     * 课时详情-记录列表
     */
    @ResponseBody
    @PostMapping("/base/startCource/recordDetails")
    @PostMapping("/api/startCource/recordDetails")
    @ApiOperation(value = "课时详情-记录列表", tags = {"APP-开始上课"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
@@ -210,7 +242,7 @@
     * 课时详情-续课课包详情
     */
    @ResponseBody
    @PostMapping("/base/startCource/renewal")
    @PostMapping("/api/startCource/renewal")
    @ApiOperation(value = "课时详情-续课课包详情", tags = {"APP-开始上课"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
@@ -233,7 +265,7 @@
     * 课时详情-选择优惠券
     */
    @ResponseBody
    @PostMapping("/base/startCource/conponList")
    @PostMapping("/api/startCource/conponList")
    @ApiOperation(value = "课时详情-选择优惠券", tags = {"APP-开始上课"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
@@ -257,7 +289,7 @@
     * 课时详情-支付
     */
    @ResponseBody
    @PostMapping("/base/startCource/payment")
    @PostMapping("/api/startCource/payment")
    @ApiOperation(value = "课时详情-支付", tags = {"APP-开始上课"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
@@ -277,10 +309,11 @@
     * 学员评语
     */
    @ResponseBody
    @PostMapping("/base/startCource/stuComment")
    @PostMapping("/api/startCource/stuComment")
    @ApiOperation(value = "学员评语", tags = {"APP-开始上课"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
            @ApiImplicitParam(value = "学员id", name = "stuId", required = true, dataType = "int"),
    })
    public ResultUtil<List<StuCommentsVo>> queryStuComment(@RequestParam("stuId") Integer stuId){
        try {
@@ -292,25 +325,73 @@
    /**
     * 学员勋章
     * 学员勋章详情
     */
    @ResponseBody
    @PostMapping("/base/startCource/stuMedal")
    @ApiOperation(value = "学员勋章", tags = {"APP-开始上课"})
    @PostMapping("/api/startCource/stuMedal")
    @ApiOperation(value = "学员勋章详情", tags = {"APP-开始上课"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
            @ApiImplicitParam(value = "学员id", name = "stuId", required = true, dataType = "int"),
    })
    public ResultUtil<StuMedalVo> queryStuMedal(@RequestParam("stuId") Integer stuId){
    public ResultUtil<List<StuMedalVo>> queryStuMedal(@RequestParam("stuId") Integer stuId){
        try {
            Integer appUserId = tokenUtil.getUserIdFormRedis();
            if(null == appUserId){
                return ResultUtil.tokenErr();
            }
            return ResultUtil.success(honorService.queryHonorDetails(stuId));
        }catch (Exception e){
            return ResultUtil.runErr();
        }
    }
    /**
     * 学员勋章
     */
    @ResponseBody
    @PostMapping("/api/startCource/stuGoog")
    @ApiOperation(value = "学员勋章", tags = {"APP-开始上课"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
            @ApiImplicitParam(value = "学员id", name = "stuId", required = true, dataType = "int"),
    })
    public ResultUtil<List<GongVo>> queryStuGoog(@RequestParam("stuId") Integer stuId){
        try {
            Integer appUserId = tokenUtil.getUserIdFormRedis();
            if(null == appUserId){
                return ResultUtil.tokenErr();
            }
            return ResultUtil.success(honorService.queryStuOfMedalData(stuId));
        }catch (Exception e){
            return ResultUtil.runErr();
        }
    }
    /**
     * 课后视频课表
     */
    @ResponseBody
    @PostMapping("/api/startCource/afterSourceDetails")
    @ApiOperation(value = "学员勋章", tags = {"APP-开始上课"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
            @ApiImplicitParam(value = "学员id", name = "stuId", required = true, dataType = "int"),
    })
    public ResultUtil queryAfterSourceDetails(@RequestParam("stuId") Integer stuId){
        try {
            Integer appUserId = tokenUtil.getUserIdFormRedis();
            if(null == appUserId){
                return ResultUtil.tokenErr();
            }
            // TODO: 2023/7/4
            return ResultUtil.success();
        }catch (Exception e){
            return ResultUtil.runErr();
        }
    }