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
b6d45394
authored
Mar 22, 2021
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
添加线上线下用户字段
parent
be86df7a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
7 deletions
cmd/queue/user_add/main.go
internal/logic/crm_user.go
internal/logic/member_user.go
internal/model/member_user.go
cmd/queue/user_add/main.go
View file @
b6d45394
...
@@ -25,7 +25,6 @@ type WaitAddUser struct {
...
@@ -25,7 +25,6 @@ type WaitAddUser struct {
//监听用户添加队列
//监听用户添加队列
func
main
(){
func
main
(){
//定义队列类型和错误类型
//定义队列类型和错误类型
service
.
ProGramErrType
=
"member_user_add"
service
.
ProGramErrType
=
"member_user_add"
//设置所有城市
//设置所有城市
...
...
internal/logic/crm_user.go
View file @
b6d45394
...
@@ -9,8 +9,8 @@ import (
...
@@ -9,8 +9,8 @@ import (
)
)
const
INSERTCRMUSER
=
"INSERT INTO `lie_user` ("
+
const
INSERTCRMUSER
=
"INSERT INTO `lie_user` ("
+
"`outter_uid`, `source`,`adtag`, `mobile`,`email`, `create_time`,`copy_ctime`, `customer_identity`,`name`, `channel_source`,`remark`,`ptag`,`channel_source_other`"
+
"`outter_uid`, `source`,`adtag`, `mobile`,`email`, `create_time`,`copy_ctime`, `customer_identity`,`name`, `channel_source`,`remark`,`ptag`,`channel_source_other`
, `channel_type`
"
+
")VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)"
")VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?
,?
)"
const
INSERTCOMPANY
=
"INSERT INTO `lie_user_company` ("
+
const
INSERTCOMPANY
=
"INSERT INTO `lie_user_company` ("
+
"`user_id`, `com_name`,`address`, `fixed_tel`,`fax`, `main_brand`,`com_desc`, `create_time`)VALUES(?,?,?,?,?,?,?,?)"
"`user_id`, `com_name`,`address`, `fixed_tel`,`fax`, `main_brand`,`com_desc`, `create_time`)VALUES(?,?,?,?,?,?,?,?)"
...
@@ -33,7 +33,8 @@ func InsertMemberUser(memberInfo model.MemberAddUserData)bool {
...
@@ -33,7 +33,8 @@ func InsertMemberUser(memberInfo model.MemberAddUserData)bool {
//开启事务,增加用户数据
//开启事务,增加用户数据
dbTran
,
_
:=
dao
.
GetDb
()
.
Begin
()
dbTran
,
_
:=
dao
.
GetDb
()
.
Begin
()
insertResult
,
err
:=
dbTran
.
Exec
(
INSERTCRMUSER
,
memberInfo
.
User_Id
,
memberInfo
.
Source
,
memberInfo
.
Adtag
,
memberInfo
.
Mobile
,
memberInfo
.
Email
,
memberInfo
.
Create_Time
,
memberInfo
.
Create_Time
,
memberInfo
.
Customer_identity
,
memberInfo
.
User_Name
,
memberInfo
.
Channel_source
,
memberInfo
.
Remark
,
memberInfo
.
Ptag
,
""
)
insertResult
,
err
:=
dbTran
.
Exec
(
INSERTCRMUSER
,
memberInfo
.
User_Id
,
memberInfo
.
Source
,
memberInfo
.
Adtag
,
memberInfo
.
Mobile
,
memberInfo
.
Email
,
memberInfo
.
Create_Time
,
memberInfo
.
Create_Time
,
memberInfo
.
Customer_identity
,
memberInfo
.
User_Name
,
memberInfo
.
Channel_source
,
memberInfo
.
Remark
,
memberInfo
.
Ptag
,
""
,
memberInfo
.
Channel_type
)
if
err
!=
nil
{
if
err
!=
nil
{
service
.
WriteErrDetail
(
"插入用户数据错误:增加用户数据"
+
err
.
Error
())
service
.
WriteErrDetail
(
"插入用户数据错误:增加用户数据"
+
err
.
Error
())
...
...
internal/logic/member_user.go
View file @
b6d45394
...
@@ -26,7 +26,7 @@ const(
...
@@ -26,7 +26,7 @@ const(
//获取会员系统的用户数据sql
//获取会员系统的用户数据sql
const
GETMEMBERUSER
=
"select `lie_u`.`user_id`, `lie_u`.`mobile`, `lie_u`.`user_name`, `lie_u`.`email`,"
+
const
GETMEMBERUSER
=
"select `lie_u`.`user_id`, `lie_u`.`mobile`, `lie_u`.`user_name`, `lie_u`.`email`,"
+
" `lie_u`.`reg_remark`, `lie_u`.`create_device`, `lie_u`.`create_time`, `lie_c`.`com_id`, `lie_c`.`type_id`,"
+
" `lie_u`.`reg_remark`, `lie_u`.`create_device`, `lie_u`.`create_time`, `lie_
u`.`channel_type`, `lie_
c`.`com_id`, `lie_c`.`type_id`,"
+
" `lie_c`.`com_name`, `lie_c`.`com_desc`, `lie_c`.`com_province_id`, `lie_c`.`com_city_id`, `lie_c`.`com_area_id`,"
+
" `lie_c`.`com_name`, `lie_c`.`com_desc`, `lie_c`.`com_province_id`, `lie_c`.`com_city_id`, `lie_c`.`com_area_id`,"
+
" `lie_c`.`com_address`, `lie_c`.`com_telphone`, `lie_c`.`com_fax`, `lie_c`.`brand_list`, `lie_i`.`work_function`,"
+
" `lie_c`.`com_address`, `lie_c`.`com_telphone`, `lie_c`.`com_fax`, `lie_c`.`brand_list`, `lie_i`.`work_function`,"
+
" `lie_i`.`user_type`, `lie_i`.`sale_id` as `userinfo_sale_id` from `lie_user_main` as `lie_u` left join `lie_user_info` as "
+
" `lie_i`.`user_type`, `lie_i`.`sale_id` as `userinfo_sale_id` from `lie_user_main` as `lie_u` left join `lie_user_info` as "
+
...
...
internal/model/member_user.go
View file @
b6d45394
package
model
package
model
type
MemberAddUserData
struct
{
type
MemberAddUserData
struct
{
User_Id
int
`json:"user_id"`
User_Id
int
`json:"user_id"`
Mobile
string
`json:"mobile"`
Mobile
string
`json:"mobile"`
...
@@ -10,6 +9,7 @@ type MemberAddUserData struct {
...
@@ -10,6 +9,7 @@ type MemberAddUserData struct {
Remark
string
`json:"remark"`
Remark
string
`json:"remark"`
Create_Device
int
`json:"create_device"`
Create_Device
int
`json:"create_device"`
Create_Time
int
`json:"create_time"`
Create_Time
int
`json:"create_time"`
Channel_type
int
`json:"channel_type"`
Com_Id
int
`json:"com_id"`
Com_Id
int
`json:"com_id"`
Type_Id
int
`json:"type_id"`
Type_Id
int
`json:"type_id"`
Com_Name
string
`json:"ComName"`
Com_Name
string
`json:"ComName"`
...
@@ -32,5 +32,4 @@ type MemberAddUserData struct {
...
@@ -32,5 +32,4 @@ type MemberAddUserData struct {
Source
int
`json:"source"`
Source
int
`json:"source"`
Customer_identity
int
`json:"customer_identity"`
Customer_identity
int
`json:"customer_identity"`
No_Create_Order
int
`json:"no_create_order"`
No_Create_Order
int
`json:"no_create_order"`
}
}
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