|
|
@@ -6,9 +6,11 @@ use JinDouYun\Controller\BaseController;
|
|
|
use JinDouYun\Model\Cashier\MCashier;
|
|
|
use JinDouYun\Model\Cashier\MCashierCart;
|
|
|
use JinDouYun\Model\Market\MCoupon;
|
|
|
+use JinDouYun\Model\Enterprise\MEnterprise;
|
|
|
use Mall\Framework\Core\ErrorCode;
|
|
|
use Mall\Framework\Core\StatusCode;
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* Description: 收银台,订单计算提成
|
|
|
* Class Cashier
|
|
|
@@ -20,6 +22,8 @@ class Cashier extends BaseController
|
|
|
* @var MCashier
|
|
|
*/
|
|
|
private $objMCashier;
|
|
|
+ private $objMEnterprise;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* Cashier constructor.
|
|
|
@@ -33,6 +37,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 +107,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());
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 添加购物车,公共字段
|