|
|
|
@@ -437,18 +437,28 @@ public class AsyncTask { |
|
|
|
@Async |
|
|
|
public void importMerchantInit(File file, MallUserInfo user, String importKey,HttpServletRequest request, HttpServletResponse response) { |
|
|
|
// 需要验证 |
|
|
|
String[] needFields = new String[]{"门店ID","富茂系统商户ID","富茂系统省份", "富茂系统城市", "富茂系统地址","富茂系统经度", "富茂系统纬度"}; |
|
|
|
String[] needFields = new String[]{"门店名称", "门店ID", "城市", "详细地址"}; |
|
|
|
ExcelImportResult<MerchantPoiTNew> datalist = handleImportFile(null,file,MerchantPoiTNew.class,poiImportFields,needFields,new AsyncTask.PoiNewExcelHandler()); |
|
|
|
if (null == datalist) { |
|
|
|
return ; |
|
|
|
} |
|
|
|
|
|
|
|
//查询所有匹配了poi的 |
|
|
|
TtMerchantPoi poiQ = new TtMerchantPoi(); |
|
|
|
poiQ.updateTenantInfo(user); |
|
|
|
Map<String,TtMerchantPoi> poiMerchantMap = ttMerchantPoiService.queryPoiMerchantMap(poiQ); |
|
|
|
|
|
|
|
List<MerchantPoiTNew> successList = datalist.getList(); |
|
|
|
if(successList.size() > 0) { |
|
|
|
try { |
|
|
|
successList.parallelStream().forEach(poiBase -> { |
|
|
|
try { |
|
|
|
ttMerchantPoiService.importOnePoiNew(user, poiBase); |
|
|
|
if (null != poiMerchantMap) { |
|
|
|
TtMerchantPoi tp = poiMerchantMap.get(poiBase.getPoiId()); |
|
|
|
if (null != tp && ) { |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
wxMerchantService.initMerchantByPoi(poiBase.getPoiName(), poiBase.getPoiId()); |
|
|
|
} catch (UnknownSessionException ue) { |
|
|
|
logger.error("session :"+ue.getMessage(),ue); |
|
|
|
} |
|
|
|
|