csx 4 vuotta sitten
vanhempi
commit
e68dfa5447

+ 0 - 16
controllers/mobile_api_controllers/dialysis_api_controller.go Näytä tiedosto

@@ -6250,19 +6250,3 @@ func (c *DialysisAPIController) GetSchedule() {
6250 6250
 	})
6251 6251
 
6252 6252
 }
6253
-
6254
-func (this *DialysisAPIController) GetBloodDialysisPatient() {
6255
-	//adminUser := this.GetAdminUserInfo()
6256
-	//orgId := adminUser.CurrentOrgId
6257
-	//fmt.Print("orgId")
6258
-	patient, err := service.GetBloodDialysisPatient(7957)
6259
-	fmt.Print(patient)
6260
-	fmt.Print("报错------------------", err)
6261
-	//if err != nil {
6262
-	//  this.ServeFailJsonSend(enums.ErrorCodeDataException, "添加设备失败")
6263
-	//  return
6264
-	//}
6265
-	//this.ServeSuccessJSON(map[string]interface{}{
6266
-	//  "patient": patient,
6267
-	//})
6268
-}

+ 0 - 1
controllers/mobile_api_controllers/mobile_api_router_register.go Näytä tiedosto

@@ -110,5 +110,4 @@ func MobileAPIControllersRegisterRouters() {
110 110
 
111 111
 	beego.Router("/m/api/schedule/get", &DialysisAPIController{}, "Get:GetSchedule")
112 112
 
113
-	beego.Router("/api/patient/getbloodDialysisPatient", &DialysisAPIController{}, "Get:GetBloodDialysisPatient")
114 113
 }

+ 17 - 0
controllers/new_mobile_api_controllers/new_dialysis_api_controller.go Näytä tiedosto

@@ -0,0 +1,17 @@
1
+package new_mobile_api_controllers
2
+
3
+import (
4
+	"XT_New/service"
5
+	"fmt"
6
+)
7
+
8
+type NewDialysisApiController struct {
9
+	NewMobileBaseAPIAuthController
10
+}
11
+
12
+func (this *NewDialysisApiController) GetPatient() {
13
+	patient, err := service.GetBloodDialysisPatient(7957)
14
+	fmt.Print(patient)
15
+	fmt.Print("报错------------------", err)
16
+
17
+}

+ 13 - 0
controllers/new_mobile_api_controllers/new_mobile_api_base_controller.go Näytä tiedosto

@@ -0,0 +1,13 @@
1
+package new_mobile_api_controllers
2
+
3
+import (
4
+	"XT_New/controllers/mobile_api_controllers"
5
+)
6
+
7
+type NewMobileBaseAPIAuthController struct {
8
+	mobile_api_controllers.MobileBaseAPIAuthController
9
+}
10
+
11
+func (this *NewMobileBaseAPIAuthController) Prepare() {
12
+	this.MobileBaseAPIAuthController.Prepare()
13
+}

+ 9 - 0
controllers/new_mobile_api_controllers/new_mobile_api_router_register.go Näytä tiedosto

@@ -0,0 +1,9 @@
1
+package new_mobile_api_controllers
2
+
3
+import "github.com/astaxie/beego"
4
+
5
+// 平板端路由,以 /m/api 为前缀
6
+func NewMobileAPIControllersRegisterRouters() {
7
+
8
+	beego.Router("/m/api/patient/getbloodDialysisPatient", &NewDialysisApiController{}, "Get:GetPatient")
9
+}

+ 0 - 33
controllers/patientManage_api_controller.go Näytä tiedosto

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

+ 2 - 2
main.go Näytä tiedosto

@@ -1,8 +1,8 @@
1 1
 package main
2 2
 
3 3
 import (
4
-	_ "XT/routers"
5
-	"XT/service"
4
+	_ "XT_New/routers"
5
+	"XT_New/service"
6 6
 
7 7
 	"github.com/astaxie/beego"
8 8
 )

+ 4 - 4
routers/router.go Näytä tiedosto

@@ -2,9 +2,9 @@ package routers
2 2
 
3 3
 import (
4 4
 	"XT_New/controllers"
5
-	admin_api "XT_New/controllers/admin_api_controllers"
5
+	//admin_api "XT_New/controllers/admin_api_controllers"
6 6
 	m_api "XT_New/controllers/mobile_api_controllers"
7
-	"fmt"
7
+	new_m_api "XT_New/controllers/new_mobile_api_controllers"
8 8
 
9 9
 	"github.com/astaxie/beego"
10 10
 	"github.com/astaxie/beego/plugins/cors"
@@ -53,9 +53,9 @@ func init() {
53 53
 	controllers.IntegrationConfigRegistRouters()
54 54
 
55 55
 	m_api.MobileAPIControllersRegisterRouters()
56
-	admin_api.AdminAPIControllersRegisterRouters()
56
+	new_m_api.NewMobileAPIControllersRegisterRouters()
57
+	//admin_api.AdminAPIControllersRegisterRouters()
57 58
 
58 59
 	controllers.ManageRouters()
59
-	fmt.Print("进来了美欧")
60 60
 	//controllers.PatientRouters()
61 61
 }