Commit a5892626 by weijiguang

sku状态同步接口逻辑修改

parent 5a6d6601
......@@ -20,6 +20,7 @@ import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.web.client.RestTemplate;
import java.util.*;
......@@ -71,8 +72,10 @@ public class MachineApiServiceImpl {
for (String skuId : skuIds) {
shopGoodsSku.setSkuId(Long.parseLong(skuId));
List<ShopGoodsSku> shopGoodsSkus = shopGoodsSkuMapper.selectShopGoodsSkuList(shopGoodsSku);
if(shopGoodsSkus.isEmpty()){
throw new ServiceException(skuId+"不存在");
if(CollectionUtils.isEmpty(shopGoodsSkus)){
log.info(skuId+"不存在");
continue;
// throw new ServiceException(skuId+"不存在");
}
for (ShopGoodsSku goodsSkus : shopGoodsSkus) {
Long goodsId = goodsSkus.getGoodsId();
......
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