refactor: remove router、ioc is adjusted to inject by type

This commit is contained in:
meilin.huang
2024-12-16 23:29:18 +08:00
parent 7f2a49ba3c
commit 68f553f4b0
142 changed files with 1403 additions and 1905 deletions

View File

@@ -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),
}))