...
|
...
|
@@ -105,9 +105,10 @@ func (c RankController) RankSeasonAdd() { |
|
|
c.ResposeJson(msg)
|
|
|
}()
|
|
|
type Parameter struct {
|
|
|
Name string `json:"name"`
|
|
|
BeginTime string `json:"begin_time"`
|
|
|
EndTime string `json:"end_time"`
|
|
|
RankTypeId int64 `json:"rank_type_id"`
|
|
|
Name string `json:"name"`
|
|
|
BeginTime string `json:"begin_time"`
|
|
|
EndTime string `json:"end_time"`
|
|
|
}
|
|
|
var param Parameter
|
|
|
if err := json.Unmarshal(c.Ctx.Input.RequestBody, ¶m); err != nil {
|
...
|
...
|
@@ -120,7 +121,7 @@ func (c RankController) RankSeasonAdd() { |
|
|
endTime int64
|
|
|
)
|
|
|
companyid := c.GetCompanyId()
|
|
|
err := serverank.AddRankSeason(beginTime, endTime, param.Name, companyid)
|
|
|
err := serverank.AddRankSeason(param.RankTypeId, beginTime, endTime, param.Name, companyid)
|
|
|
msg = protocol.NewReturnResponse(nil, err)
|
|
|
return
|
|
|
}
|
...
|
...
|
@@ -176,6 +177,7 @@ func (c RankController) RankRangeAdd() { |
|
|
c.ResposeJson(msg)
|
|
|
}()
|
|
|
type Parameter struct {
|
|
|
RankTypeId int64 `json:"rank_type_id"`
|
|
|
Name string `json:"name"`
|
|
|
RangeType int8 `json:"range_type"`
|
|
|
RelationId []int64 `json:"relation_id"`
|
...
|
...
|
@@ -207,7 +209,7 @@ func (c RankController) RankRangeAdd() { |
|
|
return
|
|
|
}
|
|
|
companyid := c.GetCompanyId()
|
|
|
err := serverank.AddRankRange(param.Name, param.RangeType, param.RelationId, companyid)
|
|
|
err := serverank.AddRankRange(param.RankTypeId, param.Name, param.RangeType, param.RelationId, companyid)
|
|
|
msg = protocol.NewReturnResponse(nil, err)
|
|
|
return
|
|
|
}
|
...
|
...
|
|