Commit fe8e4aa5 authored by jianghaiming's avatar jianghaiming

update:set

parent 4ef66d47
......@@ -127,20 +127,20 @@ class MarketingGoodsService
$shopId = !empty($list[$i]['shop_id']) ? $list[$i]['shop_id'] : '';
$list[$i]['shop_name'] = !empty($subShopList[$shopId]['shop_name']) ? $subShopList[$shopId]['shop_name'] : '';
$commissionMode = !empty($marketingList[$value['marketing_id']]['commission_mode']) ? $marketingList[$value['marketing_id']]['commission_mode']/100 : '';
$commissionMode = !empty($marketingList[$value['marketing_id']]['commission_mode']) ? $marketingList[$value['marketing_id']]['commission_mode'] : '';
$firstCommission = !empty($marketingList[$value['marketing_id']]['first_commission_value']) ? $marketingList[$value['marketing_id']]['first_commission_value']/100 : 0;
//second_commission_value
$secondCommission = !empty($marketingList[$value['marketing_id']]['second_commission_value']) ? $marketingList[$value['marketing_id']]['second_commission_value']/100 : 0;
//
$list[$i]['share_price'] = 0;
//比例
if (!empty($commissionMode) && $commissionMode == 1) {
if (!empty($secondCommission) && $commissionMode == 1) {
$price = !empty($list[$i]['price']) ? $list[$i]['price'] : 0;
$list[$i]['share_price'] = $firstCommission*$price/100;
$list[$i]['share_price'] = sprintf("%.2f",$secondCommission*$price/100);
}
//固定
if (!empty($commissionMode) && $commissionMode == 2) {
$list[$i]['share_price'] = $firstCommission/100;
$list[$i]['share_price'] = sprintf("%.2f",$secondCommission/100);
}
$content = $userId .'_' .$value['marketing_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