完成教学案例的实现逻辑

This commit is contained in:
2025-10-31 14:18:08 +08:00
parent 55b2e201f8
commit 5995563bc6
17 changed files with 159 additions and 143 deletions

View File

@@ -6,13 +6,13 @@ package video_case
import (
"net/http"
"github.com/JACKYMYPERSON/hldrCenter/config"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/logic/video_case"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/svc"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/types"
"github.com/zeromicro/go-zero/rest/httpx"
)
func CreateVideoCaseHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
func CreateVideoCaseHandler(cfg *config.Config) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.CreateVideoCaseReq
if err := httpx.Parse(r, &req); err != nil {

View File

@@ -6,13 +6,13 @@ package video_case
import (
"net/http"
"github.com/JACKYMYPERSON/hldrCenter/config"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/logic/video_case"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/svc"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/types"
"github.com/zeromicro/go-zero/rest/httpx"
)
func DeleteVideoCaseHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
func DeleteVideoCaseHandler(cfg *config.Config) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.DeleteVideoCaseReq
if err := httpx.Parse(r, &req); err != nil {

View File

@@ -6,13 +6,13 @@ package video_case
import (
"net/http"
"github.com/JACKYMYPERSON/hldrCenter/config"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/logic/video_case"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/svc"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/types"
"github.com/zeromicro/go-zero/rest/httpx"
)
func GetVideoCaseHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
func GetVideoCaseHandler(cfg *config.Config) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.GetVideoCaseReq
if err := httpx.Parse(r, &req); err != nil {

View File

@@ -6,13 +6,13 @@ package video_case
import (
"net/http"
"github.com/JACKYMYPERSON/hldrCenter/config"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/logic/video_case"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/svc"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/types"
"github.com/zeromicro/go-zero/rest/httpx"
)
func ListVideoCaseHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
func ListVideoCaseHandler(cfg *config.Config) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.ListVideoCaseReq
if err := httpx.Parse(r, &req); err != nil {

View File

@@ -6,13 +6,13 @@ package video_case
import (
"net/http"
"github.com/JACKYMYPERSON/hldrCenter/config"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/logic/video_case"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/svc"
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/types"
"github.com/zeromicro/go-zero/rest/httpx"
)
func UpdateVideoCaseHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
func UpdateVideoCaseHandler(cfg *config.Config) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.UpdateVideoCaseReq
if err := httpx.Parse(r, &req); err != nil {