소스 검색

提交申请记录

shish 2 년 전
부모
커밋
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('已提交申请');
     }