|
@@ -1200,7 +1200,7 @@ func getCensusIncomeListV2(ch chan models.CensusIncomeChartResp, req fms.IncomeL
|
|
|
if req.SellerIds != "" {
|
|
|
sellerIds := strings.Split(req.SellerIds, ",")
|
|
|
amountCond += ` AND (( a.invoice_id <> 0 AND b.invoice_time BETWEEN ? AND ?)`
|
|
|
- amountCond += `OR ( a.payment_id <> 0 AND a.invoice_id = 0 AND d.invoice_time BETWEEN ? AND ?)) AND seller_id = ? `
|
|
|
+ amountCond += `OR ( a.payment_id <> 0 AND a.invoice_id = 0 AND d.invoice_time BETWEEN ? AND ?)) AND final_seller_id = ? `
|
|
|
amountPars = append(amountPars, st, ed, st, ed, sellerIds)
|
|
|
} else {
|
|
|
amountCond += ` AND ((a.invoice_id <> 0 AND b.invoice_time BETWEEN ? AND ?)`
|
|
@@ -1306,7 +1306,7 @@ func getCensusIncomeListV2(ch chan models.CensusIncomeChartResp, req fms.IncomeL
|
|
|
if req.SellerIds != "" {
|
|
|
sellerIds := strings.Split(req.SellerIds, ",")
|
|
|
amountCond += ` AND (( a.invoice_id <> 0 AND c.invoice_time BETWEEN ? AND ?)`
|
|
|
- amountCond += `OR ( a.payment_id <> 0 AND a.invoice_id = 0 AND d.invoice_time BETWEEN ? AND ?)) AND seller_id = ? `
|
|
|
+ amountCond += `OR ( a.payment_id <> 0 AND a.invoice_id = 0 AND d.invoice_time BETWEEN ? AND ?)) AND final_seller_id = ? `
|
|
|
amountPars = append(amountPars, prevSt, prevEd, prevSt, prevEd, sellerIds)
|
|
|
} else {
|
|
|
amountCond += ` AND ((a.invoice_id <> 0 AND b.invoice_time BETWEEN ? AND ?)`
|