shish 2 năm trước cách đây
mục cha
commit
272282bc99
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      app-ghs/controllers/CustomController.php

+ 5 - 0
app-ghs/controllers/CustomController.php

@@ -44,6 +44,11 @@ class CustomController extends BaseController
         if ($custom->ownMainId != $this->mainId) {
             util::fail('不是你的客户,无法充值');
         }
+        $customShopId = $custom->shopId ?? 0;
+        $shop = $this->shop;
+        if ($customShopId == $shop->lsShopId) {
+            util::fail('不能给自己的店充值');
+        }
         $connection = Yii::$app->db;
         $transaction = $connection->beginTransaction();
         try {