go-common/app/interface/main/app-resource/service/show/audit.go

27 lines
461 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package show
import (
"context"
"go-common/library/log"
)
func (s *Service) loadAuditCache() {
as, err := s.adt.Audits(context.TODO())
if err != nil {
log.Error("s.adt.Audits error(%v)", err)
return
}
s.auditCache = as
}
// Audit show tab data list.
func (s *Service) auditTab(mobiApp string, build int, plat int8) (isAudit bool) {
if plats, ok := s.auditCache[mobiApp]; ok {
if _, ok = plats[build]; ok {
return true
}
}
return false
}