ziwen hace 1 año
padre
commit
e71ab3580a
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      controller/census/invoice_payment.go

+ 2 - 2
controller/census/invoice_payment.go

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