调整接口
This commit is contained in:
@ -0,0 +1,15 @@
|
||||
package statistic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"server/internal/consts"
|
||||
|
||||
"server/api/statistic/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) GetOnlineDevice(ctx context.Context, req *v1.GetOnlineDeviceReq) (res *v1.GetOnlineDeviceRes, err error) {
|
||||
card, err := g.Redis().SCard(ctx, fmt.Sprintf(consts.NetbarOnlineDeviceSetKey, req.NetbarAccount))
|
||||
return &v1.GetOnlineDeviceRes{Total: card}, err
|
||||
}
|
||||
Reference in New Issue
Block a user