From 7865a1010be2f95faab151d99ecdb095f44c2a08 Mon Sep 17 00:00:00 2001
From: lisy <linlangsur163@163.com>
Date: 星期五, 14 七月 2023 16:30:34 +0800
Subject: [PATCH] 修复了积分商城详情页面的门店列表查询;兑换支付todo

---
 cloud-server-account/src/main/java/com/dsh/account/controller/ClassDetailsController.java |   81 +++++++++++++++++++++++++++++++---------
 1 files changed, 63 insertions(+), 18 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 7ff2d81..5079f5f 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,9 +4,11 @@
 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.AppointmentRecordVo;
 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.exploreDetail.LonLatRequest;
 import com.dsh.account.model.vo.medalDetail.GongVo;
 import com.dsh.account.model.vo.medalDetail.StuMedalVo;
 import com.dsh.account.model.vo.sourceDetail.CouponStuAvailableVo;
@@ -64,17 +66,15 @@
     @PostMapping("/api/startCource/queryStudentData")
     @ApiOperation(value = "上课首页", tags = {"APP-开始上课"})
     @ApiImplicitParams({
-            @ApiImplicitParam(value = "经度值", name = "longitude", required = true, dataType = "String"),
-            @ApiImplicitParam(value = "纬度值", name = "latitude", required = true, dataType = "String"),
             @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
     })
