PatientHealthGuidanceController.java 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package com.yihu.wlyy.web.patient.health;
  2. import io.swagger.annotations.Api;
  3. import org.json.JSONArray;
  4. import org.springframework.beans.factory.annotation.Autowired;
  5. import org.springframework.stereotype.Controller;
  6. import org.springframework.web.bind.annotation.RequestMapping;
  7. import org.springframework.web.bind.annotation.ResponseBody;
  8. import com.yihu.wlyy.service.app.health.PatientHealthGuidanceService;
  9. import com.yihu.wlyy.web.BaseController;
  10. /**
  11. * 患者端:健康指导控制类
  12. * @author George
  13. *
  14. */
  15. @Controller
  16. @RequestMapping(value = "/patient/health/guidance")
  17. @Api(description = "患者端-健康指导")
  18. public class PatientHealthGuidanceController extends BaseController {
  19. @Autowired
  20. private PatientHealthGuidanceService patientHealthGuidanceService;
  21. /**
  22. * 查询患者的健康指导
  23. * @param patient
  24. * @return
  25. */
  26. @RequestMapping(value = "list")
  27. @ResponseBody
  28. public String list(long id, int pagesize) {
  29. try {
  30. JSONArray array = patientHealthGuidanceService.findGuidanceByPatient(getUID(), id, pagesize);
  31. return write(200, "查询成功!", "list", array);
  32. } catch (Exception e) {
  33. error(e);
  34. return error(-1, "查询失败!");
  35. }
  36. }
  37. }