Files
rootandClaude Opus 5 8679200f41 Initial commit
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 13:57:10 +08:00

53 lines
2.2 KiB
Go

package acth5ctrl
import (
"time"
"91porn-server/common"
"91porn-server/common/stderr"
"91porn-server/models/commod"
"91porn-server/models/l/lotterylgmod"
"github.com/gin-gonic/gin"
)
// List doc
// @Summary 中奖号列表
// @Description 中奖号列表
// @Tags web-活动
// @Accept mpfd,json
// @Produce json,html
// @Param pageNumber formData integer true "当前页"
// @Param pageSize formData integer true "每页条数"
// @Param title formData string false "过滤项-标题"
// @Param actId formData string false "过滤项-活动ID"
// @Param enable formData bool false "过滤项-活动开关"
// @Param status formData string false "过滤项-活动状态"
// @Param startTime formData string false "过滤项-活动开始时间"
// @Param endTime formData string false "过滤项-活动结束时间"
// @Success 200 {string} user "{"msg": "操作成功", "date": { "total":10, "list":[] }}"
// @Failure 400 {string} json "{"msg": "操作失败"}"
// @Router /web/admin/lottnum/list [get]
func List(c *gin.Context) {
var arg struct {
Start *time.Time `form:"start" json:"start"`
End *time.Time `form:"end" json:"end"`
UID *uint64 `form:"uid" json:"uid"`
Code *int `form:"code" json:"code"`
commod.Page
}
if err := c.ShouldBind(&arg); err != nil {
common.ServeJSON(c, stderr.ErrParamError, "web lottnum list arg error"+err.Error())
return
}
info, total, err := lotterylgmod.LottnumList(arg.PageNumber, arg.PageSize, arg.Start, arg.End, arg.UID, arg.Code)
if err != nil {
common.ServeJSON(c, stderr.ErrDbQueryError, "")
return
}
common.ServeJSON(c, stderr.Success, gin.H{
"list": info,
"total": total,
})
}