|
|
@@ -104,12 +104,12 @@ class PurchaseController extends BaseController
|
|
|
$info = PurchaseClass::getByCondition(['orderSn' => $orderSn], true);
|
|
|
PurchaseService::valid($info, $this->shopId);
|
|
|
|
|
|
-// if ($info->status != 5) {
|
|
|
-// util::fail('订单已取消');
|
|
|
-// }
|
|
|
-// if ($info->status != 1) {
|
|
|
-// util::fail('订单不是待付款状态');
|
|
|
-// }
|
|
|
+ if ($info->status == 5) {
|
|
|
+ util::fail('订单已取消');
|
|
|
+ }
|
|
|
+ if ($info->status != 1) {
|
|
|
+ util::fail('订单不是待付款状态');
|
|
|
+ }
|
|
|
|
|
|
$ghsId = $info->ghsId;
|
|
|
$ghs = GhsClass::getGhsInfo($ghsId);
|
|
|
@@ -162,9 +162,9 @@ class PurchaseController extends BaseController
|
|
|
if ($info->status == 5) {
|
|
|
util::fail('订单已取消');
|
|
|
}
|
|
|
-// if ($info->status == 1) {
|
|
|
-// util::fail('订单不是待付款状态');
|
|
|
-// }
|
|
|
+ if ($info->status != 1) {
|
|
|
+ util::fail('订单不是待付款状态');
|
|
|
+ }
|
|
|
|
|
|
PurchaseService::valid($info, $this->shopId);
|
|
|
$connection = Yii::$app->db;//事务处理
|
|
|
@@ -254,12 +254,12 @@ class PurchaseController extends BaseController
|
|
|
if (empty($order)) {
|
|
|
util::fail('订单号无效');
|
|
|
}
|
|
|
-// if ($order->status == 5) {
|
|
|
-// util::fail('订单已取消');
|
|
|
-// }
|
|
|
-// if ($order->status == 1) {
|
|
|
-// util::fail('订单不是待付款状态');
|
|
|
-// }
|
|
|
+ if ($order->status == 5) {
|
|
|
+ util::fail('订单已取消');
|
|
|
+ }
|
|
|
+ if ($order->status != 1) {
|
|
|
+ util::fail('订单不是待付款状态');
|
|
|
+ }
|
|
|
|
|
|
$id = $order->id;
|
|
|
$order->changePrice = 2;
|