stat.go 525 B

1234567891011121314151617181920212223
  1. package archive
  2. import (
  3. "context"
  4. "go-common/app/service/main/archive/api"
  5. "go-common/app/service/main/archive/model/archive"
  6. "go-common/library/log"
  7. )
  8. // Stat get a archive stat.
  9. func (d *Dao) Stat(c context.Context, aid int64) (st *api.Stat, err error) {
  10. if st, err = d.statCache(c, aid); err != nil {
  11. log.Error("%+v", err)
  12. } else if st != nil {
  13. return
  14. }
  15. arg := &archive.ArgAid2{Aid: aid}
  16. if st, err = d.arcRPC.Stat3(c, arg); err != nil {
  17. log.Error("d.arcRPC.Stat3(%v) error(%v)", arg, err)
  18. }
  19. return
  20. }