shish 2 лет назад
Родитель
Сommit
dabf3c140a
1 измененных файлов с 19 добавлено и 0 удалено
  1. 19 0
      app-hd/controllers/ApplyController.php

+ 19 - 0
app-hd/controllers/ApplyController.php

@@ -29,6 +29,25 @@ class ApplyController extends BaseController
     //申请开通批发店 ssh 20231125
     public function actionOpenPf()
     {
+        $shop = $this->shop;
+        $pfShopId = $shop->pfShopId ?? 0;
+        if (!empty($pfShopId)) {
+            util::fail('已经开通过了,无需重复申请');
+        }
+        $mobile = $shop->mobile ?? 0;
+        if (empty($mobile)) {
+            util::fail('没有找到手机号');
+        }
+        $apply = ApplyClass::getByCondition(['mobile' => $mobile], true);
+        if (empty($apply)) {
+            util::fail('找不到历史申请记录');
+        }
+        $apply->introSjId = 1;
+        $apply->introStyle = 0;
+        $apply->introSjName = 0;
+        $apply->introShopId = 0;
+        $apply->status = 1;
+        $apply->save();
         util::complete('已提交申请');
     }