|
@@ -2,6 +2,7 @@
|
|
|
namespace app\common\service;
|
|
|
|
|
|
use app\common\model\Admin;
|
|
|
+use app\common\model\Goods;
|
|
|
use app\common\model\GoodsCart;
|
|
|
use app\common\model\GoodsSku;
|
|
|
use app\common\model\User;
|
|
@@ -157,9 +158,6 @@ class OrderService extends BaseService {
|
|
|
'amount_install'=>0,
|
|
|
'amount_discount'=>0,
|
|
|
'amount_cmn'=>0,
|
|
|
- 'num'=>0,
|
|
|
- 'num_install'=>0,
|
|
|
- 'goods'=>[]
|
|
|
];
|
|
|
$user=$this->getUser();
|
|
|
|
|
@@ -186,6 +184,9 @@ class OrderService extends BaseService {
|
|
|
if(!$goods['sku']||!$goods['goods']){
|
|
|
$this->error('规格或商品不存在');
|
|
|
}
|
|
|
+ if($goods['goods']['status']!=Goods::STATUS_NORMAL){
|
|
|
+ $this->error("商品[{$goods['goods']['name']}]已下架");
|
|
|
+ }
|
|
|
list($amountReal,$amountKill,$amountOrigin)=$this->getAmount($goods['sku'],$goods['goods']);
|
|
|
$goods['amount_pay']=0;
|
|
|
$goods['amount_coupon']=0;
|
|
@@ -257,4 +258,4 @@ class OrderService extends BaseService {
|
|
|
}
|
|
|
return $amountArr;
|
|
|
}
|
|
|
-}
|
|
|
+}
|