update 系统管理导入数据报错提示信息
This commit is contained in:
+3
-3
@@ -2,10 +2,12 @@ package com.jero.common.util;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
|
||||
import javax.management.remote.JMXProviderException;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
@@ -31,9 +33,7 @@ public class ImportExcelUtil {
|
||||
//String fileName = fileUrl.substring(lastIndex + 1);
|
||||
//result.put("fileUrl", "/sys/common/static/" + fileUrl);
|
||||
//result.put("fileName", fileName);
|
||||
Result<JSONObject> res = Result.OK(result);
|
||||
res.setMessage("文件导入成功,但有错误。\n"+"总上传行数:" + totalCount + ",已导入行数:" + successLines + ",错误次数:" + errorLines +",错误信息:" +errorMessage);
|
||||
return res;
|
||||
throw new JeroBootException("文件导入失败:"+errorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user