|
|
@@ -182,6 +182,10 @@ func WithdrawApply(c *gin.Context) { |
|
|
|
e.OutErr(c, e.ERR, "支付宝用户信息未授权") |
|
|
|
return |
|
|
|
} |
|
|
|
if aliInfo.OpenId != "" { |
|
|
|
e.OutErr(c, e.ERR, "支付宝用户授权信息有误") |
|
|
|
return |
|
|
|
} |
|
|
|
//appId = sysCfgMap[enum.AlipayAppId] |
|
|
|
userId = aliInfo.UserId |
|
|
|
openId = aliInfo.OpenId |
|
|
@@ -505,6 +509,13 @@ func BindAlipayAccount(c *gin.Context) { |
|
|
|
e.OutErr(c, e.ERR, err.Error()) |
|
|
|
return |
|
|
|
} |
|
|
|
fmt.Println("BindAlipayAccount>>>>>>>>", info) |
|
|
|
utils.FilePutContents("BindAlipayAccount", utils.SerializeStr(map[string]interface{}{ |
|
|
|
"info": info, |
|
|
|
"systemOauthToken": systemOauthToken, |
|
|
|
"req": req, |
|
|
|
})) |
|
|
|
|
|
|
|
infoDb := implement.NewAlipayUserInfoDb(db.Db) |
|
|
|
userInfo, err := infoDb.GetAlipayUserInfo(user.Id) |
|
|
|
if err != nil { |
|
|
@@ -516,7 +527,7 @@ func BindAlipayAccount(c *gin.Context) { |
|
|
|
m := model.AlipayUserInfo{ |
|
|
|
Uid: user.Id, |
|
|
|
UserId: info.Response.UserId, |
|
|
|
OpenId: info.Response.OpenId, |
|
|
|
OpenId: systemOauthToken.Response.OpenId, |
|
|
|
AppId: client.AppId, |
|
|
|
UserName: info.Response.NickName, |
|
|
|
Ext: "", |
|
|
|