diff --git a/Application/Home/Controller/FinanceController.class.php b/Application/Home/Controller/FinanceController.class.php index 72160c12f..67a5c6191 100644 --- a/Application/Home/Controller/FinanceController.class.php +++ b/Application/Home/Controller/FinanceController.class.php @@ -55,7 +55,7 @@ class FinanceController extends BaseController $map['pay_time'] = ['between', [$begTime, $endTime + 86399]]; } - $data = $model->field('pay_order_number,game_name,user_account,promote_account,pay_amount,pay_way,selle_ratio,convert(pay_amount*selle_ratio,decimal(10,2)) as income,pay_time,selle_status') + $data = $model->field('pay_order_number,game_name,user_account,promote_account,pay_amount,pay_way,if(selle_ratio >= 0,selle_ratio,0) as selle_ratio,convert(pay_amount*if(selle_ratio >= 0,selle_ratio,0),decimal(10,2)) as income,pay_time,selle_status') ->where($map) ->order('id desc') ->page($page, $row)