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-account/src/main/java/com/dsh/account/controller/StudentController.java |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/cloud-server-account/src/main/java/com/dsh/account/controller/StudentController.java b/cloud-server-account/src/main/java/com/dsh/account/controller/StudentController.java
index c264ecf..1f664ad 100644
--- a/cloud-server-account/src/main/java/com/dsh/account/controller/StudentController.java
+++ b/cloud-server-account/src/main/java/com/dsh/account/controller/StudentController.java
@@ -69,8 +69,6 @@
     @PostMapping("/api/student/queryStudentList")
     @ApiOperation(value = "获取学员列表", tags = {"APP-课程列表"})
     @ApiImplicitParams({
-            @ApiImplicitParam(value = "经度", name = "lon", dataType = "string", required = true),
-            @ApiImplicitParam(value = "纬度", name = "lat", dataType = "string", required = true),
             @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
     })
     public ResultUtil<List<StudentVo>> queryStudentList(){
@@ -88,6 +86,7 @@
                 SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
                 studentVo.setAge(Integer.valueOf(sdf.format(new Date())) - Integer.valueOf(sdf.format(tStudent.getBirthday())));
                 listVo.add(studentVo);
+                studentVo.setName(tStudent.getName());
             }
             return ResultUtil.success(listVo);
         }catch (Exception e){
@@ -96,4 +95,21 @@
         }
     }
 
+
+    /**
+     * 根据电话号码学员信息
+     * @param phone
+     * @return
+     */
+    @ResponseBody
+    @PostMapping("/student/queryStudentByPhone")
+    public TStudent queryStudentByPhone(@RequestBody String phone){
+        try {
+            TStudent one = studentService.getOne(new QueryWrapper<TStudent>().eq("phone", phone).eq("state", 1));
+            return one;
+        }catch (Exception e){
+            e.printStackTrace();
+            return null;
+        }
+    }
 }

--
Gitblit v1.7.1