🎨 完善用户讲师申请接口,新增order模块
This commit is contained in:
@@ -270,3 +270,22 @@ func (a *AppUserApi) ApplyTeacher(context *gin.Context) {
|
||||
|
||||
r.OkWithMessage("申请成功", context)
|
||||
}
|
||||
|
||||
// GetTeacherApply 获取教师申请状态
|
||||
func (a *AppUserApi) GetTeacherApply(context *gin.Context) {
|
||||
id := user_jwt.GetUserID(context)
|
||||
if id == 0 {
|
||||
global.GVA_LOG.Error("获取用户ID失败")
|
||||
r.FailWithMessage("获取用户ID失败", context)
|
||||
return
|
||||
}
|
||||
|
||||
status, err := appUserService.GetTeacherApplyStatus(id)
|
||||
if err != nil {
|
||||
global.GVA_LOG.Error("获取教师申请状态失败", zap.Error(err))
|
||||
r.FailWithMessage("获取教师申请状态失败", context)
|
||||
return
|
||||
}
|
||||
|
||||
r.OkWithDetailed(status, "获取教师申请状态成功", context)
|
||||
}
|
||||
|
Reference in New Issue
Block a user