|
@@ -269,36 +269,34 @@ func (this *dataExportPackStruct) GetDataExportRecordList(userId, memberPid, use
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if payWay > 0 || starttime > 0 || endtime > 0 || userIds != "" {
|
|
|
- if userIds != "" {
|
|
|
- wh, thisArgs := qutil.WhArgs(strings.Split(userIds, ","))
|
|
|
- comSql += ` and a.ent_user_id in (` + wh + `)`
|
|
|
- args = append(args, thisArgs...)
|
|
|
- }
|
|
|
- if payWay > 0 {
|
|
|
- comSql += ` and a.type=?`
|
|
|
- if payWay == 1 || payWay == 2 {
|
|
|
- args = append(args, payWay-1)
|
|
|
- } else if payWay == 3 || payWay == 4 {
|
|
|
- comSql += ` and a.isSenior=?`
|
|
|
+ if userIds != "" {
|
|
|
+ wh, thisArgs := qutil.WhArgs(strings.Split(userIds, ","))
|
|
|
+ comSql += ` and a.ent_user_id in (` + wh + `)`
|
|
|
+ args = append(args, thisArgs...)
|
|
|
+ }
|
|
|
+ if payWay > 0 {
|
|
|
+ comSql += ` and a.type=?`
|
|
|
+ if payWay == 1 || payWay == 2 {
|
|
|
+ args = append(args, payWay-1)
|
|
|
+ } else if payWay == 3 || payWay == 4 {
|
|
|
+ comSql += ` and a.isSenior=?`
|
|
|
+ args = append(args, 2)
|
|
|
+ if payWay == 3 {
|
|
|
args = append(args, 2)
|
|
|
- if payWay == 3 {
|
|
|
- args = append(args, 2)
|
|
|
- } else {
|
|
|
- args = append(args, 1)
|
|
|
- }
|
|
|
} else {
|
|
|
- args = append(args, payWay-2)
|
|
|
+ args = append(args, 1)
|
|
|
}
|
|
|
+ } else {
|
|
|
+ args = append(args, payWay-2)
|
|
|
}
|
|
|
- if starttime > 0 {
|
|
|
- comSql += ` and a.date>=?`
|
|
|
- args = append(args, starttime)
|
|
|
- }
|
|
|
- if endtime > 0 {
|
|
|
- comSql += ` and a.date<=?`
|
|
|
- args = append(args, endtime)
|
|
|
- }
|
|
|
+ }
|
|
|
+ if starttime > 0 {
|
|
|
+ comSql += ` and a.date>=?`
|
|
|
+ args = append(args, starttime)
|
|
|
+ }
|
|
|
+ if endtime > 0 {
|
|
|
+ comSql += ` and a.date<=?`
|
|
|
+ args = append(args, endtime)
|
|
|
}
|
|
|
countSql := `select count(1) as count ` + comSql
|
|
|
listSql := `select a.source,a.filter,a.query_id,a.date,a.export_num,a.deduct_num,a.path,a.isSenior,a.type,a.operator ` + comSql + ` order by a.date desc limit ?,?`
|