Browse Source

需求更改

XMLWAN 4 years ago
parent
commit
a477b6bc25
2 changed files with 4 additions and 3 deletions
  1. 1 1
      conf/app.conf
  2. 3 2
      controllers/data_api_controller.go

+ 1 - 1
conf/app.conf View File

1
 appname = 血透
1
 appname = 血透
2
-httpport = 9529
2
+httpport = 9531
3
 runmode = dev
3
 runmode = dev
4
 
4
 
5
 # 1
5
 # 1

+ 3 - 2
controllers/data_api_controller.go View File

71
 	var dataconfig models.Dataconfig
71
 	var dataconfig models.Dataconfig
72
 	var resultConfig models.ConfigViewModel
72
 	var resultConfig models.ConfigViewModel
73
 	code := configFormData(&dataconfig, c.Ctx.Input.RequestBody)
73
 	code := configFormData(&dataconfig, c.Ctx.Input.RequestBody)
74
+	fmt.Println("code----------", code)
74
 	if code > 0 {
75
 	if code > 0 {
75
 		c.ServeFailJSONWithSGJErrorCode(code)
76
 		c.ServeFailJSONWithSGJErrorCode(code)
76
 		return
77
 		return
111
 	} else {
112
 	} else {
112
 		dataconfig.Order = 0
113
 		dataconfig.Order = 0
113
 	}
114
 	}
114
-
115
+	fmt.Println("dataconfig-------------", dataconfig)
115
 	err = service.CreateConfig(&dataconfig)
116
 	err = service.CreateConfig(&dataconfig)
116
 	if err != nil {
117
 	if err != nil {
117
 		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeCreateConfig)
118
 		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeCreateConfig)
390
 	}
391
 	}
391
 	dataconfig.Module = module
392
 	dataconfig.Module = module
392
 
393
 
393
-	if module == "education" || module == "summary" || module == "course_disease" || module == "rescue_record" {
394
+	if module == "education" || module == "summary" || module == "course_disease" || module == "rescue_record" || module == "nursing_record" || module == "special_record" {
394
 		if configBody["title"] == nil || reflect.TypeOf(configBody["title"]).String() != "string" {
395
 		if configBody["title"] == nil || reflect.TypeOf(configBody["title"]).String() != "string" {
395
 			utils.ErrorLog("title")
396
 			utils.ErrorLog("title")
396
 			code = enums.ErrorCodeParamWrong
397
 			code = enums.ErrorCodeParamWrong