patientManage_api_controller.go 846B

12345678910111213141516171819202122232425262728293031323334
  1. package controllers
  2. import (
  3. "XT_New/controllers/mobile_api_controllers"
  4. "XT_New/enums"
  5. "XT_New/service"
  6. "fmt"
  7. "github.com/astaxie/beego"
  8. )
  9. type PatientAPIController struct {
  10. //controllers.BaseAPIController
  11. mobile_api_controllers.MobileBaseAPIAuthController
  12. }
  13. func PatientRouters() {
  14. beego.Router("/api/patient/getbloodDialysisPatient", &PatientAPIController{}, "Get:GetBloodDialysisPatient")
  15. }
  16. func (this *PatientAPIController) GetBloodDialysisPatient() {
  17. //adminUser := this.GetAdminUserInfo()
  18. //orgId := adminUser.CurrentOrgId
  19. //fmt.Print("orgId")
  20. patient, err := service.GetBloodDialysisPatient(7957)
  21. fmt.Print("报错------------------", err)
  22. if err != nil {
  23. this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
  24. return
  25. }
  26. this.ServeSuccessJSON(map[string]interface{}{
  27. "patient": patient,
  28. })
  29. }