From c764d35e0147ebf1f9385b90d5dd43afc37eb79f Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期四, 24 三月 2022 14:26:02 +0800
Subject: [PATCH] 优化 平均价为空的问题

---
 service-api/src/main/java/com/java110/api/controller/app/AppController.java |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/service-api/src/main/java/com/java110/api/controller/app/AppController.java b/service-api/src/main/java/com/java110/api/controller/app/AppController.java
index bca4b7b..753664d 100644
--- a/service-api/src/main/java/com/java110/api/controller/app/AppController.java
+++ b/service-api/src/main/java/com/java110/api/controller/app/AppController.java
@@ -21,11 +21,13 @@
 import com.java110.api.smo.privilege.IPrivilegeSMO;
 import com.java110.core.base.controller.BaseController;
 import com.java110.core.context.IPageData;
+import com.java110.core.log.LoggerFactory;
 import com.java110.utils.constant.CommonConstant;
+import com.java110.vo.ResultVo;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiOperation;
 import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
@@ -92,7 +94,7 @@
             responseEntity = apiSMOImpl.doApi(postInfo, headers,request);
         } catch (Throwable e) {
             logger.error("璇锋眰post 鏂规硶[" + service + "]澶辫触锛�" + postInfo, e);
-            responseEntity = new ResponseEntity<String>("璇锋眰鍙戠敓寮傚父锛�" + e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
+            responseEntity = ResultVo.error("璇锋眰鍙戠敓寮傚父锛�" + e.getMessage(),HttpStatus.INTERNAL_SERVER_ERROR);
         }
         logger.debug("api锛歿} 杩斿洖淇℃伅涓猴細{}", service, responseEntity);
 
@@ -125,7 +127,7 @@
 
         } catch (Throwable e) {
             logger.error("璇锋眰get 鏂规硶[" + service + "]澶辫触锛�", e);
-            responseEntity = new ResponseEntity<String>("璇锋眰鍙戠敓寮傚父锛�" + e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
+            responseEntity = ResultVo.error("璇锋眰鍙戠敓寮傚父锛�" + e.getMessage(),HttpStatus.INTERNAL_SERVER_ERROR);
         }
         logger.debug("api锛歿} 杩斿洖淇℃伅涓猴細{}", service, responseEntity);
 
@@ -161,7 +163,7 @@
             //responseEntity = apiServiceSMOImpl.service(JSONObject.toJSONString(getParameterStringMap(request)), headers);
         } catch (Throwable e) {
             logger.error("璇锋眰get 鏂规硶[" + action + "]澶辫触锛�", e);
-            responseEntity = new ResponseEntity<String>("璇锋眰鍙戠敓寮傚父锛�" + e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
+            responseEntity = ResultVo.error("璇锋眰鍙戠敓寮傚父锛�" + e.getMessage(),HttpStatus.INTERNAL_SERVER_ERROR);
         }
         logger.debug("api锛歿} 杩斿洖淇℃伅涓猴細{}", action, responseEntity);
 
@@ -199,7 +201,7 @@
             //responseEntity = apiServiceSMOImpl.service(JSONObject.toJSONString(getParameterStringMap(request)), headers);
         } catch (Throwable e) {
             logger.error("璇锋眰post 鏂规硶[" + action + "]澶辫触锛�" + postInfo, e);
-            responseEntity = new ResponseEntity<String>("璇锋眰鍙戠敓寮傚父锛�" + e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
+            responseEntity = ResultVo.error("璇锋眰鍙戠敓寮傚父锛�" + e.getMessage(),HttpStatus.INTERNAL_SERVER_ERROR);
         }
         logger.debug("api锛歿} 杩斿洖淇℃伅涓猴細{}", action, responseEntity);
 
@@ -234,7 +236,7 @@
             //responseEntity = apiServiceSMOImpl.service(JSONObject.toJSONString(getParameterStringMap(request)), headers);
         } catch (Throwable e) {
             logger.error("璇锋眰put 鏂规硶[" + service + "]澶辫触锛�", e);
-            responseEntity = new ResponseEntity<String>("璇锋眰鍙戠敓寮傚父锛�" + e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
+            responseEntity = ResultVo.error("璇锋眰鍙戠敓寮傚父锛�" + e.getMessage(),HttpStatus.INTERNAL_SERVER_ERROR);
         }
         logger.debug("api锛歿} 杩斿洖淇℃伅涓猴細{}", service, responseEntity);
         return responseEntity;
@@ -266,7 +268,7 @@
             //responseEntity = apiServiceSMOImpl.service(JSONObject.toJSONString(getParameterStringMap(request)), headers);
         } catch (Throwable e) {
             logger.error("璇锋眰delete 鏂规硶[" + service + "]澶辫触锛�", e);
-            responseEntity = new ResponseEntity<String>("璇锋眰鍙戠敓寮傚父锛�" + e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
+            responseEntity = ResultVo.error("璇锋眰鍙戠敓寮傚父锛�" + e.getMessage(),HttpStatus.INTERNAL_SERVER_ERROR);
         }
 
         logger.debug("api锛歿} 杩斿洖淇℃伅涓猴細{}", service, responseEntity);

--
Gitblit v1.8.0