Commit 34fb9fdc authored by liuyuzhen's avatar liuyuzhen

组合销售商品数据

parent 7e60f5ba
......@@ -514,7 +514,7 @@ class CartServiceModel extends \Business\AbstractModel{
$favList = array();
foreach($cartList as $cart){
if($cart['type']==\Our\ApiConst::addBundingToCart){
\Error\ErrorModel::throwException(\Error\CodeConfigModel::pbundingGoodsCannotMoveToFavouites);
continue;
}
$fav = array();
$fav['member_id'] = $memberId;
......@@ -526,6 +526,9 @@ class CartServiceModel extends \Business\AbstractModel{
$fav['fav_type'] = $cart['type'];
$favList[] = $fav;
}
if(!$favList){
\Error\ErrorModel::throwException(\Error\CodeConfigModel::pbundingGoodsCannotMoveToFavouites);
}
$favResult = $favoritesDao->insertAllOrUpdate($favList);
if(!$favResult){
$cartDao->db->doRollback();
......
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