修改优化查询
This commit is contained in:
parent
a007894fa6
commit
d614cfc42a
@ -193,8 +193,10 @@ class UserBillDao extends BaseDao
|
||||
->when(isset($where['now_money']) && in_array($where['now_money'], [0, 1, 2]), function ($query) use ($where) {
|
||||
if ($where['now_money'] == 0) //->whereIn('category', ['now_money','brokerage'])
|
||||
$query->whereIn('type', ['pay_product', 'recharge', 'sys_inc_money', 'sys_dec_money', 'brokerage', 'presell', 'refund', 'zhibo_reward_inc', 'zhibo_reward_dec','order_one'])
|
||||
->whereor('category','now_money')
|
||||
->whereor('category','brokerage')
|
||||
->where(function ($query) {
|
||||
$query->where('category', 'now_money')
|
||||
->orWhere('category', 'brokerage');
|
||||
})
|
||||
;
|
||||
else if ($where['now_money'] == 1)
|
||||
$query->where('category', 'now_money')->whereIn('type', ['pay_product', 'sys_dec_money', 'presell', 'zhibo_reward_dec']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user