🎨 新增讲师包月功能,优化支付回调
This commit is contained in:
@@ -476,3 +476,34 @@ func (a *AppUserApi) GetFollowStatus(ctx *gin.Context) {
|
||||
}
|
||||
r.OkWithDetailed(followed, "获取关注状态成功", ctx)
|
||||
}
|
||||
|
||||
// GetVipTeacherList 获取包月讲师列表
|
||||
func (a *AppUserApi) GetVipTeacherList(context *gin.Context) {
|
||||
var p common.PageInfo
|
||||
if err := context.ShouldBind(&p); err != nil {
|
||||
global.GVA_LOG.Error("参数错误,获取包月讲师列表失败", zap.Error(err))
|
||||
r.FailWithMessage("参数错误,获取包月讲师列表失败", context)
|
||||
return
|
||||
}
|
||||
|
||||
userId := user_jwt.GetUserID(context)
|
||||
if userId == 0 {
|
||||
global.GVA_LOG.Error("获取用户ID失败")
|
||||
r.FailWithMessage("获取用户ID失败", context)
|
||||
return
|
||||
}
|
||||
|
||||
teachers, total, err := appUserService.GetVipTeacherList(p, userId)
|
||||
if err != nil {
|
||||
global.GVA_LOG.Error("获取包月讲师列表失败", zap.Error(err))
|
||||
r.FailWithMessage("获取包月讲师列表失败", context)
|
||||
return
|
||||
}
|
||||
r.OkWithDetailed(
|
||||
r.PageResult{
|
||||
List: teachers,
|
||||
Total: total,
|
||||
Page: p.Page,
|
||||
PageSize: p.PageSize,
|
||||
}, "获取包月讲师列表成功", context)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user