-    public ResultUtil<ClassInfoVo> queryCouponRecord(@RequestBody String longitude, @RequestBody String latitude){
+    public ResultUtil<ClassInfoVo> queryCouponRecord(LonLatRequest lonLatRequest){
         try {
             Integer userIdFormRedis = tokenUtil.getUserIdFormRedis();
             if(null == userIdFormRedis){
                 return ResultUtil.tokenErr();
             }
-            return ResultUtil.success(tappuService.queryUserOfStus(userIdFormRedis,longitude,latitude));
+            return ResultUtil.success(tappuService.queryUserOfStus(userIdFormRedis,lonLatRequest.getLongitude(),lonLatRequest.getLatitude()));
         }catch (Exception e){
             e.printStackTrace();
             return ResultUtil.runErr();
@@ -86,10 +86,10 @@
     @PostMapping("/api/startCource/queryPhysical")
     @ApiOperation(value = "获取学员测试报告", tags = {"APP-开始上课"})
     @ApiImplicitParams({
-            @ApiImplicitParam(value = "学员id", name = "id", required = true, dataType = "int"),
+            @ApiImplicitParam(value = "学员id", name = "stuID", required = true, dataType = "int"),
             @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
     })
-    public ResultUtil<StuPhysicalVo> getStuPhysicalInfo(@RequestBody Integer stuID){
+    public ResultUtil<StuPhysicalVo> getStuPhysicalInfo(Integer stuID){
         StuPhysicalVo vo = new StuPhysicalVo();
         TStudent tStudent = istuService.getById(stuID);
         if (ToolUtil.isNotEmpty(tStudent)){
@@ -111,14 +111,13 @@
             @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
     })
     @Transactional
-    public ResultUtil addStu(@RequestBody StuDetailsReq stu){
+    public ResultUtil addStu(StuDetailsReq stu){
         try {
             Integer userIdFormRedis = tokenUtil.getUserIdFormRedis();
             if(null == userIdFormRedis){
                 return ResultUtil.tokenErr();
             }
-            istuService.addStuOfAppUser(stu,userIdFormRedis);
-            return ResultUtil.success();
+            return istuService.addStuOfAppUser(stu,userIdFormRedis);
         }catch (Exception e){
             return ResultUtil.runErr(ResultUtil.ERROR);
         }
@@ -173,7 +172,7 @@
             @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){
+    public ResultUtil<List<StuListVo>> dealSwitchStudents(Integer stuId){
         try {
             Integer userIdFormRedis = tokenUtil.getUserIdFormRedis();
             if(null == userIdFormRedis){
@@ -199,7 +198,7 @@
             @ApiImplicitParam(value = "课包id", name = "lessonId", required = true, dataType = "int"),
             @ApiImplicitParam(value = "学员id", name = "stuId", required = true, dataType = "int"),
     })
-    public ResultUtil<ClassDetailsInsVo> coursePackageDetails(@RequestBody Integer lessonId, @RequestBody Integer stuId){
+    public ResultUtil<ClassDetailsInsVo> coursePackageDetails(Integer lessonId, Integer stuId){
         try {
             Integer userIdFormRedis = tokenUtil.getUserIdFormRedis();
             if(null == userIdFormRedis){
@@ -224,7 +223,7 @@
     @ApiImplicitParams({
             @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
     })
-    public ResultUtil<List<PurchaseRecordVo>> recordList(@RequestBody RecordTimeRequest timeRequest){
+    public ResultUtil<List<PurchaseRecordVo>> recordList(RecordTimeRequest timeRequest){
         try {
             Integer userIdFormRedis = tokenUtil.getUserIdFormRedis();
             if(null == userIdFormRedis){
@@ -244,9 +243,11 @@
     @PostMapping("/api/startCource/renewal")
     @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 = "lessonId", required = true, dataType = "int"),
+            @ApiImplicitParam(value = "学员id", name = "stuId", required = true, dataType = "int"),
     })
-    public ResultUtil<CourseDetailsOfContinuationResp> renewalOfCourses(@RequestBody Integer lessonId, @RequestBody Integer stuId){
+    public ResultUtil<CourseDetailsOfContinuationResp> renewalOfCourses(Integer lessonId, Integer stuId){
         try {
             Integer userIdFormRedis = tokenUtil.getUserIdFormRedis();
             if(null == userIdFormRedis){
@@ -293,7 +294,7 @@
     @ApiImplicitParams({
             @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
     })
-    public ResultUtil continuationOperation(@RequestBody ClasspaymentRequest request){
+    public ResultUtil continuationOperation(ClasspaymentRequest request){
         try {
             Integer userIdFormRedis = tokenUtil.getUserIdFormRedis();
             if(null == userIdFormRedis){
@@ -317,7 +318,7 @@
             @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){
+    public ResultUtil<List<StuCommentsVo>> queryStuComment( Integer stuId){
         try {
             return ResultUtil.success(evalstuService.queryStuCommentsList(stuId));
         }catch (Exception e){
@@ -336,7 +337,7 @@
             @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){
+    public ResultUtil<List<StuMedalVo>> queryStuMedal( Integer stuId){
         try {
             Integer appUserId = tokenUtil.getUserIdFormRedis();
             if(null == appUserId){
@@ -359,7 +360,7 @@
             @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){
+    public ResultUtil<List<GongVo>> queryStuGoog(Integer stuId){
         try {
             Integer appUserId = tokenUtil.getUserIdFormRedis();
             if(null == appUserId){
@@ -371,6 +372,50 @@
         }
     }
 
+    /**
+     * 上课预约记录
+     */
+    @ResponseBody
+    @PostMapping("/api/startCource/stuAppointList")
+    @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<AppointmentRecordVo> cgeClassAppointmentRecordList(Integer stuId){
+        try {
+            Integer appUserId = tokenUtil.getUserIdFormRedis();
+            if(null == appUserId){
+                return ResultUtil.tokenErr();
+            }
+            return ResultUtil.success(istuService.getAppointmentRecords(stuId,appUserId));
+        }catch (Exception e){
+            return ResultUtil.runErr();
+        }
+    }
 
 
+
+    /**
+     * 取消预约
+     */
+    @ResponseBody
+    @PostMapping("/api/startCource/cancelCourse")
+    @ApiOperation(value = "上课预约-取消预约", tags = {"APP-开始上课"})
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
+            @ApiImplicitParam(value = "上课记录id", name = "courseStuRecordId", required = true, dataType = "int"),
+    })
+    public ResultUtil cancelReservation(Integer courseStuRecordId){
+        try {
+            Integer appUserId = tokenUtil.getUserIdFormRedis();
+            if(null == appUserId){
+                return ResultUtil.tokenErr();
+            }
+            return istuService.cancelReservationOfCourse(courseStuRecordId);
+        }catch (Exception e){
+            return ResultUtil.runErr();
+        }
+    }
+
 }

--
Gitblit v1.7.1