...
|
...
|
@@ -101,7 +101,7 @@ func (c RankController) RankSeasonList() { |
|
|
}
|
|
|
companyid := c.GetCompanyId()
|
|
|
rspData, err := serverank.RankSeasonList(param.PageIndex, param.PageSize, param.RankTypeId, companyid)
|
|
|
msg = protocol.NewReturnResponse(rspData, err)
|
|
|
msg = protocol.NewPageDataResponse(rspData, err)
|
|
|
return
|
|
|
}
|
|
|
|
...
|
...
|
@@ -145,11 +145,15 @@ 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
|
|
|
// }
|
|
|
if beginTime < endTime {
|
|
|
msg = protocol.BadRequestParam("1")
|
|
|
return
|
|
|
}
|
|
|
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)
|
...
|
...
|
@@ -198,11 +202,15 @@ 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
|
|
|
// }
|
|
|
if beginTime < endTime {
|
|
|
msg = protocol.BadRequestParam("1")
|
|
|
return
|
|
|
}
|
|
|
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)
|
...
|
...
|
|