Browse Source

删除日志语句,增加错误信息返回

chenw 6 years ago
parent
commit
58bd2c6f2b

+ 1 - 1
bi-server/src/main/java/com/usoftchina/bi/server/service/chart/GetChartsDataUtilService.java

@@ -91,7 +91,7 @@ public class GetChartsDataUtilService {
             columnValuesInfo.setValues(pageInfo);
             columnValuesInfo.setValues(pageInfo);
         }catch (Exception e){
         }catch (Exception e){
             e.printStackTrace();
             e.printStackTrace();
-            return new RepEntity(RepCode.erro);
+            return new RepEntity(RepCode.erro.getCode(), e.getCause().getMessage(), null);
         }finally {
         }finally {
             DynamicDataSourceContextHolder.clearDataSourceType();
             DynamicDataSourceContextHolder.clearDataSourceType();
         }
         }

+ 1 - 1
bi-server/src/main/java/com/usoftchina/bi/server/service/chart/ShowIndividualService.java

@@ -92,7 +92,7 @@ public class ShowIndividualService {
         popAndIndDataInfo.setValueList(pageInfo);
         popAndIndDataInfo.setValueList(pageInfo);
     }catch (Exception e){
     }catch (Exception e){
         e.printStackTrace();
         e.printStackTrace();
-        return new RepEntity(RepCode.erro);
+        return new RepEntity(RepCode.erro.getCode(), e.getCause().getMessage(), null);
     }finally {
     }finally {
         DynamicDataSourceContextHolder.clearDataSourceType();
         DynamicDataSourceContextHolder.clearDataSourceType();
     }
     }

+ 1 - 1
bi-server/src/main/java/com/usoftchina/bi/server/service/chart/ShowLineService.java

@@ -164,7 +164,7 @@ public class ShowLineService {
 
 
         }catch (Exception e){
         }catch (Exception e){
             e.printStackTrace();
             e.printStackTrace();
-            return new RepEntity(RepCode.erro);
+            return new RepEntity(RepCode.erro.getCode(), e.getCause().getMessage(), null);
         }finally {
         }finally {
             DynamicDataSourceContextHolder.clearDataSourceType();
             DynamicDataSourceContextHolder.clearDataSourceType();
         }
         }

+ 1 - 1
bi-server/src/main/java/com/usoftchina/bi/server/service/chart/ShowPopulationService.java

@@ -169,7 +169,7 @@ public class ShowPopulationService {
         }
         }
         }catch (Exception e){
         }catch (Exception e){
             e.printStackTrace();
             e.printStackTrace();
-            return new RepEntity(RepCode.erro);
+            return new RepEntity(RepCode.erro.getCode(), e.getCause().getMessage(), null);
         }finally {
         }finally {
             DynamicDataSourceContextHolder.clearDataSourceType();
             DynamicDataSourceContextHolder.clearDataSourceType();
         }
         }

+ 2 - 4
bi-server/src/main/java/com/usoftchina/bi/server/service/dataSource/ColumnScreenService.java

@@ -54,8 +54,7 @@ public class ColumnScreenService {
             data =  showChartsMapper.getScreenData(columnScreenInfo.getColumnName(), tableName, columnScreenInfo.getKeyword(), columnScreenInfo.getCount());
             data =  showChartsMapper.getScreenData(columnScreenInfo.getColumnName(), tableName, columnScreenInfo.getKeyword(), columnScreenInfo.getCount());
         }catch (Exception e){
         }catch (Exception e){
             e.printStackTrace();
             e.printStackTrace();
-            logger.error("异常");
-            return new RepEntity(RepCode.erro);
+            return new RepEntity(RepCode.erro.getCode(), e.getCause().getMessage(), null);
         }finally {
         }finally {
             DynamicDataSourceContextHolder.clearDataSourceType();
             DynamicDataSourceContextHolder.clearDataSourceType();
         }
         }
@@ -91,8 +90,7 @@ public class ColumnScreenService {
             data =  showChartsMapper.getScreenData(columnScreenInfo.getColumnName(), tableName, columnScreenInfo.getKeyword(), columnScreenInfo.getCount());
             data =  showChartsMapper.getScreenData(columnScreenInfo.getColumnName(), tableName, columnScreenInfo.getKeyword(), columnScreenInfo.getCount());
         }catch (Exception e){
         }catch (Exception e){
             e.printStackTrace();
             e.printStackTrace();
-            logger.error("异常");
-            return new RepEntity(RepCode.erro);
+            return new RepEntity(RepCode.erro.getCode(), e.getCause().getMessage(), null);
         }finally {
         }finally {
             DynamicDataSourceContextHolder.clearDataSourceType();
             DynamicDataSourceContextHolder.clearDataSourceType();
         }
         }