...
|
...
|
@@ -16,6 +16,8 @@ import java.util.function.BinaryOperator; |
|
|
import java.util.function.Function;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import com.yohobuy.ufo.model.response.store.StoreInfoBo;
|
|
|
import com.yohoufo.common.ApiResponse;
|
|
|
import com.yohoufo.dal.product.*;
|
|
|
import com.yohoufo.dal.product.model.*;
|
|
|
import org.apache.commons.collections.MapUtils;
|
...
|
...
|
@@ -1182,7 +1184,7 @@ public class ProductServiceImpl implements ProductService { |
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public SkupInfo querySkupDetailBySkup(int skup) {
|
|
|
public SkupInfo querySkupDetailBySkup(Integer skup, Integer storeId) {
|
|
|
|
|
|
StoragePrice skupDo = storagePriceMapper.selectBySkup(skup);
|
|
|
|
...
|
...
|
@@ -1207,6 +1209,13 @@ public class ProductServiceImpl implements ProductService { |
|
|
|
|
|
Pair<Integer, String> skupStatusPair = product.getShelveStatus() == 1 ? getSkupStatus(skupDo.getStatus()) : getSkupStatus(0);
|
|
|
|
|
|
String storeName = "YOHO!STORE艾尚店";
|
|
|
if (storeId != null && storeId > 0) {
|
|
|
StoreInfoBo storeInfoBo = queryStoreInfo(storeId);
|
|
|
if(storeInfoBo != null)
|
|
|
storeName = storeInfoBo.getStoreName();
|
|
|
}
|
|
|
|
|
|
return SkupInfo.builder()
|
|
|
.productId(product.getId())
|
|
|
.productName(product.getProductName())
|
...
|
...
|
@@ -1221,11 +1230,22 @@ public class ProductServiceImpl implements ProductService { |
|
|
.price(skupDo.getPrice())
|
|
|
.status(skupStatusPair.getLeft())
|
|
|
.statusStr(skupStatusPair.getRight())
|
|
|
.storeName("YOHO!STORE艾尚店")
|
|
|
.storeName(storeName)
|
|
|
.build();
|
|
|
|
|
|
}
|
|
|
|
|
|
//查询门店信息
|
|
|
private StoreInfoBo queryStoreInfo(int storeId) {
|
|
|
ApiResponse resp = ufoServiceCaller.call("ufo.store.queryStoreInfoById", ApiResponse.class, storeId);
|
|
|
if (resp != null && resp.getCode()==200) {
|
|
|
if (resp.getData() != null) {
|
|
|
return (StoreInfoBo)resp.getData();
|
|
|
}
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* skup状态:0:已下架;1:可售;2:已售出
|
|
|
*
|
...
|
...
|
|