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