Sfoglia il codice sorgente

获取客户信息

shish 1 anno fa
parent
commit
01937124a1

+ 15 - 0
app-hd/controllers/CustomController.php

@@ -188,6 +188,21 @@ class CustomController extends BaseController
         util::success($list);
     }
 
+    //获取客户信息 ssh 20250510
+    public function actionInfo()
+    {
+        $get = Yii::$app->request->get();
+        $id = $get['id'] ?? 0;
+        $custom = CustomClass::getById($id, true);
+        if (empty($custom)) {
+            util::fail('没有找到客户信息');
+        }
+        if ($custom->shopId != $this->shopId) {
+            util::fail('不是你的客户');
+        }
+        util::success(['custom' => $custom]);
+    }
+
     //获取客户基本和资产信息 ssh 2019.11.30
     public function actionDetail()
     {

+ 1 - 1
biz-hd/custom/classes/CustomClass.php

@@ -435,7 +435,7 @@ class CustomClass extends BaseClass
     {
         $userId = $custom['userId'];
         $userData = [];
-        if (isset($data['mobile']) && !empty($data['mobile'])) {
+        if (!empty($data['mobile'])) {
             $userData['mobile'] = $data['mobile'];
         }
         if (!empty($userData)) {