feat: 初次启动
This commit is contained in:
@@ -1,22 +1,20 @@
|
||||
Name: radio-api
|
||||
|
||||
Log:
|
||||
Encoding: plain
|
||||
Host: 0.0.0.0
|
||||
Port: 9005
|
||||
|
||||
Auth:
|
||||
AccessSecret: 9149f2eb-d517-4a50-a03a-231dbcf0d872
|
||||
AccessExpire: 7200
|
||||
AccessSecret: sundynix-jwt-secret-2024
|
||||
AccessExpire: 604800
|
||||
|
||||
# MySQL
|
||||
DB:
|
||||
DataSource: root:root@tcp(192.168.100.127:3307)/sundynix_micro_go?charset=utf8mb4&parseTime=True&loc=Local
|
||||
RadioRpc:
|
||||
Etcd:
|
||||
Hosts:
|
||||
- 192.168.100.127:2379
|
||||
Key: radio.rpc
|
||||
|
||||
# Redis
|
||||
Cache:
|
||||
- Host: 127.0.0.1:6379
|
||||
Pass: sundynix
|
||||
Type: node
|
||||
|
||||
# RPC 依赖
|
||||
UserRpc:
|
||||
Etcd:
|
||||
Hosts:
|
||||
@@ -28,18 +26,3 @@ FileRpc:
|
||||
Hosts:
|
||||
- 192.168.100.127:2379
|
||||
Key: file.rpc
|
||||
|
||||
# TTS 火山引擎
|
||||
Tts:
|
||||
AppId: "9604175735"
|
||||
ResourceId: "seed-tts-2.0"
|
||||
AccessKey: "IMSrxDQgXWOwaJnuF-5G7uppRQutwBny"
|
||||
|
||||
# 微信支付
|
||||
WechatPay:
|
||||
MchId: "1735188493"
|
||||
MchCertificateSerialNumber: "3725BFCA9CA3AF819AEC5D0CB7D3540BBC67F2CF"
|
||||
MchApiV3Key: "a1B2c3D4e5F6g7H8i9J0k1L2m3N4o5P6"
|
||||
PrivateKeyPath: "/Users/blizzard/privateFolder/cert/apiclient_key.pem"
|
||||
PublicKeyPath: "/Users/blizzard/privateFolder/cert/pub_key.pem"
|
||||
NotifyUrl: "https://radio.sundynix.cn/api/wechatpay/notify"
|
||||
|
||||
@@ -14,27 +14,7 @@ type Config struct {
|
||||
AccessSecret string
|
||||
AccessExpire int64
|
||||
}
|
||||
DB struct {
|
||||
DataSource string
|
||||
}
|
||||
Cache []struct {
|
||||
Host string
|
||||
Pass string
|
||||
Type string
|
||||
}
|
||||
UserRpc zrpc.RpcClientConf
|
||||
FileRpc zrpc.RpcClientConf
|
||||
Tts struct {
|
||||
AppId string
|
||||
ResourceId string
|
||||
AccessKey string
|
||||
}
|
||||
WechatPay struct {
|
||||
MchId string
|
||||
MchCertificateSerialNumber string
|
||||
MchApiV3Key string
|
||||
PrivateKeyPath string
|
||||
PublicKeyPath string
|
||||
NotifyUrl string
|
||||
}
|
||||
RadioRpc zrpc.RpcClientConf
|
||||
UserRpc zrpc.RpcClientConf
|
||||
FileRpc zrpc.RpcClientConf
|
||||
}
|
||||
|
||||
@@ -6,53 +6,24 @@ package svc
|
||||
import (
|
||||
"sundynix-micro-go/app/file/rpc/fileservice"
|
||||
"sundynix-micro-go/app/radio/api/internal/config"
|
||||
radioModel "sundynix-micro-go/app/radio/model"
|
||||
"sundynix-micro-go/app/radio/rpc/radioservice"
|
||||
"sundynix-micro-go/app/user/rpc/userservice"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"github.com/zeromicro/go-zero/zrpc"
|
||||
"gorm.io/driver/mysql"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type ServiceContext struct {
|
||||
Config config.Config
|
||||
DB *gorm.DB
|
||||
UserRpc userservice.UserService
|
||||
FileRpc fileservice.FileService
|
||||
Config config.Config
|
||||
RadioRpc radioservice.RadioService
|
||||
UserRpc userservice.UserService
|
||||
FileRpc fileservice.FileService
|
||||
}
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
db, err := gorm.Open(mysql.Open(c.DB.DataSource), &gorm.Config{})
|
||||
if err != nil {
|
||||
logx.Errorf("连接数据库失败: %v", err)
|
||||
panic(err)
|
||||
}
|
||||
|
||||
// 自动迁移
|
||||
if err := db.AutoMigrate(
|
||||
&radioModel.SundynixRadioUserProfile{},
|
||||
&radioModel.SundynixRadioCategory{},
|
||||
&radioModel.SundynixRadioChannel{},
|
||||
&radioModel.SundynixRadioProgram{},
|
||||
&radioModel.SundynixRadioVoice{},
|
||||
&radioModel.SundynixRadioLike{},
|
||||
&radioModel.SundynixRadioFavorite{},
|
||||
&radioModel.SundynixRadioComment{},
|
||||
&radioModel.SundynixRadioHistory{},
|
||||
&radioModel.SundynixRadioSubscription{},
|
||||
&radioModel.SundynixRadioSubscriptionOrder{},
|
||||
&radioModel.SundynixRadioPayNotify{},
|
||||
&radioModel.SundynixRadioVipConfig{},
|
||||
&radioModel.SundynixRadioListenLog{},
|
||||
); err != nil {
|
||||
logx.Errorf("数据库迁移失败: %v", err)
|
||||
}
|
||||
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
DB: db,
|
||||
UserRpc: userservice.NewUserService(zrpc.MustNewClient(c.UserRpc)),
|
||||
FileRpc: fileservice.NewFileService(zrpc.MustNewClient(c.FileRpc)),
|
||||
Config: c,
|
||||
RadioRpc: radioservice.NewRadioService(zrpc.MustNewClient(c.RadioRpc)),
|
||||
UserRpc: userservice.NewUserService(zrpc.MustNewClient(c.UserRpc)),
|
||||
FileRpc: fileservice.NewFileService(zrpc.MustNewClient(c.FileRpc)),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
Name: radio.rpc
|
||||
ListenOn: 0.0.0.0:8080
|
||||
|
||||
Log:
|
||||
Encoding: plain
|
||||
ListenOn: 0.0.0.0:9015
|
||||
Etcd:
|
||||
Hosts:
|
||||
- 127.0.0.1:2379
|
||||
- 192.168.100.127:2379
|
||||
Key: radio.rpc
|
||||
|
||||
DB:
|
||||
DataSource: root:root@tcp(192.168.100.127:3307)/sundynix_micro_go?charset=utf8mb4&parseTime=True&loc=Local
|
||||
|
||||
@@ -4,4 +4,7 @@ import "github.com/zeromicro/go-zero/zrpc"
|
||||
|
||||
type Config struct {
|
||||
zrpc.RpcServerConf
|
||||
DB struct {
|
||||
DataSource string
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ func NewCommentProgramLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Co
|
||||
}
|
||||
}
|
||||
|
||||
func (l *CommentProgramLogic) CommentProgram(in *radio.CommentReq) (*radio.CommentResp, error) {
|
||||
func (l *CommentProgramLogic) CommentProgram(in *radio.CommentReq) (*radio.CommonResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.CommentResp{}, nil
|
||||
return &radio.CommonResp{}, nil
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ func NewCreateCategoryLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Cr
|
||||
}
|
||||
|
||||
// 分类
|
||||
func (l *CreateCategoryLogic) CreateCategory(in *radio.CreateCategoryReq) (*radio.CreateCategoryResp, error) {
|
||||
func (l *CreateCategoryLogic) CreateCategory(in *radio.CategoryReq) (*radio.CommonResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.CreateCategoryResp{}, nil
|
||||
return &radio.CommonResp{}, nil
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ func NewCreateChannelLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Cre
|
||||
}
|
||||
|
||||
// 频道
|
||||
func (l *CreateChannelLogic) CreateChannel(in *radio.CreateChannelReq) (*radio.CreateChannelResp, error) {
|
||||
func (l *CreateChannelLogic) CreateChannel(in *radio.CreateChannelReq) (*radio.CommonResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.CreateChannelResp{}, nil
|
||||
return &radio.CommonResp{}, nil
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ func NewCreateProgramLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Cre
|
||||
}
|
||||
|
||||
// 节目
|
||||
func (l *CreateProgramLogic) CreateProgram(in *radio.CreateProgramReq) (*radio.CreateProgramResp, error) {
|
||||
func (l *CreateProgramLogic) CreateProgram(in *radio.CreateProgramReq) (*radio.CommonResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.CreateProgramResp{}, nil
|
||||
return &radio.CommonResp{}, nil
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ func NewCreateVoiceLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Creat
|
||||
}
|
||||
|
||||
// 音色
|
||||
func (l *CreateVoiceLogic) CreateVoice(in *radio.CreateVoiceReq) (*radio.CreateVoiceResp, error) {
|
||||
func (l *CreateVoiceLogic) CreateVoice(in *radio.CreateVoiceReq) (*radio.CommonResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.CreateVoiceResp{}, nil
|
||||
return &radio.CommonResp{}, nil
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ func NewDeleteCategoryLogic(ctx context.Context, svcCtx *svc.ServiceContext) *De
|
||||
}
|
||||
}
|
||||
|
||||
func (l *DeleteCategoryLogic) DeleteCategory(in *radio.DeleteByIdsReq) (*radio.DeleteResp, error) {
|
||||
func (l *DeleteCategoryLogic) DeleteCategory(in *radio.IdsReq) (*radio.CommonResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.DeleteResp{}, nil
|
||||
return &radio.CommonResp{}, nil
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ func NewDeleteChannelLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Del
|
||||
}
|
||||
}
|
||||
|
||||
func (l *DeleteChannelLogic) DeleteChannel(in *radio.DeleteByIdsReq) (*radio.DeleteResp, error) {
|
||||
func (l *DeleteChannelLogic) DeleteChannel(in *radio.IdsReq) (*radio.CommonResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.DeleteResp{}, nil
|
||||
return &radio.CommonResp{}, nil
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ func NewDeleteProgramLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Del
|
||||
}
|
||||
}
|
||||
|
||||
func (l *DeleteProgramLogic) DeleteProgram(in *radio.DeleteByIdsReq) (*radio.DeleteResp, error) {
|
||||
func (l *DeleteProgramLogic) DeleteProgram(in *radio.IdsReq) (*radio.CommonResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.DeleteResp{}, nil
|
||||
return &radio.CommonResp{}, nil
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ func NewDeleteVoiceLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Delet
|
||||
}
|
||||
}
|
||||
|
||||
func (l *DeleteVoiceLogic) DeleteVoice(in *radio.DeleteByIdsReq) (*radio.DeleteResp, error) {
|
||||
func (l *DeleteVoiceLogic) DeleteVoice(in *radio.IdsReq) (*radio.CommonResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.DeleteResp{}, nil
|
||||
return &radio.CommonResp{}, nil
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"sundynix-micro-go/app/radio/rpc/internal/svc"
|
||||
"sundynix-micro-go/app/radio/rpc/radio"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type GetAnalyticsOverviewLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewGetAnalyticsOverviewLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetAnalyticsOverviewLogic {
|
||||
return &GetAnalyticsOverviewLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
// 数据分析
|
||||
func (l *GetAnalyticsOverviewLogic) GetAnalyticsOverview(in *radio.AnalyticsReq) (*radio.AnalyticsOverviewResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.AnalyticsOverviewResp{}, nil
|
||||
}
|
||||
@@ -23,8 +23,8 @@ func NewGetCategoryListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *G
|
||||
}
|
||||
}
|
||||
|
||||
func (l *GetCategoryListLogic) GetCategoryList(in *radio.GetCategoryListReq) (*radio.GetCategoryListResp, error) {
|
||||
func (l *GetCategoryListLogic) GetCategoryList(in *radio.CategoryListReq) (*radio.CategoryListResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.GetCategoryListResp{}, nil
|
||||
return &radio.CategoryListResp{}, nil
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"sundynix-micro-go/app/radio/rpc/internal/svc"
|
||||
"sundynix-micro-go/app/radio/rpc/radio"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type GetChannelAnalyticsLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewGetChannelAnalyticsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetChannelAnalyticsLogic {
|
||||
return &GetChannelAnalyticsLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *GetChannelAnalyticsLogic) GetChannelAnalytics(in *radio.AnalyticsReq) (*radio.ChannelAnalyticsResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.ChannelAnalyticsResp{}, nil
|
||||
}
|
||||
@@ -23,8 +23,8 @@ func NewGetChannelDetailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *
|
||||
}
|
||||
}
|
||||
|
||||
func (l *GetChannelDetailLogic) GetChannelDetail(in *radio.GetChannelDetailReq) (*radio.GetChannelDetailResp, error) {
|
||||
func (l *GetChannelDetailLogic) GetChannelDetail(in *radio.IdReq) (*radio.ChannelInfo, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.GetChannelDetailResp{}, nil
|
||||
return &radio.ChannelInfo{}, nil
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ func NewGetChannelListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Ge
|
||||
}
|
||||
}
|
||||
|
||||
func (l *GetChannelListLogic) GetChannelList(in *radio.GetChannelListReq) (*radio.GetChannelListResp, error) {
|
||||
func (l *GetChannelListLogic) GetChannelList(in *radio.ChannelListReq) (*radio.ChannelListResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.GetChannelListResp{}, nil
|
||||
return &radio.ChannelListResp{}, nil
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ func NewGetFavoriteListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *G
|
||||
}
|
||||
}
|
||||
|
||||
func (l *GetFavoriteListLogic) GetFavoriteList(in *radio.GetFavoriteListReq) (*radio.GetFavoriteListResp, error) {
|
||||
func (l *GetFavoriteListLogic) GetFavoriteList(in *radio.InteractionListReq) (*radio.FavoriteListResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.GetFavoriteListResp{}, nil
|
||||
return &radio.FavoriteListResp{}, nil
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ func NewGetHistoryListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Ge
|
||||
}
|
||||
}
|
||||
|
||||
func (l *GetHistoryListLogic) GetHistoryList(in *radio.GetHistoryListReq) (*radio.GetHistoryListResp, error) {
|
||||
func (l *GetHistoryListLogic) GetHistoryList(in *radio.InteractionListReq) (*radio.HistoryListResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.GetHistoryListResp{}, nil
|
||||
return &radio.HistoryListResp{}, nil
|
||||
}
|
||||
|
||||
@@ -23,9 +23,9 @@ func NewGetMySubscriptionsLogic(ctx context.Context, svcCtx *svc.ServiceContext)
|
||||
}
|
||||
}
|
||||
|
||||
// 订阅
|
||||
func (l *GetMySubscriptionsLogic) GetMySubscriptions(in *radio.GetMySubscriptionsReq) (*radio.GetMySubscriptionsResp, error) {
|
||||
// 订阅/VIP
|
||||
func (l *GetMySubscriptionsLogic) GetMySubscriptions(in *radio.SubscriptionListReq) (*radio.SubscriptionListResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.GetMySubscriptionsResp{}, nil
|
||||
return &radio.SubscriptionListResp{}, nil
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ func NewGetMyVipInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetM
|
||||
}
|
||||
}
|
||||
|
||||
func (l *GetMyVipInfoLogic) GetMyVipInfo(in *radio.GetMyVipInfoReq) (*radio.GetMyVipInfoResp, error) {
|
||||
func (l *GetMyVipInfoLogic) GetMyVipInfo(in *radio.GetProfileReq) (*radio.RadioUserProfile, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.GetMyVipInfoResp{}, nil
|
||||
return &radio.RadioUserProfile{}, nil
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ func NewGetProgramDetailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *
|
||||
}
|
||||
}
|
||||
|
||||
func (l *GetProgramDetailLogic) GetProgramDetail(in *radio.GetProgramDetailReq) (*radio.GetProgramDetailResp, error) {
|
||||
func (l *GetProgramDetailLogic) GetProgramDetail(in *radio.IdReq) (*radio.ProgramInfo, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.GetProgramDetailResp{}, nil
|
||||
return &radio.ProgramInfo{}, nil
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ func NewGetProgramListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Ge
|
||||
}
|
||||
}
|
||||
|
||||
func (l *GetProgramListLogic) GetProgramList(in *radio.GetProgramListReq) (*radio.GetProgramListResp, error) {
|
||||
func (l *GetProgramListLogic) GetProgramList(in *radio.ProgramListReq) (*radio.ProgramListResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.GetProgramListResp{}, nil
|
||||
return &radio.ProgramListResp{}, nil
|
||||
}
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"sundynix-micro-go/app/radio/rpc/internal/svc"
|
||||
"sundynix-micro-go/app/radio/rpc/radio"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type GetRadioUserProfileLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewGetRadioUserProfileLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetRadioUserProfileLogic {
|
||||
return &GetRadioUserProfileLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
// 用户
|
||||
func (l *GetRadioUserProfileLogic) GetRadioUserProfile(in *radio.GetRadioUserProfileReq) (*radio.GetRadioUserProfileResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.GetRadioUserProfileResp{}, nil
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"sundynix-micro-go/app/radio/rpc/internal/svc"
|
||||
"sundynix-micro-go/app/radio/rpc/radio"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type GetUserAnalyticsLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewGetUserAnalyticsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetUserAnalyticsLogic {
|
||||
return &GetUserAnalyticsLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *GetUserAnalyticsLogic) GetUserAnalytics(in *radio.AnalyticsReq) (*radio.UserAnalyticsResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.UserAnalyticsResp{}, nil
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"sundynix-micro-go/app/radio/rpc/internal/svc"
|
||||
"sundynix-micro-go/app/radio/rpc/radio"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type GetUserProfileLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewGetUserProfileLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetUserProfileLogic {
|
||||
return &GetUserProfileLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
// 用户Profile
|
||||
func (l *GetUserProfileLogic) GetUserProfile(in *radio.GetProfileReq) (*radio.RadioUserProfile, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.RadioUserProfile{}, nil
|
||||
}
|
||||
@@ -23,9 +23,8 @@ func NewGetVipConfigListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *
|
||||
}
|
||||
}
|
||||
|
||||
// VIP
|
||||
func (l *GetVipConfigListLogic) GetVipConfigList(in *radio.GetVipConfigListReq) (*radio.GetVipConfigListResp, error) {
|
||||
func (l *GetVipConfigListLogic) GetVipConfigList(in *radio.IdReq) (*radio.VipConfigListResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.GetVipConfigListResp{}, nil
|
||||
return &radio.VipConfigListResp{}, nil
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ func NewGetVoiceListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetV
|
||||
}
|
||||
}
|
||||
|
||||
func (l *GetVoiceListLogic) GetVoiceList(in *radio.GetVoiceListReq) (*radio.GetVoiceListResp, error) {
|
||||
func (l *GetVoiceListLogic) GetVoiceList(in *radio.VoiceListReq) (*radio.VoiceListResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.GetVoiceListResp{}, nil
|
||||
return &radio.VoiceListResp{}, nil
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ func NewRecordHistoryLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Rec
|
||||
}
|
||||
}
|
||||
|
||||
func (l *RecordHistoryLogic) RecordHistory(in *radio.RecordHistoryReq) (*radio.RecordHistoryResp, error) {
|
||||
func (l *RecordHistoryLogic) RecordHistory(in *radio.RecordHistoryReq) (*radio.CommonResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.RecordHistoryResp{}, nil
|
||||
return &radio.CommonResp{}, nil
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ func NewToggleFavoriteLogic(ctx context.Context, svcCtx *svc.ServiceContext) *To
|
||||
}
|
||||
}
|
||||
|
||||
func (l *ToggleFavoriteLogic) ToggleFavorite(in *radio.ToggleFavoriteReq) (*radio.ToggleFavoriteResp, error) {
|
||||
func (l *ToggleFavoriteLogic) ToggleFavorite(in *radio.ToggleFavoriteReq) (*radio.CommonResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.ToggleFavoriteResp{}, nil
|
||||
return &radio.CommonResp{}, nil
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ func NewToggleLikeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Toggle
|
||||
}
|
||||
|
||||
// 互动
|
||||
func (l *ToggleLikeLogic) ToggleLike(in *radio.ToggleLikeReq) (*radio.ToggleLikeResp, error) {
|
||||
func (l *ToggleLikeLogic) ToggleLike(in *radio.ToggleLikeReq) (*radio.CommonResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.ToggleLikeResp{}, nil
|
||||
return &radio.CommonResp{}, nil
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ func NewUpdateCategoryLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Up
|
||||
}
|
||||
}
|
||||
|
||||
func (l *UpdateCategoryLogic) UpdateCategory(in *radio.UpdateCategoryReq) (*radio.UpdateCategoryResp, error) {
|
||||
func (l *UpdateCategoryLogic) UpdateCategory(in *radio.CategoryUpdateReq) (*radio.CommonResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.UpdateCategoryResp{}, nil
|
||||
return &radio.CommonResp{}, nil
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ func NewUpdateChannelLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Upd
|
||||
}
|
||||
}
|
||||
|
||||
func (l *UpdateChannelLogic) UpdateChannel(in *radio.UpdateChannelReq) (*radio.UpdateChannelResp, error) {
|
||||
func (l *UpdateChannelLogic) UpdateChannel(in *radio.UpdateChannelReq) (*radio.CommonResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.UpdateChannelResp{}, nil
|
||||
return &radio.CommonResp{}, nil
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ func NewUpdateProgramLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Upd
|
||||
}
|
||||
}
|
||||
|
||||
func (l *UpdateProgramLogic) UpdateProgram(in *radio.UpdateProgramReq) (*radio.UpdateProgramResp, error) {
|
||||
func (l *UpdateProgramLogic) UpdateProgram(in *radio.UpdateProgramReq) (*radio.CommonResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.UpdateProgramResp{}, nil
|
||||
return &radio.CommonResp{}, nil
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ func NewUpdateVoiceLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Updat
|
||||
}
|
||||
}
|
||||
|
||||
func (l *UpdateVoiceLogic) UpdateVoice(in *radio.UpdateVoiceReq) (*radio.UpdateVoiceResp, error) {
|
||||
func (l *UpdateVoiceLogic) UpdateVoice(in *radio.UpdateVoiceReq) (*radio.CommonResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &radio.UpdateVoiceResp{}, nil
|
||||
return &radio.CommonResp{}, nil
|
||||
}
|
||||
|
||||
@@ -23,139 +23,139 @@ func NewRadioServiceServer(svcCtx *svc.ServiceContext) *RadioServiceServer {
|
||||
}
|
||||
}
|
||||
|
||||
// 用户
|
||||
func (s *RadioServiceServer) GetRadioUserProfile(ctx context.Context, in *radio.GetRadioUserProfileReq) (*radio.GetRadioUserProfileResp, error) {
|
||||
l := logic.NewGetRadioUserProfileLogic(ctx, s.svcCtx)
|
||||
return l.GetRadioUserProfile(in)
|
||||
// 用户Profile
|
||||
func (s *RadioServiceServer) GetUserProfile(ctx context.Context, in *radio.GetProfileReq) (*radio.RadioUserProfile, error) {
|
||||
l := logic.NewGetUserProfileLogic(ctx, s.svcCtx)
|
||||
return l.GetUserProfile(in)
|
||||
}
|
||||
|
||||
// 分类
|
||||
func (s *RadioServiceServer) CreateCategory(ctx context.Context, in *radio.CreateCategoryReq) (*radio.CreateCategoryResp, error) {
|
||||
func (s *RadioServiceServer) CreateCategory(ctx context.Context, in *radio.CategoryReq) (*radio.CommonResp, error) {
|
||||
l := logic.NewCreateCategoryLogic(ctx, s.svcCtx)
|
||||
return l.CreateCategory(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) UpdateCategory(ctx context.Context, in *radio.UpdateCategoryReq) (*radio.UpdateCategoryResp, error) {
|
||||
func (s *RadioServiceServer) UpdateCategory(ctx context.Context, in *radio.CategoryUpdateReq) (*radio.CommonResp, error) {
|
||||
l := logic.NewUpdateCategoryLogic(ctx, s.svcCtx)
|
||||
return l.UpdateCategory(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) DeleteCategory(ctx context.Context, in *radio.DeleteByIdsReq) (*radio.DeleteResp, error) {
|
||||
func (s *RadioServiceServer) DeleteCategory(ctx context.Context, in *radio.IdsReq) (*radio.CommonResp, error) {
|
||||
l := logic.NewDeleteCategoryLogic(ctx, s.svcCtx)
|
||||
return l.DeleteCategory(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) GetCategoryList(ctx context.Context, in *radio.GetCategoryListReq) (*radio.GetCategoryListResp, error) {
|
||||
func (s *RadioServiceServer) GetCategoryList(ctx context.Context, in *radio.CategoryListReq) (*radio.CategoryListResp, error) {
|
||||
l := logic.NewGetCategoryListLogic(ctx, s.svcCtx)
|
||||
return l.GetCategoryList(in)
|
||||
}
|
||||
|
||||
// 频道
|
||||
func (s *RadioServiceServer) CreateChannel(ctx context.Context, in *radio.CreateChannelReq) (*radio.CreateChannelResp, error) {
|
||||
func (s *RadioServiceServer) CreateChannel(ctx context.Context, in *radio.CreateChannelReq) (*radio.CommonResp, error) {
|
||||
l := logic.NewCreateChannelLogic(ctx, s.svcCtx)
|
||||
return l.CreateChannel(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) UpdateChannel(ctx context.Context, in *radio.UpdateChannelReq) (*radio.UpdateChannelResp, error) {
|
||||
func (s *RadioServiceServer) UpdateChannel(ctx context.Context, in *radio.UpdateChannelReq) (*radio.CommonResp, error) {
|
||||
l := logic.NewUpdateChannelLogic(ctx, s.svcCtx)
|
||||
return l.UpdateChannel(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) DeleteChannel(ctx context.Context, in *radio.DeleteByIdsReq) (*radio.DeleteResp, error) {
|
||||
func (s *RadioServiceServer) DeleteChannel(ctx context.Context, in *radio.IdsReq) (*radio.CommonResp, error) {
|
||||
l := logic.NewDeleteChannelLogic(ctx, s.svcCtx)
|
||||
return l.DeleteChannel(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) GetChannelList(ctx context.Context, in *radio.GetChannelListReq) (*radio.GetChannelListResp, error) {
|
||||
func (s *RadioServiceServer) GetChannelList(ctx context.Context, in *radio.ChannelListReq) (*radio.ChannelListResp, error) {
|
||||
l := logic.NewGetChannelListLogic(ctx, s.svcCtx)
|
||||
return l.GetChannelList(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) GetChannelDetail(ctx context.Context, in *radio.GetChannelDetailReq) (*radio.GetChannelDetailResp, error) {
|
||||
func (s *RadioServiceServer) GetChannelDetail(ctx context.Context, in *radio.IdReq) (*radio.ChannelInfo, error) {
|
||||
l := logic.NewGetChannelDetailLogic(ctx, s.svcCtx)
|
||||
return l.GetChannelDetail(in)
|
||||
}
|
||||
|
||||
// 节目
|
||||
func (s *RadioServiceServer) CreateProgram(ctx context.Context, in *radio.CreateProgramReq) (*radio.CreateProgramResp, error) {
|
||||
func (s *RadioServiceServer) CreateProgram(ctx context.Context, in *radio.CreateProgramReq) (*radio.CommonResp, error) {
|
||||
l := logic.NewCreateProgramLogic(ctx, s.svcCtx)
|
||||
return l.CreateProgram(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) UpdateProgram(ctx context.Context, in *radio.UpdateProgramReq) (*radio.UpdateProgramResp, error) {
|
||||
func (s *RadioServiceServer) UpdateProgram(ctx context.Context, in *radio.UpdateProgramReq) (*radio.CommonResp, error) {
|
||||
l := logic.NewUpdateProgramLogic(ctx, s.svcCtx)
|
||||
return l.UpdateProgram(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) DeleteProgram(ctx context.Context, in *radio.DeleteByIdsReq) (*radio.DeleteResp, error) {
|
||||
func (s *RadioServiceServer) DeleteProgram(ctx context.Context, in *radio.IdsReq) (*radio.CommonResp, error) {
|
||||
l := logic.NewDeleteProgramLogic(ctx, s.svcCtx)
|
||||
return l.DeleteProgram(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) GetProgramList(ctx context.Context, in *radio.GetProgramListReq) (*radio.GetProgramListResp, error) {
|
||||
func (s *RadioServiceServer) GetProgramList(ctx context.Context, in *radio.ProgramListReq) (*radio.ProgramListResp, error) {
|
||||
l := logic.NewGetProgramListLogic(ctx, s.svcCtx)
|
||||
return l.GetProgramList(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) GetProgramDetail(ctx context.Context, in *radio.GetProgramDetailReq) (*radio.GetProgramDetailResp, error) {
|
||||
func (s *RadioServiceServer) GetProgramDetail(ctx context.Context, in *radio.IdReq) (*radio.ProgramInfo, error) {
|
||||
l := logic.NewGetProgramDetailLogic(ctx, s.svcCtx)
|
||||
return l.GetProgramDetail(in)
|
||||
}
|
||||
|
||||
// 音色
|
||||
func (s *RadioServiceServer) CreateVoice(ctx context.Context, in *radio.CreateVoiceReq) (*radio.CreateVoiceResp, error) {
|
||||
func (s *RadioServiceServer) CreateVoice(ctx context.Context, in *radio.CreateVoiceReq) (*radio.CommonResp, error) {
|
||||
l := logic.NewCreateVoiceLogic(ctx, s.svcCtx)
|
||||
return l.CreateVoice(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) UpdateVoice(ctx context.Context, in *radio.UpdateVoiceReq) (*radio.UpdateVoiceResp, error) {
|
||||
func (s *RadioServiceServer) UpdateVoice(ctx context.Context, in *radio.UpdateVoiceReq) (*radio.CommonResp, error) {
|
||||
l := logic.NewUpdateVoiceLogic(ctx, s.svcCtx)
|
||||
return l.UpdateVoice(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) DeleteVoice(ctx context.Context, in *radio.DeleteByIdsReq) (*radio.DeleteResp, error) {
|
||||
func (s *RadioServiceServer) DeleteVoice(ctx context.Context, in *radio.IdsReq) (*radio.CommonResp, error) {
|
||||
l := logic.NewDeleteVoiceLogic(ctx, s.svcCtx)
|
||||
return l.DeleteVoice(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) GetVoiceList(ctx context.Context, in *radio.GetVoiceListReq) (*radio.GetVoiceListResp, error) {
|
||||
func (s *RadioServiceServer) GetVoiceList(ctx context.Context, in *radio.VoiceListReq) (*radio.VoiceListResp, error) {
|
||||
l := logic.NewGetVoiceListLogic(ctx, s.svcCtx)
|
||||
return l.GetVoiceList(in)
|
||||
}
|
||||
|
||||
// 互动
|
||||
func (s *RadioServiceServer) ToggleLike(ctx context.Context, in *radio.ToggleLikeReq) (*radio.ToggleLikeResp, error) {
|
||||
func (s *RadioServiceServer) ToggleLike(ctx context.Context, in *radio.ToggleLikeReq) (*radio.CommonResp, error) {
|
||||
l := logic.NewToggleLikeLogic(ctx, s.svcCtx)
|
||||
return l.ToggleLike(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) ToggleFavorite(ctx context.Context, in *radio.ToggleFavoriteReq) (*radio.ToggleFavoriteResp, error) {
|
||||
func (s *RadioServiceServer) ToggleFavorite(ctx context.Context, in *radio.ToggleFavoriteReq) (*radio.CommonResp, error) {
|
||||
l := logic.NewToggleFavoriteLogic(ctx, s.svcCtx)
|
||||
return l.ToggleFavorite(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) CommentProgram(ctx context.Context, in *radio.CommentReq) (*radio.CommentResp, error) {
|
||||
func (s *RadioServiceServer) CommentProgram(ctx context.Context, in *radio.CommentReq) (*radio.CommonResp, error) {
|
||||
l := logic.NewCommentProgramLogic(ctx, s.svcCtx)
|
||||
return l.CommentProgram(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) RecordHistory(ctx context.Context, in *radio.RecordHistoryReq) (*radio.RecordHistoryResp, error) {
|
||||
func (s *RadioServiceServer) RecordHistory(ctx context.Context, in *radio.RecordHistoryReq) (*radio.CommonResp, error) {
|
||||
l := logic.NewRecordHistoryLogic(ctx, s.svcCtx)
|
||||
return l.RecordHistory(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) GetHistoryList(ctx context.Context, in *radio.GetHistoryListReq) (*radio.GetHistoryListResp, error) {
|
||||
l := logic.NewGetHistoryListLogic(ctx, s.svcCtx)
|
||||
return l.GetHistoryList(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) GetFavoriteList(ctx context.Context, in *radio.GetFavoriteListReq) (*radio.GetFavoriteListResp, error) {
|
||||
func (s *RadioServiceServer) GetFavoriteList(ctx context.Context, in *radio.InteractionListReq) (*radio.FavoriteListResp, error) {
|
||||
l := logic.NewGetFavoriteListLogic(ctx, s.svcCtx)
|
||||
return l.GetFavoriteList(in)
|
||||
}
|
||||
|
||||
// 订阅
|
||||
func (s *RadioServiceServer) GetMySubscriptions(ctx context.Context, in *radio.GetMySubscriptionsReq) (*radio.GetMySubscriptionsResp, error) {
|
||||
func (s *RadioServiceServer) GetHistoryList(ctx context.Context, in *radio.InteractionListReq) (*radio.HistoryListResp, error) {
|
||||
l := logic.NewGetHistoryListLogic(ctx, s.svcCtx)
|
||||
return l.GetHistoryList(in)
|
||||
}
|
||||
|
||||
// 订阅/VIP
|
||||
func (s *RadioServiceServer) GetMySubscriptions(ctx context.Context, in *radio.SubscriptionListReq) (*radio.SubscriptionListResp, error) {
|
||||
l := logic.NewGetMySubscriptionsLogic(ctx, s.svcCtx)
|
||||
return l.GetMySubscriptions(in)
|
||||
}
|
||||
@@ -165,13 +165,28 @@ func (s *RadioServiceServer) CreatePayOrder(ctx context.Context, in *radio.Creat
|
||||
return l.CreatePayOrder(in)
|
||||
}
|
||||
|
||||
// VIP
|
||||
func (s *RadioServiceServer) GetVipConfigList(ctx context.Context, in *radio.GetVipConfigListReq) (*radio.GetVipConfigListResp, error) {
|
||||
func (s *RadioServiceServer) GetVipConfigList(ctx context.Context, in *radio.IdReq) (*radio.VipConfigListResp, error) {
|
||||
l := logic.NewGetVipConfigListLogic(ctx, s.svcCtx)
|
||||
return l.GetVipConfigList(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) GetMyVipInfo(ctx context.Context, in *radio.GetMyVipInfoReq) (*radio.GetMyVipInfoResp, error) {
|
||||
func (s *RadioServiceServer) GetMyVipInfo(ctx context.Context, in *radio.GetProfileReq) (*radio.RadioUserProfile, error) {
|
||||
l := logic.NewGetMyVipInfoLogic(ctx, s.svcCtx)
|
||||
return l.GetMyVipInfo(in)
|
||||
}
|
||||
|
||||
// 数据分析
|
||||
func (s *RadioServiceServer) GetAnalyticsOverview(ctx context.Context, in *radio.AnalyticsReq) (*radio.AnalyticsOverviewResp, error) {
|
||||
l := logic.NewGetAnalyticsOverviewLogic(ctx, s.svcCtx)
|
||||
return l.GetAnalyticsOverview(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) GetChannelAnalytics(ctx context.Context, in *radio.AnalyticsReq) (*radio.ChannelAnalyticsResp, error) {
|
||||
l := logic.NewGetChannelAnalyticsLogic(ctx, s.svcCtx)
|
||||
return l.GetChannelAnalytics(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) GetUserAnalytics(ctx context.Context, in *radio.AnalyticsReq) (*radio.UserAnalyticsResp, error) {
|
||||
l := logic.NewGetUserAnalyticsLogic(ctx, s.svcCtx)
|
||||
return l.GetUserAnalytics(in)
|
||||
}
|
||||
|
||||
@@ -1,13 +1,44 @@
|
||||
package svc
|
||||
|
||||
import "sundynix-micro-go/app/radio/rpc/internal/config"
|
||||
import (
|
||||
radioModel "sundynix-micro-go/app/radio/model"
|
||||
"sundynix-micro-go/app/radio/rpc/internal/config"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"gorm.io/driver/mysql"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type ServiceContext struct {
|
||||
Config config.Config
|
||||
DB *gorm.DB
|
||||
}
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
db, err := gorm.Open(mysql.Open(c.DB.DataSource), &gorm.Config{})
|
||||
if err != nil {
|
||||
logx.Errorf("连接数据库失败: %v", err)
|
||||
panic(err)
|
||||
}
|
||||
|
||||
if err := db.AutoMigrate(
|
||||
&radioModel.SundynixRadioUserProfile{},
|
||||
&radioModel.SundynixRadioCategory{},
|
||||
&radioModel.SundynixRadioChannel{},
|
||||
&radioModel.SundynixRadioProgram{},
|
||||
&radioModel.SundynixRadioVoice{},
|
||||
&radioModel.SundynixRadioLike{},
|
||||
&radioModel.SundynixRadioFavorite{},
|
||||
&radioModel.SundynixRadioComment{},
|
||||
&radioModel.SundynixRadioHistory{},
|
||||
&radioModel.SundynixRadioSubscription{},
|
||||
&radioModel.SundynixRadioSubscriptionOrder{},
|
||||
&radioModel.SundynixRadioPayNotify{},
|
||||
&radioModel.SundynixRadioVipConfig{},
|
||||
&radioModel.SundynixRadioListenLog{},
|
||||
); err != nil {
|
||||
logx.Errorf("数据库迁移失败: %v", err)
|
||||
}
|
||||
|
||||
return &ServiceContext{Config: c, DB: db}
|
||||
}
|
||||
|
||||
+308
-107
@@ -4,7 +4,23 @@ package radio;
|
||||
|
||||
option go_package = "./radio";
|
||||
|
||||
// ========== 通用 ==========
|
||||
|
||||
message CommonResp {
|
||||
int64 code = 1;
|
||||
string msg = 2;
|
||||
}
|
||||
|
||||
message IdReq {
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message IdsReq {
|
||||
repeated string ids = 1;
|
||||
}
|
||||
|
||||
// ========== 用户Profile ==========
|
||||
|
||||
message RadioUserProfile {
|
||||
string id = 1;
|
||||
string userId = 2;
|
||||
@@ -14,26 +30,45 @@ message RadioUserProfile {
|
||||
int64 vipExpireAt = 6;
|
||||
int32 vipLevel = 7;
|
||||
}
|
||||
message GetRadioUserProfileReq { string userId = 1; }
|
||||
message GetRadioUserProfileResp { RadioUserProfile profile = 1; }
|
||||
|
||||
message GetProfileReq {
|
||||
string userId = 1;
|
||||
}
|
||||
|
||||
// ========== 分类 ==========
|
||||
|
||||
message CategoryInfo {
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
string icon = 3;
|
||||
int32 sort = 4;
|
||||
}
|
||||
message CreateCategoryReq { string name = 1; string icon = 2; int32 sort = 3; }
|
||||
message CreateCategoryResp { string id = 1; }
|
||||
message UpdateCategoryReq { string id = 1; string name = 2; string icon = 3; int32 sort = 4; }
|
||||
message UpdateCategoryResp {}
|
||||
message DeleteByIdsReq { repeated string ids = 1; }
|
||||
message DeleteResp {}
|
||||
message GetCategoryListReq { int32 current = 1; int32 pageSize = 2; }
|
||||
message GetCategoryListResp { repeated CategoryInfo list = 1; int64 total = 2; }
|
||||
|
||||
message CategoryReq {
|
||||
string name = 1;
|
||||
string icon = 2;
|
||||
int32 sort = 3;
|
||||
}
|
||||
|
||||
message CategoryUpdateReq {
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
string icon = 3;
|
||||
int32 sort = 4;
|
||||
}
|
||||
|
||||
message CategoryListResp {
|
||||
repeated CategoryInfo list = 1;
|
||||
int64 total = 2;
|
||||
}
|
||||
|
||||
message CategoryListReq {
|
||||
int32 current = 1;
|
||||
int32 pageSize = 2;
|
||||
}
|
||||
|
||||
// ========== 频道 ==========
|
||||
|
||||
message ChannelInfo {
|
||||
string id = 1;
|
||||
string categoryId = 2;
|
||||
@@ -48,28 +83,52 @@ message ChannelInfo {
|
||||
string tags = 11;
|
||||
int32 sort = 12;
|
||||
int32 status = 13;
|
||||
int64 createdAt = 14;
|
||||
}
|
||||
|
||||
message CreateChannelReq {
|
||||
string categoryId = 1; string name = 2; string description = 3;
|
||||
int32 isFree = 4; int32 isVipOnly = 5;
|
||||
int32 monthlyPrice = 6; int32 quarterlyPrice = 7; int32 annualPrice = 8;
|
||||
string cover = 9; string tags = 10; int32 sort = 11;
|
||||
string categoryId = 1;
|
||||
string name = 2;
|
||||
string description = 3;
|
||||
int32 isFree = 4;
|
||||
int32 isVipOnly = 5;
|
||||
int32 monthlyPrice = 6;
|
||||
int32 quarterlyPrice = 7;
|
||||
int32 annualPrice = 8;
|
||||
string cover = 9;
|
||||
string tags = 10;
|
||||
int32 sort = 11;
|
||||
}
|
||||
message CreateChannelResp { string id = 1; }
|
||||
|
||||
message UpdateChannelReq {
|
||||
string id = 1; string name = 2; string description = 3;
|
||||
int32 isFree = 4; int32 isVipOnly = 5;
|
||||
int32 monthlyPrice = 6; int32 quarterlyPrice = 7; int32 annualPrice = 8;
|
||||
string cover = 9; string tags = 10; int32 sort = 11; int32 status = 12;
|
||||
string id = 1;
|
||||
string categoryId = 2;
|
||||
string name = 3;
|
||||
string description = 4;
|
||||
int32 isFree = 5;
|
||||
int32 isVipOnly = 6;
|
||||
int32 monthlyPrice = 7;
|
||||
int32 quarterlyPrice = 8;
|
||||
int32 annualPrice = 9;
|
||||
string cover = 10;
|
||||
string tags = 11;
|
||||
int32 sort = 12;
|
||||
int32 status = 13;
|
||||
}
|
||||
|
||||
message ChannelListReq {
|
||||
int32 current = 1;
|
||||
int32 pageSize = 2;
|
||||
string categoryId = 3;
|
||||
string userId = 4;
|
||||
}
|
||||
|
||||
message ChannelListResp {
|
||||
repeated ChannelInfo list = 1;
|
||||
int64 total = 2;
|
||||
}
|
||||
message UpdateChannelResp {}
|
||||
message GetChannelListReq { int32 current = 1; int32 pageSize = 2; string categoryId = 3; string userId = 4; }
|
||||
message GetChannelListResp { repeated ChannelInfo list = 1; int64 total = 2; }
|
||||
message GetChannelDetailReq { string id = 1; string userId = 2; }
|
||||
message GetChannelDetailResp { ChannelInfo channel = 1; }
|
||||
|
||||
// ========== 节目 ==========
|
||||
|
||||
message ProgramInfo {
|
||||
string id = 1;
|
||||
string channelId = 2;
|
||||
@@ -84,113 +143,255 @@ message ProgramInfo {
|
||||
int32 playCount = 11;
|
||||
int32 likeCount = 12;
|
||||
int32 status = 13;
|
||||
int64 createdAt = 14;
|
||||
}
|
||||
|
||||
message CreateProgramReq {
|
||||
string channelId = 1; string title = 2; string description = 3;
|
||||
string content = 4; string cover = 5; string tags = 6;
|
||||
string channelId = 1;
|
||||
string title = 2;
|
||||
string description = 3;
|
||||
string content = 4;
|
||||
string cover = 5;
|
||||
string tags = 6;
|
||||
}
|
||||
message CreateProgramResp { string id = 1; }
|
||||
|
||||
message UpdateProgramReq {
|
||||
string id = 1; string title = 2; string description = 3;
|
||||
string content = 4; string cover = 5; string audioId = 6;
|
||||
int32 audioStatus = 7; int32 duration = 8; string tags = 9; int32 status = 10;
|
||||
string id = 1;
|
||||
string channelId = 2;
|
||||
string title = 3;
|
||||
string description = 4;
|
||||
string content = 5;
|
||||
string cover = 6;
|
||||
string audioId = 7;
|
||||
int32 audioStatus = 8;
|
||||
int32 duration = 9;
|
||||
string tags = 10;
|
||||
int32 status = 11;
|
||||
}
|
||||
|
||||
message ProgramListReq {
|
||||
int32 current = 1;
|
||||
int32 pageSize = 2;
|
||||
string channelId = 3;
|
||||
string userId = 4;
|
||||
}
|
||||
|
||||
message ProgramListResp {
|
||||
repeated ProgramInfo list = 1;
|
||||
int64 total = 2;
|
||||
}
|
||||
message UpdateProgramResp {}
|
||||
message GetProgramListReq { int32 current = 1; int32 pageSize = 2; string channelId = 3; string userId = 4; }
|
||||
message GetProgramListResp { repeated ProgramInfo list = 1; int64 total = 2; }
|
||||
message GetProgramDetailReq { string id = 1; string userId = 2; }
|
||||
message GetProgramDetailResp { ProgramInfo program = 1; }
|
||||
|
||||
// ========== 音色 ==========
|
||||
|
||||
message VoiceInfo {
|
||||
string id = 1; string speakerId = 2; string name = 3;
|
||||
string description = 4; string gender = 5; string icon = 6;
|
||||
string audioId = 7; int32 sort = 8; int32 status = 9;
|
||||
int32 isDefault = 10; int32 useCount = 11;
|
||||
string id = 1;
|
||||
string speakerId = 2;
|
||||
string name = 3;
|
||||
string description = 4;
|
||||
string gender = 5;
|
||||
string icon = 6;
|
||||
string audioId = 7;
|
||||
int32 sort = 8;
|
||||
int32 status = 9;
|
||||
int32 isDefault = 10;
|
||||
}
|
||||
|
||||
message CreateVoiceReq {
|
||||
string speakerId = 1;
|
||||
string name = 2;
|
||||
string description = 3;
|
||||
string gender = 4;
|
||||
string icon = 5;
|
||||
string audioId = 6;
|
||||
int32 sort = 7;
|
||||
int32 isDefault = 8;
|
||||
}
|
||||
|
||||
message UpdateVoiceReq {
|
||||
string id = 1;
|
||||
string speakerId = 2;
|
||||
string name = 3;
|
||||
string description = 4;
|
||||
string gender = 5;
|
||||
string icon = 6;
|
||||
string audioId = 7;
|
||||
int32 sort = 8;
|
||||
int32 status = 9;
|
||||
int32 isDefault = 10;
|
||||
}
|
||||
|
||||
message VoiceListReq {
|
||||
int32 current = 1;
|
||||
int32 pageSize = 2;
|
||||
}
|
||||
|
||||
message VoiceListResp {
|
||||
repeated VoiceInfo list = 1;
|
||||
int64 total = 2;
|
||||
}
|
||||
message CreateVoiceReq { string speakerId = 1; string name = 2; string description = 3; string gender = 4; string icon = 5; string audioId = 6; int32 sort = 7; int32 isDefault = 8; }
|
||||
message CreateVoiceResp { string id = 1; }
|
||||
message UpdateVoiceReq { string id = 1; string name = 2; string description = 3; string icon = 4; string audioId = 5; int32 sort = 6; int32 status = 7; int32 isDefault = 8; }
|
||||
message UpdateVoiceResp {}
|
||||
message GetVoiceListReq { int32 current = 1; int32 pageSize = 2; }
|
||||
message GetVoiceListResp { repeated VoiceInfo list = 1; int64 total = 2; }
|
||||
|
||||
// ========== 互动 ==========
|
||||
message ToggleLikeReq { string userId = 1; string programId = 2; }
|
||||
message ToggleLikeResp { bool liked = 1; }
|
||||
message ToggleFavoriteReq { string userId = 1; string programId = 2; }
|
||||
message ToggleFavoriteResp { bool favorited = 1; }
|
||||
message CommentReq { string userId = 1; string programId = 2; string content = 3; string parentId = 4; }
|
||||
message CommentResp {}
|
||||
message RecordHistoryReq { string userId = 1; string programId = 2; int32 duration = 3; }
|
||||
message RecordHistoryResp {}
|
||||
message GetHistoryListReq { string userId = 1; int32 current = 2; int32 pageSize = 3; }
|
||||
message GetHistoryListResp { repeated ProgramInfo list = 1; int64 total = 2; }
|
||||
message GetFavoriteListReq { string userId = 1; int32 current = 2; int32 pageSize = 3; }
|
||||
message GetFavoriteListResp { repeated ProgramInfo list = 1; int64 total = 2; }
|
||||
|
||||
// ========== 订阅/支付 ==========
|
||||
message SubscriptionInfo {
|
||||
string id = 1; string userId = 2; string channelId = 3;
|
||||
int64 expiredAt = 4; int32 status = 5;
|
||||
message ToggleLikeReq {
|
||||
string userId = 1;
|
||||
string programId = 2;
|
||||
}
|
||||
|
||||
message ToggleFavoriteReq {
|
||||
string userId = 1;
|
||||
string programId = 2;
|
||||
}
|
||||
|
||||
message CommentReq {
|
||||
string userId = 1;
|
||||
string programId = 2;
|
||||
string content = 3;
|
||||
string parentId = 4;
|
||||
}
|
||||
|
||||
message RecordHistoryReq {
|
||||
string userId = 1;
|
||||
string programId = 2;
|
||||
int32 duration = 3;
|
||||
}
|
||||
|
||||
message InteractionListReq {
|
||||
string userId = 1;
|
||||
int32 current = 2;
|
||||
int32 pageSize = 3;
|
||||
}
|
||||
|
||||
message FavoriteListResp {
|
||||
repeated ProgramInfo list = 1;
|
||||
int64 total = 2;
|
||||
}
|
||||
|
||||
message HistoryListResp {
|
||||
repeated ProgramInfo list = 1;
|
||||
int64 total = 2;
|
||||
}
|
||||
|
||||
// ========== 订阅/VIP ==========
|
||||
|
||||
message SubscriptionInfo {
|
||||
string id = 1;
|
||||
string channelId = 2;
|
||||
int64 expiredAt = 3;
|
||||
int32 status = 4;
|
||||
}
|
||||
|
||||
message SubscriptionListReq {
|
||||
string userId = 1;
|
||||
}
|
||||
|
||||
message SubscriptionListResp {
|
||||
repeated SubscriptionInfo list = 1;
|
||||
}
|
||||
|
||||
message CreatePayOrderReq {
|
||||
string userId = 1;
|
||||
string channelId = 2;
|
||||
string planType = 3;
|
||||
}
|
||||
|
||||
message CreatePayOrderResp {
|
||||
string orderNo = 1;
|
||||
string prepayId = 2;
|
||||
}
|
||||
message GetMySubscriptionsReq { string userId = 1; }
|
||||
message GetMySubscriptionsResp { repeated SubscriptionInfo list = 1; }
|
||||
message CreatePayOrderReq { string userId = 1; string channelId = 2; string planType = 3; }
|
||||
message CreatePayOrderResp { string orderNo = 1; string prepayId = 2; }
|
||||
|
||||
// ========== VIP ==========
|
||||
message VipConfigInfo {
|
||||
string id = 1; string name = 2; string planType = 3;
|
||||
int32 price = 4; int32 originalPrice = 5; int32 duration = 6;
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
string planType = 3;
|
||||
int32 price = 4;
|
||||
int32 originalPrice = 5;
|
||||
int32 duration = 6;
|
||||
string desc = 7;
|
||||
}
|
||||
message GetVipConfigListReq { int32 current = 1; int32 pageSize = 2; }
|
||||
message GetVipConfigListResp { repeated VipConfigInfo list = 1; int64 total = 2; }
|
||||
message GetMyVipInfoReq { string userId = 1; }
|
||||
message GetMyVipInfoResp { RadioUserProfile profile = 1; }
|
||||
|
||||
// ========== 通用 ==========
|
||||
message Empty {}
|
||||
message VipConfigListResp {
|
||||
repeated VipConfigInfo list = 1;
|
||||
}
|
||||
|
||||
// ========== 数据分析 ==========
|
||||
|
||||
message AnalyticsReq {
|
||||
string startDate = 1;
|
||||
string endDate = 2;
|
||||
}
|
||||
|
||||
message AnalyticsOverviewResp {
|
||||
int64 totalUsers = 1;
|
||||
int64 totalPlays = 2;
|
||||
int64 totalChannels = 3;
|
||||
int64 totalPrograms = 4;
|
||||
}
|
||||
|
||||
message ChannelAnalyticsResp {
|
||||
repeated ChannelAnalyticsItem list = 1;
|
||||
}
|
||||
|
||||
message ChannelAnalyticsItem {
|
||||
string channelId = 1;
|
||||
string channelName = 2;
|
||||
int64 playCount = 3;
|
||||
int64 likeCount = 4;
|
||||
int64 subscriberCount = 5;
|
||||
}
|
||||
|
||||
message UserAnalyticsResp {
|
||||
int64 newUsers = 1;
|
||||
int64 activeUsers = 2;
|
||||
int64 vipUsers = 3;
|
||||
}
|
||||
|
||||
// ========== 服务定义 ==========
|
||||
|
||||
service RadioService {
|
||||
// 用户
|
||||
rpc GetRadioUserProfile(GetRadioUserProfileReq) returns (GetRadioUserProfileResp);
|
||||
// 用户Profile
|
||||
rpc GetUserProfile(GetProfileReq) returns (RadioUserProfile);
|
||||
|
||||
// 分类
|
||||
rpc CreateCategory(CreateCategoryReq) returns (CreateCategoryResp);
|
||||
rpc UpdateCategory(UpdateCategoryReq) returns (UpdateCategoryResp);
|
||||
rpc DeleteCategory(DeleteByIdsReq) returns (DeleteResp);
|
||||
rpc GetCategoryList(GetCategoryListReq) returns (GetCategoryListResp);
|
||||
rpc CreateCategory(CategoryReq) returns (CommonResp);
|
||||
rpc UpdateCategory(CategoryUpdateReq) returns (CommonResp);
|
||||
rpc DeleteCategory(IdsReq) returns (CommonResp);
|
||||
rpc GetCategoryList(CategoryListReq) returns (CategoryListResp);
|
||||
|
||||
// 频道
|
||||
rpc CreateChannel(CreateChannelReq) returns (CreateChannelResp);
|
||||
rpc UpdateChannel(UpdateChannelReq) returns (UpdateChannelResp);
|
||||
rpc DeleteChannel(DeleteByIdsReq) returns (DeleteResp);
|
||||
rpc GetChannelList(GetChannelListReq) returns (GetChannelListResp);
|
||||
rpc GetChannelDetail(GetChannelDetailReq) returns (GetChannelDetailResp);
|
||||
rpc CreateChannel(CreateChannelReq) returns (CommonResp);
|
||||
rpc UpdateChannel(UpdateChannelReq) returns (CommonResp);
|
||||
rpc DeleteChannel(IdsReq) returns (CommonResp);
|
||||
rpc GetChannelList(ChannelListReq) returns (ChannelListResp);
|
||||
rpc GetChannelDetail(IdReq) returns (ChannelInfo);
|
||||
|
||||
// 节目
|
||||
rpc CreateProgram(CreateProgramReq) returns (CreateProgramResp);
|
||||
rpc UpdateProgram(UpdateProgramReq) returns (UpdateProgramResp);
|
||||
rpc DeleteProgram(DeleteByIdsReq) returns (DeleteResp);
|
||||
rpc GetProgramList(GetProgramListReq) returns (GetProgramListResp);
|
||||
rpc GetProgramDetail(GetProgramDetailReq) returns (GetProgramDetailResp);
|
||||
rpc CreateProgram(CreateProgramReq) returns (CommonResp);
|
||||
rpc UpdateProgram(UpdateProgramReq) returns (CommonResp);
|
||||
rpc DeleteProgram(IdsReq) returns (CommonResp);
|
||||
rpc GetProgramList(ProgramListReq) returns (ProgramListResp);
|
||||
rpc GetProgramDetail(IdReq) returns (ProgramInfo);
|
||||
|
||||
// 音色
|
||||
rpc CreateVoice(CreateVoiceReq) returns (CreateVoiceResp);
|
||||
rpc UpdateVoice(UpdateVoiceReq) returns (UpdateVoiceResp);
|
||||
rpc DeleteVoice(DeleteByIdsReq) returns (DeleteResp);
|
||||
rpc GetVoiceList(GetVoiceListReq) returns (GetVoiceListResp);
|
||||
rpc CreateVoice(CreateVoiceReq) returns (CommonResp);
|
||||
rpc UpdateVoice(UpdateVoiceReq) returns (CommonResp);
|
||||
rpc DeleteVoice(IdsReq) returns (CommonResp);
|
||||
rpc GetVoiceList(VoiceListReq) returns (VoiceListResp);
|
||||
|
||||
// 互动
|
||||
rpc ToggleLike(ToggleLikeReq) returns (ToggleLikeResp);
|
||||
rpc ToggleFavorite(ToggleFavoriteReq) returns (ToggleFavoriteResp);
|
||||
rpc CommentProgram(CommentReq) returns (CommentResp);
|
||||
rpc RecordHistory(RecordHistoryReq) returns (RecordHistoryResp);
|
||||
rpc GetHistoryList(GetHistoryListReq) returns (GetHistoryListResp);
|
||||
rpc GetFavoriteList(GetFavoriteListReq) returns (GetFavoriteListResp);
|
||||
// 订阅
|
||||
rpc GetMySubscriptions(GetMySubscriptionsReq) returns (GetMySubscriptionsResp);
|
||||
rpc ToggleLike(ToggleLikeReq) returns (CommonResp);
|
||||
rpc ToggleFavorite(ToggleFavoriteReq) returns (CommonResp);
|
||||
rpc CommentProgram(CommentReq) returns (CommonResp);
|
||||
rpc RecordHistory(RecordHistoryReq) returns (CommonResp);
|
||||
rpc GetFavoriteList(InteractionListReq) returns (FavoriteListResp);
|
||||
rpc GetHistoryList(InteractionListReq) returns (HistoryListResp);
|
||||
|
||||
// 订阅/VIP
|
||||
rpc GetMySubscriptions(SubscriptionListReq) returns (SubscriptionListResp);
|
||||
rpc CreatePayOrder(CreatePayOrderReq) returns (CreatePayOrderResp);
|
||||
// VIP
|
||||
rpc GetVipConfigList(GetVipConfigListReq) returns (GetVipConfigListResp);
|
||||
rpc GetMyVipInfo(GetMyVipInfoReq) returns (GetMyVipInfoResp);
|
||||
rpc GetVipConfigList(IdReq) returns (VipConfigListResp);
|
||||
rpc GetMyVipInfo(GetProfileReq) returns (RadioUserProfile);
|
||||
|
||||
// 数据分析
|
||||
rpc GetAnalyticsOverview(AnalyticsReq) returns (AnalyticsOverviewResp);
|
||||
rpc GetChannelAnalytics(AnalyticsReq) returns (ChannelAnalyticsResp);
|
||||
rpc GetUserAnalytics(AnalyticsReq) returns (UserAnalyticsResp);
|
||||
}
|
||||
|
||||
+1020
-1651
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -14,105 +14,92 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
CategoryInfo = radio.CategoryInfo
|
||||
ChannelInfo = radio.ChannelInfo
|
||||
CommentReq = radio.CommentReq
|
||||
CommentResp = radio.CommentResp
|
||||
CreateCategoryReq = radio.CreateCategoryReq
|
||||
CreateCategoryResp = radio.CreateCategoryResp
|
||||
CreateChannelReq = radio.CreateChannelReq
|
||||
CreateChannelResp = radio.CreateChannelResp
|
||||
CreatePayOrderReq = radio.CreatePayOrderReq
|
||||
CreatePayOrderResp = radio.CreatePayOrderResp
|
||||
CreateProgramReq = radio.CreateProgramReq
|
||||
CreateProgramResp = radio.CreateProgramResp
|
||||
CreateVoiceReq = radio.CreateVoiceReq
|
||||
CreateVoiceResp = radio.CreateVoiceResp
|
||||
DeleteByIdsReq = radio.DeleteByIdsReq
|
||||
DeleteResp = radio.DeleteResp
|
||||
Empty = radio.Empty
|
||||
GetCategoryListReq = radio.GetCategoryListReq
|
||||
GetCategoryListResp = radio.GetCategoryListResp
|
||||
GetChannelDetailReq = radio.GetChannelDetailReq
|
||||
GetChannelDetailResp = radio.GetChannelDetailResp
|
||||
GetChannelListReq = radio.GetChannelListReq
|
||||
GetChannelListResp = radio.GetChannelListResp
|
||||
GetFavoriteListReq = radio.GetFavoriteListReq
|
||||
GetFavoriteListResp = radio.GetFavoriteListResp
|
||||
GetHistoryListReq = radio.GetHistoryListReq
|
||||
GetHistoryListResp = radio.GetHistoryListResp
|
||||
GetMySubscriptionsReq = radio.GetMySubscriptionsReq
|
||||
GetMySubscriptionsResp = radio.GetMySubscriptionsResp
|
||||
GetMyVipInfoReq = radio.GetMyVipInfoReq
|
||||
GetMyVipInfoResp = radio.GetMyVipInfoResp
|
||||
GetProgramDetailReq = radio.GetProgramDetailReq
|
||||
GetProgramDetailResp = radio.GetProgramDetailResp
|
||||
GetProgramListReq = radio.GetProgramListReq
|
||||
GetProgramListResp = radio.GetProgramListResp
|
||||
GetRadioUserProfileReq = radio.GetRadioUserProfileReq
|
||||
GetRadioUserProfileResp = radio.GetRadioUserProfileResp
|
||||
GetVipConfigListReq = radio.GetVipConfigListReq
|
||||
GetVipConfigListResp = radio.GetVipConfigListResp
|
||||
GetVoiceListReq = radio.GetVoiceListReq
|
||||
GetVoiceListResp = radio.GetVoiceListResp
|
||||
ProgramInfo = radio.ProgramInfo
|
||||
RadioUserProfile = radio.RadioUserProfile
|
||||
RecordHistoryReq = radio.RecordHistoryReq
|
||||
RecordHistoryResp = radio.RecordHistoryResp
|
||||
SubscriptionInfo = radio.SubscriptionInfo
|
||||
ToggleFavoriteReq = radio.ToggleFavoriteReq
|
||||
ToggleFavoriteResp = radio.ToggleFavoriteResp
|
||||
ToggleLikeReq = radio.ToggleLikeReq
|
||||
ToggleLikeResp = radio.ToggleLikeResp
|
||||
UpdateCategoryReq = radio.UpdateCategoryReq
|
||||
UpdateCategoryResp = radio.UpdateCategoryResp
|
||||
UpdateChannelReq = radio.UpdateChannelReq
|
||||
UpdateChannelResp = radio.UpdateChannelResp
|
||||
UpdateProgramReq = radio.UpdateProgramReq
|
||||
UpdateProgramResp = radio.UpdateProgramResp
|
||||
UpdateVoiceReq = radio.UpdateVoiceReq
|
||||
UpdateVoiceResp = radio.UpdateVoiceResp
|
||||
VipConfigInfo = radio.VipConfigInfo
|
||||
VoiceInfo = radio.VoiceInfo
|
||||
AnalyticsOverviewResp = radio.AnalyticsOverviewResp
|
||||
AnalyticsReq = radio.AnalyticsReq
|
||||
CategoryInfo = radio.CategoryInfo
|
||||
CategoryListReq = radio.CategoryListReq
|
||||
CategoryListResp = radio.CategoryListResp
|
||||
CategoryReq = radio.CategoryReq
|
||||
CategoryUpdateReq = radio.CategoryUpdateReq
|
||||
ChannelAnalyticsItem = radio.ChannelAnalyticsItem
|
||||
ChannelAnalyticsResp = radio.ChannelAnalyticsResp
|
||||
ChannelInfo = radio.ChannelInfo
|
||||
ChannelListReq = radio.ChannelListReq
|
||||
ChannelListResp = radio.ChannelListResp
|
||||
CommentReq = radio.CommentReq
|
||||
CommonResp = radio.CommonResp
|
||||
CreateChannelReq = radio.CreateChannelReq
|
||||
CreatePayOrderReq = radio.CreatePayOrderReq
|
||||
CreatePayOrderResp = radio.CreatePayOrderResp
|
||||
CreateProgramReq = radio.CreateProgramReq
|
||||
CreateVoiceReq = radio.CreateVoiceReq
|
||||
FavoriteListResp = radio.FavoriteListResp
|
||||
GetProfileReq = radio.GetProfileReq
|
||||
HistoryListResp = radio.HistoryListResp
|
||||
IdReq = radio.IdReq
|
||||
IdsReq = radio.IdsReq
|
||||
InteractionListReq = radio.InteractionListReq
|
||||
ProgramInfo = radio.ProgramInfo
|
||||
ProgramListReq = radio.ProgramListReq
|
||||
ProgramListResp = radio.ProgramListResp
|
||||
RadioUserProfile = radio.RadioUserProfile
|
||||
RecordHistoryReq = radio.RecordHistoryReq
|
||||
SubscriptionInfo = radio.SubscriptionInfo
|
||||
SubscriptionListReq = radio.SubscriptionListReq
|
||||
SubscriptionListResp = radio.SubscriptionListResp
|
||||
ToggleFavoriteReq = radio.ToggleFavoriteReq
|
||||
ToggleLikeReq = radio.ToggleLikeReq
|
||||
UpdateChannelReq = radio.UpdateChannelReq
|
||||
UpdateProgramReq = radio.UpdateProgramReq
|
||||
UpdateVoiceReq = radio.UpdateVoiceReq
|
||||
UserAnalyticsResp = radio.UserAnalyticsResp
|
||||
VipConfigInfo = radio.VipConfigInfo
|
||||
VipConfigListResp = radio.VipConfigListResp
|
||||
VoiceInfo = radio.VoiceInfo
|
||||
VoiceListReq = radio.VoiceListReq
|
||||
VoiceListResp = radio.VoiceListResp
|
||||
|
||||
RadioService interface {
|
||||
// 用户
|
||||
GetRadioUserProfile(ctx context.Context, in *GetRadioUserProfileReq, opts ...grpc.CallOption) (*GetRadioUserProfileResp, error)
|
||||
// 用户Profile
|
||||
GetUserProfile(ctx context.Context, in *GetProfileReq, opts ...grpc.CallOption) (*RadioUserProfile, error)
|
||||
// 分类
|
||||
CreateCategory(ctx context.Context, in *CreateCategoryReq, opts ...grpc.CallOption) (*CreateCategoryResp, error)
|
||||
UpdateCategory(ctx context.Context, in *UpdateCategoryReq, opts ...grpc.CallOption) (*UpdateCategoryResp, error)
|
||||
DeleteCategory(ctx context.Context, in *DeleteByIdsReq, opts ...grpc.CallOption) (*DeleteResp, error)
|
||||
GetCategoryList(ctx context.Context, in *GetCategoryListReq, opts ...grpc.CallOption) (*GetCategoryListResp, error)
|
||||
CreateCategory(ctx context.Context, in *CategoryReq, opts ...grpc.CallOption) (*CommonResp, error)
|
||||
UpdateCategory(ctx context.Context, in *CategoryUpdateReq, opts ...grpc.CallOption) (*CommonResp, error)
|
||||
DeleteCategory(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error)
|
||||
GetCategoryList(ctx context.Context, in *CategoryListReq, opts ...grpc.CallOption) (*CategoryListResp, error)
|
||||
// 频道
|
||||
CreateChannel(ctx context.Context, in *CreateChannelReq, opts ...grpc.CallOption) (*CreateChannelResp, error)
|
||||
UpdateChannel(ctx context.Context, in *UpdateChannelReq, opts ...grpc.CallOption) (*UpdateChannelResp, error)
|
||||
DeleteChannel(ctx context.Context, in *DeleteByIdsReq, opts ...grpc.CallOption) (*DeleteResp, error)
|
||||
GetChannelList(ctx context.Context, in *GetChannelListReq, opts ...grpc.CallOption) (*GetChannelListResp, error)
|
||||
GetChannelDetail(ctx context.Context, in *GetChannelDetailReq, opts ...grpc.CallOption) (*GetChannelDetailResp, error)
|
||||
CreateChannel(ctx context.Context, in *CreateChannelReq, opts ...grpc.CallOption) (*CommonResp, error)
|
||||
UpdateChannel(ctx context.Context, in *UpdateChannelReq, opts ...grpc.CallOption) (*CommonResp, error)
|
||||
DeleteChannel(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error)
|
||||
GetChannelList(ctx context.Context, in *ChannelListReq, opts ...grpc.CallOption) (*ChannelListResp, error)
|
||||
GetChannelDetail(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*ChannelInfo, error)
|
||||
// 节目
|
||||
CreateProgram(ctx context.Context, in *CreateProgramReq, opts ...grpc.CallOption) (*CreateProgramResp, error)
|
||||
UpdateProgram(ctx context.Context, in *UpdateProgramReq, opts ...grpc.CallOption) (*UpdateProgramResp, error)
|
||||
DeleteProgram(ctx context.Context, in *DeleteByIdsReq, opts ...grpc.CallOption) (*DeleteResp, error)
|
||||
GetProgramList(ctx context.Context, in *GetProgramListReq, opts ...grpc.CallOption) (*GetProgramListResp, error)
|
||||
GetProgramDetail(ctx context.Context, in *GetProgramDetailReq, opts ...grpc.CallOption) (*GetProgramDetailResp, error)
|
||||
CreateProgram(ctx context.Context, in *CreateProgramReq, opts ...grpc.CallOption) (*CommonResp, error)
|
||||
UpdateProgram(ctx context.Context, in *UpdateProgramReq, opts ...grpc.CallOption) (*CommonResp, error)
|
||||
DeleteProgram(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error)
|
||||
GetProgramList(ctx context.Context, in *ProgramListReq, opts ...grpc.CallOption) (*ProgramListResp, error)
|
||||
GetProgramDetail(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*ProgramInfo, error)
|
||||
// 音色
|
||||
CreateVoice(ctx context.Context, in *CreateVoiceReq, opts ...grpc.CallOption) (*CreateVoiceResp, error)
|
||||
UpdateVoice(ctx context.Context, in *UpdateVoiceReq, opts ...grpc.CallOption) (*UpdateVoiceResp, error)
|
||||
DeleteVoice(ctx context.Context, in *DeleteByIdsReq, opts ...grpc.CallOption) (*DeleteResp, error)
|
||||
GetVoiceList(ctx context.Context, in *GetVoiceListReq, opts ...grpc.CallOption) (*GetVoiceListResp, error)
|
||||
CreateVoice(ctx context.Context, in *CreateVoiceReq, opts ...grpc.CallOption) (*CommonResp, error)
|
||||
UpdateVoice(ctx context.Context, in *UpdateVoiceReq, opts ...grpc.CallOption) (*CommonResp, error)
|
||||
DeleteVoice(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error)
|
||||
GetVoiceList(ctx context.Context, in *VoiceListReq, opts ...grpc.CallOption) (*VoiceListResp, error)
|
||||
// 互动
|
||||
ToggleLike(ctx context.Context, in *ToggleLikeReq, opts ...grpc.CallOption) (*ToggleLikeResp, error)
|
||||
ToggleFavorite(ctx context.Context, in *ToggleFavoriteReq, opts ...grpc.CallOption) (*ToggleFavoriteResp, error)
|
||||
CommentProgram(ctx context.Context, in *CommentReq, opts ...grpc.CallOption) (*CommentResp, error)
|
||||
RecordHistory(ctx context.Context, in *RecordHistoryReq, opts ...grpc.CallOption) (*RecordHistoryResp, error)
|
||||
GetHistoryList(ctx context.Context, in *GetHistoryListReq, opts ...grpc.CallOption) (*GetHistoryListResp, error)
|
||||
GetFavoriteList(ctx context.Context, in *GetFavoriteListReq, opts ...grpc.CallOption) (*GetFavoriteListResp, error)
|
||||
// 订阅
|
||||
GetMySubscriptions(ctx context.Context, in *GetMySubscriptionsReq, opts ...grpc.CallOption) (*GetMySubscriptionsResp, error)
|
||||
ToggleLike(ctx context.Context, in *ToggleLikeReq, opts ...grpc.CallOption) (*CommonResp, error)
|
||||
ToggleFavorite(ctx context.Context, in *ToggleFavoriteReq, opts ...grpc.CallOption) (*CommonResp, error)
|
||||
CommentProgram(ctx context.Context, in *CommentReq, opts ...grpc.CallOption) (*CommonResp, error)
|
||||
RecordHistory(ctx context.Context, in *RecordHistoryReq, opts ...grpc.CallOption) (*CommonResp, error)
|
||||
GetFavoriteList(ctx context.Context, in *InteractionListReq, opts ...grpc.CallOption) (*FavoriteListResp, error)
|
||||
GetHistoryList(ctx context.Context, in *InteractionListReq, opts ...grpc.CallOption) (*HistoryListResp, error)
|
||||
// 订阅/VIP
|
||||
GetMySubscriptions(ctx context.Context, in *SubscriptionListReq, opts ...grpc.CallOption) (*SubscriptionListResp, error)
|
||||
CreatePayOrder(ctx context.Context, in *CreatePayOrderReq, opts ...grpc.CallOption) (*CreatePayOrderResp, error)
|
||||
// VIP
|
||||
GetVipConfigList(ctx context.Context, in *GetVipConfigListReq, opts ...grpc.CallOption) (*GetVipConfigListResp, error)
|
||||
GetMyVipInfo(ctx context.Context, in *GetMyVipInfoReq, opts ...grpc.CallOption) (*GetMyVipInfoResp, error)
|
||||
GetVipConfigList(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*VipConfigListResp, error)
|
||||
GetMyVipInfo(ctx context.Context, in *GetProfileReq, opts ...grpc.CallOption) (*RadioUserProfile, error)
|
||||
// 数据分析
|
||||
GetAnalyticsOverview(ctx context.Context, in *AnalyticsReq, opts ...grpc.CallOption) (*AnalyticsOverviewResp, error)
|
||||
GetChannelAnalytics(ctx context.Context, in *AnalyticsReq, opts ...grpc.CallOption) (*ChannelAnalyticsResp, error)
|
||||
GetUserAnalytics(ctx context.Context, in *AnalyticsReq, opts ...grpc.CallOption) (*UserAnalyticsResp, error)
|
||||
}
|
||||
|
||||
defaultRadioService struct {
|
||||
@@ -126,139 +113,139 @@ func NewRadioService(cli zrpc.Client) RadioService {
|
||||
}
|
||||
}
|
||||
|
||||
// 用户
|
||||
func (m *defaultRadioService) GetRadioUserProfile(ctx context.Context, in *GetRadioUserProfileReq, opts ...grpc.CallOption) (*GetRadioUserProfileResp, error) {
|
||||
// 用户Profile
|
||||
func (m *defaultRadioService) GetUserProfile(ctx context.Context, in *GetProfileReq, opts ...grpc.CallOption) (*RadioUserProfile, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetRadioUserProfile(ctx, in, opts...)
|
||||
return client.GetUserProfile(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 分类
|
||||
func (m *defaultRadioService) CreateCategory(ctx context.Context, in *CreateCategoryReq, opts ...grpc.CallOption) (*CreateCategoryResp, error) {
|
||||
func (m *defaultRadioService) CreateCategory(ctx context.Context, in *CategoryReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.CreateCategory(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) UpdateCategory(ctx context.Context, in *UpdateCategoryReq, opts ...grpc.CallOption) (*UpdateCategoryResp, error) {
|
||||
func (m *defaultRadioService) UpdateCategory(ctx context.Context, in *CategoryUpdateReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.UpdateCategory(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) DeleteCategory(ctx context.Context, in *DeleteByIdsReq, opts ...grpc.CallOption) (*DeleteResp, error) {
|
||||
func (m *defaultRadioService) DeleteCategory(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.DeleteCategory(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) GetCategoryList(ctx context.Context, in *GetCategoryListReq, opts ...grpc.CallOption) (*GetCategoryListResp, error) {
|
||||
func (m *defaultRadioService) GetCategoryList(ctx context.Context, in *CategoryListReq, opts ...grpc.CallOption) (*CategoryListResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetCategoryList(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 频道
|
||||
func (m *defaultRadioService) CreateChannel(ctx context.Context, in *CreateChannelReq, opts ...grpc.CallOption) (*CreateChannelResp, error) {
|
||||
func (m *defaultRadioService) CreateChannel(ctx context.Context, in *CreateChannelReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.CreateChannel(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) UpdateChannel(ctx context.Context, in *UpdateChannelReq, opts ...grpc.CallOption) (*UpdateChannelResp, error) {
|
||||
func (m *defaultRadioService) UpdateChannel(ctx context.Context, in *UpdateChannelReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.UpdateChannel(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) DeleteChannel(ctx context.Context, in *DeleteByIdsReq, opts ...grpc.CallOption) (*DeleteResp, error) {
|
||||
func (m *defaultRadioService) DeleteChannel(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.DeleteChannel(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) GetChannelList(ctx context.Context, in *GetChannelListReq, opts ...grpc.CallOption) (*GetChannelListResp, error) {
|
||||
func (m *defaultRadioService) GetChannelList(ctx context.Context, in *ChannelListReq, opts ...grpc.CallOption) (*ChannelListResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetChannelList(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) GetChannelDetail(ctx context.Context, in *GetChannelDetailReq, opts ...grpc.CallOption) (*GetChannelDetailResp, error) {
|
||||
func (m *defaultRadioService) GetChannelDetail(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*ChannelInfo, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetChannelDetail(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 节目
|
||||
func (m *defaultRadioService) CreateProgram(ctx context.Context, in *CreateProgramReq, opts ...grpc.CallOption) (*CreateProgramResp, error) {
|
||||
func (m *defaultRadioService) CreateProgram(ctx context.Context, in *CreateProgramReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.CreateProgram(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) UpdateProgram(ctx context.Context, in *UpdateProgramReq, opts ...grpc.CallOption) (*UpdateProgramResp, error) {
|
||||
func (m *defaultRadioService) UpdateProgram(ctx context.Context, in *UpdateProgramReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.UpdateProgram(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) DeleteProgram(ctx context.Context, in *DeleteByIdsReq, opts ...grpc.CallOption) (*DeleteResp, error) {
|
||||
func (m *defaultRadioService) DeleteProgram(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.DeleteProgram(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) GetProgramList(ctx context.Context, in *GetProgramListReq, opts ...grpc.CallOption) (*GetProgramListResp, error) {
|
||||
func (m *defaultRadioService) GetProgramList(ctx context.Context, in *ProgramListReq, opts ...grpc.CallOption) (*ProgramListResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetProgramList(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) GetProgramDetail(ctx context.Context, in *GetProgramDetailReq, opts ...grpc.CallOption) (*GetProgramDetailResp, error) {
|
||||
func (m *defaultRadioService) GetProgramDetail(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*ProgramInfo, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetProgramDetail(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 音色
|
||||
func (m *defaultRadioService) CreateVoice(ctx context.Context, in *CreateVoiceReq, opts ...grpc.CallOption) (*CreateVoiceResp, error) {
|
||||
func (m *defaultRadioService) CreateVoice(ctx context.Context, in *CreateVoiceReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.CreateVoice(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) UpdateVoice(ctx context.Context, in *UpdateVoiceReq, opts ...grpc.CallOption) (*UpdateVoiceResp, error) {
|
||||
func (m *defaultRadioService) UpdateVoice(ctx context.Context, in *UpdateVoiceReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.UpdateVoice(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) DeleteVoice(ctx context.Context, in *DeleteByIdsReq, opts ...grpc.CallOption) (*DeleteResp, error) {
|
||||
func (m *defaultRadioService) DeleteVoice(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.DeleteVoice(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) GetVoiceList(ctx context.Context, in *GetVoiceListReq, opts ...grpc.CallOption) (*GetVoiceListResp, error) {
|
||||
func (m *defaultRadioService) GetVoiceList(ctx context.Context, in *VoiceListReq, opts ...grpc.CallOption) (*VoiceListResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetVoiceList(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 互动
|
||||
func (m *defaultRadioService) ToggleLike(ctx context.Context, in *ToggleLikeReq, opts ...grpc.CallOption) (*ToggleLikeResp, error) {
|
||||
func (m *defaultRadioService) ToggleLike(ctx context.Context, in *ToggleLikeReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.ToggleLike(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) ToggleFavorite(ctx context.Context, in *ToggleFavoriteReq, opts ...grpc.CallOption) (*ToggleFavoriteResp, error) {
|
||||
func (m *defaultRadioService) ToggleFavorite(ctx context.Context, in *ToggleFavoriteReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.ToggleFavorite(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) CommentProgram(ctx context.Context, in *CommentReq, opts ...grpc.CallOption) (*CommentResp, error) {
|
||||
func (m *defaultRadioService) CommentProgram(ctx context.Context, in *CommentReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.CommentProgram(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) RecordHistory(ctx context.Context, in *RecordHistoryReq, opts ...grpc.CallOption) (*RecordHistoryResp, error) {
|
||||
func (m *defaultRadioService) RecordHistory(ctx context.Context, in *RecordHistoryReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.RecordHistory(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) GetHistoryList(ctx context.Context, in *GetHistoryListReq, opts ...grpc.CallOption) (*GetHistoryListResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetHistoryList(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) GetFavoriteList(ctx context.Context, in *GetFavoriteListReq, opts ...grpc.CallOption) (*GetFavoriteListResp, error) {
|
||||
func (m *defaultRadioService) GetFavoriteList(ctx context.Context, in *InteractionListReq, opts ...grpc.CallOption) (*FavoriteListResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetFavoriteList(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 订阅
|
||||
func (m *defaultRadioService) GetMySubscriptions(ctx context.Context, in *GetMySubscriptionsReq, opts ...grpc.CallOption) (*GetMySubscriptionsResp, error) {
|
||||
func (m *defaultRadioService) GetHistoryList(ctx context.Context, in *InteractionListReq, opts ...grpc.CallOption) (*HistoryListResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetHistoryList(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 订阅/VIP
|
||||
func (m *defaultRadioService) GetMySubscriptions(ctx context.Context, in *SubscriptionListReq, opts ...grpc.CallOption) (*SubscriptionListResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetMySubscriptions(ctx, in, opts...)
|
||||
}
|
||||
@@ -268,13 +255,28 @@ func (m *defaultRadioService) CreatePayOrder(ctx context.Context, in *CreatePayO
|
||||
return client.CreatePayOrder(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// VIP
|
||||
func (m *defaultRadioService) GetVipConfigList(ctx context.Context, in *GetVipConfigListReq, opts ...grpc.CallOption) (*GetVipConfigListResp, error) {
|
||||
func (m *defaultRadioService) GetVipConfigList(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*VipConfigListResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetVipConfigList(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) GetMyVipInfo(ctx context.Context, in *GetMyVipInfoReq, opts ...grpc.CallOption) (*GetMyVipInfoResp, error) {
|
||||
func (m *defaultRadioService) GetMyVipInfo(ctx context.Context, in *GetProfileReq, opts ...grpc.CallOption) (*RadioUserProfile, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetMyVipInfo(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 数据分析
|
||||
func (m *defaultRadioService) GetAnalyticsOverview(ctx context.Context, in *AnalyticsReq, opts ...grpc.CallOption) (*AnalyticsOverviewResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetAnalyticsOverview(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) GetChannelAnalytics(ctx context.Context, in *AnalyticsReq, opts ...grpc.CallOption) (*ChannelAnalyticsResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetChannelAnalytics(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) GetUserAnalytics(ctx context.Context, in *AnalyticsReq, opts ...grpc.CallOption) (*UserAnalyticsResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetUserAnalytics(ctx, in, opts...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user