feat(main): fix mp-weixin

This commit is contained in:
2025-01-18 23:21:48 +08:00
parent 9459d51501
commit 98d21d5ab9
4 changed files with 441 additions and 5 deletions

View File

@@ -50,7 +50,7 @@ func (l *WxMiniAuthLogic) WxMiniAuth(req *types.WXMiniAuthReq) (resp *types.WXMi
if findErr == model.ErrNotFound {
// 用户不存在,创建新用户
user = &model.User{}
user.Mobile = weChatResponse.OpenId
if transErr := l.svcCtx.UserModel.Trans(l.ctx, func(ctx context.Context, session sqlx.Session) error {
// 插入新用户
insertResult, userInsertErr := l.svcCtx.UserModel.Insert(ctx, session, user)