123456789101112131415161718192021222324252627 |
- package ent_contact
- import (
- "context"
- ul "data_ent_wuye/ent_util"
- "time"
- "log"
- )
- // 增量对于标讯数据...
- func InjectContactAddTask(uid string, name string, phone string, email string) {
- if phone == "" || uid == "" {
- return
- }
- source_type := 1
- create_time := time.Now().Unix()
- msgs := GetEntContacts(uid)
- if !QueryingExists(msgs, name, phone) {
- query := "INSERT INTO information.ent_contact(id,phone,name,email,source_type,create_time,update_time) VALUES(?,?,?,?,?,?,?)"
- //插入数据
- err := ul.ClickHouseConn.Exec(context.Background(), query, uid, phone, name, email, source_type, create_time, create_time)
- if err != nil {
- log.Println(err)
- }
- }
- }
|