XMLWAN 4 年之前
父節點
當前提交
cf2bd05dc2
共有 1 個文件被更改,包括 26 次插入20 次删除
  1. 26 20
      controllers/new_mobile_api_controllers/common_api_controller.go

+ 26 - 20
controllers/new_mobile_api_controllers/common_api_controller.go 查看文件

1040
 func (this *CommonApiController) GetNormData() {
1040
 func (this *CommonApiController) GetNormData() {
1041
 	orgid := this.GetAdminUserInfo().CurrentOrgId
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