Commit c9713335 by Java-张振楠

①清除无用信息

parent bbc3902b
package com.thinkgem.jeesite.common.baseBean; package com.thinkgem.jeesite.common.baseBean;
/** /**
* Created by yanlj on 2017/6/28. * 接口请求通用对象
*/ */
public class Request implements java.io.Serializable { public class Request implements java.io.Serializable {
......
...@@ -11,10 +11,10 @@ import java.io.IOException; ...@@ -11,10 +11,10 @@ import java.io.IOException;
/** /**
* 验证sign * 验证sign
*/ */
//@WebFilter(filterName = "validationFilter", urlPatterns = "/api/*") @WebFilter(filterName = "validationFilter", urlPatterns = "/api/*")
public class ValidationFilter implements Filter { public class ValidationFilter implements Filter {
@Override @Override
public void init(FilterConfig filterConfig) throws ServletException { public void init(FilterConfig filterConfig) {
} }
@Override @Override
......
...@@ -40,13 +40,8 @@ import com.thinkgem.jeesite.modules.sys.utils.DictUtils; ...@@ -40,13 +40,8 @@ import com.thinkgem.jeesite.modules.sys.utils.DictUtils;
public class ImportExcel { public class ImportExcel {
private static Logger log = LoggerFactory.getLogger(ImportExcel.class); private static Logger log = LoggerFactory.getLogger(ImportExcel.class);
/** /**
* 工作薄对象
*/
private Workbook wb;
/**
* 工作表对象 * 工作表对象
*/ */
private Sheet sheet; private Sheet sheet;
...@@ -129,19 +124,23 @@ public class ImportExcel { ...@@ -129,19 +124,23 @@ public class ImportExcel {
*/ */
public ImportExcel(String fileName, InputStream is, int headerNum, int sheetIndex) public ImportExcel(String fileName, InputStream is, int headerNum, int sheetIndex)
throws InvalidFormatException, IOException { throws InvalidFormatException, IOException {
if (StringUtils.isBlank(fileName)){ /*
工作薄对象
*/
Workbook wb;
if (StringUtils.isBlank(fileName)){
throw new RuntimeException("导入文档为空!"); throw new RuntimeException("导入文档为空!");
}else if(fileName.toLowerCase().endsWith("xls")){ }else if(fileName.toLowerCase().endsWith("xls")){
this.wb = new HSSFWorkbook(is); wb = new HSSFWorkbook(is);
}else if(fileName.toLowerCase().endsWith("xlsx")){ }else if(fileName.toLowerCase().endsWith("xlsx")){
this.wb = new XSSFWorkbook(is); wb = new XSSFWorkbook(is);
}else{ }else{
throw new RuntimeException("文档格式不正确!"); throw new RuntimeException("文档格式不正确!");
} }
if (this.wb.getNumberOfSheets()<sheetIndex){ if (wb.getNumberOfSheets()<sheetIndex){
throw new RuntimeException("文档中没有工作表!"); throw new RuntimeException("文档中没有工作表!");
} }
this.sheet = this.wb.getSheetAt(sheetIndex); this.sheet = wb.getSheetAt(sheetIndex);
this.headerNum = headerNum; this.headerNum = headerNum;
log.debug("Initialize success."); log.debug("Initialize success.");
} }
......
...@@ -2,9 +2,7 @@ package com.thinkgem.jeesite.modules.homepage.api; ...@@ -2,9 +2,7 @@ package com.thinkgem.jeesite.modules.homepage.api;
import com.thinkgem.jeesite.common.baseBean.Response; import com.thinkgem.jeesite.common.baseBean.Response;
import com.thinkgem.jeesite.common.constant.ComCode; import com.thinkgem.jeesite.common.constant.ComCode;
import com.thinkgem.jeesite.modules.homepage.bean.AdvRequest;
import com.thinkgem.jeesite.modules.homepage.bean.NoticeRequest; import com.thinkgem.jeesite.modules.homepage.bean.NoticeRequest;
import com.thinkgem.jeesite.modules.homepage.service.AdvService;
import com.thinkgem.jeesite.modules.homepage.service.NoticeService; import com.thinkgem.jeesite.modules.homepage.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
......
...@@ -2,9 +2,7 @@ package com.thinkgem.jeesite.modules.homepage.dao; ...@@ -2,9 +2,7 @@ package com.thinkgem.jeesite.modules.homepage.dao;
import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao; import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
import com.thinkgem.jeesite.modules.homepage.bean.AdvRequest;
import com.thinkgem.jeesite.modules.homepage.bean.NoticeRequest; import com.thinkgem.jeesite.modules.homepage.bean.NoticeRequest;
import com.thinkgem.jeesite.modules.homepage.entity.AdvEntity;
import com.thinkgem.jeesite.modules.homepage.entity.NoticeEntity; import com.thinkgem.jeesite.modules.homepage.entity.NoticeEntity;
import java.util.List; import java.util.List;
......
package com.thinkgem.jeesite.modules.homepage.service; package com.thinkgem.jeesite.modules.homepage.service;
import com.thinkgem.jeesite.modules.homepage.bean.AdvRequest;
import com.thinkgem.jeesite.modules.homepage.bean.NoticeRequest; import com.thinkgem.jeesite.modules.homepage.bean.NoticeRequest;
import com.thinkgem.jeesite.modules.homepage.dao.AdvDao;
import com.thinkgem.jeesite.modules.homepage.dao.NoticeDao; import com.thinkgem.jeesite.modules.homepage.dao.NoticeDao;
import com.thinkgem.jeesite.modules.homepage.entity.AdvEntity;
import com.thinkgem.jeesite.modules.homepage.entity.NoticeEntity; import com.thinkgem.jeesite.modules.homepage.entity.NoticeEntity;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
......
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