三端用户手机号联通,增加临时用户
This commit is contained in:
		| @@ -3,7 +3,6 @@ package user | ||||
| import ( | ||||
| 	"context" | ||||
| 	"qnc-server/common/ctxdata" | ||||
| 	jwtx "qnc-server/common/jwt" | ||||
| 	"qnc-server/common/xerr" | ||||
| 	"time" | ||||
|  | ||||
| @@ -32,11 +31,11 @@ func NewGetTokenLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetToken | ||||
| func (l *GetTokenLogic) GetToken() (resp *types.MobileCodeLoginResp, err error) { | ||||
| 	userID, err := ctxdata.GetUidFromCtx(l.ctx) | ||||
| 	if err != nil { | ||||
| 		return nil, errors.Wrapf(xerr.NewErrMsg(""), "用户信息, %v", err) | ||||
| 		return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "用户信息, %v", err) | ||||
| 	} | ||||
| 	token, generaErr := jwtx.GenerateJwtToken(userID, l.svcCtx.Config.JwtAuth.AccessSecret, l.svcCtx.Config.JwtAuth.AccessExpire) | ||||
| 	if generaErr != nil { | ||||
| 		return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "更新token, 生成token失败 : %d", userID) | ||||
| 	token, err := l.svcCtx.UserService.GeneralUserToken(l.ctx, userID) | ||||
| 	if err != nil { | ||||
| 		return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "用户信息, %v", err) | ||||
| 	} | ||||
| 	// 获取当前时间戳 | ||||
| 	now := time.Now().Unix() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user