...
|
...
|
@@ -105,9 +105,9 @@ func (dao *OrderBaseDao) DividendOrders(option *domain.DividendOrdersQueryOption |
|
|
//}
|
|
|
if option.DividendAction == 0 { //累计分红
|
|
|
if option.DetailAction == 0 { //已收明细
|
|
|
q.Where(`"order_base".partner_bonus_has>0`)
|
|
|
} else if option.DetailAction == 1 { //未收明细 //实际金额>已支付金额
|
|
|
q.Where(`"order_base".partner_bonus_not>0`)
|
|
|
q.Where(`(partner_bonus_has>0 or (partner_bonus_has=0 and coalesce(partner_bonus_not,0)=0 and bonus_status=2)) `)
|
|
|
} else if option.DetailAction == 1 { //未收明细 //实际金额>已支付金额 如果应收分红为0,根据支付状态判断是已收(2)还是未收(1)
|
|
|
q.Where(`(partner_bonus_not>0 or (partner_bonus_has=0 and coalesce(partner_bonus_not,0)=0 and bonus_status=1))`)
|
|
|
}
|
|
|
} else if option.DividendAction == 1 { //分红支出
|
|
|
q.Where(`"order_base".partner_bonus_expense>0`)
|
...
|
...
|
|