|
@@ -11,6 +11,22 @@ import (
|
|
|
"go.mongodb.org/mongo-driver/mongo/options"
|
|
"go.mongodb.org/mongo-driver/mongo/options"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
+type GameChannelService struct {
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+func (s *GameChannelService) All() (interface{}, error) {
|
|
|
|
|
+ filter := bson.M{}
|
|
|
|
|
+ coll := mgm.Coll(&channel.Channel{})
|
|
|
|
|
+
|
|
|
|
|
+ var list []channel.Channel
|
|
|
|
|
+ err := coll.SimpleFindWithCtx(context.Background(), &list, filter)
|
|
|
|
|
+ if err != nil {
|
|
|
|
|
+ return nil, err
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return serializer.BuildChannelAll(list), nil
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// ChannelListService 渠道列表
|
|
// ChannelListService 渠道列表
|
|
|
type ChannelListService struct {
|
|
type ChannelListService struct {
|
|
|
Name string `form:"name" json:"name"`
|
|
Name string `form:"name" json:"name"`
|