上线 零散 bug修改
This commit is contained in:
@@ -779,14 +779,12 @@ class BlindBox extends adminApi
|
||||
$all_lists_data = db::name('vs_gift_bag_receive_log')->where($where)->order("id desc")->select();
|
||||
$total =0;
|
||||
$total_gift_money = 0;
|
||||
$total_money = 0;
|
||||
foreach ($all_lists_data as $key => $value) {
|
||||
$total += $value['num'];
|
||||
$total_gift_money += $value['gift_price'] * $value['num'];
|
||||
$total += $value['num'];//总抽奖次数
|
||||
$total_gift_money += $value['gift_price'] * $value['num']; //总礼物价值(收入)
|
||||
$total_money += $value['bag_price'] * $value['num']; //总抽奖金额(支出)
|
||||
}
|
||||
//总抽奖次数 $total
|
||||
//总抽奖金额(支出)
|
||||
$total_money = db::name('vs_gift_bag_receive_log')->where($where)->sum('bag_price');
|
||||
//总礼物价值(收入) $total_gift_money
|
||||
//统计
|
||||
if($total_gift_money==0 || $total_money==0){
|
||||
$ratio = 0;
|
||||
|
||||
Reference in New Issue
Block a user