Merge branch 'develop' of git.ailuowan.com:zzw/lone-services into develop

This commit is contained in:
zzw
2026-10-28 16:10:18 +08:00
14 changed files with 206 additions and 52 deletions
@@ -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{