yl 59d31d4b47 feat: 添加我的课程模块功能
- 新增我的课程列表API接口
- 支持按学习状态筛选(全部/学习中/已完结)
- 支持分页查询
- 包含课程基本信息、学习进度等数据
- 添加Apifox接口文档配置指南

文件变更:
- server/api/admin/mycourse/mycourse.go - API接口定义
- server/internal/controller/admin/mycourse/mycourse.go - 控制器层
- server/internal/service/mycourse.go - 服务层(模拟数据)
- server/internal/router/admin.go - 路由配置
- docs/apifox_config.md - 接口文档
2025-07-28 15:30:04 +08:00

46 lines
1.1 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Package cmd
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package cmd
import (
"context"
"github.com/gogf/gf/v2/os/gcmd"
_ "hotgo/internal/crons"
"hotgo/internal/global"
"hotgo/internal/library/cron"
"hotgo/internal/service"
)
var (
Cron = &gcmd.Command{
Name: "cron",
Brief: "定时任务用来部署一些可独立运行的定时任务通过tcp方式和后台保持长连接通讯动态调整任务属性。",
Description: ``,
Func: func(ctx context.Context, parser *gcmd.Parser) (err error) {
// 服务日志处理
cron.Logger().SetHandlers(global.LoggingServeLogHandler)
// 启动定时任务
service.SysCron().StartCron(ctx)
// tcp客户端
service.CronClient().Start(ctx)
serverWg.Add(1)
// 信号监听
signalListen(ctx, signalHandlerForOverall)
<-serverCloseSignal
service.CronClient().Stop(ctx)
cron.StopALL()
cron.Logger().Debug(ctx, "cron successfully closed ..")
serverWg.Done()
return
},
}
)