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

+ 6 - 6
controller/census/seller.go

@@ -560,8 +560,8 @@ func (this *SellerController) InvoiceListV2(c *gin.Context) {
 			amountPars := make([]interface{}, 0)
 			amountPars = append(amountPars, summaryIds)
 			if len(groupIds) > 0 {
-				historyCond += ` AND AND IF ( a.invoice_id = 0, d.seller_group_id, b.seller_group_id ) IN (?) `
-				historyPars = append(historyPars, groupIds)
+				amountCond += ` AND AND IF ( a.invoice_id = 0, d.seller_group_id, b.seller_group_id ) IN (?) `
+				amountPars = append(historyPars, groupIds)
 			}
 
 			//if req.SellerIds != "" {
@@ -645,8 +645,8 @@ func (this *SellerController) InvoiceListV2(c *gin.Context) {
 			amountPars := make([]interface{}, 0)
 			amountPars = append(amountPars, summaryIds)
 			if len(groupIds) > 0 {
-				historyCond += ` AND AND IF ( a.invoice_id = 0, d.seller_group_id, b.seller_group_id ) IN (?) `
-				historyPars = append(historyPars, groupIds)
+				amountCond += ` AND AND IF ( a.invoice_id = 0, d.seller_group_id, b.seller_group_id ) IN (?) `
+				amountPars = append(historyPars, groupIds)
 			}
 			//if req.SellerIds != "" {
 			//	sellerIds := strings.Split(req.SellerIds, ",")
@@ -743,8 +743,8 @@ func (this *SellerController) InvoiceListV2(c *gin.Context) {
 			amountPars := make([]interface{}, 0)
 			amountPars = append(amountPars, summaryIds)
 			if len(groupIds) > 0 {
-				historyCond += ` AND AND IF ( a.invoice_id = 0, d.seller_group_id, b.seller_group_id ) IN (?) `
-				historyPars = append(historyPars, groupIds)
+				amountCond += ` AND AND IF ( a.invoice_id = 0, d.seller_group_id, b.seller_group_id ) IN (?) `
+				amountPars = append(historyPars, groupIds)
 			}
 			//if req.SellerIds != "" {
 			//	sellerIds := strings.Split(req.SellerIds, ",")