Commit fa76c73b authored by hujiebin's avatar hujiebin

默认:30"

parent d147ca6c
...@@ -121,7 +121,7 @@ type GroupPowerStarReq struct { ...@@ -121,7 +121,7 @@ type GroupPowerStarReq struct {
// @Param nonce header string true "随机数字" // @Param nonce header string true "随机数字"
// @Param groupPowerId query int true "家族id" // @Param groupPowerId query int true "家族id"
// @Param type query string true "类型 1:送礼 2:活跃 3:收礼物" // @Param type query string true "类型 1:送礼 2:活跃 3:收礼物"
// @Param pageSize query int false "分页大小 默认:10" default(10) // @Param pageSize query int false "分页大小 默认:30" default(30)
// @Param pageIndex query int false "第几个分页,从1开始 默认:1" default(1) // @Param pageIndex query int false "第几个分页,从1开始 默认:1" default(1)
// @Success 200 {object} []group_power_cv.CvGroupPowerStarData // @Success 200 {object} []group_power_cv.CvGroupPowerStarData
// @Router /v1/groupPower/star [get] // @Router /v1/groupPower/star [get]
...@@ -134,6 +134,9 @@ func GroupPowerStar(c *gin.Context) (*mycontext.MyContext, error) { ...@@ -134,6 +134,9 @@ func GroupPowerStar(c *gin.Context) (*mycontext.MyContext, error) {
if param.PageIndex <= 0 { if param.PageIndex <= 0 {
param.PageIndex = 1 param.PageIndex = 1
} }
if param.PageSize <= 0 {
param.PageSize = 30
}
var model = domain.CreateModelContext(myContext) var model = domain.CreateModelContext(myContext)
offset, limit := (param.PageIndex-1)*param.PageSize, param.PageSize offset, limit := (param.PageIndex-1)*param.PageSize, param.PageSize
rank, err := groupPower_m.GetGroupPowerMonthStarRank(model, param.GroupPowerId, param.Type, offset, limit) rank, err := groupPower_m.GetGroupPowerMonthStarRank(model, param.GroupPowerId, param.Type, offset, limit)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment