From e350ed7ffc3a57387186c602d99443d6f936d549 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期三, 05 七月 2023 08:31:25 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 cloud-server-account/src/main/java/com/dsh/account/controller/ClassDetailsController.java |  113 ++++++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 97 insertions(+), 16 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 2f7c1ea..1a213c9 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
@@ -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();
         }
+
+
     }
 
 

--
Gitblit v1.7.1