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
d2e12805
authored
Apr 12, 2021
by
Joneq
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
提交代码
parent
860b4e73
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
internal/logic/crm_user.go
internal/logic/crm_user.go
View file @
d2e12805
...
@@ -20,6 +20,9 @@ const INSERTISCREATEORDER = "INSERT INTO `lie_user_extend` (`user_id`, `no_crea
...
@@ -20,6 +20,9 @@ const INSERTISCREATEORDER = "INSERT INTO `lie_user_extend` (`user_id`, `no_crea
const
INSERTSALES
=
"INSERT INTO `lie_salesman` (`user_id`, `sale_id`,`assign_time`, `update_time`)VALUES(?,?,?,?)"
const
INSERTSALES
=
"INSERT INTO `lie_salesman` (`user_id`, `sale_id`,`assign_time`, `update_time`)VALUES(?,?,?,?)"
const
INSERTINVOICECOMUSER
=
"INSERT INTO `lie_invoice_com_user` (`com_id`, `user_id`, `sale_id`, `sale_type`, `create_time`)VALUES( ?, ?, ?, ?, ?)"
//检测会员用户是否存在
//检测会员用户是否存在
func
CheckMemberIdIsHave
(
memberId
int
)(
returnUserId
int
){
func
CheckMemberIdIsHave
(
memberId
int
)(
returnUserId
int
){
...
@@ -78,6 +81,13 @@ func InsertMemberUser(memberInfo model.MemberAddUserData)bool {
...
@@ -78,6 +81,13 @@ func InsertMemberUser(memberInfo model.MemberAddUserData)bool {
}
}
}
}
//插入用户关联关系 20200406新增
insertResult
,
err
=
dbTran
.
Exec
(
INSERTINVOICECOMUSER
,
memberInfo
.
Com_Id
,
memberInfo
.
User_Id
,
memberInfo
.
Sale_Id
,
memberInfo
.
Channel_type
,
memberInfo
.
Create_Time
)
if
err
!=
nil
{
service
.
WriteErrDetail
(
"插入用户数据错误:插入用户关联关系"
+
err
.
Error
())
err
=
dbTran
.
Rollback
()
return
false
}
//插入公司
//插入公司
insertResult
,
err
=
dbTran
.
Exec
(
INSERTCOMPANY
,
lastInsertId
,
memberInfo
.
Com_Name
,
memberInfo
.
Com_Full_addr
,
memberInfo
.
Com_Telphone
,
memberInfo
.
Com_Fax
,
""
,
memberInfo
.
Com_Desc
,
memberInfo
.
Create_Time
)
insertResult
,
err
=
dbTran
.
Exec
(
INSERTCOMPANY
,
lastInsertId
,
memberInfo
.
Com_Name
,
memberInfo
.
Com_Full_addr
,
memberInfo
.
Com_Telphone
,
memberInfo
.
Com_Fax
,
""
,
memberInfo
.
Com_Desc
,
memberInfo
.
Create_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