wangchuanjin 5 сар өмнө
parent
commit
779fcd4604

+ 21 - 15
common/src/qfw/util/dataexport/dataExportRecord.go

@@ -3,10 +3,11 @@ package dataexport
 import (
 	"encoding/json"
 	"fmt"
-	"app.yhyue.com/moapp/jybase/mysql"
-	"app.yhyue.com/moapp/jybase/redis"
 	"strings"
 	"time"
+
+	"app.yhyue.com/moapp/jybase/mysql"
+	"app.yhyue.com/moapp/jybase/redis"
 )
 
 //数据包导出记录
@@ -137,20 +138,25 @@ func (dpm *DataPacketMsg) AddNum(num int) (err error) {
 	return fmt.Errorf("稍后重试")
 }
 
-func (dpm *DataPacketMsg) SaveRecord(db *mysql.Mysql, useId, selectId string, t int, idList []string, filePath, phone, email string) error {
+func (dpm *DataPacketMsg) SaveRecord(db *mysql.Mysql, useId, selectId string, t int, idList []string, filePath, phone, email string, entId, entUserId, source int64, operator, filter string) error {
 	if db.Insert(recordTable, map[string]interface{}{
-		"infoids":    strings.Join(idList, ","),
-		"type":       t,
-		"master_id":  dpm.masterId,
-		"useid":      useId,
-		"query_id":   selectId,
-		"date":       time.Now().Unix(),
-		"path":       filePath,
-		"deduct_num": len(idList),
-		"export_num": len(idList),
-		"phone":      phone,
-		"mail":       email,
-		"isSenior":   2,
+		"infoids":     strings.Join(idList, ","),
+		"type":        t,
+		"master_id":   dpm.masterId,
+		"useid":       useId,
+		"query_id":    selectId,
+		"date":        time.Now().Unix(),
+		"path":        filePath,
+		"deduct_num":  len(idList),
+		"export_num":  len(idList),
+		"phone":       phone,
+		"mail":        email,
+		"isSenior":    2,
+		"ent_id":      entId,
+		"ent_user_id": entUserId,
+		"source":      source,
+		"operator":    operator,
+		"filter":      filter,
 	}) == 0 {
 		return fmt.Errorf("数据导出记录保存出错 userId:%s,selectId:%s,类型:%d,导出数据:%v", useId, selectId, t, idList)
 	}