Merge branch 'develop' of git.ailuowan.com:zzw/lone-services into develop
This commit is contained in:
@@ -30,21 +30,12 @@ func NewGetWsCodeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetWsCo
|
||||
}
|
||||
|
||||
func (l *GetWsCodeLogic) GetWsCode(in *percutaneous.GetWsCodeRequest) (*percutaneous.Response, error) {
|
||||
id := in.UserId
|
||||
if id < utils.NumberOne {
|
||||
adminInfo := utils.GetUserFromCtx(l.ctx)
|
||||
if adminInfo.ID < utils.NumberOne {
|
||||
return l.fail(utils.ErrorNoLoginInfo)
|
||||
}
|
||||
id = adminInfo.ID
|
||||
}
|
||||
|
||||
Type := WsTypeApp
|
||||
if in.Type == utils.NumberTwo {
|
||||
Type = WsTypeOperation
|
||||
}
|
||||
|
||||
key := utils.MD5Encrypt(fmt.Sprintf("%d%s%s", id, dao.WsCode, Type))
|
||||
key := utils.MD5Encrypt(fmt.Sprintf("%s%s", dao.WsCode, Type))
|
||||
redisKey := pkgws.RedisKeyQRSession + key
|
||||
|
||||
payload, err := jsoniter.MarshalToString(pkgws.Session{
|
||||
|
||||
Reference in New Issue
Block a user