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
70b358da
authored
Sep 09, 2021
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整释放
parent
6234912f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
cmd/follow/handle/salesman.go
cmd/follow/handle/set_free.go
cmd/follow/handle/salesman.go
View file @
70b358da
...
...
@@ -42,14 +42,22 @@ func UpdateLimitFollowTime() {
var
sales
model
.
Salesman
err
=
row
.
StructScan
(
&
sales
)
// 2-1、检查是否为线上销售
is_online_sales
:=
IsOnlineSales
(
sales
.
Sale_Id
)
// 检查用户渠道,若为线上渠道则执行释放,否则跳过
var
user_info
model
.
Users
dao
.
GetNewDb
()
.
Get
(
&
user_info
,
"select * from lie_user where user_id = ?"
,
sales
.
User_Id
)
if
!
is_online_sales
{
// 若不属于线上销售,则跳出本次循环
dao
.
GetDb
()
.
Exec
(
"update lie_salesman set sys_limit = ? where user_id = ?"
,
-
1
,
sales
.
User_Id
)
if
user_info
.
Channel_type
!=
1
{
continue
}
// 2-1、检查是否为线上销售
//is_online_sales := IsOnlineSales(sales.Sale_Id)
//
//if !is_online_sales { // 若不属于线上销售,则跳出本次循环
// dao.GetDb().Exec("update lie_salesman set sys_limit = ? where user_id = ?", -1, sales.User_Id)
// continue
//}
// 2-2、计算限制时间
limit_follow_time
:=
CalLimitFollowTime
(
sales
.
User_Id
,
sales
.
Assign_Time
)
...
...
cmd/follow/handle/set_free.go
View file @
70b358da
...
...
@@ -85,7 +85,7 @@ func CompareTime(user_id, limit_follow_time int) {
// 清理新的关联表
var
timeNow
=
time
.
Now
()
.
Unix
()
dao
.
GetDb
()
.
Exec
(
"update `lie_invoice_com_user` set sale_id
= ?, update_time = ? where user_id = ?"
,
0
,
timeNow
,
user_info
.
Outter_uid
)
dao
.
GetDb
()
.
Exec
(
"update `lie_invoice_com_user` set sale_id
= ?, department_id = ?, update_time = ? where user_id = ?"
,
0
,
0
,
timeNow
,
user_info
.
Outter_uid
)
// 添加释放日志
dao
.
GetDb
()
.
Exec
(
"insert into lie_action_log (user_id, type, event, remark, create_time) values (?, ?, ?, ?, ?)"
,
user_id
,
2
,
"释放用户"
,
""
,
curr_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