Browse Source

Merge branch 'seller_census'

zwxi 1 year ago
parent
commit
da0edab9fa
1 changed files with 6 additions and 6 deletions
  1. 6 6
      controller/census/seller.go

+ 6 - 6
controller/census/seller.go

@@ -567,13 +567,13 @@ func (this *SellerController) InvoiceListV2(c *gin.Context) {
 
 			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 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)
+				amountCond += ` AND (( b.seller_id IN ? AND a.invoice_id <> 0 )`
+				amountCond += `OR ( d.seller_id IN ? AND  a.payment_id <> 0 AND a.invoice_id = 0 )) `
+				amountPars = append(amountPars, sellerIds, sellerIds)
 			} else {
-				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 ?))`
-				amountPars = append(amountPars, st, ed, st, ed)
+				amountCond += ` AND ((a.invoice_id <> 0 )`
+				amountCond += `OR (a.payment_id <> 0 AND a.invoice_id = 0 ))`
+				amountPars = append(amountPars)
 			}
 			results, e := fms.GetContractSummaryIncomeAmount(amountCond, amountPars)
 			if e != nil {