update 系统管理导入数据报错提示信息

This commit is contained in:
lijiarao
2021-09-28 13:55:07 +08:00
parent 03ac1817f7
commit 56b7035bc4
4 changed files with 7 additions and 3 deletions
@@ -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);
}
}