common_service.go 379 B

1234567891011121314151617
  1. package service
  2. import "youngee_b_api/app/dao"
  3. type CommonService struct{}
  4. func (s CommonService) CooperationPlatform() ([]string, error) {
  5. var icons []string
  6. coopPlatforms, err := dao.CommonDao{}.GetCoopPlatform()
  7. if err != nil {
  8. return nil, err
  9. }
  10. for _, coopPlatform := range coopPlatforms {
  11. icons = append(icons, coopPlatform.PlatformIcon)
  12. }
  13. return icons, nil
  14. }