竞技馆抽奖活动图片视频资源设置
This commit is contained in:
parent
2ab1a20900
commit
7e52629091
|
@ -83,6 +83,19 @@ func (svc *LotteryLogSvc) GetLotteryLogs(req *model.GetLotteryLogReq, ret *model
|
|||
return
|
||||
}
|
||||
|
||||
func (svc *LotteryLogSvc) UpdateMedia(req *model.UpdateLotteryMediaReq, ret *bool) error {
|
||||
clog := LotteryLogsCollection(req.Platform)
|
||||
if clog == nil {
|
||||
return LotteryLogDBErr
|
||||
}
|
||||
err := clog.Update(bson.M{"_id": req.LogId}, bson.M{"$set": bson.M{"media": req.Media}})
|
||||
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
||||
return err
|
||||
}
|
||||
*ret = true
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
rpc.Register(new(LotteryLogSvc))
|
||||
}
|
||||
|
|
|
@ -49,5 +49,4 @@ const (
|
|||
ETCDKEY_PopUpWindow = "/game/PopUpWindowConfig" //弹窗配置
|
||||
ETCDKEY_LotteryConfig = "/game/lottery" //抽奖配置
|
||||
ETCDKEY_LotteryUser = "/game/user_lottery" //抽奖用户必中配置
|
||||
ETCDKEY_LotteryShow = "/game/show_lottery" //抽奖展示配置
|
||||
)
|
||||
|
|
|
@ -246,6 +246,8 @@ func init() {
|
|||
admin.MyAdminApp.Route("/api/player/delete", WorldSrvApi)
|
||||
// 添加道具
|
||||
admin.MyAdminApp.Route("/api/player/AddItem", WorldSrvApi)
|
||||
// 修改竞技馆抽奖记录图片视频
|
||||
admin.MyAdminApp.Route("/api/game/show_lottery", WorldSrvApi)
|
||||
}
|
||||
|
||||
func Stats() map[string]ApiStats {
|
||||
|
|
|
@ -3,7 +3,6 @@ package model
|
|||
import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/globalsign/mgo"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
|
@ -239,11 +238,3 @@ func InitGameParam() {
|
|||
GameParamData.AdminPassword = "fjslowopcserg"
|
||||
}
|
||||
}
|
||||
|
||||
// BackTimeUnixToLocalTimeUnix 后台时间戳转本地时间戳
|
||||
func BackTimeUnixToLocalTimeUnix(ts int64) int64 {
|
||||
_, offset := time.Now().Zone()
|
||||
backOffset := GameParamData.BackendTimeLocal * 3600
|
||||
ts += int64(backOffset - offset)
|
||||
return ts
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package model
|
||||
|
||||
import (
|
||||
"mongo.games.com/game/protocol/webapi"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
@ -16,6 +17,12 @@ type LotteryAward struct {
|
|||
N int64 // 奖品数量
|
||||
}
|
||||
|
||||
type LotteryShow struct {
|
||||
Tp int32 // 1图片 2视频
|
||||
Url string // 地址
|
||||
ImgUrl string // 缩略图地址
|
||||
}
|
||||
|
||||
type LotteryLog struct {
|
||||
Platform string `bson:"-"`
|
||||
CId int64 // 抽奖配置Id
|
||||
|
@ -32,6 +39,7 @@ type LotteryLog struct {
|
|||
IsMust bool // 是否必中
|
||||
ImageURL string // 图片地址
|
||||
Ts int64 // 发奖时间
|
||||
Media []*LotteryShow // 媒体信息
|
||||
}
|
||||
|
||||
type GetLotteryLogReq struct {
|
||||
|
@ -62,3 +70,27 @@ func GetLotteryLogs(plt string, count int) ([]*LotteryLog, error) {
|
|||
|
||||
return ret.LotteryLog, nil
|
||||
}
|
||||
|
||||
type UpdateLotteryMediaReq struct {
|
||||
Platform string
|
||||
LogId string
|
||||
Media []*webapi.ShowLottery
|
||||
}
|
||||
|
||||
func UpdateLotteryMedia(plt string, logId string, req []*webapi.ShowLottery) error {
|
||||
if rpcCli == nil {
|
||||
return ErrRPClientNoConn
|
||||
}
|
||||
|
||||
upsertReq := &UpdateLotteryMediaReq{
|
||||
Platform: plt,
|
||||
LogId: logId,
|
||||
Media: req,
|
||||
}
|
||||
ret := false
|
||||
err := rpcCli.CallWithTimeout("LotteryLogSvc.UpdateMedia", upsertReq, &ret, time.Second*30)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -9384,7 +9384,7 @@ type UserLottery struct {
|
|||
Platform string `protobuf:"bytes,1,opt,name=Platform,proto3" json:"Platform,omitempty"` // 平台
|
||||
Id int64 `protobuf:"varint,2,opt,name=Id,proto3" json:"Id,omitempty"` // 配置id
|
||||
SnId int32 `protobuf:"varint,3,opt,name=SnId,proto3" json:"SnId,omitempty"` // 玩家ID
|
||||
Time int64 `protobuf:"varint,4,opt,name=Time,proto3" json:"Time,omitempty"` // 抽奖时间
|
||||
Time string `protobuf:"bytes,4,opt,name=Time,proto3" json:"Time,omitempty"` // 抽奖时间 2006-01-02 15:04:05
|
||||
Num int64 `protobuf:"varint,5,opt,name=Num,proto3" json:"Num,omitempty"` // 第几期
|
||||
On int32 `protobuf:"varint,6,opt,name=On,proto3" json:"On,omitempty"` // 开关 1开启 2关闭
|
||||
}
|
||||
|
@ -9442,11 +9442,11 @@ func (x *UserLottery) GetSnId() int32 {
|
|||
return 0
|
||||
}
|
||||
|
||||
func (x *UserLottery) GetTime() int64 {
|
||||
func (x *UserLottery) GetTime() string {
|
||||
if x != nil {
|
||||
return x.Time
|
||||
}
|
||||
return 0
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserLottery) GetNum() int64 {
|
||||
|
@ -9463,110 +9463,6 @@ func (x *UserLottery) GetOn() int32 {
|
|||
return 0
|
||||
}
|
||||
|
||||
// etcd /game/show_lottery 抽奖展示配置
|
||||
type ShowLottery struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Platform string `protobuf:"bytes,1,opt,name=Platform,proto3" json:"Platform,omitempty"` // 平台
|
||||
Id int64 `protobuf:"varint,2,opt,name=Id,proto3" json:"Id,omitempty"` // 配置id
|
||||
On int32 `protobuf:"varint,3,opt,name=On,proto3" json:"On,omitempty"` // 开关 1开启 2关闭
|
||||
Time int64 `protobuf:"varint,4,opt,name=Time,proto3" json:"Time,omitempty"` // 抽奖时间
|
||||
Num int64 `protobuf:"varint,5,opt,name=Num,proto3" json:"Num,omitempty"` // 第几期
|
||||
Tp int32 `protobuf:"varint,6,opt,name=Tp,proto3" json:"Tp,omitempty"` // 资源类型 1图片 2视频
|
||||
Url string `protobuf:"bytes,7,opt,name=Url,proto3" json:"Url,omitempty"` // 资源地址
|
||||
ImgUrl string `protobuf:"bytes,8,opt,name=ImgUrl,proto3" json:"ImgUrl,omitempty"` // 视频缩略图地址
|
||||
}
|
||||
|
||||
func (x *ShowLottery) Reset() {
|
||||
*x = ShowLottery{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_common_proto_msgTypes[99]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ShowLottery) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ShowLottery) ProtoMessage() {}
|
||||
|
||||
func (x *ShowLottery) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_common_proto_msgTypes[99]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ShowLottery.ProtoReflect.Descriptor instead.
|
||||
func (*ShowLottery) Descriptor() ([]byte, []int) {
|
||||
return file_common_proto_rawDescGZIP(), []int{99}
|
||||
}
|
||||
|
||||
func (x *ShowLottery) GetPlatform() string {
|
||||
if x != nil {
|
||||
return x.Platform
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ShowLottery) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ShowLottery) GetOn() int32 {
|
||||
if x != nil {
|
||||
return x.On
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ShowLottery) GetTime() int64 {
|
||||
if x != nil {
|
||||
return x.Time
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ShowLottery) GetNum() int64 {
|
||||
if x != nil {
|
||||
return x.Num
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ShowLottery) GetTp() int32 {
|
||||
if x != nil {
|
||||
return x.Tp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ShowLottery) GetUrl() string {
|
||||
if x != nil {
|
||||
return x.Url
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ShowLottery) GetImgUrl() string {
|
||||
if x != nil {
|
||||
return x.ImgUrl
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_common_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_common_proto_rawDesc = []byte{
|
||||
|
@ -11031,24 +10927,13 @@ var file_common_proto_rawDesc = []byte{
|
|||
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x0e,
|
||||
0x0a, 0x02, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49, 0x64, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e,
|
||||
0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
|
||||
0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75, 0x6d, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x4f, 0x6e, 0x18, 0x06,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x4f, 0x6e, 0x22, 0xa9, 0x01, 0x0a, 0x0b, 0x53, 0x68, 0x6f,
|
||||
0x77, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74,
|
||||
0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74,
|
||||
0x66, 0x6f, 0x72, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x02, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x4f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x02, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75, 0x6d, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x70,
|
||||
0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x54, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x72,
|
||||
0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x49, 0x6d, 0x67, 0x55, 0x72, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x49, 0x6d,
|
||||
0x67, 0x55, 0x72, 0x6c, 0x42, 0x26, 0x5a, 0x24, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61,
|
||||
0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x4f, 0x6e, 0x42, 0x26, 0x5a, 0x24, 0x6d, 0x6f, 0x6e, 0x67,
|
||||
0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65,
|
||||
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -11063,7 +10948,7 @@ func file_common_proto_rawDescGZIP() []byte {
|
|||
return file_common_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 110)
|
||||
var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 109)
|
||||
var file_common_proto_goTypes = []interface{}{
|
||||
(*MysqlDbSetting)(nil), // 0: webapi.MysqlDbSetting
|
||||
(*MongoDbSetting)(nil), // 1: webapi.MongoDbSetting
|
||||
|
@ -11164,33 +11049,32 @@ var file_common_proto_goTypes = []interface{}{
|
|||
(*LotteryConfig)(nil), // 96: webapi.LotteryConfig
|
||||
(*LotteryInfo)(nil), // 97: webapi.LotteryInfo
|
||||
(*UserLottery)(nil), // 98: webapi.UserLottery
|
||||
(*ShowLottery)(nil), // 99: webapi.ShowLottery
|
||||
nil, // 100: webapi.Platform.BindTelRewardEntry
|
||||
nil, // 101: webapi.PlayerData.RankScoreEntry
|
||||
nil, // 102: webapi.ItemShop.AwardEntry
|
||||
nil, // 103: webapi.VIPcfg.AwardEntry
|
||||
nil, // 104: webapi.VIPcfg.Privilege1Entry
|
||||
nil, // 105: webapi.VIPcfg.Privilege7Entry
|
||||
nil, // 106: webapi.VIPcfg.Privilege9Entry
|
||||
nil, // 107: webapi.ActInviteConfig.PayScoreEntry
|
||||
nil, // 108: webapi.SkinLevel.UpItemEntry
|
||||
nil, // 109: webapi.SkinItem.UnlockParamEntry
|
||||
(*server.DB_GameFree)(nil), // 110: server.DB_GameFree
|
||||
(*server.DB_GameItem)(nil), // 111: server.DB_GameItem
|
||||
nil, // 99: webapi.Platform.BindTelRewardEntry
|
||||
nil, // 100: webapi.PlayerData.RankScoreEntry
|
||||
nil, // 101: webapi.ItemShop.AwardEntry
|
||||
nil, // 102: webapi.VIPcfg.AwardEntry
|
||||
nil, // 103: webapi.VIPcfg.Privilege1Entry
|
||||
nil, // 104: webapi.VIPcfg.Privilege7Entry
|
||||
nil, // 105: webapi.VIPcfg.Privilege9Entry
|
||||
nil, // 106: webapi.ActInviteConfig.PayScoreEntry
|
||||
nil, // 107: webapi.SkinLevel.UpItemEntry
|
||||
nil, // 108: webapi.SkinItem.UnlockParamEntry
|
||||
(*server.DB_GameFree)(nil), // 109: server.DB_GameFree
|
||||
(*server.DB_GameItem)(nil), // 110: server.DB_GameItem
|
||||
}
|
||||
var file_common_proto_depIdxs = []int32{
|
||||
2, // 0: webapi.Platform.Leaderboard:type_name -> webapi.RankSwitch
|
||||
3, // 1: webapi.Platform.ClubConfig:type_name -> webapi.ClubConfig
|
||||
4, // 2: webapi.Platform.ThirdGameMerchant:type_name -> webapi.ThirdGame
|
||||
100, // 3: webapi.Platform.BindTelReward:type_name -> webapi.Platform.BindTelRewardEntry
|
||||
99, // 3: webapi.Platform.BindTelReward:type_name -> webapi.Platform.BindTelRewardEntry
|
||||
6, // 4: webapi.GameConfigGlobal.GameStatus:type_name -> webapi.GameStatus
|
||||
110, // 5: webapi.GameFree.DbGameFree:type_name -> server.DB_GameFree
|
||||
109, // 5: webapi.GameFree.DbGameFree:type_name -> server.DB_GameFree
|
||||
8, // 6: webapi.PlatformGameConfig.DbGameFrees:type_name -> webapi.GameFree
|
||||
0, // 7: webapi.PlatformDbConfig.Mysql:type_name -> webapi.MysqlDbSetting
|
||||
1, // 8: webapi.PlatformDbConfig.MongoDb:type_name -> webapi.MongoDbSetting
|
||||
1, // 9: webapi.PlatformDbConfig.MongoDbLog:type_name -> webapi.MongoDbSetting
|
||||
110, // 10: webapi.GameConfigGroup.DbGameFree:type_name -> server.DB_GameFree
|
||||
101, // 11: webapi.PlayerData.RankScore:type_name -> webapi.PlayerData.RankScoreEntry
|
||||
109, // 10: webapi.GameConfigGroup.DbGameFree:type_name -> server.DB_GameFree
|
||||
100, // 11: webapi.PlayerData.RankScore:type_name -> webapi.PlayerData.RankScoreEntry
|
||||
32, // 12: webapi.PlayerData.Items:type_name -> webapi.ItemInfo
|
||||
14, // 13: webapi.PlayerData.RoleUnlockList:type_name -> webapi.ModInfo
|
||||
14, // 14: webapi.PlayerData.PetUnlockList:type_name -> webapi.ModInfo
|
||||
|
@ -11203,7 +11087,7 @@ var file_common_proto_depIdxs = []int32{
|
|||
32, // 21: webapi.ExchangeShop.Items:type_name -> webapi.ItemInfo
|
||||
25, // 22: webapi.ExchangeShopList.List:type_name -> webapi.ExchangeShop
|
||||
29, // 23: webapi.ExchangeShopList.Weight:type_name -> webapi.ShopWeight
|
||||
102, // 24: webapi.ItemShop.Award:type_name -> webapi.ItemShop.AwardEntry
|
||||
101, // 24: webapi.ItemShop.Award:type_name -> webapi.ItemShop.AwardEntry
|
||||
30, // 25: webapi.ItemShopList.List:type_name -> webapi.ItemShop
|
||||
32, // 26: webapi.MatchInfoAward.ItemId:type_name -> webapi.ItemInfo
|
||||
33, // 27: webapi.GameMatchDate.Award:type_name -> webapi.MatchInfoAward
|
||||
|
@ -11224,14 +11108,14 @@ var file_common_proto_depIdxs = []int32{
|
|||
38, // 42: webapi.WelfareSpree.Item:type_name -> webapi.WelfareDate
|
||||
48, // 43: webapi.WelfareFirstPayDataList.List:type_name -> webapi.WelfareSpree
|
||||
48, // 44: webapi.WelfareContinuousPayDataList.List:type_name -> webapi.WelfareSpree
|
||||
103, // 45: webapi.VIPcfg.Award:type_name -> webapi.VIPcfg.AwardEntry
|
||||
104, // 46: webapi.VIPcfg.Privilege1:type_name -> webapi.VIPcfg.Privilege1Entry
|
||||
105, // 47: webapi.VIPcfg.Privilege7:type_name -> webapi.VIPcfg.Privilege7Entry
|
||||
106, // 48: webapi.VIPcfg.Privilege9:type_name -> webapi.VIPcfg.Privilege9Entry
|
||||
102, // 45: webapi.VIPcfg.Award:type_name -> webapi.VIPcfg.AwardEntry
|
||||
103, // 46: webapi.VIPcfg.Privilege1:type_name -> webapi.VIPcfg.Privilege1Entry
|
||||
104, // 47: webapi.VIPcfg.Privilege7:type_name -> webapi.VIPcfg.Privilege7Entry
|
||||
105, // 48: webapi.VIPcfg.Privilege9:type_name -> webapi.VIPcfg.Privilege9Entry
|
||||
51, // 49: webapi.VIPcfgDataList.List:type_name -> webapi.VIPcfg
|
||||
38, // 50: webapi.ChessRankConfig.Item:type_name -> webapi.WelfareDate
|
||||
55, // 51: webapi.ChessRankcfgData.Datas:type_name -> webapi.ChessRankConfig
|
||||
107, // 52: webapi.ActInviteConfig.PayScore:type_name -> webapi.ActInviteConfig.PayScoreEntry
|
||||
106, // 52: webapi.ActInviteConfig.PayScore:type_name -> webapi.ActInviteConfig.PayScoreEntry
|
||||
62, // 53: webapi.ActInviteConfig.Awards1:type_name -> webapi.RankAward
|
||||
62, // 54: webapi.ActInviteConfig.Awards2:type_name -> webapi.RankAward
|
||||
62, // 55: webapi.ActInviteConfig.Awards3:type_name -> webapi.RankAward
|
||||
|
@ -11248,12 +11132,12 @@ var file_common_proto_depIdxs = []int32{
|
|||
69, // 66: webapi.DiamondLotteryData.Info:type_name -> webapi.DiamondLotteryInfo
|
||||
70, // 67: webapi.DiamondLotteryData.Players:type_name -> webapi.DiamondLotteryPlayers
|
||||
72, // 68: webapi.DiamondLotteryConfig.LotteryData:type_name -> webapi.DiamondLotteryData
|
||||
111, // 69: webapi.ItemConfig.Items:type_name -> server.DB_GameItem
|
||||
110, // 69: webapi.ItemConfig.Items:type_name -> server.DB_GameItem
|
||||
32, // 70: webapi.RankAwardInfo.Item:type_name -> webapi.ItemInfo
|
||||
75, // 71: webapi.RankTypeInfo.Award:type_name -> webapi.RankAwardInfo
|
||||
76, // 72: webapi.RankTypeConfig.Info:type_name -> webapi.RankTypeInfo
|
||||
108, // 73: webapi.SkinLevel.UpItem:type_name -> webapi.SkinLevel.UpItemEntry
|
||||
109, // 74: webapi.SkinItem.UnlockParam:type_name -> webapi.SkinItem.UnlockParamEntry
|
||||
107, // 73: webapi.SkinLevel.UpItem:type_name -> webapi.SkinLevel.UpItemEntry
|
||||
108, // 74: webapi.SkinItem.UnlockParam:type_name -> webapi.SkinItem.UnlockParamEntry
|
||||
78, // 75: webapi.SkinItem.Levels:type_name -> webapi.SkinLevel
|
||||
79, // 76: webapi.SkinConfig.Items:type_name -> webapi.SkinItem
|
||||
82, // 77: webapi.AwardLogConfig.AwardLog:type_name -> webapi.AwardLogData
|
||||
|
@ -12467,18 +12351,6 @@ func file_common_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_common_proto_msgTypes[99].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ShowLottery); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
|
@ -12486,7 +12358,7 @@ func file_common_proto_init() {
|
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_common_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 110,
|
||||
NumMessages: 109,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
|
|
@ -1035,19 +1035,7 @@ message UserLottery{
|
|||
string Platform = 1; // 平台
|
||||
int64 Id = 2; // 配置id
|
||||
int32 SnId = 3; // 玩家ID
|
||||
int64 Time = 4; // 抽奖时间
|
||||
string Time = 4; // 抽奖时间 2006-01-02 15:04:05
|
||||
int64 Num = 5; // 第几期
|
||||
int32 On = 6; // 开关 1开启 2关闭
|
||||
}
|
||||
|
||||
// etcd /game/show_lottery 抽奖展示配置
|
||||
message ShowLottery{
|
||||
string Platform = 1; // 平台
|
||||
int64 Id = 2; // 配置id
|
||||
int32 On = 3; // 开关 1开启 2关闭
|
||||
int64 Time = 4; // 抽奖时间
|
||||
int64 Num = 5; // 第几期
|
||||
int32 Tp = 6; // 资源类型 1图片 2视频
|
||||
string Url = 7; // 资源地址
|
||||
string ImgUrl = 8; // 视频缩略图地址
|
||||
}
|
|
@ -9497,6 +9497,189 @@ func (x *SAGetDollExchangeOrder) GetOrderList() []*ExchangeOrderInfo {
|
|||
return nil
|
||||
}
|
||||
|
||||
// 设置抽奖获奖图片和视频
|
||||
// post /api/game/show_lottery
|
||||
type ASShowLottery struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Platform string `protobuf:"bytes,1,opt,name=Platform,proto3" json:"Platform,omitempty"` // 平台
|
||||
LogId string `protobuf:"bytes,2,opt,name=LogId,proto3" json:"LogId,omitempty"` // 日志id
|
||||
List []*ShowLottery `protobuf:"bytes,3,rep,name=List,proto3" json:"List,omitempty"` // 资源
|
||||
}
|
||||
|
||||
func (x *ASShowLottery) Reset() {
|
||||
*x = ASShowLottery{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_webapi_proto_msgTypes[139]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ASShowLottery) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ASShowLottery) ProtoMessage() {}
|
||||
|
||||
func (x *ASShowLottery) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_webapi_proto_msgTypes[139]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ASShowLottery.ProtoReflect.Descriptor instead.
|
||||
func (*ASShowLottery) Descriptor() ([]byte, []int) {
|
||||
return file_webapi_proto_rawDescGZIP(), []int{139}
|
||||
}
|
||||
|
||||
func (x *ASShowLottery) GetPlatform() string {
|
||||
if x != nil {
|
||||
return x.Platform
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ASShowLottery) GetLogId() string {
|
||||
if x != nil {
|
||||
return x.LogId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ASShowLottery) GetList() []*ShowLottery {
|
||||
if x != nil {
|
||||
return x.List
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ShowLottery struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Tp int32 `protobuf:"varint,1,opt,name=Tp,proto3" json:"Tp,omitempty"` // 资源类型 1图片 2视频
|
||||
Url string `protobuf:"bytes,2,opt,name=Url,proto3" json:"Url,omitempty"` // 资源地址
|
||||
ImgUrl string `protobuf:"bytes,3,opt,name=ImgUrl,proto3" json:"ImgUrl,omitempty"` // 视频缩略图地址
|
||||
}
|
||||
|
||||
func (x *ShowLottery) Reset() {
|
||||
*x = ShowLottery{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_webapi_proto_msgTypes[140]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ShowLottery) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ShowLottery) ProtoMessage() {}
|
||||
|
||||
func (x *ShowLottery) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_webapi_proto_msgTypes[140]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ShowLottery.ProtoReflect.Descriptor instead.
|
||||
func (*ShowLottery) Descriptor() ([]byte, []int) {
|
||||
return file_webapi_proto_rawDescGZIP(), []int{140}
|
||||
}
|
||||
|
||||
func (x *ShowLottery) GetTp() int32 {
|
||||
if x != nil {
|
||||
return x.Tp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ShowLottery) GetUrl() string {
|
||||
if x != nil {
|
||||
return x.Url
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ShowLottery) GetImgUrl() string {
|
||||
if x != nil {
|
||||
return x.ImgUrl
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SAShowLottery struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Tag TagCode `protobuf:"varint,1,opt,name=Tag,proto3,enum=webapi.TagCode" json:"Tag,omitempty"` //错误码
|
||||
Msg string `protobuf:"bytes,2,opt,name=Msg,proto3" json:"Msg,omitempty"` //错误信息
|
||||
}
|
||||
|
||||
func (x *SAShowLottery) Reset() {
|
||||
*x = SAShowLottery{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_webapi_proto_msgTypes[141]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SAShowLottery) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SAShowLottery) ProtoMessage() {}
|
||||
|
||||
func (x *SAShowLottery) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_webapi_proto_msgTypes[141]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SAShowLottery.ProtoReflect.Descriptor instead.
|
||||
func (*SAShowLottery) Descriptor() ([]byte, []int) {
|
||||
return file_webapi_proto_rawDescGZIP(), []int{141}
|
||||
}
|
||||
|
||||
func (x *SAShowLottery) GetTag() TagCode {
|
||||
if x != nil {
|
||||
return x.Tag
|
||||
}
|
||||
return TagCode_UNKNOWN
|
||||
}
|
||||
|
||||
func (x *SAShowLottery) GetMsg() string {
|
||||
if x != nil {
|
||||
return x.Msg
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_webapi_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_webapi_proto_rawDesc = []byte{
|
||||
|
@ -10522,24 +10705,40 @@ var file_webapi_proto_rawDesc = []byte{
|
|||
0x12, 0x37, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x78, 0x63,
|
||||
0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09,
|
||||
0x4f, 0x72, 0x64, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x2a, 0xdc, 0x01, 0x0a, 0x07, 0x54, 0x61,
|
||||
0x67, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e,
|
||||
0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12,
|
||||
0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53,
|
||||
0x49, 0x47, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x50,
|
||||
0x52, 0x4f, 0x54, 0x4f, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10,
|
||||
0x04, 0x12, 0x12, 0x0a, 0x0e, 0x4a, 0x59, 0x42, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x45, 0x52,
|
||||
0x52, 0x4f, 0x52, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x4a, 0x59, 0x42, 0x5f, 0x43, 0x4f, 0x44,
|
||||
0x45, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x6c, 0x61,
|
||||
0x79, 0x5f, 0x4e, 0x6f, 0x74, 0x45, 0x58, 0x49, 0x53, 0x54, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05,
|
||||
0x4c, 0x69, 0x6d, 0x69, 0x74, 0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x65, 0x6c, 0x45, 0x78,
|
||||
0x69, 0x73, 0x74, 0x10, 0x09, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x65,
|
||||
0x6c, 0x4e, 0x6f, 0x74, 0x42, 0x69, 0x6e, 0x64, 0x10, 0x0b, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x6f,
|
||||
0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x0c, 0x42, 0x26, 0x5a, 0x24, 0x6d, 0x6f, 0x6e, 0x67,
|
||||
0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65,
|
||||
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x4f, 0x72, 0x64, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x6a, 0x0a, 0x0d, 0x41, 0x53, 0x53,
|
||||
0x68, 0x6f, 0x77, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c,
|
||||
0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c,
|
||||
0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x49, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x4c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x04,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x77, 0x65, 0x62,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x53, 0x68, 0x6f, 0x77, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x52,
|
||||
0x04, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x47, 0x0a, 0x0b, 0x53, 0x68, 0x6f, 0x77, 0x4c, 0x6f, 0x74,
|
||||
0x74, 0x65, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x02, 0x54, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x03, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x6d, 0x67, 0x55, 0x72, 0x6c,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x49, 0x6d, 0x67, 0x55, 0x72, 0x6c, 0x22, 0x44,
|
||||
0x0a, 0x0d, 0x53, 0x41, 0x53, 0x68, 0x6f, 0x77, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x12,
|
||||
0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77,
|
||||
0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54,
|
||||
0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x03, 0x4d, 0x73, 0x67, 0x2a, 0xdc, 0x01, 0x0a, 0x07, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65,
|
||||
0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a,
|
||||
0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41,
|
||||
0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x45,
|
||||
0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x5f,
|
||||
0x44, 0x41, 0x54, 0x41, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e,
|
||||
0x4a, 0x59, 0x42, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x05,
|
||||
0x12, 0x12, 0x0a, 0x0e, 0x4a, 0x59, 0x42, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x45, 0x58, 0x49,
|
||||
0x53, 0x54, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x79, 0x5f, 0x4e, 0x6f, 0x74,
|
||||
0x45, 0x58, 0x49, 0x53, 0x54, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x69, 0x6d, 0x69, 0x74,
|
||||
0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x65, 0x6c, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0x09,
|
||||
0x12, 0x13, 0x0a, 0x0f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x6f, 0x74, 0x46, 0x6f,
|
||||
0x75, 0x6e, 0x64, 0x10, 0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x65, 0x6c, 0x4e, 0x6f, 0x74, 0x42,
|
||||
0x69, 0x6e, 0x64, 0x10, 0x0b, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e,
|
||||
0x64, 0x10, 0x0c, 0x42, 0x26, 0x5a, 0x24, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d,
|
||||
0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -10555,7 +10754,7 @@ func file_webapi_proto_rawDescGZIP() []byte {
|
|||
}
|
||||
|
||||
var file_webapi_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_webapi_proto_msgTypes = make([]protoimpl.MessageInfo, 139)
|
||||
var file_webapi_proto_msgTypes = make([]protoimpl.MessageInfo, 142)
|
||||
var file_webapi_proto_goTypes = []interface{}{
|
||||
(TagCode)(0), // 0: webapi.TagCode
|
||||
(*SAPlatformInfo)(nil), // 1: webapi.SAPlatformInfo
|
||||
|
@ -10697,93 +10896,96 @@ var file_webapi_proto_goTypes = []interface{}{
|
|||
(*SARoomInfo)(nil), // 137: webapi.SARoomInfo
|
||||
(*ASGetDollExchangeOrder)(nil), // 138: webapi.ASGetDollExchangeOrder
|
||||
(*SAGetDollExchangeOrder)(nil), // 139: webapi.SAGetDollExchangeOrder
|
||||
(*Platform)(nil), // 140: webapi.Platform
|
||||
(*PlatformGameConfig)(nil), // 141: webapi.PlatformGameConfig
|
||||
(*GameConfigGroup)(nil), // 142: webapi.GameConfigGroup
|
||||
(*GameConfigGlobal)(nil), // 143: webapi.GameConfigGlobal
|
||||
(*PlatformDbConfig)(nil), // 144: webapi.PlatformDbConfig
|
||||
(*CoinPoolSetting)(nil), // 145: webapi.CoinPoolSetting
|
||||
(*RoomInfo)(nil), // 146: webapi.RoomInfo
|
||||
(*PlayerSingleAdjust)(nil), // 147: webapi.PlayerSingleAdjust
|
||||
(*PlayerData)(nil), // 148: webapi.PlayerData
|
||||
(*HorseRaceLamp)(nil), // 149: webapi.HorseRaceLamp
|
||||
(*MessageInfo)(nil), // 150: webapi.MessageInfo
|
||||
(*ServerInfo)(nil), // 151: webapi.ServerInfo
|
||||
(*OnlineReport)(nil), // 152: webapi.OnlineReport
|
||||
(*ItemInfo)(nil), // 153: webapi.ItemInfo
|
||||
(*ExchangeShop)(nil), // 154: webapi.ExchangeShop
|
||||
(*ShopWeight)(nil), // 155: webapi.ShopWeight
|
||||
(*ASShowLottery)(nil), // 140: webapi.ASShowLottery
|
||||
(*ShowLottery)(nil), // 141: webapi.ShowLottery
|
||||
(*SAShowLottery)(nil), // 142: webapi.SAShowLottery
|
||||
(*Platform)(nil), // 143: webapi.Platform
|
||||
(*PlatformGameConfig)(nil), // 144: webapi.PlatformGameConfig
|
||||
(*GameConfigGroup)(nil), // 145: webapi.GameConfigGroup
|
||||
(*GameConfigGlobal)(nil), // 146: webapi.GameConfigGlobal
|
||||
(*PlatformDbConfig)(nil), // 147: webapi.PlatformDbConfig
|
||||
(*CoinPoolSetting)(nil), // 148: webapi.CoinPoolSetting
|
||||
(*RoomInfo)(nil), // 149: webapi.RoomInfo
|
||||
(*PlayerSingleAdjust)(nil), // 150: webapi.PlayerSingleAdjust
|
||||
(*PlayerData)(nil), // 151: webapi.PlayerData
|
||||
(*HorseRaceLamp)(nil), // 152: webapi.HorseRaceLamp
|
||||
(*MessageInfo)(nil), // 153: webapi.MessageInfo
|
||||
(*ServerInfo)(nil), // 154: webapi.ServerInfo
|
||||
(*OnlineReport)(nil), // 155: webapi.OnlineReport
|
||||
(*ItemInfo)(nil), // 156: webapi.ItemInfo
|
||||
(*ExchangeShop)(nil), // 157: webapi.ExchangeShop
|
||||
(*ShopWeight)(nil), // 158: webapi.ShopWeight
|
||||
}
|
||||
var file_webapi_proto_depIdxs = []int32{
|
||||
0, // 0: webapi.ASPlatformInfo.Tag:type_name -> webapi.TagCode
|
||||
140, // 1: webapi.ASPlatformInfo.Platforms:type_name -> webapi.Platform
|
||||
143, // 1: webapi.ASPlatformInfo.Platforms:type_name -> webapi.Platform
|
||||
0, // 2: webapi.ASGameConfig.Tag:type_name -> webapi.TagCode
|
||||
141, // 3: webapi.ASGameConfig.Configs:type_name -> webapi.PlatformGameConfig
|
||||
144, // 3: webapi.ASGameConfig.Configs:type_name -> webapi.PlatformGameConfig
|
||||
0, // 4: webapi.ASGameConfigGroup.Tag:type_name -> webapi.TagCode
|
||||
142, // 5: webapi.ASGameConfigGroup.GameConfigGroup:type_name -> webapi.GameConfigGroup
|
||||
145, // 5: webapi.ASGameConfigGroup.GameConfigGroup:type_name -> webapi.GameConfigGroup
|
||||
0, // 6: webapi.ASGameConfigGlobal.Tag:type_name -> webapi.TagCode
|
||||
143, // 7: webapi.ASGameConfigGlobal.GameStatus:type_name -> webapi.GameConfigGlobal
|
||||
146, // 7: webapi.ASGameConfigGlobal.GameStatus:type_name -> webapi.GameConfigGlobal
|
||||
0, // 8: webapi.ASDbConfig.Tag:type_name -> webapi.TagCode
|
||||
144, // 9: webapi.ASDbConfig.DbConfigs:type_name -> webapi.PlatformDbConfig
|
||||
140, // 10: webapi.ASUpdatePlatform.Platforms:type_name -> webapi.Platform
|
||||
147, // 9: webapi.ASDbConfig.DbConfigs:type_name -> webapi.PlatformDbConfig
|
||||
143, // 10: webapi.ASUpdatePlatform.Platforms:type_name -> webapi.Platform
|
||||
0, // 11: webapi.SAUpdatePlatform.Tag:type_name -> webapi.TagCode
|
||||
143, // 12: webapi.ASUpdateGameConfigGlobal.GameStatus:type_name -> webapi.GameConfigGlobal
|
||||
146, // 12: webapi.ASUpdateGameConfigGlobal.GameStatus:type_name -> webapi.GameConfigGlobal
|
||||
0, // 13: webapi.SAUpdateGameConfigGlobal.Tag:type_name -> webapi.TagCode
|
||||
141, // 14: webapi.ASUpdateGameConfig.Config:type_name -> webapi.PlatformGameConfig
|
||||
144, // 14: webapi.ASUpdateGameConfig.Config:type_name -> webapi.PlatformGameConfig
|
||||
0, // 15: webapi.SAUpdateGameConfig.Tag:type_name -> webapi.TagCode
|
||||
142, // 16: webapi.ASUpdateGameConfigGroup.GameConfigGroup:type_name -> webapi.GameConfigGroup
|
||||
145, // 16: webapi.ASUpdateGameConfigGroup.GameConfigGroup:type_name -> webapi.GameConfigGroup
|
||||
0, // 17: webapi.SAUpdateGameConfigGroup.Tag:type_name -> webapi.TagCode
|
||||
0, // 18: webapi.SAAddCoinById.Tag:type_name -> webapi.TagCode
|
||||
0, // 19: webapi.SAResetGamePool.Tag:type_name -> webapi.TagCode
|
||||
145, // 20: webapi.ASUpdateGamePool.CoinPoolSetting:type_name -> webapi.CoinPoolSetting
|
||||
148, // 20: webapi.ASUpdateGamePool.CoinPoolSetting:type_name -> webapi.CoinPoolSetting
|
||||
0, // 21: webapi.SAUpdateGamePool.Tag:type_name -> webapi.TagCode
|
||||
0, // 22: webapi.SAQueryGamePoolByGameId.Tag:type_name -> webapi.TagCode
|
||||
145, // 23: webapi.SAQueryGamePoolByGameId.CoinPoolSetting:type_name -> webapi.CoinPoolSetting
|
||||
145, // 24: webapi.CoinPoolStatesInfo.CoinPoolSetting:type_name -> webapi.CoinPoolSetting
|
||||
148, // 23: webapi.SAQueryGamePoolByGameId.CoinPoolSetting:type_name -> webapi.CoinPoolSetting
|
||||
148, // 24: webapi.CoinPoolStatesInfo.CoinPoolSetting:type_name -> webapi.CoinPoolSetting
|
||||
0, // 25: webapi.SAQueryAllGamePool.Tag:type_name -> webapi.TagCode
|
||||
26, // 26: webapi.SAQueryAllGamePool.CoinPoolStatesInfo:type_name -> webapi.CoinPoolStatesInfo
|
||||
0, // 27: webapi.SAListRoom.Tag:type_name -> webapi.TagCode
|
||||
146, // 28: webapi.SAListRoom.RoomInfo:type_name -> webapi.RoomInfo
|
||||
149, // 28: webapi.SAListRoom.RoomInfo:type_name -> webapi.RoomInfo
|
||||
0, // 29: webapi.SAGetRoom.Tag:type_name -> webapi.TagCode
|
||||
146, // 30: webapi.SAGetRoom.RoomInfo:type_name -> webapi.RoomInfo
|
||||
149, // 30: webapi.SAGetRoom.RoomInfo:type_name -> webapi.RoomInfo
|
||||
0, // 31: webapi.SADestroyRoom.Tag:type_name -> webapi.TagCode
|
||||
147, // 32: webapi.ASSinglePlayerAdjust.PlayerSingleAdjust:type_name -> webapi.PlayerSingleAdjust
|
||||
150, // 32: webapi.ASSinglePlayerAdjust.PlayerSingleAdjust:type_name -> webapi.PlayerSingleAdjust
|
||||
0, // 33: webapi.SASinglePlayerAdjust.Tag:type_name -> webapi.TagCode
|
||||
147, // 34: webapi.SASinglePlayerAdjust.PlayerSingleAdjust:type_name -> webapi.PlayerSingleAdjust
|
||||
150, // 34: webapi.SASinglePlayerAdjust.PlayerSingleAdjust:type_name -> webapi.PlayerSingleAdjust
|
||||
0, // 35: webapi.SAGetPlayerData.Tag:type_name -> webapi.TagCode
|
||||
148, // 36: webapi.SAGetPlayerData.PlayerData:type_name -> webapi.PlayerData
|
||||
151, // 36: webapi.SAGetPlayerData.PlayerData:type_name -> webapi.PlayerData
|
||||
0, // 37: webapi.SAMorePlayerData.Tag:type_name -> webapi.TagCode
|
||||
148, // 38: webapi.SAMorePlayerData.PlayerData:type_name -> webapi.PlayerData
|
||||
151, // 38: webapi.SAMorePlayerData.PlayerData:type_name -> webapi.PlayerData
|
||||
0, // 39: webapi.SAKickPlayer.Tag:type_name -> webapi.TagCode
|
||||
42, // 40: webapi.ASUpdatePlayerElement.PlayerEleArgs:type_name -> webapi.PlayerEleArgs
|
||||
0, // 41: webapi.SAUpdatePlayerElement.Tag:type_name -> webapi.TagCode
|
||||
0, // 42: webapi.SAWhiteBlackControl.Tag:type_name -> webapi.TagCode
|
||||
0, // 43: webapi.SAQueryHorseRaceLampList.Tag:type_name -> webapi.TagCode
|
||||
149, // 44: webapi.SAQueryHorseRaceLampList.HorseRaceLamp:type_name -> webapi.HorseRaceLamp
|
||||
152, // 44: webapi.SAQueryHorseRaceLampList.HorseRaceLamp:type_name -> webapi.HorseRaceLamp
|
||||
0, // 45: webapi.SACreateHorseRaceLamp.Tag:type_name -> webapi.TagCode
|
||||
0, // 46: webapi.SAGetHorseRaceLampById.Tag:type_name -> webapi.TagCode
|
||||
149, // 47: webapi.SAGetHorseRaceLampById.HorseRaceLamp:type_name -> webapi.HorseRaceLamp
|
||||
149, // 48: webapi.ASEditHorseRaceLamp.HorseRaceLamp:type_name -> webapi.HorseRaceLamp
|
||||
152, // 47: webapi.SAGetHorseRaceLampById.HorseRaceLamp:type_name -> webapi.HorseRaceLamp
|
||||
152, // 48: webapi.ASEditHorseRaceLamp.HorseRaceLamp:type_name -> webapi.HorseRaceLamp
|
||||
0, // 49: webapi.SAEditHorseRaceLamp.Tag:type_name -> webapi.TagCode
|
||||
0, // 50: webapi.SARemoveHorseRaceLampById.Tag:type_name -> webapi.TagCode
|
||||
0, // 51: webapi.SABlackBySnId.Tag:type_name -> webapi.TagCode
|
||||
0, // 52: webapi.SACreateShortMessage.Tag:type_name -> webapi.TagCode
|
||||
0, // 53: webapi.SAQueryShortMessageList.Tag:type_name -> webapi.TagCode
|
||||
150, // 54: webapi.SAQueryShortMessageList.MessageInfo:type_name -> webapi.MessageInfo
|
||||
153, // 54: webapi.SAQueryShortMessageList.MessageInfo:type_name -> webapi.MessageInfo
|
||||
0, // 55: webapi.SADeleteShortMessage.Tag:type_name -> webapi.TagCode
|
||||
0, // 56: webapi.SAQueryOnlineReportList.Tag:type_name -> webapi.TagCode
|
||||
148, // 57: webapi.SAQueryOnlineReportList.PlayerData:type_name -> webapi.PlayerData
|
||||
151, // 57: webapi.SAQueryOnlineReportList.PlayerData:type_name -> webapi.PlayerData
|
||||
0, // 58: webapi.SASrvCtrlClose.Tag:type_name -> webapi.TagCode
|
||||
0, // 59: webapi.SASrvCtrlNotice.Tag:type_name -> webapi.TagCode
|
||||
0, // 60: webapi.SASrvCtrlStartScript.Tag:type_name -> webapi.TagCode
|
||||
0, // 61: webapi.SAListServerStates.Tag:type_name -> webapi.TagCode
|
||||
151, // 62: webapi.SAListServerStates.ServerInfo:type_name -> webapi.ServerInfo
|
||||
154, // 62: webapi.SAListServerStates.ServerInfo:type_name -> webapi.ServerInfo
|
||||
0, // 63: webapi.SAServerStateSwitch.Tag:type_name -> webapi.TagCode
|
||||
0, // 64: webapi.SAResetEtcdData.Tag:type_name -> webapi.TagCode
|
||||
0, // 65: webapi.SAOnlineReportTotal.Tag:type_name -> webapi.TagCode
|
||||
152, // 66: webapi.SAOnlineReportTotal.OnlineReport:type_name -> webapi.OnlineReport
|
||||
155, // 66: webapi.SAOnlineReportTotal.OnlineReport:type_name -> webapi.OnlineReport
|
||||
0, // 67: webapi.SAAddCoinByIdAndPT.Tag:type_name -> webapi.TagCode
|
||||
153, // 68: webapi.JybInfoAward.ItemId:type_name -> webapi.ItemInfo
|
||||
156, // 68: webapi.JybInfoAward.ItemId:type_name -> webapi.ItemInfo
|
||||
83, // 69: webapi.ASCreateJYB.Award:type_name -> webapi.JybInfoAward
|
||||
0, // 70: webapi.SACreateJYB.Tag:type_name -> webapi.TagCode
|
||||
0, // 71: webapi.SAUpdateJYB.Tag:type_name -> webapi.TagCode
|
||||
|
@ -10795,10 +10997,10 @@ var file_webapi_proto_depIdxs = []int32{
|
|||
94, // 77: webapi.SAGetExchangeOrder.OrderList:type_name -> webapi.ExchangeOrderInfo
|
||||
0, // 78: webapi.SAUpExchangeStatus.Tag:type_name -> webapi.TagCode
|
||||
0, // 79: webapi.SAGetExchangeShop.Tag:type_name -> webapi.TagCode
|
||||
154, // 80: webapi.SAGetExchangeShop.List:type_name -> webapi.ExchangeShop
|
||||
155, // 81: webapi.SAGetExchangeShop.Weight:type_name -> webapi.ShopWeight
|
||||
157, // 80: webapi.SAGetExchangeShop.List:type_name -> webapi.ExchangeShop
|
||||
158, // 81: webapi.SAGetExchangeShop.Weight:type_name -> webapi.ShopWeight
|
||||
0, // 82: webapi.SAThdUpdatePlayerCoin.Tag:type_name -> webapi.TagCode
|
||||
153, // 83: webapi.SACreateOrder.ItemInfo:type_name -> webapi.ItemInfo
|
||||
156, // 83: webapi.SACreateOrder.ItemInfo:type_name -> webapi.ItemInfo
|
||||
0, // 84: webapi.SACallbackPayment.Tag:type_name -> webapi.TagCode
|
||||
0, // 85: webapi.SAResource.Tag:type_name -> webapi.TagCode
|
||||
0, // 86: webapi.SASendSms.Tag:type_name -> webapi.TagCode
|
||||
|
@ -10807,7 +11009,7 @@ var file_webapi_proto_depIdxs = []int32{
|
|||
0, // 89: webapi.SAGetImgVerify.Tag:type_name -> webapi.TagCode
|
||||
0, // 90: webapi.SAPlayerDelete.Tag:type_name -> webapi.TagCode
|
||||
0, // 91: webapi.SAPlayerInviteLink.Tag:type_name -> webapi.TagCode
|
||||
153, // 92: webapi.ASAddItemById.ItemInfo:type_name -> webapi.ItemInfo
|
||||
156, // 92: webapi.ASAddItemById.ItemInfo:type_name -> webapi.ItemInfo
|
||||
0, // 93: webapi.SAAddItemById.Tag:type_name -> webapi.TagCode
|
||||
130, // 94: webapi.SASMSConfig.Info:type_name -> webapi.SMSInfo
|
||||
0, // 95: webapi.SASMSConfig.Tag:type_name -> webapi.TagCode
|
||||
|
@ -10817,11 +11019,13 @@ var file_webapi_proto_depIdxs = []int32{
|
|||
136, // 99: webapi.SARoomInfo.List:type_name -> webapi.RoundInfo
|
||||
0, // 100: webapi.SAGetDollExchangeOrder.Tag:type_name -> webapi.TagCode
|
||||
94, // 101: webapi.SAGetDollExchangeOrder.OrderList:type_name -> webapi.ExchangeOrderInfo
|
||||
102, // [102:102] is the sub-list for method output_type
|
||||
102, // [102:102] is the sub-list for method input_type
|
||||
102, // [102:102] is the sub-list for extension type_name
|
||||
102, // [102:102] is the sub-list for extension extendee
|
||||
0, // [0:102] is the sub-list for field type_name
|
||||
141, // 102: webapi.ASShowLottery.List:type_name -> webapi.ShowLottery
|
||||
0, // 103: webapi.SAShowLottery.Tag:type_name -> webapi.TagCode
|
||||
104, // [104:104] is the sub-list for method output_type
|
||||
104, // [104:104] is the sub-list for method input_type
|
||||
104, // [104:104] is the sub-list for extension type_name
|
||||
104, // [104:104] is the sub-list for extension extendee
|
||||
0, // [0:104] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_webapi_proto_init() }
|
||||
|
@ -12499,6 +12703,42 @@ func file_webapi_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_webapi_proto_msgTypes[139].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ASShowLottery); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_webapi_proto_msgTypes[140].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ShowLottery); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_webapi_proto_msgTypes[141].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SAShowLottery); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
|
@ -12506,7 +12746,7 @@ func file_webapi_proto_init() {
|
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_webapi_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 139,
|
||||
NumMessages: 142,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
|
|
@ -1004,3 +1004,22 @@ message SAGetDollExchangeOrder {
|
|||
TagCode Tag = 1;//错误码
|
||||
repeated ExchangeOrderInfo OrderList = 2;//订单数据
|
||||
}
|
||||
|
||||
// 设置抽奖获奖图片和视频
|
||||
// post /api/game/show_lottery
|
||||
message ASShowLottery{
|
||||
string Platform = 1; // 平台
|
||||
string LogId = 2; // 日志id
|
||||
repeated ShowLottery List = 3; // 资源
|
||||
}
|
||||
|
||||
message ShowLottery{
|
||||
int32 Tp = 1; // 资源类型 1图片 2视频
|
||||
string Url = 2; // 资源地址
|
||||
string ImgUrl = 3; // 视频缩略图地址
|
||||
}
|
||||
|
||||
message SAShowLottery{
|
||||
TagCode Tag = 1; //错误码
|
||||
string Msg = 2; //错误信息
|
||||
}
|
|
@ -623,18 +623,13 @@ func CSLotteryHistory(s *netlib.Session, d *rankproto.GateTransmit, packetId int
|
|||
N: vv.N,
|
||||
})
|
||||
}
|
||||
for _, vv := range com.ConfigMgrInst.GetConfig(d.Platform).LotteryShows {
|
||||
if vv.GetOn() != common.On {
|
||||
continue
|
||||
}
|
||||
if common.TsInSameDay(vv.GetTime(), r.GetTs()) && vv.GetNum() == int64(r.GetIndex()) {
|
||||
for _, vv := range v.Media {
|
||||
r.Show = append(r.Show, &rankproto.LotteryShow{
|
||||
Tp: vv.GetTp(),
|
||||
Url: vv.GetUrl(),
|
||||
ImgUrl: vv.GetImgUrl(),
|
||||
Tp: vv.Tp,
|
||||
Url: vv.Url,
|
||||
ImgUrl: vv.ImgUrl,
|
||||
})
|
||||
}
|
||||
}
|
||||
ranks = append(ranks, r)
|
||||
}
|
||||
|
||||
|
|
|
@ -17,8 +17,6 @@ func init() {
|
|||
etcd.Register(etcd.ETCDKEY_PLATFORM_PREFIX, webapi.Platform{}, PlatformConfigEtcd)
|
||||
// 竞技馆房间配置
|
||||
etcd.Register(etcd.ETCDKEY_RoomConfig, webapi.RoomConfig{}, PlatformConfigEtcd)
|
||||
// 抽奖展示
|
||||
etcd.Register(etcd.ETCDKEY_LotteryShow, webapi.ShowLottery{}, etcdHandler)
|
||||
}
|
||||
|
||||
func PlatformConfigEtcd(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
||||
|
@ -30,19 +28,17 @@ func PlatformConfigEtcd(ctx context.Context, completeKey string, isInit bool, ev
|
|||
PlatformConfigSingleton.Update(config)
|
||||
case *webapi.RoomConfig:
|
||||
ConfigMgrInst.UpdateRoomConfig(config)
|
||||
case *webapi.ShowLottery:
|
||||
ConfigMgrInst.GetConfig(config.Platform).LotteryShows[config.GetId()] = config
|
||||
}
|
||||
}
|
||||
|
||||
func etcdHandler(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
||||
switch config := data.(type) {
|
||||
case *webapi.ShowLottery:
|
||||
switch event.Type {
|
||||
case clientv3.EventTypePut:
|
||||
ConfigMgrInst.GetConfig(config.Platform).LotteryShows[config.GetId()] = config
|
||||
case clientv3.EventTypeDelete:
|
||||
delete(ConfigMgrInst.GetConfig(config.Platform).LotteryShows, config.GetId())
|
||||
}
|
||||
}
|
||||
}
|
||||
//func etcdHandler(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
||||
// switch config := data.(type) {
|
||||
// case *webapi.ShowLottery:
|
||||
// switch event.Type {
|
||||
// case clientv3.EventTypePut:
|
||||
// ConfigMgrInst.GetConfig(config.Platform).LotteryShows[config.GetId()] = config
|
||||
// case clientv3.EventTypeDelete:
|
||||
// delete(ConfigMgrInst.GetConfig(config.Platform).LotteryShows, config.GetId())
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
|
|
@ -60,7 +60,7 @@ func InitHandler() {
|
|||
})
|
||||
|
||||
mq.RegisterHandler(&mq.RegisterHandlerParam{
|
||||
Name: mq.DBLotteryLog,
|
||||
Name: mq.RankLotteryLog,
|
||||
Data: &model.LotteryLog{},
|
||||
Handler: func(data interface{}) (err error) {
|
||||
log, ok := data.(*model.LotteryLog)
|
||||
|
|
|
@ -106,8 +106,6 @@ func init() {
|
|||
etcd.Register(etcd.ETCDKEY_LotteryConfig, webapi.LotteryConfig{}, platformConfigEvent)
|
||||
// 用户抽奖
|
||||
etcd.Register(etcd.ETCDKEY_LotteryUser, webapi.UserLottery{}, handlerEvent)
|
||||
// 抽奖展示
|
||||
etcd.Register(etcd.ETCDKEY_LotteryShow, webapi.ShowLottery{}, handlerEvent)
|
||||
}
|
||||
|
||||
func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
||||
|
@ -560,7 +558,6 @@ func handlerEvent(ctx context.Context, completeKey string, isInit bool, event *c
|
|||
return
|
||||
}
|
||||
config := data.(*webapi.UserLottery)
|
||||
config.Time = model.BackTimeUnixToLocalTimeUnix(config.Time)
|
||||
PlatformMgrSingleton.GetConfig(config.GetPlatform()).LotteryUser[config.GetId()] = config
|
||||
case clientv3.EventTypeDelete:
|
||||
if plt == "" || len(param) == 0 {
|
||||
|
@ -569,22 +566,6 @@ func handlerEvent(ctx context.Context, completeKey string, isInit bool, event *c
|
|||
delete(PlatformMgrSingleton.GetConfig(plt).LotteryUser, int64(param[0]))
|
||||
}
|
||||
|
||||
case equalFunc(etcd.ETCDKEY_LotteryShow):
|
||||
switch event.Type {
|
||||
case clientv3.EventTypePut:
|
||||
if data == nil {
|
||||
return
|
||||
}
|
||||
config := data.(*webapi.ShowLottery)
|
||||
config.Time = model.BackTimeUnixToLocalTimeUnix(config.Time)
|
||||
PlatformMgrSingleton.GetConfig(config.GetPlatform()).LotteryShows[config.GetId()] = config
|
||||
case clientv3.EventTypeDelete:
|
||||
if plt == "" || len(param) == 0 {
|
||||
return
|
||||
}
|
||||
delete(PlatformMgrSingleton.GetConfig(plt).LotteryShows, int64(param[0]))
|
||||
}
|
||||
|
||||
default:
|
||||
logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey)
|
||||
}
|
||||
|
|
|
@ -263,7 +263,8 @@ func (l *LotteryData) Done() {
|
|||
if v.GetOn() != common.On {
|
||||
continue
|
||||
}
|
||||
if common.TsInSameDay(v.GetTime(), l.StartTs) && v.GetNum() == int64(l.Num+1) {
|
||||
t, _ := time.Parse(time.DateTime, v.GetTime())
|
||||
if common.TsInSameDay(t.Unix(), l.StartTs) && v.GetNum() == int64(l.Num+1) {
|
||||
// 必中
|
||||
isMust = true
|
||||
tp = 1
|
||||
|
|
|
@ -20,6 +20,7 @@ import (
|
|||
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/model"
|
||||
"mongo.games.com/game/mq"
|
||||
"mongo.games.com/game/proto"
|
||||
"mongo.games.com/game/protocol/bag"
|
||||
loginproto "mongo.games.com/game/protocol/login"
|
||||
|
@ -2535,6 +2536,43 @@ func init() {
|
|||
return common.ResponseTag_TransactYield, pack
|
||||
}
|
||||
}))
|
||||
|
||||
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/game/show_lottery", WebAPIHandlerWrapper(
|
||||
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||
pack := &webapiproto.SAShowLottery{}
|
||||
msg := &webapiproto.ASShowLottery{}
|
||||
|
||||
var err error
|
||||
err = proto.Unmarshal(params, msg)
|
||||
if err != nil {
|
||||
pack.Tag = webapiproto.TagCode_FAILED
|
||||
pack.Msg = "参数错误"
|
||||
return common.ResponseTag_ParamError, pack
|
||||
}
|
||||
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
err = model.UpdateLotteryMedia(msg.GetPlatform(), msg.GetLogId(), msg.GetList())
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("/api/game/show_lottery UpdateLotteryMedia %v err: %v", msg, err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}), task.CompleteNotifyWrapper(func(i interface{}, t task.Task) {
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("/api/game/show_lottery %v err: %v", msg, err)
|
||||
pack.Tag = webapiproto.TagCode_FAILED
|
||||
pack.Msg = "修改失败"
|
||||
} else {
|
||||
pack.Tag = webapiproto.TagCode_SUCCESS
|
||||
pack.Msg = "修改成功"
|
||||
mq.Write(&model.LotteryLog{Platform: msg.GetPlatform()}, mq.RankLotteryLog)
|
||||
}
|
||||
tNode.TransRep.RetFiels = pack
|
||||
tNode.Resume()
|
||||
logger.Logger.Tracef("/api/game/show_lottery ret: %v", pack)
|
||||
}), "modify_show_lottery").Start()
|
||||
return common.ResponseTag_TransactYield, pack
|
||||
}))
|
||||
}
|
||||
|
||||
type playerDataParam struct {
|
||||
|
|
Loading…
Reference in New Issue