service.go 668 B

12345678910111213141516171819202122232425262728293031
  1. package article
  2. import (
  3. "go-common/app/interface/main/creative/conf"
  4. "go-common/app/interface/main/creative/dao/account"
  5. "go-common/app/interface/main/creative/dao/activity"
  6. "go-common/app/interface/main/creative/dao/article"
  7. "go-common/app/interface/main/creative/dao/bfs"
  8. "go-common/app/interface/main/creative/service"
  9. )
  10. //Service struct.
  11. type Service struct {
  12. c *conf.Config
  13. art *article.Dao
  14. acc *account.Dao
  15. bfs *bfs.Dao
  16. act *activity.Dao
  17. }
  18. //New get service.
  19. func New(c *conf.Config, rpcdaos *service.RPCDaos) *Service {
  20. s := &Service{
  21. c: c,
  22. art: rpcdaos.Art,
  23. acc: rpcdaos.Acc,
  24. bfs: bfs.New(c),
  25. act: activity.New(c),
  26. }
  27. return s
  28. }