yingzi 2 gadi atpakaļ
vecāks
revīzija
cf0311c6ff

+ 34 - 0
Controller/Cashier/Cashier.Class.php

@@ -20,6 +20,8 @@ class Cashier extends BaseController
      * @var MCashier
      */
     private $objMCashier;
+    private $objMEnterprise;
+    
 
     /**
      * Cashier constructor.
@@ -33,6 +35,7 @@ class Cashier extends BaseController
     {
         parent::__construct($isCheckAcl, $isMustLogin, $checkToken, $getAreaCode);
         $this->objMCashier = new MCashier($this->onlineUserId, $this->onlineEnterpriseId);
+        $this->objMEnterprise = new MEnterprise();
     }
 
     /**
@@ -102,6 +105,37 @@ class Cashier extends BaseController
         }
         parent::sendOutput($result->getData());
     }
+    
+    /**
+     * Doc: (des="获取通用收银客户信息")
+     * User: XMing
+     * Date: 2020/9/11
+     * Time: 2:23 下午
+     * @throws \Exception
+     */
+    public function getCommonCustomerInfo()
+    {
+        if(empty($this->onlineEnterpriseId)){
+            parent::sendOutput('企业信息不存在', ErrorCode::$paramError);
+        }
+        $params['enterpriseId'] = $this->onlineEnterpriseId;
+        
+        $result = $this->objMEnterprise->getEnterpriseInfo($params);
+        if (!$result->isSuccess()) {
+            parent::sendOutput($result->getData(), $result->getErrorCode());
+        }
+        $data = $result->getData();
+        if(empty($data )){
+            parent::sendOutput('企业信息不存在', ErrorCode::$paramError);
+        }
+//        $mobile = $data["commonCashierCustomerMobile"];
+        $mobile = "13600000001";
+        $result = $this->objMCashier->searchCustomerDetails($mobile);
+        if (!$result->isSuccess()) {
+            parent::sendOutput($result->getData(), $result->getErrorCode());
+        }
+        parent::sendOutput($result->getData());
+    }
 
     /**
      * 添加购物车,公共字段

+ 1 - 1
Model/Cashier/MCashier.Class.php

@@ -729,7 +729,7 @@ class MCashier
             'num'       => count((array)$queryIndex),
         ]);
     }
-
+    
 
     /**
      * Doc: (des="根据手机号检索会员信息")