🎨 新增兑换码功能,新增vip过期检测定时任务
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"git.echol.cn/loser/lckt/global"
|
||||
"git.echol.cn/loser/lckt/model/app"
|
||||
common "git.echol.cn/loser/lckt/model/common/request"
|
||||
"git.echol.cn/loser/lckt/model/common/response"
|
||||
"git.echol.cn/loser/lckt/task"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
@@ -94,3 +96,13 @@ func (b *BannerApi) GetIndexBanners(context *gin.Context) {
|
||||
}
|
||||
response.OkWithData(list, context)
|
||||
}
|
||||
|
||||
func (b *BannerApi) GetVIPBanners(context *gin.Context) {
|
||||
err := task.CheckVip(global.GVA_DB)
|
||||
if err != nil {
|
||||
response.FailWithMessage("获取VIPBanner失败: "+err.Error(), context)
|
||||
return
|
||||
}
|
||||
|
||||
response.OkWithMessage("检测vip成功", context)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user