go-common/app/interface/main/app-view/dao/archive/stat.go

24 lines
525 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package archive
import (
"context"
"go-common/app/service/main/archive/api"
"go-common/app/service/main/archive/model/archive"
"go-common/library/log"
)
// Stat get a archive stat.
func (d *Dao) Stat(c context.Context, aid int64) (st *api.Stat, err error) {
if st, err = d.statCache(c, aid); err != nil {
log.Error("%+v", err)
} else if st != nil {
return
}
arg := &archive.ArgAid2{Aid: aid}
if st, err = d.arcRPC.Stat3(c, arg); err != nil {
log.Error("d.arcRPC.Stat3(%v) error(%v)", arg, err)
}
return
}