|
@@ -181,6 +181,13 @@ public class ProductModuleServiceImpl implements ProductModuleService {
|
|
@Override
|
|
@Override
|
|
public ProductVo getProductDetails(Integer productID, String domain) {
|
|
public ProductVo getProductDetails(Integer productID, String domain) {
|
|
ProductVo product = productModuleDao.findProductById(productID);
|
|
ProductVo product = productModuleDao.findProductById(productID);
|
|
|
|
+ if (product == null) {
|
|
|
|
+ //商品已删除/审核未通过/已冻结
|
|
|
|
+ product.setValidFlag("0");
|
|
|
|
+ } else if ("2".equals(product.getValidFlag()) && product.getStock() == 0) {
|
|
|
|
+ //已上架但库存为0的商品,设置为已售罄商品
|
|
|
|
+ product.setValidFlag("4");
|
|
|
|
+ }
|
|
String[] split = null;
|
|
String[] split = null;
|
|
//商品标签
|
|
//商品标签
|
|
if (product.getTags() != null) {
|
|
if (product.getTags() != null) {
|