From a5d0c4da70f592c7ab338483cabc37816e11c3d9 Mon Sep 17 00:00:00 2001
From: lisy <linlangsur163@163.com>
Date: 星期二, 04 七月 2023 17:43:06 +0800
Subject: [PATCH] account模块:开始上课-切换学员功能接口

---
 cloud-server-account/src/main/java/com/dsh/account/controller/ClassDetailsController.java |   61 +++++++++++++++++++++++++++++-
 1 files changed, 58 insertions(+), 3 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..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
@@ -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();
+        }
+
+
+    }
+
 
     /**
      * 课时详情
@@ -285,7 +312,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 +331,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 +354,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 +369,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