add and fix apis
CI / changes (push) Successful in 1m31s
CI / ad (push) Successful in 0s
CI / admin (push) Successful in 0s
CI / analysis (push) Successful in 0s
CI / bff (push) Successful in 1s
CI / chore (push) Successful in 0s
CI / equipment (push) Successful in 0s
CI / express (push) Successful in 0s
CI / factory (push) Successful in 0s
CI / message (push) Successful in 1s
CI / order (push) Successful in 0s
CI / payment (push) Successful in 0s
CI / percutaneous (push) Successful in 30s
CI / product (push) Successful in 0s
CI / record (push) Successful in 0s
CI / sale (push) Successful in 0s
CI / store (push) Successful in 1s
CI / task (push) Successful in 0s
CI / support (push) Successful in 0s
CI / user (push) Successful in 0s
CI / water (push) Successful in 0s
CI / wecom (push) Successful in 0s
CI / ws (push) Successful in 0s

This commit is contained in:
2026-10-28 14:09:26 +08:00
parent 524cb004ce
commit ddb4aa8b65
@@ -48,16 +48,25 @@ func (l *WsClientStatusLogic) WsClientStatus(in *percutaneous.GetWsCodeRequest)
if len(val) > utils.NumberTen {
data := "ok"
keys := []string{WsTypeApp, WsTypeOperation}
ok := false
for _, k := range keys {
key = utils.MD5Encrypt(fmt.Sprintf("%s%s", dao.WsCode, k))
redisKey = pkgws.RedisKeyQRSession + key
if err = pkgws.Publish(l.ctx, redisKey, pkgws.Success(data)); err != nil {
l.Errorf("ws client publish: %v", err)
ok = false
return l.fail(utils.Fail)
}
redis.Client.Del(l.ctx, redisKey).Result()
ok = true
}
if ok {
for _, k := range keys {
key = utils.MD5Encrypt(fmt.Sprintf("%s%s", dao.WsCode, k))
redisKey = pkgws.RedisKeyQRSession + key
redis.Client.Del(l.ctx, redisKey).Result()
}
}
return l.ok(utils.NumberOne)
}