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.
34 lines
1.1 KiB
34 lines
1.1 KiB
4 months ago
|
package controller
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"tyj_admin/api/v1/game"
|
||
|
"tyj_admin/internal/serviceGame"
|
||
|
)
|
||
|
|
||
|
var GameCdKey = cdKeyController{}
|
||
|
|
||
|
type cdKeyController struct {
|
||
|
BaseController
|
||
|
}
|
||
|
|
||
|
func (c *cdKeyController) RandomGenerateCode(ctx context.Context, req *game.RandomGenerateCodeReq) (res *game.RandomGenerateCodeRes, err error) {
|
||
|
res, err = serviceGame.GameCdKey().RandomGenerateCode(ctx, req)
|
||
|
return
|
||
|
}
|
||
|
|
||
|
func (c *cdKeyController) GetGiftExchangeConfig(ctx context.Context, req *game.GetGiftExchangeListReq) (res *game.GetGiftExchangeListRes, err error) {
|
||
|
res, err = serviceGame.GameCdKey().GetGiftExchangeConfig(ctx, req)
|
||
|
return
|
||
|
}
|
||
|
|
||
|
func (c *cdKeyController) UpdateGiftExchangeConfig(ctx context.Context, req *game.UpdateGiftExchangeReq) (res *game.UpdateGiftExchangeRes, err error) {
|
||
|
res, err = serviceGame.GameCdKey().UpdateGiftExchangeConfig(ctx, req)
|
||
|
return
|
||
|
}
|
||
|
|
||
|
func (c *cdKeyController) GetGiftExchange(ctx context.Context, req *game.GetGiftExchangeReq) (res *game.GetGiftExchangeRes, err error) {
|
||
|
res, err = serviceGame.GameCdKey().GetGiftExchange(ctx, req)
|
||
|
return
|
||
|
}
|