From c678894e37d15cca116d962eba5c107c99176945 Mon Sep 17 00:00:00 2001
From: lisy <linlangsur163@163.com>
Date: 星期四, 20 七月 2023 17:39:05 +0800
Subject: [PATCH] 开始上课的主页中课包列表展示;bmi工具类匹配对应的身体状态

---
 cloud-server-course/src/main/java/com/dsh/course/controller/CoursePackageController.java |   34 ++++++++++++++++++++++++++++++----
 1 files changed, 30 insertions(+), 4 deletions(-)

diff --git a/cloud-server-course/src/main/java/com/dsh/course/controller/CoursePackageController.java b/cloud-server-course/src/main/java/com/dsh/course/controller/CoursePackageController.java
index 1cc67b4..8fb6b20 100644
--- a/cloud-server-course/src/main/java/com/dsh/course/controller/CoursePackageController.java
+++ b/cloud-server-course/src/main/java/com/dsh/course/controller/CoursePackageController.java
@@ -1,7 +1,8 @@
 package com.dsh.course.controller;
 
 import com.dsh.course.entity.TCoursePackage;
-import com.dsh.course.model.vo.response.WeekLimitedResponse;
+import com.dsh.course.model.vo.response.Details;
+import com.dsh.course.model.vo.response.ExchangeCoursePackageResponse;
 import com.dsh.course.service.TCoursePackageDiscountService;
 import com.dsh.course.service.TCoursePackageService;
 import com.dsh.course.util.ResultUtil;
@@ -11,6 +12,8 @@
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
 
 /**
  * @author zhibing.pu
@@ -53,12 +56,14 @@
      */
     @ResponseBody
     @PostMapping("/api/useBenefit/weekLimitedBenefit")
-    @ApiOperation(value = "使用福利-本周福利限时折扣列表", tags = {"APP-开始上课"})
+    @ApiOperation(value = "本周福利-限时折扣列表", tags = {"APP-使用福利"})
     @ApiImplicitParams({
             @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
-            @ApiImplicitParam(name = "discountType",value = "默认显示 限时折扣 (1限时折扣 2赠送课时)")
+            @ApiImplicitParam(name = "discountType",value = "默认显示 限时折扣 (1限时折扣 2赠送课时)",dataType = "int"),
+            @ApiImplicitParam(name = "lon",value = "经度",dataType = "String"),
+            @ApiImplicitParam(name = "lat",value = "纬度",dataType = "String"),
     })
-    public ResultUtil<WeekLimitedResponse> thisWeeksBenefitList(Integer discountType,String lon,String lat){
+    public ResultUtil<List<Details>> thisWeeksBenefitList(Integer discountType, String lon, String lat){
         try {
             Integer appUserId = tokenUtil.getUserIdFormRedis();
             if(null == appUserId){
@@ -70,4 +75,25 @@
         }
     }
 
+
+    /**
+     * 折扣课包详情
+     */
+    @ResponseBody
+    @PostMapping("/api/useBenefit/discountCourseDatas")
+    @ApiOperation(value = "本周福利-折扣课包详情", tags = {"APP-使用福利"})
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
+            @ApiImplicitParam(name = "coursePackageDiscountId",value = "限时折扣配置id/赠送课时配置id",dataType = "int"),
+            @ApiImplicitParam(name = "lon",value = "经度",dataType = "String"),
+            @ApiImplicitParam(name = "lat",value = "纬度",dataType = "String"),
+    })
+    public ResultUtil<ExchangeCoursePackageResponse> discountCourseDatas(Integer coursePackageDiscountId,String lon,String lat){
+        try {
+            return ResultUtil.success(tcpdService.getWeekFreeCourseDetails(coursePackageDiscountId,lat,lon));
+        }catch (Exception e){
+            return ResultUtil.runErr();
+        }
+    }
+
 }

--
Gitblit v1.7.1