【新增】教程与分类关联
This commit is contained in:
@@ -0,0 +1,12 @@
|
|||||||
|
package com.corewing.app.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.corewing.app.entity.CourseCategory;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 教程分类 Mapper接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface CourseCategoryMapper extends BaseMapper<CourseCategory> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package com.corewing.app.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.corewing.app.entity.CourseCategoryRelation;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 教程与教程分类关系Mapper接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface CourseCategoryRelationMapper extends BaseMapper<CourseCategoryRelation> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.corewing.app.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.corewing.app.entity.CourseCategoryRelation;
|
||||||
|
|
||||||
|
public interface CourseCategoryRelationService extends IService<CourseCategoryRelation> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package com.corewing.app.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.corewing.app.entity.CourseCategoryRelation;
|
||||||
|
import com.corewing.app.mapper.CourseCategoryRelationMapper;
|
||||||
|
import com.corewing.app.service.CourseCategoryRelationService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class CourseCategoryRelationServiceImpl extends ServiceImpl<CourseCategoryRelationMapper, CourseCategoryRelation> implements CourseCategoryRelationService {
|
||||||
|
}
|
||||||
38
src/main/resources/db/app_course_category_relation.sql
Normal file
38
src/main/resources/db/app_course_category_relation.sql
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
Navicat Premium Dump SQL
|
||||||
|
|
||||||
|
Source Server : 120.24.204.180
|
||||||
|
Source Server Type : MySQL
|
||||||
|
Source Server Version : 80036 (8.0.36)
|
||||||
|
Source Host : 120.24.204.180:3306
|
||||||
|
Source Schema : app
|
||||||
|
|
||||||
|
Target Server Type : MySQL
|
||||||
|
Target Server Version : 80036 (8.0.36)
|
||||||
|
File Encoding : 65001
|
||||||
|
|
||||||
|
Date: 28/10/2025 13:46:38
|
||||||
|
*/
|
||||||
|
|
||||||
|
SET NAMES utf8mb4;
|
||||||
|
SET FOREIGN_KEY_CHECKS = 0;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for app_course_category_relation
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `app_course_category_relation`;
|
||||||
|
CREATE TABLE `app_course_category_relation` (
|
||||||
|
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||||
|
`course_id` bigint DEFAULT NULL COMMENT '教程id',
|
||||||
|
`category_id` bigint DEFAULT NULL COMMENT '教程分类id',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='教程与教程分类关系表';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of app_course_category_relation
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO `app_course_category_relation` (`id`, `course_id`, `category_id`) VALUES (1, 1, 1);
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
SET FOREIGN_KEY_CHECKS = 1;
|
||||||
Reference in New Issue
Block a user