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.
20 lines
469 B
20 lines
469 B
package service |
|
|
|
import ( |
|
"context" |
|
"time" |
|
|
|
"go-common/app/interface/openplatform/article/model" |
|
) |
|
|
|
// ActInfo . |
|
func (s *Service) ActInfo(c context.Context, plat int8) (res *model.ActInfo, err error) { |
|
res = &model.ActInfo{Activities: []*model.Activity{}, Banners: []*model.Banner{}} |
|
if bs, _ := s.actBanners(c, plat, time.Now()); len(bs) > 0 { |
|
res.Banners = bs |
|
} |
|
for _, act := range s.activities { |
|
res.Activities = append(res.Activities, act) |
|
} |
|
return |
|
}
|
|
|