修改删除商品提示
parent
e21c2f7125
commit
f59736712d
|
|
@ -143,9 +143,12 @@ class ProductSkuController extends AdminController
|
|||
public function destroy($id)
|
||||
{
|
||||
$sku = ProductSkuModel::findOrFail($id);
|
||||
if ($sku->release_at || $sku->verify_state == 1 || $sku->sales > 0) {//如果是上架中、审核中或者已售出的,无法删除
|
||||
if ($sku->release_at || $sku->verify_state == 1) {//如果是上架中、审核中或者已售出的,无法删除
|
||||
throw new BizException(__('product-sku.options.deny_message'));
|
||||
}
|
||||
if ($sku->sales > 0){
|
||||
throw new BizException('商品已售出,无法被删除');
|
||||
}
|
||||
return parent::destroy($id);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue