You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
672 B
39 lines
672 B
package income |
|
|
|
import ( |
|
"context" |
|
|
|
"go-common/app/admin/main/growup/conf" |
|
upD "go-common/app/admin/main/growup/dao" |
|
incomeD "go-common/app/admin/main/growup/dao/income" |
|
"go-common/app/admin/main/growup/dao/message" |
|
) |
|
|
|
// Service struct |
|
type Service struct { |
|
conf *conf.Config |
|
dao *incomeD.Dao |
|
msg *message.Dao |
|
upDao *upD.Dao |
|
} |
|
|
|
// New fn |
|
func New(c *conf.Config) (s *Service) { |
|
s = &Service{ |
|
conf: c, |
|
dao: incomeD.New(c), |
|
msg: message.New(c), |
|
upDao: upD.New(c), |
|
} |
|
return s |
|
} |
|
|
|
// Ping check dao health. |
|
func (s *Service) Ping(c context.Context) (err error) { |
|
return s.dao.Ping(c) |
|
} |
|
|
|
// Close dao |
|
func (s *Service) Close() { |
|
s.dao.Close() |
|
}
|
|
|