almanac-reward.go
621 Bytes
package apis
import (
"net/http"
. "client/icesimba.mail/models"
"github.com/gin-gonic/gin"
)
func AlmanacRewardApi(c *gin.Context) {
gameId := c.Request.FormValue("game_id")
date := c.Request.FormValue("date")
if gameId == "" || date == "" {
code = "1003"
c.JSON(http.StatusOK, gin.H{
"code": code,
"msg": "参数错误",
})
return
}
almanacReward, err := QueryAlmanacReward(date, gameId)
if err != nil {
c.JSON(http.StatusOK, gin.H{
"code": "1000",
"msg": err.Error(),
})
return
}
code = "0"
c.JSON(http.StatusOK, gin.H{
"code": code,
"obj": almanacReward,
})
return
}