Commit 8245517b by guojuxing

查询门店

parent 127feab5
......@@ -98,6 +98,7 @@ public class WmStoreSyncController {
public RestResponse listStore(StoreSearchDTO storeSearchDTO) {
//todo 过滤已同步过的门店
storeSearchDTO.setEnterpriseId(UserDetailUtils.getUserDetail().getEnterpriseId());
storeSearchDTO.setStatus(1);
return ResultControllerUtils.commonResult(storeApiService
.listStore(storeSearchDTO, storeSearchDTO.getCurrentPage(), storeSearchDTO.getPageSize()));
}
......@@ -361,17 +362,20 @@ public class WmStoreSyncController {
List<WeimobPhysicalStoreDTO> physicalStoreList = new ArrayList<>();
List<StoreDTO> storeList = getStoreList(storeIds, false);
storeList.forEach(store -> physicalStoreList.add(getWeimobPhsicalStore(store)));
if (CollectionUtils.isEmpty(physicalStoreList)) {
return RestResponse.failure(ErrorCode.SYSTEM_ERROR.getCode(), "门店数据非启用");
}
ServiceResponse<List<Integer>> wmResult = weimobStoreSiteService
.addWeimobPhysicalStoreBatch(wmMallStoreId, enterpriseId, physicalStoreList);
LOGGER.info("实体门店批量到微盟结果:{}", JSON.toJSONString(wmResult));
if (!wmResult.isSuccess()) {
HashMap<String, String> map = JSON.parseObject(wmResult.getMessage(), HashMap.class);
HashMap<Integer, String> map = JSON.parseObject(wmResult.getMessage(), HashMap.class);
StringBuilder errorIds = new StringBuilder();
Map<String, String> errorMessage = new HashMap<>(16);
for (Map.Entry<String, String> entry : map.entrySet()) {
for (Map.Entry<Integer, String> entry : map.entrySet()) {
errorIds.append(entry.getKey()).append(GlobalInfo.FLAG_COMMA);
errorMessage.put(entry.getKey(), entry.getValue());
errorMessage.put(entry.getKey().toString(), entry.getValue());
}
this.wmStoreSyncLogApiService.saveWmStoreSyncLog(wmResult.getResult(),
......
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