Ver Fonte

feat:xiugai

wangchuanjin há 5 meses atrás
pai
commit
cf5c9f7a7c

+ 28 - 29
src/jfw/modules/subscribepay/src/entity/dataExportPackStruct.go

@@ -624,38 +624,37 @@ func (this *dataExportPackStruct) PerRechargeList(userId, userIds, starttime, en
 			args = append(args, userId)
 		}
 	}
-	if account > 0 || tpe > 0 || starttime != "" || endtime != "" || userIds != "" {
-		if userIds != "" {
-			wh, thisArgs := qutil.WhArgs(strings.Split(userIds, ","))
-			comSql += ` and a.entUserId in (` + wh + `)`
-			args = append(args, thisArgs...)
-		}
-		if account > 0 {
-			comSql += ` and a.accountType=?`
-			if account == 1 || account == 2 {
-				args = append(args, 0)
-				comSql += ` and a.resourceType=?`
-				if account == 1 {
-					args = append(args, "高级字段包")
-				} else {
-					args = append(args, "标准字段包")
-				}
+	comSql += ` and a.name in ('数据流包','数据流包(合并)')`
+	if account > 0 {
+		comSql += ` and a.accountType=?`
+		if account == 1 || account == 2 {
+			args = append(args, 0)
+			comSql += ` and a.resourceType in (?,?)`
+			if account == 1 {
+				args = append(args, "高级字段包", "高级字段包(合并)")
 			} else {
-				args = append(args, account-2)
+				args = append(args, "标准字段包", "标准字段包(合并)")
 			}
+		} else {
+			args = append(args, account-2)
 		}
-		if tpe > 0 {
-			comSql += ` and a.userType=?`
-			args = append(args, tpe-1)
-		}
-		if starttime != "" {
-			comSql += ` and a.createTime>=?`
-			args = append(args, starttime)
-		}
-		if endtime != "" {
-			comSql += ` and a.createTime<=?`
-			args = append(args, endtime)
-		}
+	}
+	if userIds != "" {
+		wh, thisArgs := qutil.WhArgs(strings.Split(userIds, ","))
+		comSql += ` and a.entUserId in (` + wh + `)`
+		args = append(args, thisArgs...)
+	}
+	if tpe > 0 {
+		comSql += ` and a.userType=?`
+		args = append(args, tpe-1)
+	}
+	if starttime != "" {
+		comSql += ` and a.createTime>=?`
+		args = append(args, starttime)
+	}
+	if endtime != "" {
+		comSql += ` and a.createTime<=?`
+		args = append(args, endtime)
 	}
 	countSql := `select count(1) as count ` + comSql
 	count := util.Mysql.CountBySql(countSql, args...)