From 8fd3cbb140059e6ccfbb29f4ea6583e3c7b5fdcc Mon Sep 17 00:00:00 2001 From: river <1376754470@qq.com> Date: Fri, 18 Dec 2020 17:14:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=A2=E6=88=B7=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E6=97=B6=E5=87=BA=E9=94=99=E7=9A=84=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../financial/crms/service/impl/CustomerServiceImpl.java | 6 +++--- .../com/daqing/framework/model/response/ResponseResult.java | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java index 20f03db5..34c101fc 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java @@ -370,7 +370,7 @@ public class CustomerServiceImpl extends ServiceImpl().SUCCESS("导入数据失败,员工" + manager.getManager() + "不存在"); + return new ResponseResult().FAIL("导入数据失败,员工" + manager.getManager() + "不存在"); } } this.saveCustomerPersonal(customerPersonalTOI); @@ -390,14 +390,14 @@ public class CustomerServiceImpl extends ServiceImpl().SUCCESS("导入数据失败,员工" + manager.getManager() + "不存在"); + return new ResponseResult().FAIL("导入数据失败,员工" + manager.getManager() + "不存在"); } } this.saveCustomerCompany(customerCompanyTOI); } return ResponseResult.SUCCESS(); } catch (Exception e) { - return new ResponseResult().SUCCESS("导入数据失败,请检查文件和数据格式或稍后再试"); + return new ResponseResult().FAIL("导入数据失败,请检查文件和数据格式或稍后再试"); } } diff --git a/dq-framework-common/src/main/java/com/daqing/framework/model/response/ResponseResult.java b/dq-framework-common/src/main/java/com/daqing/framework/model/response/ResponseResult.java index 3b78c29c..edf2b061 100644 --- a/dq-framework-common/src/main/java/com/daqing/framework/model/response/ResponseResult.java +++ b/dq-framework-common/src/main/java/com/daqing/framework/model/response/ResponseResult.java @@ -53,7 +53,11 @@ public class ResponseResult { } public static ResponseResult SUCCESS(Object t) { - return new ResponseResult<>(true, 10000, t, "操作成功!"); + return new ResponseResult<>(true, 10000, t, "操作成功!"); + } + + public static ResponseResult FAIL(Object t) { + return new ResponseResult<>(false, 99999, t, "操作失败!"); } public ResponseResult SUCCESS_DATA(T t){