|
|
@@ -1,5 +1,6 @@
|
|
|
package com.uas.platform.b2c.trade.order.controller;
|
|
|
|
|
|
+import com.uas.platform.b2c.common.base.model.FileUpload;
|
|
|
import com.uas.platform.b2c.core.support.log.UsageBufferedLogger;
|
|
|
import com.uas.platform.b2c.core.support.view.JxlsExcelView;
|
|
|
import com.uas.platform.b2c.prod.commodity.service.ReleaseProductByBatchService;
|
|
|
@@ -16,7 +17,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
-import org.springframework.web.multipart.commons.CommonsMultipartFile;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
@@ -67,14 +67,14 @@ public class PurchaseProductController {
|
|
|
* @see ResultMap
|
|
|
*/
|
|
|
@RequestMapping(value = "/personal/release/excel", method = RequestMethod.POST)
|
|
|
- public ResultMap releasePersonalProductByExcel(@RequestParam CommonsMultipartFile uploadItem, Integer ignoreImport) {
|
|
|
- String fileName = uploadItem.getOriginalFilename();
|
|
|
+ public ResultMap releasePersonalProductByExcel(FileUpload uploadItem, Integer ignoreImport) {
|
|
|
+ String fileName = uploadItem.getFile().getOriginalFilename();
|
|
|
// 获取EXCEL后缀格式
|
|
|
String suffix = fileName.substring(fileName.lastIndexOf(".") + 1);
|
|
|
InputStream inputStream;
|
|
|
Workbook workbook;
|
|
|
try {
|
|
|
- inputStream = uploadItem.getInputStream();
|
|
|
+ inputStream = uploadItem.getFile().getInputStream();
|
|
|
// 根据表格格式分开处理
|
|
|
if (JxlsExcelView.EXCEL_XLS.equals(suffix)) {
|
|
|
workbook = new HSSFWorkbook(inputStream);
|