XMLWAN 4 years ago
parent
commit
cf2bd05dc2
1 changed files with 26 additions and 20 deletions
  1. 26 20
      controllers/new_mobile_api_controllers/common_api_controller.go

+ 26 - 20
controllers/new_mobile_api_controllers/common_api_controller.go View File

@@ -1040,27 +1040,33 @@ func (this *CommonApiController) GetSearchDetailCheck() {
1040 1040
 func (this *CommonApiController) GetNormData() {
1041 1041
 	orgid := this.GetAdminUserInfo().CurrentOrgId
1042 1042
 	//获取系统数据
1043
-	normdata, _ := service.GetNormDataByOrgId(orgid)
1044
-
1045
-	if len(normdata) == 0 {
1046
-		normdata, err := service.GetNormData(0)
1047
-		if err != nil {
1048
-			this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
1049
-			return
1050
-		}
1051
-		this.ServeSuccessJSON(map[string]interface{}{
1052
-			"normdata": normdata,
1053
-		})
1054
-	} else {
1055
-		normdata, err := service.GetNormDataByOrgId(orgid)
1056
-		if err != nil {
1057
-			this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
1058
-			return
1059
-		}
1060
-		this.ServeSuccessJSON(map[string]interface{}{
1061
-			"normdata": normdata,
1062
-		})
1043
+	normdata, err := service.GetNormDataByOrgId(orgid)
1044
+	if err != nil {
1045
+		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
1046
+		return
1063 1047
 	}
1048
+	this.ServeSuccessJSON(map[string]interface{}{
1049
+		"normdata": normdata,
1050
+	})
1051
+	//if len(normdata) == 0 {
1052
+	//	normdata, err := service.GetNormData(0)
1053
+	//	if err != nil {
1054
+	//		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
1055
+	//		return
1056
+	//	}
1057
+	//	this.ServeSuccessJSON(map[string]interface{}{
1058
+	//		"normdata": normdata,
1059
+	//	})
1060
+	//} else {
1061
+	//	normdata, err := service.GetNormDataByOrgId(orgid)
1062
+	//	if err != nil {
1063
+	//		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
1064
+	//		return
1065
+	//	}
1066
+	//	this.ServeSuccessJSON(map[string]interface{}{
1067
+	//		"normdata": normdata,
1068
+	//	})
1069
+	//}
1064 1070
 
1065 1071
 }
1066 1072