🎨 新增用户简介字段,新增手机端讲师相关接口
This commit is contained in:
@@ -3,6 +3,7 @@ package app
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
common "git.echol.cn/loser/lckt/model/common/request"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
@@ -361,3 +362,30 @@ func (a *AppUserApi) BindPhone(context *gin.Context) {
|
||||
|
||||
r.OkWithDetailed(user, "绑定手机号成功", context)
|
||||
}
|
||||
|
||||
// -----------------讲师相关---------------------
|
||||
|
||||
// GetTeacherList 获取讲师列表
|
||||
func (a *AppUserApi) GetTeacherList(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
|
||||
}
|
||||
|
||||
teachers, total, err := appUserService.GetTeacherList(p)
|
||||
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