Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc_golang_server_1
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangjie
dc_golang_server_1
Commits
5fe915ab
Commit
5fe915ab
authored
Oct 19, 2021
by
zhengqiuyun86
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初始化微信用户信息
parent
ef29a55d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
UWeCustomerDao.go
wechat/dao/UWeCustomerDao.go
+6
-1
UWeCustomerService.go
wechat/service/UWeCustomerService.go
+4
-1
No files found.
wechat/dao/UWeCustomerDao.go
View file @
5fe915ab
...
@@ -6,6 +6,11 @@ import (
...
@@ -6,6 +6,11 @@ import (
func
FindUWeCustomerByUnionid
(
unionid
string
)
model
.
UWeCustomer
{
func
FindUWeCustomerByUnionid
(
unionid
string
)
model
.
UWeCustomer
{
var
customer
model
.
UWeCustomer
var
customer
model
.
UWeCustomer
PgDb
.
First
(
&
customer
,
"unionid = ?"
,
unionid
)
//
PgDb
.
First
(
&
customer
,
"unionid = ?"
,
unionid
)
return
customer
}
func
NewCustomer
(
customer
model
.
UWeCustomer
)
model
.
UWeCustomer
{
PgDb
.
Create
(
&
customer
)
return
customer
return
customer
}
}
wechat/service/UWeCustomerService.go
View file @
5fe915ab
...
@@ -18,7 +18,10 @@ func FindUWeCustomerByUnionid(unionid string) model.UWeCustomer {
...
@@ -18,7 +18,10 @@ func FindUWeCustomerByUnionid(unionid string) model.UWeCustomer {
}
}
func
initUWeCustomer
(
unionid
string
,
openid
string
)
{
func
initUWeCustomer
(
unionid
string
,
openid
string
)
{
var
customer
model
.
UWeCustomer
customer
.
Unionid
=
unionid
customer
.
Openid
=
openid
dao
.
NewCustomer
(
customer
)
}
}
type
LoginFromWechatAppletData
struct
{
type
LoginFromWechatAppletData
struct
{
...
...
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