| @@ -295,7 +295,7 @@ public class AsyncTask { | |||
| String[] importFields = new String[]{"服务商POI_ID", "POI名称", "省份", "城市", "地址", "经度", "纬度", "高德ID(非必填)", | |||
| "已匹配POI_ID", "已匹配POI名称", "已匹配POI省份", "已匹配POI城市", "已匹配POI地址", "未匹配原因", "其他信息","POI导入结果"}; | |||
| String[] needFields = new String[]{"服务商POI_ID","已匹配POI_ID"}; | |||
| ExcelImportResult<MerchantPoiT> datalist = handleImportFile(null,file,MerchantPoiT.class,importFields,needFields,new AsyncTask.PoiExcelHandler()); | |||
| ExcelImportResult<MerchantPoiT> datalist = handleImportFile(importKey,file,MerchantPoiT.class,importFields,needFields,new AsyncTask.PoiExcelHandler()); | |||
| if (null == datalist) { | |||
| return; | |||
| } | |||
| @@ -310,11 +310,15 @@ public class AsyncTask { | |||
| logger.error("session :"+ue.getMessage()); | |||
| } | |||
| }); | |||
| stringRedisTemplate.expire(importKey,10, TimeUnit.SECONDS); | |||
| if (StringUtils.isNotBlank(importKey)) { | |||
| stringRedisTemplate.expire(importKey,10, TimeUnit.SECONDS); | |||
| } | |||
| exportExcel(request, response, successList,MerchantPoiT.class, "POI导入-结果.xlsx"); | |||
| } catch (Exception e) { | |||
| logger.error("导入模板失败:"+e.getMessage(),e); | |||
| stringRedisTemplate.expire(importKey,10, TimeUnit.SECONDS); | |||
| if (StringUtils.isNotBlank(importKey)) { | |||
| stringRedisTemplate.expire(importKey,10, TimeUnit.SECONDS); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @@ -455,7 +459,7 @@ public class AsyncTask { | |||
| public void importExcelPoiDataForNew(File file, MallUserInfo user, String importKey,HttpServletRequest request, HttpServletResponse response) { | |||
| // 需要验证 | |||
| String[] needFields = new String[]{"门店ID","富茂系统商户ID","富茂系统省份", "富茂系统城市", "富茂系统地址","富茂系统经度", "富茂系统纬度"}; | |||
| ExcelImportResult<MerchantPoiTNew> datalist = handleImportFile(null,file,MerchantPoiTNew.class,poiImportFields,needFields,new AsyncTask.PoiNewExcelHandler()); | |||
| ExcelImportResult<MerchantPoiTNew> datalist = handleImportFile(importKey,file,MerchantPoiTNew.class,poiImportFields,needFields,new AsyncTask.PoiNewExcelHandler()); | |||
| if (null == datalist) { | |||
| return ; | |||
| } | |||
| @@ -470,11 +474,15 @@ public class AsyncTask { | |||
| logger.error("session :"+ue.getMessage(),ue); | |||
| } | |||
| }); | |||
| stringRedisTemplate.expire(importKey,10, TimeUnit.SECONDS); | |||
| if (StringUtils.isNotBlank(importKey)) { | |||
| stringRedisTemplate.expire(importKey,10, TimeUnit.SECONDS); | |||
| } | |||
| exportExcel(request, response, successList,MerchantPoiTNew.class, "POI导入-结果.xlsx"); | |||
| } catch (Exception e) { | |||
| logger.error("导入模板失败:"+e.getMessage(),e); | |||
| stringRedisTemplate.expire(importKey,10, TimeUnit.SECONDS); | |||
| if (StringUtils.isNotBlank(importKey)) { | |||
| stringRedisTemplate.expire(importKey,10, TimeUnit.SECONDS); | |||
| } | |||
| } | |||
| } | |||
| } | |||