Commit 811379cb authored by liuyuzhen's avatar liuyuzhen

订单确认检测地址

parent 8a4ff984
...@@ -73,9 +73,6 @@ class OrderConfirmUtil { ...@@ -73,9 +73,6 @@ class OrderConfirmUtil {
$this->memberId = $memberId; $this->memberId = $memberId;
$this->member = \DAO\MemberModel::getInstance()->getInfo($this->memberId); $this->member = \DAO\MemberModel::getInstance()->getInfo($this->memberId);
$this ->address = $this->checkCurrentAddress($currentAddress,$this->memberId); $this ->address = $this->checkCurrentAddress($currentAddress,$this->memberId);
if(!$this->address){
\Error\ErrorModel::throwException(\Error\CodeConfigModel::noAddressForOrder);
}
//if($this ->address['addressId'] == ) //if($this ->address['addressId'] == )
$this->postData = json_decode($data['param'],true); $this->postData = json_decode($data['param'],true);
if(!$this->postData){ if(!$this->postData){
...@@ -158,6 +155,9 @@ class OrderConfirmUtil { ...@@ -158,6 +155,9 @@ class OrderConfirmUtil {
} }
public function checkOneStoreData($temp){ public function checkOneStoreData($temp){
if(!$this->address){
\Error\ErrorModel::throwException(\Error\CodeConfigModel::noAddressForOrder);
}
if(!$temp['storeId']){ if(!$temp['storeId']){
\Error\ErrorModel::throwException(\Error\CodeConfigModel::emptyStoreIdForOrder); \Error\ErrorModel::throwException(\Error\CodeConfigModel::emptyStoreIdForOrder);
} }
...@@ -194,6 +194,11 @@ class OrderConfirmUtil { ...@@ -194,6 +194,11 @@ class OrderConfirmUtil {
* @throws \Exception * @throws \Exception
*/ */
public function checkOneStoreDataNew($temp){ public function checkOneStoreDataNew($temp){
if($temp['deliveryType']==\Our\ApiConst::deliveryStore){
if(!$this->address){
\Error\ErrorModel::throwException(\Error\CodeConfigModel::noAddressForOrder);
}
}
if(!$temp['storeId']){ if(!$temp['storeId']){
\Error\ErrorModel::throwException(\Error\CodeConfigModel::emptyStoreIdForOrder); \Error\ErrorModel::throwException(\Error\CodeConfigModel::emptyStoreIdForOrder);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment