完成教学案例和视频案例的实现层

This commit is contained in:
2025-10-31 14:23:28 +08:00
parent 5995563bc6
commit c3df04ed0d
10 changed files with 140 additions and 30 deletions

View File

@@ -6,7 +6,8 @@ package video_case
import (
"context"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/svc"
"github.com/JACKYMYPERSON/hldrCenter/config"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/model"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/types"
"github.com/zeromicro/go-zero/core/logx"
@@ -14,15 +15,17 @@ import (
type CreateVideoCaseLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
ctx context.Context
cfg *config.Config
model model.VideoCaseModel
}
func NewCreateVideoCaseLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateVideoCaseLogic {
func NewCreateVideoCaseLogic(ctx context.Context, cfg *config.Config, model model.VideoCaseModel) *CreateVideoCaseLogic {
return &CreateVideoCaseLogic{
Logger: logx.WithContext(ctx),
ctx: ctx,
svcCtx: svcCtx,
cfg: cfg,
model: model,
}
}

View File

@@ -6,7 +6,8 @@ package video_case
import (
"context"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/svc"
"github.com/JACKYMYPERSON/hldrCenter/config"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/model"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/types"
"github.com/zeromicro/go-zero/core/logx"
@@ -14,15 +15,17 @@ import (
type DeleteVideoCaseLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
ctx context.Context
cfg *config.Config
model model.VideoCaseModel
}
func NewDeleteVideoCaseLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteVideoCaseLogic {
func NewDeleteVideoCaseLogic(ctx context.Context, cfg *config.Config, model model.VideoCaseModel) *DeleteVideoCaseLogic {
return &DeleteVideoCaseLogic{
Logger: logx.WithContext(ctx),
ctx: ctx,
svcCtx: svcCtx,
cfg: cfg,
model: model,
}
}

View File

@@ -6,7 +6,8 @@ package video_case
import (
"context"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/svc"
"github.com/JACKYMYPERSON/hldrCenter/config"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/model"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/types"
"github.com/zeromicro/go-zero/core/logx"
@@ -14,15 +15,17 @@ import (
type GetVideoCaseLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
ctx context.Context
cfg *config.Config
model model.VideoCaseModel
}
func NewGetVideoCaseLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetVideoCaseLogic {
func NewGetVideoCaseLogic(ctx context.Context, cfg *config.Config, model model.VideoCaseModel) *GetVideoCaseLogic {
return &GetVideoCaseLogic{
Logger: logx.WithContext(ctx),
ctx: ctx,
svcCtx: svcCtx,
cfg: cfg,
model: model,
}
}

View File

@@ -6,7 +6,8 @@ package video_case
import (
"context"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/svc"
"github.com/JACKYMYPERSON/hldrCenter/config"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/model"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/types"
"github.com/zeromicro/go-zero/core/logx"
@@ -14,15 +15,17 @@ import (
type ListVideoCaseLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
ctx context.Context
cfg *config.Config
model model.VideoCaseModel
}
func NewListVideoCaseLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListVideoCaseLogic {
func NewListVideoCaseLogic(ctx context.Context, cfg *config.Config, model model.VideoCaseModel) *ListVideoCaseLogic {
return &ListVideoCaseLogic{
Logger: logx.WithContext(ctx),
ctx: ctx,
svcCtx: svcCtx,
cfg: cfg,
model: model,
}
}

View File

@@ -6,7 +6,8 @@ package video_case
import (
"context"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/svc"
"github.com/JACKYMYPERSON/hldrCenter/config"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/model"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/types"
"github.com/zeromicro/go-zero/core/logx"
@@ -14,15 +15,17 @@ import (
type UpdateVideoCaseLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
ctx context.Context
cfg *config.Config
model model.VideoCaseModel
}
func NewUpdateVideoCaseLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateVideoCaseLogic {
func NewUpdateVideoCaseLogic(ctx context.Context, cfg *config.Config, model model.VideoCaseModel) *UpdateVideoCaseLogic {
return &UpdateVideoCaseLogic{
Logger: logx.WithContext(ctx),
ctx: ctx,
svcCtx: svcCtx,
cfg: cfg,
model: model,
}
}