81 lines
3.3 KiB
Java
81 lines
3.3 KiB
Java
package com.bwie.controller;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.bwie.common.result.Result;
|
|
import com.bwie.service.BloodService;
|
|
import lombok.extern.log4j.Log4j2;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
/**
|
|
* @Author: zhx
|
|
* @Package: com.bwie.controller
|
|
* @Datetime: 2023/12/10 10:39
|
|
* @Filename: BloodController
|
|
*/
|
|
@RestController
|
|
@Log4j2
|
|
public class BloodController {
|
|
|
|
@Autowired
|
|
private BloodService bloodService;
|
|
|
|
@Autowired
|
|
private HttpServletRequest request;
|
|
|
|
@GetMapping("/bloodList")
|
|
public Result bloodList(){
|
|
|
|
log.info("功能名称:获取个人血糖数据,请求URI:{},请求方式:{},请求参数:{}",
|
|
request.getRequestURI(),request.getMethod(),null);
|
|
Result result = bloodService.bloodList();
|
|
log.info("功能名称:获取个人血糖数据,请求URI:{},请求方式:{},响应结果:{}",
|
|
request.getRequestURI(),request.getMethod(), JSONObject.toJSONString(result));
|
|
return result;
|
|
}
|
|
|
|
@GetMapping("/BloodPressureList")
|
|
public Result BloodPressure(){
|
|
log.info("功能名称:获取个人血压数据,请求URI:{},请求方式:{},请求参数:{}",
|
|
request.getRequestURI(),request.getMethod(),null);
|
|
Result result = bloodService.BloodPressure();
|
|
log.info("功能名称:获取个人血压数据,请求URI:{},请求方式:{},响应结果:{}",
|
|
request.getRequestURI(),request.getMethod(), JSONObject.toJSONString(result));
|
|
return result;
|
|
}
|
|
|
|
@GetMapping("/HealthEducationList")
|
|
public Result HealthEducationList(){
|
|
log.info("功能名称:获取健康教育内容,请求URI:{},请求方式:{},请求参数:{}",
|
|
request.getRequestURI(),request.getMethod(),null);
|
|
Result result = bloodService.HealthEducationList();
|
|
log.info("功能名称:获取健康教育内容,请求URI:{},请求方式:{},响应结果:{}",
|
|
request.getRequestURI(),request.getMethod(), JSONObject.toJSONString(result));
|
|
return result;
|
|
}
|
|
@GetMapping("/HealthRecordsList")
|
|
public Result HealthRecordsList(){
|
|
log.info("功能名称:获取健康档案,请求URI:{},请求方式:{},请求参数:{}",
|
|
request.getRequestURI(),request.getMethod(),null);
|
|
Result result = bloodService.HealthRecordsList();
|
|
log.info("功能名称:获取获取健康档案,请求URI:{},请求方式:{},响应结果:{}",
|
|
request.getRequestURI(),request.getMethod(), JSONObject.toJSONString(result));
|
|
return result;
|
|
}
|
|
|
|
@GetMapping("/DiabetesPatientList")
|
|
public Result DiabetesPatientList(){
|
|
log.info("功能名称:获取糖尿病列表,请求URI:{},请求方式:{},请求参数:{}",
|
|
request.getRequestURI(),request.getMethod(),null);
|
|
Result result = bloodService.DiabetesPatientList();
|
|
log.info("功能名称:获取糖尿病列表,请求URI:{},请求方式:{},响应结果:{}",
|
|
request.getRequestURI(),request.getMethod(), JSONObject.toJSONString(result));
|
|
return result;
|
|
}
|
|
|
|
|
|
}
|