Commit c72be61012423f8a41b81dde5fea5c929a9a62a7
1 parent
6e4ac791
Exists in
master
and in
1 other branch
feat✨:排行榜功能
Showing
2 changed files
with
6 additions
and
4 deletions
Show diff stats
controllers/admin.go
| ... | ... | @@ -18,8 +18,8 @@ func (c *AdminController) CacheSet() { |
| 18 | 18 | return |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | - confbase.CacheState = req.State | |
| 22 | - rsp := models.RspAdminCacheSet{State: confbase.CacheState} | |
| 21 | + confbase.CacheState = req.ConfigCache | |
| 22 | + rsp := models.RspAdminCacheSet{ConfigCache: confbase.CacheState} | |
| 23 | 23 | |
| 24 | 24 | c.RetRspCodeData(code_msg.RECODE_OK, rsp) |
| 25 | 25 | } | ... | ... |
models/admin.go
| ... | ... | @@ -2,10 +2,12 @@ package models |
| 2 | 2 | |
| 3 | 3 | // ReqAdminCacheSet 请求 |
| 4 | 4 | type ReqAdminCacheSet struct { |
| 5 | - State int `form:"state" json:"state"` // 0=关闭 1=打开 | |
| 5 | + BaseLoginInfo | |
| 6 | + BaseSign | |
| 7 | + ConfigCache int `form:"config_cache" json:"config_cache"` // 0=关闭 1=打开 | |
| 6 | 8 | } |
| 7 | 9 | |
| 8 | 10 | // RspAdminCacheSet 返回 |
| 9 | 11 | type RspAdminCacheSet struct { |
| 10 | - State int `form:"state" json:"state"` // 0=关闭 1=打开 | |
| 12 | + ConfigCache int `form:"config_cache" json:"config_cache"` // 0=关闭 1=打开 | |
| 11 | 13 | } | ... | ... |