patientManage_api_controller.go 823B

12345678910111213141516171819202122232425262728293031323334
  1. package controllers
  2. import (
  3. "XT/controllers"
  4. "XT_New/enums"
  5. "XT_New/service"
  6. "fmt"
  7. "github.com/astaxie/beego"
  8. )
  9. type PatientAPIController struct {
  10. controllers.BaseAuthAPIController
  11. }
  12. func PatientRouters() {
  13. beego.Router("/api/patient/getbloodDialysisPatient", &PatientAPIController{}, "Get:GetBloodDialysisPatient")
  14. }
  15. func (this *PatientAPIController) GetBloodDialysisPatient() {
  16. //adminUser := this.GetAdminUserInfo()
  17. //orgId := adminUser.CurrentOrgId
  18. //fmt.Print("orgId")
  19. fmt.Print("-----------------------触发了咩哟u")
  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. }