作者 tangxvhui

榜单设置调整

... ... @@ -15,7 +15,7 @@ type RankController struct {
BaseController
}
//GetRankType ..
//GetRankType 榜单类型列表
//@router /rank/list
func (c RankController) GetRankType() {
var msg *protocol.ResponseMessage
... ... @@ -28,7 +28,7 @@ func (c RankController) GetRankType() {
return
}
//EditRankType ...
//EditRankType 榜单类型列表添加
//@router /rank/edit
func (c RankController) EditRankType() {
var msg *protocol.ResponseMessage
... ... @@ -82,7 +82,7 @@ func (c RankController) RankTypeForbidAllow() {
return
}
//RankSeasonList ...
//RankSeasonList 赛季列表
//@router /rank/season/list
func (c RankController) RankSeasonList() {
var msg *protocol.ResponseMessage
... ... @@ -102,7 +102,7 @@ func (c RankController) RankSeasonList() {
return
}
//RankSeasonAdd ...
//RankSeasonAdd 赛季列表添加
//@router /rank/season/add
func (c RankController) RankSeasonAdd() {
var msg *protocol.ResponseMessage
... ... @@ -207,7 +207,7 @@ func (c RankController) RankSeasonEdit() {
return
}
//RankRangeList ...
//RankRangeList 赛季榜单参与人列表
//@router /rank/range/list
func (c RankController) RankRangeList() {
var msg *protocol.ResponseMessage
... ... @@ -221,7 +221,7 @@ func (c RankController) RankRangeList() {
return
}
//RankRangeAdd ...
//RankRangeAdd 赛季榜单参与人列表添加
//@router /rank/range/add
func (c RankController) RankRangeAdd() {
var msg *protocol.ResponseMessage
... ... @@ -266,7 +266,7 @@ func (c RankController) RankRangeAdd() {
return
}
//RankRangeEdit ...
//RankRangeEdit 赛季榜单参与人编辑
//@router /rank/range/edit
func (c RankController) RankRangeEdit() {
var msg *protocol.ResponseMessage
... ... @@ -342,7 +342,7 @@ func (c RankController) RankRangeForbidAllow() {
return
}
//RankRangeInfo ...
//RankRangeInfo 赛季榜单参与人详情
//@router /rank/range/info
func (c RankController) RankRangeInfo() {
var msg *protocol.ResponseMessage
... ... @@ -395,7 +395,7 @@ func (c RankController) RankRangeSort() {
return
}
//RankItemList ...
//RankItemList 评比项列表
//@router /rank/item/list
func (c RankController) RankItemList() {
var msg *protocol.ResponseMessage
... ... @@ -443,3 +443,26 @@ func (c RankController) RankItemEdit() {
msg = protocol.NewReturnResponse(nil, err)
return
}
//RankRangeMove 赛季榜单参与人分组 批量移动
//@router /rank/range/move
func (c RankController) RankRangeMove() {
var msg *protocol.ResponseMessage
defer func() {
c.ResposeJson(msg)
}()
type Parameter struct {
FromId int64 `json:"from_id"`
ToId string `json:"name"`
RankTypeId int8 `json:"rank_type_id"`
RelationId []int64 `json:"relation_id"`
}
var param Parameter
if err := json.Unmarshal(c.Ctx.Input.RequestBody, &param); err != nil {
log.Error("json 解析失败 err:%s", err)
msg = protocol.BadRequestParam("1")
return
}
return
}
... ...
... ... @@ -116,6 +116,7 @@ func init() {
beego.NSRouter("/range/forbid_allow", &controllers.RankController{}, "post:RankRangeForbidAllow"),
beego.NSRouter("/range/info", &controllers.RankController{}, "post:RankRangeInfo"),
beego.NSRouter("/range/sort", &controllers.RankController{}, "post:RankRangeSort"),
beego.NSRouter("/range/move", &controllers.RankController{}, "post:RankRangeMove"),
beego.NSRouter("/item/list", &controllers.RankController{}, "post:RankItemList"),
beego.NSRouter("/item/edit", &controllers.RankController{}, "post:RankItemEdit"),
),
... ...
... ... @@ -633,20 +633,9 @@ func AllowRankRange(id int64, companyid int64) error {
return nil
}
func RankRangeMove(fromId int64, toId int64, moveIds []int64, companyid int64) error {
// var (
// err error
// rankRange *models.RankRange
// )
// rankRange, err = models.GetRankRangeById(id)
// if err != nil {
// log.Error("获取rank_range数据失败:%s", err)
// return protocol.NewErrWithMessage("1")
// }
// rankRange.Status = 0
// err = models.UpdateRankRangeById(rankRange, []string{"Status"})
// if err != nil {
// log.Error("更新rank_range数据失败:%s", err)
// }
func RankRangeMove(fromId int64, toId int64, RelationId []int64, companyid int64) error {
o := orm.NewOrm()
o.Begin()
o.Commit()
return nil
}
... ...