From c0f6294b0be6789fddd652f89f820fcf6d5526cf Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期四, 06 七月 2023 17:32:39 +0800 Subject: [PATCH] 合并代码 --- cloud-server-account/src/main/java/com/dsh/account/controller/ClassDetailsController.java | 74 +++++++++++++++++++++++++++++++++---- 1 files changed, 66 insertions(+), 8 deletions(-) diff --git a/cloud-server-account/src/main/java/com/dsh/account/controller/ClassDetailsController.java b/cloud-server-account/src/main/java/com/dsh/account/controller/ClassDetailsController.java index 5f18bcc..a4dbd72 100644 --- a/cloud-server-account/src/main/java/com/dsh/account/controller/ClassDetailsController.java +++ b/cloud-server-account/src/main/java/com/dsh/account/controller/ClassDetailsController.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.dsh.account.entity.TStudent; import com.dsh.account.feignclient.competition.model.PurchaseRecordVo; +import com.dsh.account.model.vo.classDetails.ClasspaymentRequest; import com.dsh.account.model.vo.classDetails.classInsVo.*; import com.dsh.account.model.vo.commentDetail.StuCommentsVo; import com.dsh.account.model.vo.medalDetail.GongVo; @@ -28,7 +29,6 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletRequest; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.List; @@ -154,6 +154,7 @@ vo.setStuHeight(sts.getHeight()); vo.setStuWeight(sts.getWeight()); vo.setIsNot(sts.getIsDefault()); + stuListVos.add(vo); }); } return ResultUtil.success(stuListVos); @@ -161,6 +162,32 @@ return ResultUtil.runErr(); } } + + + /** + * 切换学员 + */ + @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(); + } + + + } + /** * 课时详情 @@ -265,12 +292,15 @@ @PostMapping("/api/startCource/payment") @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....."), }) - public ResultUtil<?> continuationOperation(@RequestBody Integer lessonId, @RequestBody Integer stuId, HttpServletRequest request){ + public ResultUtil continuationOperation(@RequestBody ClasspaymentRequest request){ try { - - return ResultUtil.success(); + Integer userIdFormRedis = tokenUtil.getUserIdFormRedis(); + if(null == userIdFormRedis){ + return ResultUtil.tokenErr(); + } + return istuService.renewClassPayment(userIdFormRedis,request); }catch (Exception e){ return ResultUtil.runErr(); } @@ -285,7 +315,8 @@ @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 { @@ -303,7 +334,8 @@ @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<List<StuMedalVo>> queryStuMedal(@RequestParam("stuId") Integer stuId){ try { @@ -325,7 +357,8 @@ @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(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 { @@ -339,5 +372,30 @@ } } + /** + * 课后视频课表 + */ + @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(); + } + + + } + } -- Gitblit v1.7.1