|
@@ -130,26 +130,28 @@ func userbase() {
|
|
log.Println("userbase uid 注册时间 ", registedates)
|
|
log.Println("userbase uid 注册时间 ", registedates)
|
|
if time.Now().Unix()-registedates.Unix() > int64(cfg.RegTimes)*86400 {
|
|
if time.Now().Unix()-registedates.Unix() > int64(cfg.RegTimes)*86400 {
|
|
if count == 0 {
|
|
if count == 0 {
|
|
|
|
+ // TiDb.Insert("dwd_f_crm_open_sea", map[string]interface{}{
|
|
|
|
+ // "clue_id": clueId,
|
|
|
|
+ // "comeintime": nowTime,
|
|
|
|
+ // "comeinsource": 2,
|
|
|
|
+ // })
|
|
clueId := TiDb.Insert("dwd_f_crm_clue_info", map[string]interface{}{
|
|
clueId := TiDb.Insert("dwd_f_crm_clue_info", map[string]interface{}{
|
|
- "userid": userId,
|
|
|
|
- "uid": uId,
|
|
|
|
- "is_assign": 0,
|
|
|
|
- "comeintime": nowTime,
|
|
|
|
- "createtime": nowTime,
|
|
|
|
- "updatetime": nowTime,
|
|
|
|
- "cluename": phone,
|
|
|
|
- "top_cluetype": "379",
|
|
|
|
- "sub_cluetype": "380",
|
|
|
|
- "trailstatus": "01",
|
|
|
|
- "name": name,
|
|
|
|
- "phone": phone,
|
|
|
|
|
|
+ "userid": userId,
|
|
|
|
+ "uid": uId,
|
|
|
|
+ "is_assign": 0,
|
|
|
|
+ "comeintime": nowTime,
|
|
|
|
+ "createtime": nowTime,
|
|
|
|
+ "updatetime": nowTime,
|
|
|
|
+ "cluename": phone,
|
|
|
|
+ "top_cluetype": "379",
|
|
|
|
+ "sub_cluetype": "380",
|
|
|
|
+ "trailstatus": "01",
|
|
|
|
+ "name": name,
|
|
|
|
+ "phone": phone,
|
|
|
|
+ "comeintime_open": nowTime,
|
|
|
|
+ "comeinsource_open": 2,
|
|
})
|
|
})
|
|
if clueId > 0 {
|
|
if clueId > 0 {
|
|
- TiDb.Insert("dwd_f_crm_open_sea", map[string]interface{}{
|
|
|
|
- "clue_id": clueId,
|
|
|
|
- "comeintime": nowTime,
|
|
|
|
- "comeinsource": 2,
|
|
|
|
- })
|
|
|
|
TiDb.Insert("dwd_f_userbase_contacts", map[string]interface{}{
|
|
TiDb.Insert("dwd_f_userbase_contacts", map[string]interface{}{
|
|
"status": 1,
|
|
"status": 1,
|
|
"is_delete": 1,
|
|
"is_delete": 1,
|
|
@@ -406,12 +408,6 @@ func FormatData(data map[string]interface{}, item string) (bool, bool) {
|
|
position_id, seatNumber, saleName, saleData := autoDraw(level)
|
|
position_id, seatNumber, saleName, saleData := autoDraw(level)
|
|
log.Println("data -------", position_id, seatNumber, saleName)
|
|
log.Println("data -------", position_id, seatNumber, saleName)
|
|
if position_id > 0 && seatNumber != "" {
|
|
if position_id > 0 && seatNumber != "" {
|
|
- // if TiDb.Count("dwd_f_crm_private_sea", map[string]interface{}{"position_id": position_id}) >= cfg.CountLimit {
|
|
|
|
- // log.Println("线索分配失败,私海线索数据超过限制", item, position_id, seatNumber, uId, userId, phone)
|
|
|
|
- // TiDb.UpdateOrDeleteBySql(`update dwd_f_crm_clue_autodraw_record set count = count + 1 where seatNumber = ? and clue_level = ?`, seatNumber, level)
|
|
|
|
- // return false, false
|
|
|
|
- // // position_id, seatNumber, saleName, saleData = autoDraw(level)
|
|
|
|
- // }
|
|
|
|
uCount, oks := TiDb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"uid": uId}, "", ""), true
|
|
uCount, oks := TiDb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"uid": uId}, "", ""), true
|
|
if uCount != nil && len(*uCount) > 0 {
|
|
if uCount != nil && len(*uCount) > 0 {
|
|
oks = UpdateClue(*uCount, saleData, item, userId, uId, top_cluetype, sub_cluetype, topname, subname, cluename, name, saleName, phone, position, department, industry, follow_project_area, role, seatNumber, position_id, source)
|
|
oks = UpdateClue(*uCount, saleData, item, userId, uId, top_cluetype, sub_cluetype, topname, subname, cluename, name, saleName, phone, position, department, industry, follow_project_area, role, seatNumber, position_id, source)
|
|
@@ -431,43 +427,36 @@ func FormatData(data map[string]interface{}, item string) (bool, bool) {
|
|
func SaveClue(item, userId, uId, top_cluetype, sub_cluetype, topname, subname, cluename, name, saleName, phone, position, department, industry, follow_project_area, role, seatNumber string, positionId int64, source int) bool {
|
|
func SaveClue(item, userId, uId, top_cluetype, sub_cluetype, topname, subname, cluename, name, saleName, phone, position, department, industry, follow_project_area, role, seatNumber string, positionId int64, source int) bool {
|
|
nowTime := time.Now().Format("2006-01-02 15:04:05")
|
|
nowTime := time.Now().Format("2006-01-02 15:04:05")
|
|
nowTimes := time.Unix(time.Now().Unix()+3600*12, 0).Format("2006-01-02 15:04:05")
|
|
nowTimes := time.Unix(time.Now().Unix()+3600*12, 0).Format("2006-01-02 15:04:05")
|
|
- clueId, seaId, uodateId1, uodateId2, uodateId3, uodateId4, uodateId5, uodateId6 := int64(0), int64(0), int64(0), int64(0), int64(0), int64(0), int64(0), int64(0)
|
|
|
|
|
|
+ clueId, uodateId1, uodateId2, uodateId3, uodateId4, uodateId5, uodateId6 := int64(0), int64(0), int64(0), int64(0), int64(0), int64(0), int64(0)
|
|
// BCPCID := common.GetRandom(32)
|
|
// BCPCID := common.GetRandom(32)
|
|
if TiDb.ExecTx("保存线索", func(tx *sql.Tx) bool {
|
|
if TiDb.ExecTx("保存线索", func(tx *sql.Tx) bool {
|
|
//线索
|
|
//线索
|
|
clueId = TiDb.InsertByTx(tx, "dwd_f_crm_clue_info", map[string]interface{}{
|
|
clueId = TiDb.InsertByTx(tx, "dwd_f_crm_clue_info", map[string]interface{}{
|
|
- "userid": userId,
|
|
|
|
- "uid": uId,
|
|
|
|
- "seatNumber": seatNumber,
|
|
|
|
- "position_id": positionId,
|
|
|
|
- "is_assign": 1,
|
|
|
|
- "comeintime": nowTime,
|
|
|
|
- "createtime": nowTime,
|
|
|
|
- "updatetime": nowTime,
|
|
|
|
- "cluename": cluename,
|
|
|
|
- "top_cluetype": top_cluetype,
|
|
|
|
- "sub_cluetype": sub_cluetype,
|
|
|
|
- "trailstatus": "01",
|
|
|
|
- "name": name,
|
|
|
|
- "phone": phone,
|
|
|
|
- "position": position,
|
|
|
|
- "department": department,
|
|
|
|
- "industry": industry,
|
|
|
|
- "follow_project_area": follow_project_area,
|
|
|
|
- "role": role,
|
|
|
|
- })
|
|
|
|
- //私海 --> 任务车
|
|
|
|
- seaId = TiDb.InsertByTx(tx, "dwd_f_crm_private_sea", map[string]interface{}{
|
|
|
|
- "clue_id": clueId,
|
|
|
|
- "seatNumber": seatNumber,
|
|
|
|
- "position_id": positionId,
|
|
|
|
- "comeintime": nowTime,
|
|
|
|
- "comeinsource": 2,
|
|
|
|
- "is_task": 1,
|
|
|
|
- "task_time": nowTime,
|
|
|
|
- "tasktime": common.If(item == "users", nowTimes, nowTime),
|
|
|
|
- "taskstatus": 0,
|
|
|
|
- "tasksource": "线索自动分配" + "-" + topname + "-" + subname,
|
|
|
|
|
|
+ "userid": userId,
|
|
|
|
+ "uid": uId,
|
|
|
|
+ "seatNumber": seatNumber,
|
|
|
|
+ "position_id": positionId,
|
|
|
|
+ "is_assign": 1,
|
|
|
|
+ "comeintime": nowTime,
|
|
|
|
+ "createtime": nowTime,
|
|
|
|
+ "updatetime": nowTime,
|
|
|
|
+ "cluename": cluename,
|
|
|
|
+ "top_cluetype": top_cluetype,
|
|
|
|
+ "sub_cluetype": sub_cluetype,
|
|
|
|
+ "trailstatus": "01",
|
|
|
|
+ "name": name,
|
|
|
|
+ "phone": phone,
|
|
|
|
+ "position": position,
|
|
|
|
+ "department": department,
|
|
|
|
+ "industry": industry,
|
|
|
|
+ "follow_project_area": follow_project_area,
|
|
|
|
+ "role": role,
|
|
|
|
+ "comeinsource_private": 2,
|
|
|
|
+ "is_task": 1,
|
|
|
|
+ "task_time": nowTime,
|
|
|
|
+ "tasktime": common.If(item == "users", nowTimes, nowTime),
|
|
|
|
+ "taskstatus": 0,
|
|
|
|
+ "tasksource": "线索自动分配" + "-" + topname + "-" + subname,
|
|
})
|
|
})
|
|
//变更记录
|
|
//变更记录
|
|
uodateId1 = TiDb.InsertByTx(tx, "dwd_f_crm_clue_change_record", map[string]interface{}{
|
|
uodateId1 = TiDb.InsertByTx(tx, "dwd_f_crm_clue_change_record", map[string]interface{}{
|
|
@@ -532,7 +521,7 @@ func SaveClue(item, userId, uId, top_cluetype, sub_cluetype, topname, subname, c
|
|
"BCPCID": common.GetRandom(32),
|
|
"BCPCID": common.GetRandom(32),
|
|
"operator_id": -1,
|
|
"operator_id": -1,
|
|
})
|
|
})
|
|
- return clueId > -1 && seaId > -1 && uodateId1 > -1 && uodateId2 > -1 && uodateId3 > -1 && uodateId4 > -1 && uodateId5 > -1 && uodateId6 > -1
|
|
|
|
|
|
+ return clueId > -1 && uodateId1 > -1 && uodateId2 > -1 && uodateId3 > -1 && uodateId4 > -1 && uodateId5 > -1 && uodateId6 > -1
|
|
}) {
|
|
}) {
|
|
log.Println("线索分配成功")
|
|
log.Println("线索分配成功")
|
|
if TiDb.Count("dwd_f_userbase_contacts", map[string]interface{}{"phone": phone}) == 0 {
|
|
if TiDb.Count("dwd_f_userbase_contacts", map[string]interface{}{"phone": phone}) == 0 {
|
|
@@ -548,7 +537,7 @@ func SaveClue(item, userId, uId, top_cluetype, sub_cluetype, topname, subname, c
|
|
}
|
|
}
|
|
return true
|
|
return true
|
|
} else {
|
|
} else {
|
|
- log.Println("线索分配失败!!!", clueId, seaId, uodateId1, uodateId2, uodateId3, uodateId4, uodateId5, uodateId6, " 用户信息 ", item, position, seatNumber, uId, userId, phone)
|
|
|
|
|
|
+ log.Println("线索分配失败!!!", clueId, uodateId1, uodateId2, uodateId3, uodateId4, uodateId5, uodateId6, " 用户信息 ", item, position, seatNumber, uId, userId, phone)
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -569,12 +558,12 @@ func UpdateClue(data map[string]interface{}, saleData []map[string]interface{},
|
|
oldsaleName, oldTaskTime, taskTime, is_task, taskstatus := "", "", "", 0, 0
|
|
oldsaleName, oldTaskTime, taskTime, is_task, taskstatus := "", "", "", 0, 0
|
|
old_position_id, old_seatNumber := common.Int64All(data["position_id"]), common.ObjToString(data["seatNumber"])
|
|
old_position_id, old_seatNumber := common.Int64All(data["position_id"]), common.ObjToString(data["seatNumber"])
|
|
//已在任务车的判断任务时间
|
|
//已在任务车的判断任务时间
|
|
- privateData := TiDb.FindOne("dwd_f_crm_private_sea", map[string]interface{}{"clue_id": clueId}, "", "")
|
|
|
|
- if privateData != nil && len(*privateData) > 0 {
|
|
|
|
- oldTaskTime = common.ObjToString((*privateData)["tasktime"])
|
|
|
|
- is_task = common.IntAll(data["is_task"])
|
|
|
|
- taskstatus = common.IntAll(data["taskstatus"])
|
|
|
|
- }
|
|
|
|
|
|
+ // privateData := TiDb.FindOne("dwd_f_crm_private_sea", map[string]interface{}{"clue_id": clueId}, "", "")
|
|
|
|
+ // if privateData != nil && len(*privateData) > 0 {
|
|
|
|
+ oldTaskTime = common.ObjToString(data["tasktime"])
|
|
|
|
+ is_task = common.IntAll(data["is_task"])
|
|
|
|
+ taskstatus = common.IntAll(data["taskstatus"])
|
|
|
|
+ // }
|
|
if taskstatus == 1 || is_task == 0 {
|
|
if taskstatus == 1 || is_task == 0 {
|
|
taskTime = common.ObjToString(common.If(item != "users", nowTime, nowTimes))
|
|
taskTime = common.ObjToString(common.If(item != "users", nowTime, nowTimes))
|
|
} else {
|
|
} else {
|
|
@@ -622,25 +611,27 @@ func UpdateClue(data map[string]interface{}, saleData []map[string]interface{},
|
|
recordCount := TiDb.CountBySql(`select count(1) from dwd_f_crm_trail_content where clue_id = ? and createtime > ?`, clueId, t.AddDate(0, 0, -count).Format(date.Date_Full_Layout))
|
|
recordCount := TiDb.CountBySql(`select count(1) from dwd_f_crm_trail_content where clue_id = ? and createtime > ?`, clueId, t.AddDate(0, 0, -count).Format(date.Date_Full_Layout))
|
|
//
|
|
//
|
|
clueUpdateData := map[string]interface{}{
|
|
clueUpdateData := map[string]interface{}{
|
|
- "updatetime": nowTime,
|
|
|
|
- "top_cluetype": top_cluetype,
|
|
|
|
- "sub_cluetype": sub_cluetype,
|
|
|
|
- "userid": userId,
|
|
|
|
- }
|
|
|
|
- seaUpdateData := map[string]interface{}{
|
|
|
|
- "comeinsource": 2,
|
|
|
|
- "tasksource": "线索来源自动更新" + "-" + topname + "-" + subname,
|
|
|
|
- }
|
|
|
|
- insertSeaData := map[string]interface{}{
|
|
|
|
- "clue_id": clueId,
|
|
|
|
- "comeintime": nowTime,
|
|
|
|
- "comeinsource": 2,
|
|
|
|
- "is_task": 1,
|
|
|
|
- "task_time": nowTime,
|
|
|
|
- "tasktime": taskTime,
|
|
|
|
- "taskstatus": 0,
|
|
|
|
- "tasksource": "线索来源自动更新" + "-" + topname + "-" + subname,
|
|
|
|
|
|
+ "updatetime": nowTime,
|
|
|
|
+ "top_cluetype": top_cluetype,
|
|
|
|
+ "sub_cluetype": sub_cluetype,
|
|
|
|
+ "userid": userId,
|
|
|
|
+ "comeinsource_private": 2,
|
|
|
|
+ "tasksource": "线索来源自动更新" + "-" + topname + "-" + subname,
|
|
}
|
|
}
|
|
|
|
+ // seaUpdateData := map[string]interface{}{
|
|
|
|
+ // "comeinsource": 2,
|
|
|
|
+ // "tasksource": "线索来源自动更新" + "-" + topname + "-" + subname,
|
|
|
|
+ // }
|
|
|
|
+ // insertSeaData := map[string]interface{}{
|
|
|
|
+ // "clue_id": clueId,
|
|
|
|
+ // "comeintime": nowTime,
|
|
|
|
+ // "comeinsource": 2,
|
|
|
|
+ // "is_task": 1,
|
|
|
|
+ // "task_time": nowTime,
|
|
|
|
+ // "tasktime": taskTime,
|
|
|
|
+ // "taskstatus": 0,
|
|
|
|
+ // "tasksource": "线索来源自动更新" + "-" + topname + "-" + subname,
|
|
|
|
+ // }
|
|
if cluename != "" {
|
|
if cluename != "" {
|
|
clueUpdateData["cluename"] = cluename
|
|
clueUpdateData["cluename"] = cluename
|
|
}
|
|
}
|
|
@@ -659,11 +650,11 @@ func UpdateClue(data map[string]interface{}, saleData []map[string]interface{},
|
|
clueUpdateData["position_id"] = positionId
|
|
clueUpdateData["position_id"] = positionId
|
|
clueUpdateData["comeintime"] = nowTime
|
|
clueUpdateData["comeintime"] = nowTime
|
|
clueUpdateData["is_assign"] = 1
|
|
clueUpdateData["is_assign"] = 1
|
|
- seaUpdateData["seatNumber"] = seatNumber
|
|
|
|
- seaUpdateData["position_id"] = positionId
|
|
|
|
- seaUpdateData["comeintime"] = nowTime
|
|
|
|
- insertSeaData["seatNumber"] = seatNumber
|
|
|
|
- insertSeaData["position_id"] = positionId
|
|
|
|
|
|
+ // seaUpdateData["seatNumber"] = seatNumber
|
|
|
|
+ // seaUpdateData["position_id"] = positionId
|
|
|
|
+ // seaUpdateData["comeintime"] = nowTime
|
|
|
|
+ // insertSeaData["seatNumber"] = seatNumber
|
|
|
|
+ // insertSeaData["position_id"] = positionId
|
|
for _, v := range saleData {
|
|
for _, v := range saleData {
|
|
if common.ObjToString(data["seatNumber"]) == common.ObjToString(v["seatNumber"]) {
|
|
if common.ObjToString(data["seatNumber"]) == common.ObjToString(v["seatNumber"]) {
|
|
oldsaleName = common.ObjToString(v["name"])
|
|
oldsaleName = common.ObjToString(v["name"])
|
|
@@ -671,8 +662,11 @@ func UpdateClue(data map[string]interface{}, saleData []map[string]interface{},
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- insertSeaData["seatNumber"] = old_seatNumber
|
|
|
|
- insertSeaData["position_id"] = old_position_id
|
|
|
|
|
|
+ // insertSeaData["seatNumber"] = old_seatNumber
|
|
|
|
+ // insertSeaData["position_id"] = old_position_id
|
|
|
|
+ clueUpdateData["seatNumber"] = old_seatNumber
|
|
|
|
+ clueUpdateData["position_id"] = old_position_id
|
|
|
|
+ clueUpdateData["is_assign"] = 1
|
|
}
|
|
}
|
|
if trailstatus != "08" && is_assign == 0 {
|
|
if trailstatus != "08" && is_assign == 0 {
|
|
if trailstatus == "00" && trailstatusTime != "" && time.Now().Unix()-trailstatusTimes.Unix() < 86400 {
|
|
if trailstatus == "00" && trailstatusTime != "" && time.Now().Unix()-trailstatusTimes.Unix() < 86400 {
|
|
@@ -684,28 +678,32 @@ func UpdateClue(data map[string]interface{}, saleData []map[string]interface{},
|
|
if (trailstatus != "08" && recordCount <= 0) || is_assign == 0 {
|
|
if (trailstatus != "08" && recordCount <= 0) || is_assign == 0 {
|
|
if trailstatus == "00" && trailstatusTime != "" && time.Now().Unix()-trailstatusTimes.Unix() < 86400 {
|
|
if trailstatus == "00" && trailstatusTime != "" && time.Now().Unix()-trailstatusTimes.Unix() < 86400 {
|
|
} else {
|
|
} else {
|
|
- seaUpdateData["is_task"] = 1
|
|
|
|
- seaUpdateData["task_time"] = nowTime
|
|
|
|
- seaUpdateData["tasktime"] = taskTime
|
|
|
|
- seaUpdateData["taskstatus"] = 0
|
|
|
|
|
|
+ // seaUpdateData["is_task"] = 1
|
|
|
|
+ // seaUpdateData["task_time"] = nowTime
|
|
|
|
+ // seaUpdateData["tasktime"] = taskTime
|
|
|
|
+ // seaUpdateData["taskstatus"] = 0
|
|
|
|
+ clueUpdateData["is_task"] = 1
|
|
|
|
+ clueUpdateData["task_time"] = nowTime
|
|
|
|
+ clueUpdateData["tasktime"] = taskTime
|
|
|
|
+ clueUpdateData["taskstatus"] = 0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- ok, ok1, ok2, seaId := true, true, true, int64(0)
|
|
|
|
|
|
+ ok := true
|
|
updateId1, updateId2, updateId3, updateId4, updateId5 := int64(0), int64(0), int64(0), int64(0), int64(0)
|
|
updateId1, updateId2, updateId3, updateId4, updateId5 := int64(0), int64(0), int64(0), int64(0), int64(0)
|
|
updateId6, updateId7, updateId8, updateId9, updateId10 := int64(0), int64(0), int64(0), int64(0), int64(0)
|
|
updateId6, updateId7, updateId8, updateId9, updateId10 := int64(0), int64(0), int64(0), int64(0), int64(0)
|
|
updateId11, updateId12, updateId13 := int64(0), int64(0), int64(0)
|
|
updateId11, updateId12, updateId13 := int64(0), int64(0), int64(0)
|
|
if TiDb.ExecTx("更新线索", func(tx *sql.Tx) bool {
|
|
if TiDb.ExecTx("更新线索", func(tx *sql.Tx) bool {
|
|
//线索
|
|
//线索
|
|
ok = TiDb.UpdateByTx(tx, "dwd_f_crm_clue_info", map[string]interface{}{"uid": uId}, clueUpdateData)
|
|
ok = TiDb.UpdateByTx(tx, "dwd_f_crm_clue_info", map[string]interface{}{"uid": uId}, clueUpdateData)
|
|
- if is_assign == 1 {
|
|
|
|
- ok1 = TiDb.UpdateByTx(tx, "dwd_f_crm_private_sea", map[string]interface{}{"clue_id": clueId}, seaUpdateData)
|
|
|
|
- } else {
|
|
|
|
- if trailstatus == "00" && trailstatusTime != "" && time.Now().Unix()-trailstatusTimes.Unix() < 86400 {
|
|
|
|
- } else {
|
|
|
|
- ok2 = TiDb.Delete("dwd_f_crm_open_sea", map[string]interface{}{"clue_id": clueId})
|
|
|
|
- seaId = TiDb.InsertByTx(tx, "dwd_f_crm_private_sea", insertSeaData)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ // if is_assign == 1 {
|
|
|
|
+ // ok1 = TiDb.UpdateByTx(tx, "dwd_f_crm_private_sea", map[string]interface{}{"clue_id": clueId}, seaUpdateData)
|
|
|
|
+ // } else {
|
|
|
|
+ // if trailstatus == "00" && trailstatusTime != "" && time.Now().Unix()-trailstatusTimes.Unix() < 86400 {
|
|
|
|
+ // } else {
|
|
|
|
+ // ok2 = TiDb.Delete("dwd_f_crm_open_sea", map[string]interface{}{"clue_id": clueId})
|
|
|
|
+ // seaId = TiDb.InsertByTx(tx, "dwd_f_crm_private_sea", insertSeaData)
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
//变更记录
|
|
//变更记录
|
|
if (trailstatus == "00" || old_position_id == 0) && is_assign == 1 {
|
|
if (trailstatus == "00" || old_position_id == 0) && is_assign == 1 {
|
|
if trailstatus == "00" && trailstatusTime != "" && time.Now().Unix()-trailstatusTimes.Unix() < 86400 {
|
|
if trailstatus == "00" && trailstatusTime != "" && time.Now().Unix()-trailstatusTimes.Unix() < 86400 {
|
|
@@ -816,8 +814,6 @@ func UpdateClue(data map[string]interface{}, saleData []map[string]interface{},
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- log.Println("trailstatusTime ", trailstatusTime)
|
|
|
|
- log.Println("trailstatusTimes.Unix() ", trailstatusTimes.Unix(), time.Now().Unix()-trailstatusTimes.Unix())
|
|
|
|
if trailstatus != "08" && recordCount <= 0 {
|
|
if trailstatus != "08" && recordCount <= 0 {
|
|
if trailstatus == "00" && trailstatusTime != "" && time.Now().Unix()-trailstatusTimes.Unix() < 86400 {
|
|
if trailstatus == "00" && trailstatusTime != "" && time.Now().Unix()-trailstatusTimes.Unix() < 86400 {
|
|
} else {
|
|
} else {
|
|
@@ -970,7 +966,7 @@ func UpdateClue(data map[string]interface{}, saleData []map[string]interface{},
|
|
"operator_id": -1,
|
|
"operator_id": -1,
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- return ok && ok1 && seaId > -1 && updateId1 > -1 && updateId2 > -1 && updateId3 > -1 && updateId4 > -1 && updateId5 > -1 && updateId6 > -1 && updateId7 > -1 && updateId8 > -1 && updateId9 > -1 && updateId10 > -1 && updateId11 > -1 && updateId12 > -1 && updateId13 > -1
|
|
|
|
|
|
+ return ok && updateId1 > -1 && updateId2 > -1 && updateId3 > -1 && updateId4 > -1 && updateId5 > -1 && updateId6 > -1 && updateId7 > -1 && updateId8 > -1 && updateId9 > -1 && updateId10 > -1 && updateId11 > -1 && updateId12 > -1 && updateId13 > -1
|
|
}) {
|
|
}) {
|
|
log.Println("线索更新成功")
|
|
log.Println("线索更新成功")
|
|
if TiDb.Count("dwd_f_userbase_contacts", map[string]interface{}{"phone": phone}) == 0 {
|
|
if TiDb.Count("dwd_f_userbase_contacts", map[string]interface{}{"phone": phone}) == 0 {
|
|
@@ -986,7 +982,7 @@ func UpdateClue(data map[string]interface{}, saleData []map[string]interface{},
|
|
}
|
|
}
|
|
return true
|
|
return true
|
|
} else {
|
|
} else {
|
|
- log.Println("线索更新失败!!!", ok, ok1, ok2, seaId, updateId1, updateId2, updateId3, updateId4, updateId5, updateId6, updateId7, updateId8, updateId9, updateId10, updateId11, updateId12, updateId13, " 用户信息 ", item, position, seatNumber, uId, userId, phone)
|
|
|
|
|
|
+ log.Println("线索更新失败!!!", ok, updateId1, updateId2, updateId3, updateId4, updateId5, updateId6, updateId7, updateId8, updateId9, updateId10, updateId11, updateId12, updateId13, " 用户信息 ", item, position, seatNumber, uId, userId, phone)
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
}
|
|
}
|