tank/rest/dashboard_service.go
2018-12-01 04:01:49 +08:00

27 lines
464 B
Go

package rest
//@Service
type DashboardService struct {
Bean
dashboardDao *DashboardDao
userDao *UserDao
}
//初始化方法
func (this *DashboardService) Init() {
this.Bean.Init()
//手动装填本实例的Bean. 这里必须要用中间变量方可。
b := CONTEXT.GetBean(this.dashboardDao)
if b, ok := b.(*DashboardDao); ok {
this.dashboardDao = b
}
b = CONTEXT.GetBean(this.userDao)
if b, ok := b.(*UserDao); ok {
this.userDao = b
}
}