|  | @@ -87,7 +87,7 @@ public class QnhServiceImpl implements IQnhService {
 | 
	
		
			
				|  |  |      private ShopDetailMapper shopDetailMapper;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  | -    public ResponseEntity<List<StoreListVo>> getStores(StoreDto dto) {
 | 
	
		
			
				|  |  | +    public List<StoreListVo> getStores(StoreDto dto) {
 | 
	
		
			
				|  |  |          Map<String, Object> body = bulidMap();
 | 
	
		
			
				|  |  |          JSONObject jsonObject = new JSONObject();
 | 
	
		
			
				|  |  |          if (StringUtils.isNotEmpty(dto.getOrgCode())) {
 | 
	
	
		
			
				|  | @@ -111,14 +111,14 @@ public class QnhServiceImpl implements IQnhService {
 | 
	
		
			
				|  |  |           if (result.getBoolean("result")) {
 | 
	
		
			
				|  |  |              JSONArray resultList = result.getJSONArray("resultList");
 | 
	
		
			
				|  |  |              List<StoreListVo> storeListVos = JSONObject.parseArray(JSONArray.toJSONString(resultList), StoreListVo.class);
 | 
	
		
			
				|  |  | -            return ResponseEntity.ok(storeListVos);
 | 
	
		
			
				|  |  | +            return storeListVos;
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  |               throw new YamiShopBindException(result.getString("msg"));
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  | -    public ResponseEntity<StoreDetailVo> queryStore(String regionCode, Integer pageNo, Integer pageSize) {
 | 
	
		
			
				|  |  | +    public StoreDetailVo queryStore(String regionCode, Integer pageNo, Integer pageSize) {
 | 
	
		
			
				|  |  |          Map<String, Object> body = bulidMap();
 | 
	
		
			
				|  |  |          JSONObject jsonObject = new JSONObject();
 | 
	
		
			
				|  |  |          if (StringUtils.isNotEmpty(regionCode)) {
 | 
	
	
		
			
				|  | @@ -142,7 +142,7 @@ public class QnhServiceImpl implements IQnhService {
 | 
	
		
			
				|  |  |              JSONArray resultList = result.getJSONArray("resultList");
 | 
	
		
			
				|  |  |              List<StoreDetailVo> storeDetailVos = JSONObject.parseArray(JSONArray.toJSONString(resultList), StoreDetailVo.class);
 | 
	
		
			
				|  |  |              StoreDetailVo storeDetailVo = storeDetailVos.get(0);
 | 
	
		
			
				|  |  | -            return ResponseEntity.ok(storeDetailVo);
 | 
	
		
			
				|  |  | +            return storeDetailVo;
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  |              throw new YamiShopBindException(result.getString("msg"));
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -190,7 +190,7 @@ public class QnhServiceImpl implements IQnhService {
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  | -    public ResponseEntity<GoodsItemPageVo> itemQuery(ItemQueryDto dto) {
 | 
	
		
			
				|  |  | +    public GoodsItemPageVo itemQuery(ItemQueryDto dto) {
 | 
	
		
			
				|  |  |          Map<String, Object> body = bulidMap();
 | 
	
		
			
				|  |  |          JSONObject jsonObject = new JSONObject();
 | 
	
		
			
				|  |  |          jsonObject.put("page_no", dto.getPageNo());
 | 
	
	
		
			
				|  | @@ -227,14 +227,14 @@ public class QnhServiceImpl implements IQnhService {
 | 
	
		
			
				|  |  |              goodsItemPageVo.setTotalPage(totalPage);
 | 
	
		
			
				|  |  |              List<GoodsItemVo> goodsItemVos = JSONObject.parseArray(JSONArray.toJSONString(resultList), GoodsItemVo.class);
 | 
	
		
			
				|  |  |              goodsItemPageVo.setData(goodsItemVos);
 | 
	
		
			
				|  |  | -            return ResponseEntity.ok(goodsItemPageVo);
 | 
	
		
			
				|  |  | +            return goodsItemPageVo;
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  |              throw new YamiShopBindException(result.getString("msg"));
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  | -    public ResponseEntity<String> addOrder(OrderDto dto) {
 | 
	
		
			
				|  |  | +    public String addOrder(OrderDto dto) {
 | 
	
		
			
				|  |  |          Map<String, Object> body = bulidMap();
 | 
	
		
			
				|  |  |          JSONObject jsonObject = bulidOrderParam(dto);
 | 
	
		
			
				|  |  |          HttpResponse execute = getExecute(body, jsonObject, ADD_ORDER);
 | 
	
	
		
			
				|  | @@ -247,19 +247,19 @@ public class QnhServiceImpl implements IQnhService {
 | 
	
		
			
				|  |  |                  .createTime(LocalDateTime.now()).build());
 | 
	
		
			
				|  |  |          if ("0".equals(result.getString("code"))) {
 | 
	
		
			
				|  |  |              String orderId = result.getJSONObject("data").getString("qnh_order_id");
 | 
	
		
			
				|  |  | -            return ResponseEntity.ok(orderId);
 | 
	
		
			
				|  |  | +            return orderId;
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  |              throw new YamiShopBindException(result.getString("msg"));
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  | -    public ResponseEntity<Void> syncShop(List<StoreListVo> storeListVos) {
 | 
	
		
			
				|  |  | +    public void syncShop(List<StoreListVo> storeListVos) {
 | 
	
		
			
				|  |  |          List<StoreListVo> storeListVoList = null;
 | 
	
		
			
				|  |  |          if (CollectionUtil.isNotEmpty(storeListVos)) {
 | 
	
		
			
				|  |  |              storeListVoList = storeListVos;
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  | -            storeListVoList = getStores(new StoreDto()).getBody();
 | 
	
		
			
				|  |  | +            storeListVoList = getStores(new StoreDto());
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          Date date = new Date();
 | 
	
		
			
				|  |  |          List<ShopDetail> shopDetails = new ArrayList<>();
 | 
	
	
		
			
				|  | @@ -267,7 +267,7 @@ public class QnhServiceImpl implements IQnhService {
 | 
	
		
			
				|  |  |          List<ShopAuditing> shopAuditings = new ArrayList<>();
 | 
	
		
			
				|  |  |          if (CollectionUtil.isNotEmpty(storeListVoList)) {
 | 
	
		
			
				|  |  |              for (StoreListVo item : storeListVoList) {
 | 
	
		
			
				|  |  | -                StoreDetailVo storeDetailVo = queryStore(item.getCode(), 1, 20).getBody();
 | 
	
		
			
				|  |  | +                StoreDetailVo storeDetailVo = queryStore(item.getCode(), 1, 20);
 | 
	
		
			
				|  |  |                  if (Objects.nonNull(storeDetailVo)) {
 | 
	
		
			
				|  |  |                      ShopDetail shopDetail = new ShopDetail();
 | 
	
		
			
				|  |  |                      shopDetail.setThirdPartyCode(storeDetailVo.getRegionCode());
 | 
	
	
		
			
				|  | @@ -306,14 +306,13 @@ public class QnhServiceImpl implements IQnhService {
 | 
	
		
			
				|  |  |              shopWalletService.saveBatch(shopWallets);
 | 
	
		
			
				|  |  |              shopAuditingService.saveBatch(shopAuditings);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        return ResponseEntity.ok().build();
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  |      @Transactional(rollbackFor = Exception.class)
 | 
	
		
			
				|  |  | -    public ResponseEntity<Void> syncGoods(List<GoodsItemVo> goodsItemVos) {
 | 
	
		
			
				|  |  | +    public void syncGoods(List<GoodsItemVo> goodsItemVos) {
 | 
	
		
			
				|  |  |          int currentPage = 1;
 | 
	
		
			
				|  |  | -        List<StoreListVo> storeListVoList = getStores(new StoreDto()).getBody();
 | 
	
		
			
				|  |  | +        List<StoreListVo> storeListVoList = getStores(new StoreDto());
 | 
	
		
			
				|  |  |          if (CollectionUtil.isNotEmpty(storeListVoList)) {
 | 
	
		
			
				|  |  |              List<Long> poiIds = storeListVoList.stream().map(StoreListVo::getPoiId).collect(Collectors.toList());
 | 
	
		
			
				|  |  |              ItemQueryDto itemQueryDto = new ItemQueryDto();
 | 
	
	
		
			
				|  | @@ -325,10 +324,10 @@ public class QnhServiceImpl implements IQnhService {
 | 
	
		
			
				|  |  |              } else {
 | 
	
		
			
				|  |  |                  while (true) {
 | 
	
		
			
				|  |  |                      itemQueryDto.setPageNo(currentPage);
 | 
	
		
			
				|  |  | -                    ResponseEntity<GoodsItemPageVo> page = itemQuery(itemQueryDto);
 | 
	
		
			
				|  |  | -                    if (CollectionUtil.isNotEmpty(page.getBody().getData())) {
 | 
	
		
			
				|  |  | +                    GoodsItemPageVo page = itemQuery(itemQueryDto);
 | 
	
		
			
				|  |  | +                    if (CollectionUtil.isNotEmpty(page.getData())) {
 | 
	
		
			
				|  |  |                          itemQueryDto.setPageNo(currentPage++);
 | 
	
		
			
				|  |  | -                        List<GoodsItemVo> data = page.getBody().getData();
 | 
	
		
			
				|  |  | +                        List<GoodsItemVo> data = page.getData();
 | 
	
		
			
				|  |  |                          List<Sku> skuList = new ArrayList<>();
 | 
	
		
			
				|  |  |  //            ArrayList<Category> categoryInfos = new ArrayList<>();
 | 
	
		
			
				|  |  |                          for (GoodsItemVo item : data) {
 | 
	
	
		
			
				|  | @@ -494,15 +493,14 @@ public class QnhServiceImpl implements IQnhService {
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |  //            List<Product> products = new ArrayList<>(all.size());
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        return ResponseEntity.ok().build();
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  | -    public ResponseEntity<Map<String, String>> getDetailShop(String name) {
 | 
	
		
			
				|  |  | +    public Map<String, String> getDetailShop(String name) {
 | 
	
		
			
				|  |  |          List<ShopDetail> list = shopDetailService.list(new LambdaQueryWrapper<ShopDetail>()
 | 
	
		
			
				|  |  |                  .like(StringUtils.isNotEmpty(name), ShopDetail::getShopName, name)
 | 
	
		
			
				|  |  |                  .isNotNull(ShopDetail::getThirdPartyCode));
 | 
	
		
			
				|  |  | -        return ResponseEntity.ok(list.stream().collect(Collectors.toMap(ShopDetail::getThirdPartyCode, ShopDetail::getShopName)));
 | 
	
		
			
				|  |  | +        return list.stream().collect(Collectors.toMap(ShopDetail::getThirdPartyCode, ShopDetail::getShopName));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      private JSONObject bulidOrderParam(OrderDto orderDto) {
 | 
	
	
		
			
				|  | @@ -593,7 +591,7 @@ public class QnhServiceImpl implements IQnhService {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  |      @Transactional(rollbackFor = Exception.class)
 | 
	
		
			
				|  |  | -    public ResponseEntity<String> dataUpdate(QnhPushParam qnhPushParam) {
 | 
	
		
			
				|  |  | +    public String dataUpdate(QnhPushParam qnhPushParam) {
 | 
	
		
			
				|  |  |  //        String key = "qnh:dataUpdate:" + qnhPushParam.getSign();
 | 
	
		
			
				|  |  |  //        if (!RedisUtil.hasKey(key)) {
 | 
	
		
			
				|  |  |  //            RedisUtil.set(key, qnhPushParam.getSign(), 120);
 | 
	
	
		
			
				|  | @@ -651,7 +649,7 @@ public class QnhServiceImpl implements IQnhService {
 | 
	
		
			
				|  |  |  //                    .createTime(LocalDateTime.now()).build());
 | 
	
		
			
				|  |  |  //            return ResponseEntity.ok().build();
 | 
	
		
			
				|  |  |  //        }
 | 
	
		
			
				|  |  | -        return ResponseEntity.ok().build();
 | 
	
		
			
				|  |  | +        return null;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -720,13 +718,13 @@ public class QnhServiceImpl implements IQnhService {
 | 
	
		
			
				|  |  |                  .createTime(LocalDateTime.now()).build());
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |      public void synchronizedInfo1(String code) {
 | 
	
		
			
				|  |  | -        List<StoreListVo> storeListVoList = getStores(new StoreDto()).getBody();
 | 
	
		
			
				|  |  | +        List<StoreListVo> storeListVoList = getStores(new StoreDto());
 | 
	
		
			
				|  |  |          if (CollectionUtil.isNotEmpty(storeListVoList)) {
 | 
	
		
			
				|  |  |              ItemQueryDto itemQueryDto = new ItemQueryDto();
 | 
	
		
			
				|  |  |              itemQueryDto.setOrgCode(code);
 | 
	
		
			
				|  |  |              itemQueryDto.setPageSize(100);
 | 
	
		
			
				|  |  | -            ResponseEntity<GoodsItemPageVo> firstPage = itemQuery(itemQueryDto);
 | 
	
		
			
				|  |  | -            int totalPages = firstPage.getBody().getTotalPage();
 | 
	
		
			
				|  |  | +            GoodsItemPageVo GoodsItemPageVo = itemQuery(itemQueryDto);
 | 
	
		
			
				|  |  | +            int totalPages = GoodsItemPageVo.getTotalPage();
 | 
	
		
			
				|  |  |              CountDownLatch latch = new CountDownLatch(totalPages);
 | 
	
		
			
				|  |  |              // 使用并行流替代线程池提交
 | 
	
		
			
				|  |  |              IntStream.rangeClosed(1, totalPages)
 | 
	
	
		
			
				|  | @@ -764,12 +762,12 @@ public class QnhServiceImpl implements IQnhService {
 | 
	
		
			
				|  |  |                          .eq(ShopDetail::getThirdPartyCode, code)
 | 
	
		
			
				|  |  |          );
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        ResponseEntity<GoodsItemPageVo> page = itemQuery(itemQueryDto);
 | 
	
		
			
				|  |  | -        if (CollectionUtil.isEmpty(page.getBody().getData())) {
 | 
	
		
			
				|  |  | +        GoodsItemPageVo page = itemQuery(itemQueryDto);
 | 
	
		
			
				|  |  | +        if (CollectionUtil.isEmpty(page.getData())) {
 | 
	
		
			
				|  |  |              return;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        List<GoodsItemVo> items = page.getBody().getData();
 | 
	
		
			
				|  |  | +        List<GoodsItemVo> items = page.getData();
 | 
	
		
			
				|  |  |          List<String> spuCodes = items.stream()
 | 
	
		
			
				|  |  |                  .map(GoodsItemVo::getSpuCode)
 | 
	
		
			
				|  |  |                  .distinct()
 |