Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CnChunfeng
/
crm_server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
be86df7a
authored
Mar 19, 2021
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
释放用户解除会员系统绑定
parent
5195d530
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletions
cmd/follow/handle/set_free.go
internal/model/liexin/Invoice_com_user.go
cmd/follow/handle/set_free.go
View file @
be86df7a
...
...
@@ -80,11 +80,22 @@ 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
,
"释放用户"
,
""
,
curr_time
)
dao
.
GetDb
()
.
Exec
(
"insert into lie_action_log (user_id, type, event, remark, create_time) values (?, ?, ?, ?, ?)"
,
user_id
,
2
,
free_str
,
""
,
curr_time
)
service
.
DingAlert
(
configs
.
Ding_crm_task_token
,
"任务告警:释放用户成功,CRM用户ID:"
+
strconv
.
Itoa
(
user_id
),
""
)
}
else
if
diff
<=
7
*
86400
{
// 设置为即将流失用户
...
...
internal/model/liexin/Invoice_com_user.go
0 → 100644
View file @
be86df7a
package
liexin
type
InvoiceComUser
struct
{
Id
int
`json:"id" db:"id"`
Com_id
int
`json:"com_id" db:"com_id"`
User_Id
int
`json:"user_id" db:"user_id"`
Sale_Id
int
`json:"sale_id" db:"sale_id"`
Status
int
`json:"status" db:"status"`
Sale_Type
int
`json:"sale_type" db:"sale_type"`
Create_Time
int64
`json:"create_time" db:"create_time"`
Update_Time
int64
`json:"update_time" db:"update_time"`
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment