This commit is contained in:
jiangyong 2025-03-16 13:55:55 +08:00
parent fe1766242f
commit 261c38e1db
1 changed files with 11 additions and 0 deletions

View File

@ -45,6 +45,17 @@ func (p *Pay) AlipayAuth(sess *session.AdminSession, authCode, state string) int
panic(config.ErrInternal.New().Append(goutil.EncodeJSON(res)))
}
if state != "" {
staffUser, err := dao.NewStaffUserDao().Get(cast.ToInt64(state))
session.CheckDBError(err)
session.CheckNilError(staffUser)
payee := staffUser.GetPayee()
payee.AlipayUid = res.UserId
staffUser.Payee = goutil.EncodeJSON(payee)
err = dao.NewStaffUserDao().Update(staffUser)
session.CheckDBError(err)
}
data := make(map[string]interface{})
data["state"] = state
data["userid"] = res.UserId