...
|
...
|
@@ -142,6 +142,11 @@ func (c RankController) RankSeasonAdd() { |
|
|
return
|
|
|
}
|
|
|
endTime = t2.Unix() + 86399 //60*60*24-1
|
|
|
ok := serverank.RankPeriodCheckTime(param.RankTypeId, beginTime, endTime, 0)
|
|
|
if !ok {
|
|
|
msg = protocol.BadRequestParam("10101")
|
|
|
return
|
|
|
}
|
|
|
companyid := c.GetCompanyId()
|
|
|
err = serverank.AddRankPeriod(param.RankTypeId, beginTime, endTime, param.Name, companyid)
|
|
|
msg = protocol.NewReturnResponse(nil, err)
|
...
|
...
|
@@ -156,10 +161,11 @@ func (c RankController) RankSeasonEdit() { |
|
|
c.ResposeJson(msg)
|
|
|
}()
|
|
|
type Parameter struct {
|
|
|
Id int64 `json:"id"`
|
|
|
Name string `json:"name"`
|
|
|
BeginTime string `json:"begin_time"`
|
|
|
EndTime string `json:"end_time"`
|
|
|
Id int64 `json:"id"`
|
|
|
Name string `json:"name"`
|
|
|
RankTypeId int64 `json:"rank_type_id"`
|
|
|
BeginTime string `json:"begin_time"`
|
|
|
EndTime string `json:"end_time"`
|
|
|
}
|
|
|
var param Parameter
|
|
|
if err := json.Unmarshal(c.Ctx.Input.RequestBody, ¶m); err != nil {
|
...
|
...
|
@@ -189,6 +195,11 @@ func (c RankController) RankSeasonEdit() { |
|
|
}
|
|
|
|
|
|
endTime = t2.Unix() + 86399 //60*60*24-1
|
|
|
ok := serverank.RankPeriodCheckTime(param.RankTypeId, beginTime, endTime, param.Id)
|
|
|
if !ok {
|
|
|
msg = protocol.BadRequestParam("10101")
|
|
|
return
|
|
|
}
|
|
|
companyid := c.GetCompanyId()
|
|
|
fmt.Println(beginTime, endTime)
|
|
|
err = serverank.EditRankPeriod(param.Id, beginTime, endTime, param.Name, companyid)
|
...
|
...
|
|