
- 新增mycourse API接口定义 (api/api/mycourse/) - 实现Controller层,遵循团队四层架构规范 - 实现Logic层业务逻辑,包含用户认证和模拟数据 - 自动生成Service层接口 (gf gen service) - 支持课程状态筛选和分页功能 - 返回课程基本信息、学习进度、讲师等数据
34 lines
807 B
Go
34 lines
807 B
Go
// ================================================================================
|
|
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
|
// You can delete these comments if you wish manually maintain this interface file.
|
|
// ================================================================================
|
|
|
|
package service
|
|
|
|
import (
|
|
"context"
|
|
v1 "hotgo/api/api/mycourse/v1"
|
|
)
|
|
|
|
type (
|
|
IMyCourse interface {
|
|
// GetList 获取我的课程列表
|
|
GetList(ctx context.Context, req *v1.MyCourseListReq) (res *v1.MyCourseListRes, err error)
|
|
}
|
|
)
|
|
|
|
var (
|
|
localMyCourse IMyCourse
|
|
)
|
|
|
|
func MyCourse() IMyCourse {
|
|
if localMyCourse == nil {
|
|
panic("implement not found for interface IMyCourse, forgot register?")
|
|
}
|
|
return localMyCourse
|
|
}
|
|
|
|
func RegisterMyCourse(i IMyCourse) {
|
|
localMyCourse = i
|
|
}
|