Commit 5fe915ab by zhengqiuyun86

初始化微信用户信息

parent ef29a55d
......@@ -6,6 +6,11 @@ import (
func FindUWeCustomerByUnionid(unionid string) 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
}
......@@ -18,7 +18,10 @@ func FindUWeCustomerByUnionid(unionid string) model.UWeCustomer {
}
func initUWeCustomer(unionid string, openid string) {
var customer model.UWeCustomer
customer.Unionid = unionid
customer.Openid = openid
dao.NewCustomer(customer)
}
type LoginFromWechatAppletData struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment