package controllers import ( "XT_New/controllers/mobile_api_controllers" "XT_New/enums" "XT_New/service" "fmt" "github.com/astaxie/beego" ) type PatientAPIController struct { //controllers.BaseAPIController mobile_api_controllers.MobileBaseAPIAuthController } func PatientRouters() { beego.Router("/api/patient/getbloodDialysisPatient", &PatientAPIController{}, "Get:GetBloodDialysisPatient") } func (this *PatientAPIController) GetBloodDialysisPatient() { //adminUser := this.GetAdminUserInfo() //orgId := adminUser.CurrentOrgId //fmt.Print("orgId") patient, err := service.GetBloodDialysisPatient(7957) fmt.Print("报错------------------", err) if err != nil { this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败") return } this.ServeSuccessJSON(map[string]interface{}{ "patient": patient, }) }