|
@@ -16,6 +16,8 @@ import java.util.function.BinaryOperator; |
|
@@ -16,6 +16,8 @@ import java.util.function.BinaryOperator; |
16
|
import java.util.function.Function;
|
16
|
import java.util.function.Function;
|
17
|
import java.util.stream.Collectors;
|
17
|
import java.util.stream.Collectors;
|
18
|
|
18
|
|
|
|
19
|
+import com.yohobuy.ufo.model.response.store.StoreInfoBo;
|
|
|
20
|
+import com.yohoufo.common.ApiResponse;
|
19
|
import com.yohoufo.dal.product.*;
|
21
|
import com.yohoufo.dal.product.*;
|
20
|
import com.yohoufo.dal.product.model.*;
|
22
|
import com.yohoufo.dal.product.model.*;
|
21
|
import org.apache.commons.collections.MapUtils;
|
23
|
import org.apache.commons.collections.MapUtils;
|
|
@@ -1182,7 +1184,7 @@ public class ProductServiceImpl implements ProductService { |
|
@@ -1182,7 +1184,7 @@ public class ProductServiceImpl implements ProductService { |
1182
|
}
|
1184
|
}
|
1183
|
|
1185
|
|
1184
|
@Override
|
1186
|
@Override
|
1185
|
- public SkupInfo querySkupDetailBySkup(int skup) {
|
1187
|
+ public SkupInfo querySkupDetailBySkup(Integer skup, Integer storeId) {
|
1186
|
|
1188
|
|
1187
|
StoragePrice skupDo = storagePriceMapper.selectBySkup(skup);
|
1189
|
StoragePrice skupDo = storagePriceMapper.selectBySkup(skup);
|
1188
|
|
1190
|
|
|
@@ -1207,6 +1209,13 @@ public class ProductServiceImpl implements ProductService { |
|
@@ -1207,6 +1209,13 @@ public class ProductServiceImpl implements ProductService { |
1207
|
|
1209
|
|
1208
|
Pair<Integer, String> skupStatusPair = product.getShelveStatus() == 1 ? getSkupStatus(skupDo.getStatus()) : getSkupStatus(0);
|
1210
|
Pair<Integer, String> skupStatusPair = product.getShelveStatus() == 1 ? getSkupStatus(skupDo.getStatus()) : getSkupStatus(0);
|
1209
|
|
1211
|
|
|
|
1212
|
+ String storeName = "YOHO!STORE艾尚店";
|
|
|
1213
|
+ if (storeId != null && storeId > 0) {
|
|
|
1214
|
+ StoreInfoBo storeInfoBo = queryStoreInfo(storeId);
|
|
|
1215
|
+ if(storeInfoBo != null)
|
|
|
1216
|
+ storeName = storeInfoBo.getStoreName();
|
|
|
1217
|
+ }
|
|
|
1218
|
+
|
1210
|
return SkupInfo.builder()
|
1219
|
return SkupInfo.builder()
|
1211
|
.productId(product.getId())
|
1220
|
.productId(product.getId())
|
1212
|
.productName(product.getProductName())
|
1221
|
.productName(product.getProductName())
|
|
@@ -1221,11 +1230,22 @@ public class ProductServiceImpl implements ProductService { |
|
@@ -1221,11 +1230,22 @@ public class ProductServiceImpl implements ProductService { |
1221
|
.price(skupDo.getPrice())
|
1230
|
.price(skupDo.getPrice())
|
1222
|
.status(skupStatusPair.getLeft())
|
1231
|
.status(skupStatusPair.getLeft())
|
1223
|
.statusStr(skupStatusPair.getRight())
|
1232
|
.statusStr(skupStatusPair.getRight())
|
1224
|
- .storeName("YOHO!STORE艾尚店")
|
1233
|
+ .storeName(storeName)
|
1225
|
.build();
|
1234
|
.build();
|
1226
|
|
1235
|
|
1227
|
}
|
1236
|
}
|
1228
|
|
1237
|
|
|
|
1238
|
+ //查询门店信息
|
|
|
1239
|
+ private StoreInfoBo queryStoreInfo(int storeId) {
|
|
|
1240
|
+ ApiResponse resp = ufoServiceCaller.call("ufo.store.queryStoreInfoById", ApiResponse.class, storeId);
|
|
|
1241
|
+ if (resp != null && resp.getCode()==200) {
|
|
|
1242
|
+ if (resp.getData() != null) {
|
|
|
1243
|
+ return (StoreInfoBo)resp.getData();
|
|
|
1244
|
+ }
|
|
|
1245
|
+ }
|
|
|
1246
|
+ return null;
|
|
|
1247
|
+ }
|
|
|
1248
|
+
|
1229
|
/**
|
1249
|
/**
|
1230
|
* skup状态:0:已下架;1:可售;2:已售出
|
1250
|
* skup状态:0:已下架;1:可售;2:已售出
|
1231
|
*
|
1251
|
*
|