Authored by Lixiaodi

增加下单失败状态

... ... @@ -25,7 +25,7 @@ public class StoragePrice {
* 卖家操作
* 0:初始(未支付保证金),*1:可售(已经支付保证金),2:卖家取消支付保证金,3:卖家超时未支付保证金,4:卖家支付保证金后取消售卖
* 买家操作
* 100:购买使得商品卖出(可能下单未支付,且未超时,或者已支付),101:取消卖出(买家手动),102:取消卖出(超时未支付)
* 100:购买使得商品卖出(可能下单未支付,且未超时,或者已支付),101:取消卖出(买家手动),102:取消卖出(超时未支付),103:下单失败
* 平台操作
* 200:客服取消,201:鉴定失败
* </pre>
... ...
... ... @@ -148,8 +148,6 @@ public class ProductController {
}
}
@IgnoreSignature
@IgnoreSession
// 设置鉴定中心
@RequestMapping(params = "method=ufo.product.setDepotNum")
public ApiResponse setDepotNum(
... ... @@ -184,8 +182,6 @@ public class ProductController {
}
}
@IgnoreSignature
@IgnoreSession
// 取消售卖
@RequestMapping(params = "method=ufo.product.cancelSaleSkup")
public ApiResponse cancelSaleSkup(
... ...
... ... @@ -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);
... ...