mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-01-06 14:45:48 +08:00
refactor: remove router、ioc is adjusted to inject by type
This commit is contained in:
@@ -8,12 +8,20 @@ import (
|
||||
)
|
||||
|
||||
type Dashbord struct {
|
||||
TagTreeApp tagapp.TagTree `inject:""`
|
||||
tagTreeApp tagapp.TagTree `inject:"T"`
|
||||
}
|
||||
|
||||
func (m *Dashbord) Dashbord(rc *req.Ctx) {
|
||||
func (d *Dashbord) ReqConfs() *req.Confs {
|
||||
reqs := [...]*req.Conf{
|
||||
req.NewGet("/redis/dashbord", d.Dashbord),
|
||||
}
|
||||
|
||||
return req.NewConfs("", reqs[:]...)
|
||||
}
|
||||
|
||||
func (d *Dashbord) Dashbord(rc *req.Ctx) {
|
||||
accountId := rc.GetLoginAccount().Id
|
||||
redisNum := len(m.TagTreeApp.GetAccountTags(accountId, &tagentity.TagTreeQuery{
|
||||
redisNum := len(d.tagTreeApp.GetAccountTags(accountId, &tagentity.TagTreeQuery{
|
||||
Types: collx.AsArray(tagentity.TagTypeRedis),
|
||||
}))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user