Commit e3d2c71f authored by liuyuzhen's avatar liuyuzhen

订单备注

parent 515123ec
...@@ -39,6 +39,8 @@ class OrderConfirmUtil { ...@@ -39,6 +39,8 @@ class OrderConfirmUtil {
private $saleGoodsIds = array(); //参与销售活动结算的goodsId 列表 private $saleGoodsIds = array(); //参与销售活动结算的goodsId 列表
private $storeMemos = array();
public function addOrder($data,$memberId,$currentAddress){ public function addOrder($data,$memberId,$currentAddress){
$storeCartData = $this->checkPostData($data,$memberId,$currentAddress); $storeCartData = $this->checkPostData($data,$memberId,$currentAddress);
$storeCartData = $this->checkDeliveryTypeAndPayway($storeCartData); $storeCartData = $this->checkDeliveryTypeAndPayway($storeCartData);
...@@ -84,6 +86,7 @@ class OrderConfirmUtil { ...@@ -84,6 +86,7 @@ class OrderConfirmUtil {
$gcIds = isset($cartList['gcIds'])?$cartList['gcIds']:array(); $gcIds = isset($cartList['gcIds'])?$cartList['gcIds']:array();
$storeCartData = array('cartList'=>$cartList['list'],'storeIds'=>array_keys($cartList['list']),'goodsIds'=>$cartList['goodsIds'],'goodsCommonIds'=>$cartList['goodsCommonIds'],'blIds'=>$cartList['blIds'],'gcIds'=>$gcIds); $storeCartData = array('cartList'=>$cartList['list'],'storeIds'=>array_keys($cartList['list']),'goodsIds'=>$cartList['goodsIds'],'goodsCommonIds'=>$cartList['goodsCommonIds'],'blIds'=>$cartList['blIds'],'gcIds'=>$gcIds);
$this->storeIds= array_keys($cartList['list']); $this->storeIds= array_keys($cartList['list']);
$this->storeMemos[$this->postData['storeId']] = isset($this->postData['storeMemo'])?$this->postData['storeMemo']:\Our\NameConst::emptyString;
}else{ }else{
foreach($this->postData as $temp){ foreach($this->postData as $temp){
$this->checkOneStoreData($temp); $this->checkOneStoreData($temp);
...@@ -98,6 +101,7 @@ class OrderConfirmUtil { ...@@ -98,6 +101,7 @@ class OrderConfirmUtil {
$this->storeIds[]= $temp['storeId']; $this->storeIds[]= $temp['storeId'];
$this->storeCartIds[$temp['storeId']] =$temp['cartIds']; $this->storeCartIds[$temp['storeId']] =$temp['cartIds'];
$this->postFormatData[$temp['storeId']] = $temp; $this->postFormatData[$temp['storeId']] = $temp;
$this->storeMemos[$temp['storeId']] = isset($temp['storeMemo'])?$temp['storeMemo']:\Our\NameConst::emptyString;
} }
if($this->couponIds){ if($this->couponIds){
if(count($this->couponIds)!= count(array_unique($this->couponIds))){ if(count($this->couponIds)!= count(array_unique($this->couponIds))){
...@@ -411,7 +415,7 @@ class OrderConfirmUtil { ...@@ -411,7 +415,7 @@ class OrderConfirmUtil {
$orderCommon = array(); $orderCommon = array();
$orderCommon['order_id'] = $orderId; $orderCommon['order_id'] = $orderId;
$orderCommon['store_id'] = $storeId; $orderCommon['store_id'] = $storeId;
$orderCommon['order_message'] = isset($this->postFormatData[$storeId]['storeMemo'])?$this->postFormatData[$storeId]['storeMemo']:\Our\NameConst::emptyString; $orderCommon['order_message'] = isset($this->storeMemos[$storeId])?$this->storeMemos[$storeId]:\Our\NameConst::emptyString;
$orderCommon['reciver_info'] = $reciverInfo; $orderCommon['reciver_info'] = $reciverInfo;
$orderCommon['reciver_name'] = $reciverName; $orderCommon['reciver_name'] = $reciverName;
$orderCommon['reciver_city_id'] = $this->address['city_id']; $orderCommon['reciver_city_id'] = $this->address['city_id'];
......
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