|
@@ -33,6 +33,8 @@ func everythingSync() {
|
|
|
}
|
|
|
}
|
|
|
sql := fmt.Sprintf(`select * from user_source where channel_code in (%s) and create_time > "%s" order by create_time asc`, strings.Join(codeArr, ","), lastEverythingTime)
|
|
|
+ //sql := fmt.Sprintf(`select * from user_source where id =662847`)
|
|
|
+
|
|
|
log.Println("三方渠道数据定时任务开始", sql)
|
|
|
data := ThirdParty.SelectBySql(sql)
|
|
|
if data != nil && *data != nil && len(*data) > 0 {
|
|
@@ -104,8 +106,10 @@ func everythingSyncHandle(data *[]map[string]interface{}, isUpdate bool) {
|
|
|
l_registedate := common.Int64All((*uData)["l_registedate"])
|
|
|
registe_time = time.Unix(l_registedate, 0).Format(dates.Date_Full_Layout)
|
|
|
}
|
|
|
- if uData == nil || len(*uData) == 0 {
|
|
|
- ThirdParty.Update("", map[string]interface{}{
|
|
|
+ if TiDb.Count("dwd_f_userbase_baseinfo", map[string]interface{}{
|
|
|
+ "userid": user_id,
|
|
|
+ }) <= 0 {
|
|
|
+ ThirdParty.Update("user_source", map[string]interface{}{
|
|
|
"id": id,
|
|
|
}, map[string]interface{}{
|
|
|
"ishandle": 1,
|
|
@@ -190,7 +194,7 @@ func everythingSyncHandle(data *[]map[string]interface{}, isUpdate bool) {
|
|
|
"operator_id": -1,
|
|
|
})
|
|
|
}
|
|
|
- ThirdParty.Update("", map[string]interface{}{
|
|
|
+ ThirdParty.Update("user_source", map[string]interface{}{
|
|
|
"id": id,
|
|
|
}, map[string]interface{}{
|
|
|
"ishandle": 0,
|