Commit 7ffab05ce4349536e4a2a5bb0cd7a01ad53c3387

Authored by 王家文
2 parents b5dab26d 46028495
Exists in master and in 1 other branch dev-wjw

Merge branch 'master' into dev-wjw

configs/confcardholder/config.go
@@ -11,12 +11,13 @@ import ( @@ -11,12 +11,13 @@ import (
11 type ActivityConfig struct { 11 type ActivityConfig struct {
12 Raw *ActivityConfigRaw `json:"-"` 12 Raw *ActivityConfigRaw `json:"-"`
13 13
14 - Id int64 // ID  
15 - OpenLevel int // 开启等级  
16 - PreviewTime int64 // 预告时间  
17 - StartTime int64 // 开始时间  
18 - EndTime int64 // 结束时间  
19 - Round int // 轮数 14 + Id int64 // ID
  15 + OpenLevel int // 开启等级
  16 + PreviewTime int64 // 预告时间
  17 + StartTime int64 // 开始时间
  18 + EndTime int64 // 结束时间
  19 + Round int // 轮数
  20 + IconPath string // icon资源路径
20 21
21 Awards map[string]string // 奖励配置 22 Awards map[string]string // 奖励配置
22 AlbumConfig map[int]AlbumConfig // 卡组配置 23 AlbumConfig map[int]AlbumConfig // 卡组配置
@@ -40,12 +41,13 @@ func (c *ActivityConfig) RedisInfo(suffix string) *svredis.RedisInfo { @@ -40,12 +41,13 @@ func (c *ActivityConfig) RedisInfo(suffix string) *svredis.RedisInfo {
40 41
41 // ActivityConfigRaw 卡牌活动配置 原始数据 42 // ActivityConfigRaw 卡牌活动配置 原始数据
42 type ActivityConfigRaw struct { 43 type ActivityConfigRaw struct {
43 - Id int64 `gorm:"column:id;primaryKey"` // ID  
44 - OpenLevel int // 开启等级  
45 - PreviewTime int64 // 预告时间  
46 - StartTime int64 // 开始时间  
47 - EndTime int64 // 结束时间  
48 - Round int // 轮数 44 + Id int64 `gorm:"column:id;primaryKey"` // ID
  45 + OpenLevel int // 开启等级
  46 + PreviewTime int64 // 预告时间
  47 + StartTime int64 // 开始时间
  48 + EndTime int64 // 结束时间
  49 + Round int // 轮数
  50 + IconPath string // icon资源路径
49 51
50 Awards string // 奖励配置 52 Awards string // 奖励配置
51 AlbumConfig string // 卡组配置 53 AlbumConfig string // 卡组配置
@@ -71,6 +73,7 @@ func (c *ActivityConfigRaw) MysqlInfo(suffix string) *svmysql.MysqlInfo { @@ -71,6 +73,7 @@ func (c *ActivityConfigRaw) MysqlInfo(suffix string) *svmysql.MysqlInfo {
71 // CardActivityConfigClient 卡牌活动配置 给客户端数据 73 // CardActivityConfigClient 卡牌活动配置 给客户端数据
72 type CardActivityConfigClient struct { 74 type CardActivityConfigClient struct {
73 Id int64 `form:"id" json:"id"` // ID 75 Id int64 `form:"id" json:"id"` // ID
  76 + IconPath string `form:"icon_path" json:"icon_path"` // icon资源路径
74 RoundAwards map[string]string `form:"round_awards" json:"round_awards"` // 轮次奖励配置 77 RoundAwards map[string]string `form:"round_awards" json:"round_awards"` // 轮次奖励配置
75 Albums []AlbumConfig `form:"albums" json:"albums"` // 卡组配置 78 Albums []AlbumConfig `form:"albums" json:"albums"` // 卡组配置
76 Cards []CardConfig `form:"cards" json:"cards"` // 卡牌配置 79 Cards []CardConfig `form:"cards" json:"cards"` // 卡牌配置
configs/confcardholder/decode.go
@@ -19,6 +19,7 @@ func (c *ActivityConfig) Decode(gameId string, configRaw *ActivityConfigRaw) { @@ -19,6 +19,7 @@ func (c *ActivityConfig) Decode(gameId string, configRaw *ActivityConfigRaw) {
19 c.StartTime = configRaw.StartTime 19 c.StartTime = configRaw.StartTime
20 c.EndTime = configRaw.EndTime 20 c.EndTime = configRaw.EndTime
21 c.Round = configRaw.Round 21 c.Round = configRaw.Round
  22 + c.IconPath = configRaw.IconPath
22 23
23 c.Awards = make(map[string]string) 24 c.Awards = make(map[string]string)
24 c.AlbumConfig = make(map[int]AlbumConfig) 25 c.AlbumConfig = make(map[int]AlbumConfig)
@@ -119,6 +120,7 @@ func (c *ActivityConfig) Decode(gameId string, configRaw *ActivityConfigRaw) { @@ -119,6 +120,7 @@ func (c *ActivityConfig) Decode(gameId string, configRaw *ActivityConfigRaw) {
119 func (c *ActivityConfig) GenerateConfigClient() { 120 func (c *ActivityConfig) GenerateConfigClient() {
120 configClient := &CardActivityConfigClient{ 121 configClient := &CardActivityConfigClient{
121 Id: c.Id, 122 Id: c.Id,
  123 + IconPath: c.IconPath,
122 RoundAwards: c.Awards, 124 RoundAwards: c.Awards,
123 Albums: make([]AlbumConfig, 0), 125 Albums: make([]AlbumConfig, 0),
124 Cards: make([]CardConfig, 0), 126 Cards: make([]CardConfig, 0),