Browse Source

Merge remote-tracking branch 'origin/master'

tmp
huangjiajun 3 weeks ago
parent
commit
8bdb263e54
1 changed files with 12 additions and 1 deletions
  1. +12
    -1
      app/hdl/hdl_wallet.go

+ 12
- 1
app/hdl/hdl_wallet.go View File

@@ -182,6 +182,10 @@ func WithdrawApply(c *gin.Context) {
e.OutErr(c, e.ERR, "支付宝用户信息未授权") e.OutErr(c, e.ERR, "支付宝用户信息未授权")
return return
} }
if aliInfo.OpenId != "" {
e.OutErr(c, e.ERR, "支付宝用户授权信息有误")
return
}
//appId = sysCfgMap[enum.AlipayAppId] //appId = sysCfgMap[enum.AlipayAppId]
userId = aliInfo.UserId userId = aliInfo.UserId
openId = aliInfo.OpenId openId = aliInfo.OpenId
@@ -505,6 +509,13 @@ func BindAlipayAccount(c *gin.Context) {
e.OutErr(c, e.ERR, err.Error()) e.OutErr(c, e.ERR, err.Error())
return return
} }
fmt.Println("BindAlipayAccount>>>>>>>>", info)
utils.FilePutContents("BindAlipayAccount", utils.SerializeStr(map[string]interface{}{
"info": info,
"systemOauthToken": systemOauthToken,
"req": req,
}))

infoDb := implement.NewAlipayUserInfoDb(db.Db) infoDb := implement.NewAlipayUserInfoDb(db.Db)
userInfo, err := infoDb.GetAlipayUserInfo(user.Id) userInfo, err := infoDb.GetAlipayUserInfo(user.Id)
if err != nil { if err != nil {
@@ -516,7 +527,7 @@ func BindAlipayAccount(c *gin.Context) {
m := model.AlipayUserInfo{ m := model.AlipayUserInfo{
Uid: user.Id, Uid: user.Id,
UserId: info.Response.UserId, UserId: info.Response.UserId,
OpenId: info.Response.OpenId,
OpenId: systemOauthToken.Response.OpenId,
AppId: client.AppId, AppId: client.AppId,
UserName: info.Response.NickName, UserName: info.Response.NickName,
Ext: "", Ext: "",


Loading…
Cancel
Save