...
|
...
|
@@ -287,7 +287,7 @@ public class ProductServiceImpl implements ProductService{ |
|
|
|
|
|
@Override
|
|
|
public void cancelSaleSkup(Integer skup, Integer status) {
|
|
|
StoragePrice sp = checkSkupCanCancel(skup);
|
|
|
StoragePrice sp = checkSkupCanCancel(skup, status);
|
|
|
if (!doCancelSaleSkup(skup, status)) {
|
|
|
throw new ServiceException(400, "商品(skup)取消售卖失败:" + skup);
|
|
|
}
|
...
|
...
|
@@ -312,8 +312,11 @@ public class ProductServiceImpl implements ProductService{ |
|
|
}
|
|
|
}
|
|
|
|
|
|
private StoragePrice checkSkupCanCancel(Integer skup) {
|
|
|
private StoragePrice checkSkupCanCancel(Integer skup, Integer status) {
|
|
|
LOGGER.info("checkSkupCanCancel skup = {}", skup);
|
|
|
if (status == null || status < 101 || status > 103) {
|
|
|
throw new ServiceException(400, "status状态错误:" + skup);
|
|
|
}
|
|
|
StoragePrice sp = storagePriceMapper.selectBySkup(skup);
|
|
|
if (sp == null) {
|
|
|
throw new ServiceException(400, "商品(skup)不存在:" + skup);
|
...
|
...
|
|