|
@@ -71,6 +71,7 @@ func (c *DataApiController) CreateConfig() {
|
71
|
71
|
var dataconfig models.Dataconfig
|
72
|
72
|
var resultConfig models.ConfigViewModel
|
73
|
73
|
code := configFormData(&dataconfig, c.Ctx.Input.RequestBody)
|
|
74
|
+ fmt.Println("code----------", code)
|
74
|
75
|
if code > 0 {
|
75
|
76
|
c.ServeFailJSONWithSGJErrorCode(code)
|
76
|
77
|
return
|
|
@@ -111,7 +112,7 @@ func (c *DataApiController) CreateConfig() {
|
111
|
112
|
} else {
|
112
|
113
|
dataconfig.Order = 0
|
113
|
114
|
}
|
114
|
|
-
|
|
115
|
+ fmt.Println("dataconfig-------------", dataconfig)
|
115
|
116
|
err = service.CreateConfig(&dataconfig)
|
116
|
117
|
if err != nil {
|
117
|
118
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeCreateConfig)
|
|
@@ -390,7 +391,7 @@ func configFormData(dataconfig *models.Dataconfig, data []byte) (code int) {
|
390
|
391
|
}
|
391
|
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
|
395
|
if configBody["title"] == nil || reflect.TypeOf(configBody["title"]).String() != "string" {
|
395
|
396
|
utils.ErrorLog("title")
|
396
|
397
|
code = enums.ErrorCodeParamWrong
|