Authored by chenchao

fix sync product data

... ... @@ -3,6 +3,7 @@ package com.yohoufo.order.service.proxy;
import com.yohobuy.ufo.model.ProductInfo;
import com.yohobuy.ufo.model.order.bo.GoodsInfo;
import com.yohobuy.ufo.model.order.common.SkupStatus;
import com.yohobuy.ufo.model.order.constants.SkupType;
import com.yohobuy.ufo.model.request.StoragePriceBo;
import com.yohobuy.ufo.model.request.product.ProductImportTranItemBo;
import com.yohobuy.ufo.model.response.ProductDetailResp;
... ... @@ -30,6 +31,9 @@ import java.util.*;
public class ProductProxyService {
final Logger logger = LoggerFactory.getLogger(getClass());
private static final int isAdvace = 1;
@Data
public static class PrdPrice{
private BigDecimal maxPrice;
... ... @@ -268,6 +272,10 @@ public class ProductProxyService {
skupReq.setStorageId(goods.getStorageId());
skupReq.setPrice(goods.getGoodsPrice());
skupReq.setSellerUid(goods.getUid());
Integer skupa = goods.getAttributes();
if (Objects.nonNull(skupa) && SkupType.ADVANCE.getCode() == skupa){
skupReq.setPreSaleFlag(isAdvace);
}
ApiResponse resp = ufoServiceCaller.call(syncSkup, skupReq);
return (null == resp || null == resp.getData())? false : (boolean)resp.getData();
}
... ... @@ -285,6 +293,10 @@ public class ProductProxyService {
skupReq.setStorageId(goods.getStorageId());
skupReq.setPrice(goods.getGoodsPrice());
skupReq.setSellerUid(goods.getUid());
Integer skupa = goods.getAttributes();
if (Objects.nonNull(skupa) && SkupType.ADVANCE.getCode() == skupa){
skupReq.setPreSaleFlag(isAdvace);
}
skupBoList.add(skupReq);
skupList.add(goods.getId());
}
... ...