ADDataSave 返回成败值 bool
This commit is contained in:
parent
e0429c02c1
commit
69ea336e44
6
task.go
6
task.go
|
@ -132,7 +132,7 @@ func (task *Task) Session() *requests.Session {
|
|||
}
|
||||
|
||||
// ADDataSave 公众存储数据的接口
|
||||
func ADDataSave(task ITask, db *logdb.LogDB, adDataList []string) {
|
||||
func ADDataSave(task ITask, db *logdb.LogDB, adDataList []string) bool {
|
||||
if len(adDataList) != 0 {
|
||||
adDataStore, err := json.Marshal(adDataList)
|
||||
if err != nil {
|
||||
|
@ -149,5 +149,9 @@ func ADDataSave(task ITask, db *logdb.LogDB, adDataList []string) {
|
|||
adinfo := task.GetADInfo()
|
||||
db.ADInsert(uid.String(), adinfo.Device, adinfo.Platform, adinfo.AreaCC, "",
|
||||
string(adDataStore), adinfo.SpiderID, adinfo.Channel, adinfo.Media, adinfo.CatchAccountID, 0, adinfo.Priority, time.Now())
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user