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){