作者 jinglong
1 个管道 的构建 通过 耗费 2 秒

修改品类结算优惠券

... ... @@ -424,7 +424,7 @@ class Cars extends Api
//整合商品id,商品总金额
$k = ['goods_id','price'];
$res_goods = $this->auth->array_merge_more($k,$goods_id_s,$price_s);
$res = [];
$key = 0;
foreach($data as $value){
... ... @@ -434,11 +434,16 @@ class Cars extends Api
//有品牌,看商品所属品牌
if($value['type'] == $type[0]){
$flag = 1;
}else{
if($value['type'] == $type[1] && in_array($value['bg_id'],$b_id_s)){
}else if($value['type'] == $type[1]){
if(in_array($value['bg_id'],$b_id_s)){
//去除不是该商品的
$flag = 1;
}
}else{
//品类
if(in_array($value['bg_id'],$goods_id_s)){
$flag = 1;
}
}
}else{
//无品牌
... ... @@ -562,6 +567,7 @@ class Cars extends Api
$r_value['use_goods_str'] = implode(',',$r_value['use_goods_id']);
}
}
$res2 = [];
//满减金额的优惠券
foreach($res as $res_value){
... ...