Browse Source

Merge branch 'master' of http://git.shengws.com/csx/XT_New

XMLWAN 4 years ago
parent
commit
95274ce114

+ 0 - 16
controllers/mobile_api_controllers/dialysis_api_controller.go View File

@@ -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 View File

@@ -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 View File

@@ -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 View File

@@ -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 View File

@@ -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
+}

+ 4 - 4
routers/router.go View File

@@ -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
 }