Commit 860b4e73 by 朱继来

删除释放同步会员系统

parent c3f3961c
Showing with 1 additions and 12 deletions
......@@ -80,22 +80,11 @@ func CompareTime(user_id, limit_follow_time int) {
return
}
free_str := "释放用户"
// 删除跟进记录
dao.GetDb().Exec("delete from lie_salesman where user_id = ?", user_id)
// 解绑会员系统绑定关系
var invoice_com_user_id int
dao.GetLiexinDb().Get(&invoice_com_user_id, "select id from lie_invoice_com_user where user_id = ?, sale_type = ?", user_info.Outter_uid, 1)
if (invoice_com_user_id != 0) {
dao.GetLiexinDb().Exec("update lie_invoice_com_user set status = ? where id = ?", 1, invoice_com_user_id)
free_str += ",已同步解除会员系统的用户绑定关系"
}
// 添加释放日志
dao.GetDb().Exec("insert into lie_action_log (user_id, type, event, remark, create_time) values (?, ?, ?, ?, ?)", user_id, 2, free_str, "", curr_time)
dao.GetDb().Exec("insert into lie_action_log (user_id, type, event, remark, create_time) values (?, ?, ?, ?, ?)", user_id, 2, "释放用户", "", curr_time)
service.DingAlert(configs.Ding_crm_task_token, "任务告警:释放用户成功,CRM用户ID:"+ strconv.Itoa(user_id), "")
} else if diff <= 7 * 86400 { // 设置为即将流失用户
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment