|
@@ -99,7 +99,11 @@ class Eggjackpotchanchu extends Backend
|
|
|
'do_giftprice' => Db::name('egg_do')->where('Jackpot_id',$jackpot_id)->where('starttime',$jackpot['starttime'])->sum('price'),//抽奖总礼物价值
|
|
|
];
|
|
|
//产出比
|
|
|
- $jackpot_chanchu['chanchubi'] = bcdiv($jackpot_chanchu['do_giftprice'],$jackpot_chanchu['jp_giftprice'],2);
|
|
|
+ if($jackpot_chanchu['jp_giftprice'] == 0){
|
|
|
+ $jackpot_chanchu['chanchubi'] = 0;
|
|
|
+ }else{
|
|
|
+ $jackpot_chanchu['chanchubi'] = bcdiv($jackpot_chanchu['do_giftprice'],$jackpot_chanchu['jp_giftprice'],2);
|
|
|
+ }
|
|
|
|
|
|
$jackpot = array_merge($jackpot,$jackpot_chanchu);
|
|
|
}
|