互动
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
503 B

package client
import (
"github.com/ouxuanserver/osmanthuswine/src/core"
"hudongzhuanjia/controllers"
"hudongzhuanjia/models"
)
type LotteryCtl struct {
controllers.AuthorCtl
}
func (t *LotteryCtl) UserLotteries() {
uid := t.MustGetUID()
userPrizes := make([]*models.UserPrize, 0)
err := core.GetXormAuto().Where("is_delete=0 and user_id=? ", uid).Desc("created_at").Find(&userPrizes)
t.CheckErr(err)
t.JSON(map[string]interface{}{
"list": userPrizes,
"total": len(userPrizes),
})
}