|
@@ -426,11 +426,11 @@ public class ProductServiceImpl implements ProductService { |
|
@@ -426,11 +426,11 @@ public class ProductServiceImpl implements ProductService { |
426
|
if (storagePriceMapper.updateStatus(skup, status, 0) == 0) {
|
426
|
if (storagePriceMapper.updateStatus(skup, status, 0) == 0) {
|
427
|
throw new ServiceException(400, "商品(skup)状态已变更");
|
427
|
throw new ServiceException(400, "商品(skup)状态已变更");
|
428
|
}
|
428
|
}
|
429
|
- if (status == 10) {
|
429
|
+ /*if (status == 10) {
|
430
|
if (secondhandInfoMapper.updateStatus(skup, 10) == 0) {
|
430
|
if (secondhandInfoMapper.updateStatus(skup, 10) == 0) {
|
431
|
throw new ServiceException(400, "商品(skup)改成待审核失败,状态已变更");
|
431
|
throw new ServiceException(400, "商品(skup)改成待审核失败,状态已变更");
|
432
|
}
|
432
|
}
|
433
|
- }
|
433
|
+ }*/
|
434
|
} else {
|
434
|
} else {
|
435
|
// 4:支付保证金后取消售卖
|
435
|
// 4:支付保证金后取消售卖
|
436
|
if (isSecondHand) {
|
436
|
if (isSecondHand) {
|
|
@@ -1343,6 +1343,7 @@ public class ProductServiceImpl implements ProductService { |
|
@@ -1343,6 +1343,7 @@ public class ProductServiceImpl implements ProductService { |
1343
|
return null;
|
1343
|
return null;
|
1344
|
}
|
1344
|
}
|
1345
|
SecondHandProductResp resp = new SecondHandProductResp();
|
1345
|
SecondHandProductResp resp = new SecondHandProductResp();
|
|
|
1346
|
+ resp.setStatus(sp.getStatus());
|
1346
|
Integer storageId = sp.getStorageId();
|
1347
|
Integer storageId = sp.getStorageId();
|
1347
|
Integer productId = sp.getProductId();
|
1348
|
Integer productId = sp.getProductId();
|
1348
|
Storage storage = storageMapper.selectByPrimaryKey(storageId);
|
1349
|
Storage storage = storageMapper.selectByPrimaryKey(storageId);
|
|
@@ -1357,7 +1358,17 @@ public class ProductServiceImpl implements ProductService { |
|
@@ -1357,7 +1358,17 @@ public class ProductServiceImpl implements ProductService { |
1357
|
resp.setImage(getGoodsDeafultImage(goods.getId()));
|
1358
|
resp.setImage(getGoodsDeafultImage(goods.getId()));
|
1358
|
resp.setImageList(secondhandImagesList.stream().map(image -> com.yohoufo.common.helper.ImagesHelper.getImageAbsoluteUrl(image.getImageUrl(), "goodsimg")).collect(Collectors.toList()));
|
1359
|
resp.setImageList(secondhandImagesList.stream().map(image -> com.yohoufo.common.helper.ImagesHelper.getImageAbsoluteUrl(image.getImageUrl(), "goodsimg")).collect(Collectors.toList()));
|
1359
|
resp.setGender(getGenderName(product.getGender()));
|
1360
|
resp.setGender(getGenderName(product.getGender()));
|
|
|
1361
|
+
|
|
|
1362
|
+ // 价格
|
1360
|
resp.setPrice(sp.getPrice().toString());
|
1363
|
resp.setPrice(sp.getPrice().toString());
|
|
|
1364
|
+ BigDecimal inStockLeastPrice = storagePriceMapper.selectInStockLeastPriceByProductId(productId);
|
|
|
1365
|
+ if (inStockLeastPrice != null) {
|
|
|
1366
|
+ resp.setNewProductPrice(inStockLeastPrice.toString());
|
|
|
1367
|
+ if (inStockLeastPrice.compareTo(sp.getPrice()) > 0) {
|
|
|
1368
|
+ resp.setSavePrice(inStockLeastPrice.subtract(sp.getPrice()).toString());
|
|
|
1369
|
+ }
|
|
|
1370
|
+ }
|
|
|
1371
|
+
|
1361
|
resp.setSizeName(size.getSizeName() + "码");
|
1372
|
resp.setSizeName(size.getSizeName() + "码");
|
1362
|
resp.setProductName(product.getProductName());
|
1373
|
resp.setProductName(product.getProductName());
|
1363
|
resp.setProductCode(product.getProductCode());
|
1374
|
resp.setProductCode(product.getProductCode());
|