Commit d5248f0d authored by liuyuzhen's avatar liuyuzhen

购物车提交

parent 6f039897
...@@ -386,7 +386,7 @@ class CartServiceModel extends \Business\AbstractModel{ ...@@ -386,7 +386,7 @@ class CartServiceModel extends \Business\AbstractModel{
\Error\ErrorModel::throwException(\Error\CodeConfigModel::emptyCartGoodsNum); \Error\ErrorModel::throwException(\Error\CodeConfigModel::emptyCartGoodsNum);
} }
$cartDao = \DAO\Cart\CartModel::getInstance(\Our\DbNameConst::masterDBConnectName); $cartDao = \DAO\Cart\CartModel::getInstance(\Our\DbNameConst::masterDBConnectName);
$existCart = $cartDao->find(array('goods_id'=>$cart['goods_id'],'buyer_id'=>$memberId,'cart_id'=>array('neq',$cart['cart_id']))); $existCart = $cartDao->find(array('goods_id'=>$data['goodsId'],'buyer_id'=>$memberId,'cart_id'=>array('neq',$cart['cart_id'])));
if($existCart){ if($existCart){
return array('existCartFlag'=>\Our\ApiConst::one); return array('existCartFlag'=>\Our\ApiConst::one);
} }
......
...@@ -206,12 +206,13 @@ class GroupSaleServiceModel extends \Business\AbstractModel { ...@@ -206,12 +206,13 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
$goodsState[$key] = $cartObj['goodsState']; $goodsState[$key] = $cartObj['goodsState'];
} }
array_multisort($goodsState, SORT_DESC, $offlineCarts); array_multisort($goodsState, SORT_DESC, $offlineCarts);
foreach($offlineCarts as $temp){ foreach($offlineCarts as $tempCartObj){
array_push($newstoreCarts,$temp); array_push($newstoreCarts,$tempCartObj);
} }
} }
//$storeCarts = $newstoreCarts; $storeCarts = $newstoreCarts;
$store = $storeDao->get($storeId,false); $store = $storeDao->get($storeId,false);
$temp = array();
$temp['storeName'] = $store['store_name']; $temp['storeName'] = $store['store_name'];
$temp['storeId'] = $storeId; $temp['storeId'] = $storeId;
$temp['storeCarts'] = $storeCarts; $temp['storeCarts'] = $storeCarts;
......
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