Commit 4d33187c by zhiwj

门店标签导入

parent 18386fd1
......@@ -101,9 +101,10 @@ public class StoreTagController {
"attachment; filename=" + new String(fileName.getBytes("gbk"), "ISO-8859-1"));
fo = response.getOutputStream();
String rootPath = request.getSession().getServletContext().getRealPath("/");
String filePath = "/excel/store_tag_batch_import.xlsx";
in = new FileInputStream(new File(rootPath + filePath));
// String rootPath = request.getSession().getServletContext().getRealPath("/");
// String filePath = "excel/store_tag_batch_import.xlsx";
// in = new FileInputStream(new File(rootPath + filePath));
in = this.getClass().getClassLoader().getResourceAsStream("excel/store_tag_batch_import.xlsx");
byte[] b = new byte[1024];
int len = 0;
while ((len = in.read(b)) != -1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment