当前位置: 首页 > news >正文

Springboot+Layui英语单词学习系统的设计与实现

文章目录

    • 前言
    • 详细视频演示
    • 具体实现截图
      • 后端框架SpringBoot
      • LayUI框架
      • 持久层框架MyBaits
    • 成功系统案例:
    • 参考代码
    • 数据库
    • 源码获取

前言

博主介绍:CSDN特邀作者、985高校计算机专业毕业、现任某互联网大厂高级全栈开发工程师、Gitee/掘金/华为云/阿里云/GitHub等平台持续输出高质量技术内容、深耕Java、小程序、前端、python等技术领域和毕业项目实战,以及程序定制化开发、全栈讲解。

💯文末获取源码+数据库💯
感兴趣的可以先收藏起来,还有大家在毕设选题,项目以及论文编写等相关问题都可以找我咨询,希望帮助更多的人。

详细视频演示

视频演示

具体实现截图

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

后端框架SpringBoot

Spring Boot允许开发者快速构建出既可以独立运行又满足生产级别标准的Spring基础应用程序。此框架通过提供一系列便捷的工具和服务,极大地促进了基于Spring的应用开发工作的效率和质量。通过提供一系列大型项目中常用的默认配置,Spring Boot最大化减少配置文件的使用,开发者能够迅速启动和运行Spring应用程序。

Spring Boot通过约定优于配置的原则,避免了许多传统Spring应用开发时繁琐的配置,该框架支持对内嵌服务器的自动配置,如Tomcat、Jetty或Undertow,从而简化了Web应用的部署过程。

LayUI框架

Layui 制定了一套适合自身应用场景的轻量级模块规范,以便在不同规模的项目中,也能对前端代码进行很好的管理或维护。 Layui 的轻量级模块系统,并非有意违背 CommonJS 和 ES Module ,而是试图以更简单的方式去诠释高效,这种对返璞归真的执念源于在主流标准尚未完全普及的前 ES5 时代,后来也成为 Layui 独特的表达方式。
开发者可以将其视为「像使用普通 API 一样来管理模块」,在此前提下,组件的承载也变得轻松自如,开发者完全可以游刃在以浏览器为宿主的原生态的 HTML/CSS/JavaScript 的开发模式中,而不必卷入层出不穷的主流框架的浪潮之中,给心灵一个栖息之所。
当然,Layui 自然也不是一个模块加载器,而是一套相对完整的 UI 解决方案,但与 Bootstrap 又并不相同,除了 HTML+CSS 本身的静态化处理,Layui 的组件更倾向于 JavaScript 的动态化渲染,并为之提供了相对丰富和统一的 API,使用时,只需稍加熟悉,便可在各种交互中应付自如。

持久层框架MyBaits

MyBatis是一个开源的持久层框架,它可以帮助开发者简化数据库操作的编写和管理。MyBatis的核心思想是将SQL语句和Java代码分离,通过XML或注解的方式来描述数据库操作,从而实现了数据访问层的解耦和灵活性。

MyBatis的优势主要包括以下几点:

简化数据库操作:MyBatis通过提供强大的SQL映射功能,可以将Java对象与数据库表进行映射,开发者无需手动编写繁琐的SQL语句,大大简化了数据库操作的编写和维护。

灵活的SQL控制:MyBatis支持动态SQL,可以根据不同的条件和逻辑来动态生成SQL语句,使得查询、更新等操作更加灵活和可控。

缓存支持:MyBatis提供了一级缓存和二级缓存的支持,可以有效减少数据库的访问次数,提高系统性能。

可扩展性强:MyBatis采用插件机制,可以方便地扩展和定制自己的功能,满足各种不同的业务需求。

所有项目均为博主亲自收集、开发并严格测试,确保源码完整、可运行,无缺失依赖或兼容性问题!同学们拿到后就能使用!博主具备多年高级开发经验,能深入讲解代码架构、核心逻辑及技术难点,助你高效掌握项目精髓。

成功系统案例:

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

参考代码

package cn.example.demo.modules.english.controller;import cn.example.demo.common.dictionary.AuthCenterBaseInfo;
import cn.example.demo.common.model.response.HttpDataResponseResult;
import cn.example.demo.common.model.response.HttpResponseResult;
import cn.example.demo.common.model.service.ServiceResult;
import cn.example.demo.common.retrieval.PageBean;
import cn.example.demo.common.secure.authority.AuthEnable;
import cn.example.demo.common.tools.file.ExportFileUtils;
import cn.example.demo.common.tools.file.SimpleFileUtils;
import cn.example.demo.common.tools.file.office.ExcelFileUtils;
import cn.example.demo.common.tools.obj.DateAgeUtils;
import cn.example.demo.common.validation.constraint.ParamRegex;
import cn.example.demo.common.validation.groups.Update;
import cn.example.demo.modules.english.model.dto.EnglishBookDto;
import cn.example.demo.modules.english.model.entity.EnglishBook;
import cn.example.demo.modules.english.model.entity.EnglishWord;
import cn.example.demo.modules.english.service.EnglishBookService;
import cn.example.demo.modules.sys.model.entity.SysUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ooxml.POIXMLException;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.stream.Collectors;/*** <p>* 英语书籍控制器* </p>** @author CodeUp* @create 2025/05/30 00:20:37*/
@Validated
@RestController
@RequestMapping("english/api/book")
@Api(tags = {"英语书籍操作接口"})
public class EnglishBookController {@Autowiredprivate AuthCenterBaseInfo authCenterBaseInfo;@Resourceprivate EnglishBookService englishBookService;@AuthEnable@Transactional@PostMapping(value = "add", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)@ApiOperation(value = "导入英语词汇书")public HttpResponseResult addEnglishBook(@ApiParam(value = "英语词汇文件") @RequestParam(value = "file") MultipartFile file,@ApiParam(value = "书籍编码") @RequestParam(defaultValue = "") String bookCode,@ApiParam(value = "书籍名称") @RequestParam(defaultValue = "") String bookName,@ApiParam(value = "描述") @RequestParam(defaultValue = "") String description) throws Exception {if (file == null) {return HttpDataResponseResult.isBadRequest("英语词汇文件不能为空!", null);}if (StringUtils.isNotEmpty(bookCode) && englishBookService.isExistBookCode(bookCode)) {return HttpDataResponseResult.isBadRequest("该书籍编号已存在!");}EnglishBookDto dto = EnglishBookDto.builder().bookCode(bookCode).bookName(bookName).description(description).build();try {InputStream in = file.getInputStream();Workbook workbook = WorkbookFactory.create(in);// 保存EnglishBookServiceResult result = englishBookService.insertEnglishBook(dto, workbook.getSheetAt(0));if (result.getStatus() == HttpStatus.OK.value()) {EnglishBook englishBook = (EnglishBook) result.getData();// 备份词汇书文件到本地ByteArrayOutputStream baOs = new ByteArrayOutputStream();workbook.write(baOs);ExportFileUtils.writeToFile(baOs.toByteArray(), englishBook.getFilePath());return HttpDataResponseResult.isSuccess("英语词汇书籍【" + englishBook.getBookName() + "】上传成功!", englishBook);}return HttpDataResponseResult.isNotModified(result.getMessage(), result.getData());} catch (IOException e) {return HttpDataResponseResult.isBadRequest("无法将Excel文件解析为内置对象,仅支持xls、xlsx格式的文件。Error ------> " + e.getMessage(), null);} catch (POIXMLException e) {return HttpDataResponseResult.isBadRequest("无法将Excel文件解析为内置对象,仅支持xls、xlsx格式的文件。Error ------> " + e.getMessage(), null);}}@AuthEnable@ApiOperation(value = "修改英语书籍")@PutMapping(value = "modify")@Transactionalpublic HttpResponseResult modifyEnglishBook(@RequestBody @Validated(Update.class) EnglishBookDto dto) {// 保存消息通知信息ServiceResult result = englishBookService.updateEnglishBook(dto);if (result.getStatus() == HttpStatus.OK.value()) {return HttpDataResponseResult.isSuccess("英语书籍【" + dto.getId() + "】已修改!", null);}return HttpDataResponseResult.isNotModified(result.getMessage(), result.getData());}@AuthEnable@ApiOperation(value = "查询英语书籍")@GetMapping(value = "retrieval")public HttpResponseResult getEnglishBookList(@RequestParam(defaultValue = "") Integer id,@RequestParam(defaultValue = "") String bookCode,@RequestParam(defaultValue = "") String bookName,@RequestParam(defaultValue = "") String filePath,@RequestParam(defaultValue = "") String description,@RequestParam(defaultValue = "") Short status,@RequestParam(defaultValue = "") Integer questionNum,@ApiParam(value = "当前页") @RequestParam(value = "page", defaultValue = "1") @ParamRegex.Integer String page,@ApiParam(value = "每页大小") @RequestParam(value = "limit", defaultValue = "10") @ParamRegex.Integer String limit,HttpServletRequest request) {// 分页条件PageBean<Object> pageBean = new PageBean<>();pageBean.setCurrentPage(Integer.parseInt(page));pageBean.setPageSize(Integer.parseInt(limit));PageBean result;SysUser user = (SysUser) request.getAttribute(authCenterBaseInfo.getTokenName());if (user.getUsername().equals("SuperAdmin") || user.getRoleIds().contains(1)) {} else {}result = englishBookService.queryEnglishBook(id, bookCode, bookName, filePath, description, status, questionNum, pageBean);if (result.getItems() == null || result.getItems().isEmpty()) {return HttpDataResponseResult.isNotFound("未查到记录!", null);}return HttpDataResponseResult.isSuccess(result);}@AuthEnable@ApiOperation(value = "删除英语书籍")@DeleteMapping(value = "remove/{id}")@Transactionalpublic HttpResponseResult deleteEnglishBook(@PathVariable @ParamRegex.Integer String id) {ServiceResult result = englishBookService.deleteEnglishBook(Integer.valueOf(id));if (result.getStatus() == HttpStatus.OK.value()) {return HttpDataResponseResult.isSuccess(result.getMessage(), result.getData());}return HttpDataResponseResult.isNotModified(result.getMessage(), result.getData());}@ApiOperation(value = "【英语词汇书】模板导出")@GetMapping(value = "book_word_template/export")public HttpResponseResult exportEnglishWordTemplate(HttpServletResponse response) throws Exception {List<EnglishWord> result = new ArrayList<>();EnglishWord englishWord = EnglishWord.builder().word("hello").chinese("你好;喂").description("1.(用以打招呼或唤起注意)喂,你好。如:Hello, Jim! How are you?嗨!吉姆!你好吗?\r\n" +"2.(用作打电话时的招呼语)喂\r\n" +"3.(表示惊讶等)嘿;啊\r\n" +"4.在跟打招呼用hello是不礼貌的,应该用Hi才是有礼貌的。").build();result.add(englishWord);// 生成表格并返回String title = "英语词汇书(书名)";   // 表头标题String fileName = title + "_" + DateAgeUtils.dateToString(new Date(), "yyyyMMdd#HHmmss") + ".xlsx";   // 文件名byte[] fileData = ExcelFileUtils.exportAsSheet(EnglishWord.class, result, "英语词汇书", title, false);ExportFileUtils.responseBinaryFile(fileData, response, fileName);return null;}@ApiOperation(value = "本地【英语词汇书】下载")@GetMapping(value = "english_book/export/{id}")public HttpResponseResult exportEnglishBook(@PathVariable @ParamRegex.Integer String id,HttpServletResponse response) throws Exception {EnglishBook englishBook = englishBookService.findEnglishBookById(Integer.valueOf(id));if (englishBook != null) {File file = new File(System.getProperty("user.dir") + File.separator + englishBook.getFilePath());if (file != null) {byte[] data = SimpleFileUtils.readFileAsByte(file);ExportFileUtils.responseBinaryFile(data, response, file.getName());return null;}}return HttpDataResponseResult.isNotFound("没有文件可以下载", null);}@ApiOperation(value = "【英语词汇书】字典列表")@GetMapping(value = "english_book/code_dict/list")public HttpResponseResult getEnglishBookDict() throws Exception {List<EnglishBook> englishBooks = englishBookService.queryAllEnglishBook();if (!englishBooks.isEmpty()) {List<HashMap<String, String>> bookCodes = englishBooks.stream().map(o -> {HashMap<String, String> map = new HashMap<>();map.put("code", o.getBookCode());map.put("name", o.getBookName());return map;}).collect(Collectors.toList());return HttpDataResponseResult.isSuccess(bookCodes);}return HttpDataResponseResult.isNotFound("没有查到书籍编码列表", null);}
}

数据库

/*CREATE DATABASE /*!32312 IF NOT EXISTS*/`english_learn_sys` /*!40100 DEFAULT CHARACTER SET utf8 */;USE `english_learn_sys`;DROP TABLE IF EXISTS `english_book`;CREATE TABLE `english_book` (`id` int(11) NOT NULL AUTO_INCREMENT,`book_code` varchar(100) NOT NULL,`book_name` varchar(200) NOT NULL,`file_path` varchar(500) NOT NULL,`description` text,`status` smallint(6) NOT NULL,`base_practice_num` int(11) DEFAULT NULL,`translate_practice_num` int(11) DEFAULT NULL,`exam_num` int(11) DEFAULT NULL,PRIMARY KEY (`id`),UNIQUE KEY `UK_l6rrt0kvgi4jer84tox9yp17n` (`book_code`)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8;/*Data for the table `english_book` */insert  into `english_book`(`id`,`book_code`,`book_name`,`file_path`,`description`,`status`,`base_practice_num`,`translate_practice_num`,`exam_num`) values (24,'senior_vocabulary_1','高中词汇书','data/book/高中词汇书#senior_vocabulary_1.xlsx','测试版;词汇量:10',1,2,20,5),(25,'junior_vocabulary_01','初中英语词汇书1','data/book/初中英语词汇书1#junior_vocabulary_01.xlsx','测试专用',1,4,4,4),(27,'6109f95e6b984b9e9fa9c4ffc7fbc951','英语词汇书-高阶01','data/book/英语词汇书-高阶01#6109f95e6b984b9e9fa9c4ffc7fbc951.xlsx','测试用',1,5,5,5),(29,'c75e1144bc2646e0ad503f842f410df3','小学单词书(一阶段)','data/book/小学单词书(一阶段)#c75e1144bc2646e0ad503f842f410df3.xlsx','导入词汇兼容测试:单词自动识别',1,NULL,NULL,NULL);/*Table structure for table `english_word` */DROP TABLE IF EXISTS `english_word`;CREATE TABLE `english_word` (`id` int(11) NOT NULL AUTO_INCREMENT,`book_code` varchar(100) NOT NULL,`word_type` smallint(6) DEFAULT NULL,`word` varchar(100) NOT NULL,`chinese` varchar(200) NOT NULL,`pronounce_file` varchar(500) DEFAULT NULL,`description` text,`status` smallint(6) NOT NULL,PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8;/*Data for the table `english_word` */insert  into `english_word`(`id`,`book_code`,`word_type`,`word`,`chinese`,`pronounce_file`,`description`,`status`) values (44,'senior_vocabulary_1',1,'abandon','1.vt放弃, 遗弃;2.vt放任, 狂热','data/pronounce/senior_vocabulary_1/abandon--_gb_1.mp3','a+band+on一个乐队在演出,乐队演出很放纵',1),(45,'senior_vocabulary_1',1,'abnormal','1.adj反常的, 变态的','data/pronounce/senior_vocabulary_1/abnormal--_gb_1.mp3','ab=相反,变坏 normal正常',1),(46,'senior_vocabulary_1',1,'abrupt','1.adj.突然的, 意想不到的;2.陡的, 险峻的','data/pronounce/senior_vocabulary_1/abrupt--_gb_1.mp3','rupt=break',1),(47,'senior_vocabulary_1',1,'absence','1.n.缺席;2.n.不注意; 心不在焉','data/pronounce/senior_vocabulary_1/absence--_gb_1.mp3','sence 存在,相关,ab相反 缺席的',1),(48,'senior_vocabulary_1',1,'absolute','1.adj.绝对的;完全的;2.adj 确定的','data/pronounce/senior_vocabulary_1/absolute--_gb_1.mp3','solut 松,解开 ',1),(49,'senior_vocabulary_1',1,'absorb','1. vt. 吸收(液体);2. vt. 支付;负担','data/pronounce/senior_vocabulary_1/absorb--_gb_1.mp3','sorb吸收, absorb吸收掉',1),(50,'senior_vocabulary_1',1,'abstract','1.n. 摘要, 概要, 抽象','data/pronounce/senior_vocabulary_1/abstract--_gb_1.mp3','abs(离去)+tract(拉)→把大意从文中拉出来→摘要 ',1),(51,'senior_vocabulary_1',1,'abundance','1. n. 丰富, 充裕, 丰富充裕','data/pronounce/senior_vocabulary_1/abundance--_gb_1.mp3','abundance=a + bun(小面包)+ dance,形象化记忆,很多的蚂蚁围着一块小面包在跳舞,因为丰收了',1),(52,'senior_vocabulary_1',1,'yield','1.v.出产,生长,生产;2.vi.(~to)屈服,屈从','data/pronounce/senior_vocabulary_1/yield--_gb_1.mp3','yi(已)+eld(老)----已经老了, 对有些事情就得屈服了',1),(53,'junior_vocabulary_01',1,'hello','你好;喂','data/pronounce/junior_vocabulary_01/hello--_gb_1.mp3','1.(用以打招呼或唤起注意)喂,你好。如:Hello, Jim! How are you?嗨!吉姆!你好吗?\r\n2.(用作打电话时的招呼语)喂\r\n3.(表示惊讶等)嘿;啊\r\n4.在跟打招呼用hello是不礼貌的,应该用Hi才是有礼貌的。',1),(54,'junior_vocabulary_01',1,'legendary','传奇','data/pronounce/junior_vocabulary_01/legendary--_gb_1.mp3','xxx',1),(55,'junior_vocabulary_01',2,'pay attention to','集中注意力于。。。',NULL,'xxx',1),(56,'junior_vocabulary_01',1,'unbelievable','难以置信','data/pronounce/junior_vocabulary_01/unbelievable--_gb_1.mp3','形容对某些事情感到非常惊讶',1),(57,'6109f95e6b984b9e9fa9c4ffc7fbc951',1,'engineer','工程师;设计师;机修工;技师;','data/pronounce/6109f95e6b984b9e9fa9c4ffc7fbc951/engineer--_gb_1.mp3','n.工程师;设计师;机修工;技师;技工;(船上的)轮机手;(飞机上的)机械师;工兵\nvt.密谋策划;设计制造;改变…的基因(或遗传)结构',1),(58,'6109f95e6b984b9e9fa9c4ffc7fbc951',1,'material','布料;原料;物质的;客观存在的;','data/pronounce/6109f95e6b984b9e9fa9c4ffc7fbc951/material--_gb_1.mp3','n.布料;原料;(某一活动所需的)材料;素材;节目\nadj.实际的(非精神需求的);物质的;客观存在的;重要的;必要的',1),(60,'6109f95e6b984b9e9fa9c4ffc7fbc951',1,'comprehensive','综合的; 全部的; 所有的; ','data/pronounce/6109f95e6b984b9e9fa9c4ffc7fbc951/comprehensive--_gb_1.mp3','\nadj. 综合的; 全部的; 所有的; (几乎)无所不包的; 详尽的; 综合性的(接收各种资质的学生);\nn. (英国为各种资质的学生设立的)综合中学;\n',1),(62,'6109f95e6b984b9e9fa9c4ffc7fbc951',1,'foundation','地基;房基;基础;基本原理;','data/pronounce/6109f95e6b984b9e9fa9c4ffc7fbc951/foundation--_gb_1.mp3','地基;房基;基础;基本原理;根据;基金会;(机构或组织的)创建,创办;(化妆打底用的)粉底霜',1),(63,'6109f95e6b984b9e9fa9c4ffc7fbc951',1,'tortoise','乌龟; 龟; 陆龟;','data/pronounce/6109f95e6b984b9e9fa9c4ffc7fbc951/tortoise--_gb_1.mp3','乌龟; 龟; 陆龟;',1),(67,'c75e1144bc2646e0ad503f842f410df3',1,'although [ɔːlˈðəʊ]','虽然;尽管','data/pronounce/c75e1144bc2646e0ad503f842f410df3/although--_gb_1.mp3','conj.',1),(68,'c75e1144bc2646e0ad503f842f410df3',1,'always [ˈɔːlweɪz]','总是;一直;永远','data/pronounce/c75e1144bc2646e0ad503f842f410df3/always--_gb_1.mp3','ad.',1),(69,'c75e1144bc2646e0ad503f842f410df3',1,'American [əˈmerɪkə]','美国;美洲','data/pronounce/c75e1144bc2646e0ad503f842f410df3/american--_gb_1.mp3','n.',1),(70,'c75e1144bc2646e0ad503f842f410df3',1,'answer  [ˈɑːnsə(r); (US) ˈænsər]','回答,答复;答案 回答,答复;回信(作出)答案','data/pronounce/c75e1144bc2646e0ad503f842f410df3/answer--_gb_1.mp3','I couldn’t answer all the exam questions.\n我没能作答全部的试卷问题。',1);/*Table structure for table `exam_score` */DROP TABLE IF EXISTS `exam_score`;CREATE TABLE `exam_score` (`id` int(11) NOT NULL AUTO_INCREMENT,`user_id` int(11) NOT NULL,`book_code` varchar(100) NOT NULL,`score` int(11) NOT NULL,`point` int(11) NOT NULL,`exam_time` datetime(6) NOT NULL,`total_questions` int(11) DEFAULT NULL,`answer_true` int(11) DEFAULT NULL,PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;/*Data for the table `exam_score` */insert  into `exam_score`(`id`,`user_id`,`book_code`,`score`,`point`,`exam_time`,`total_questions`,`answer_true`) values (2,8,'senior_vocabulary_1',80,0,'2021-06-01 22:33:32.469000',10,8),(3,8,'senior_vocabulary_1',100,10,'2021-06-01 22:39:05.041000',10,10),(6,1,'senior_vocabulary_1',78,0,'2021-06-06 15:12:09.303000',9,7),(7,1,'senior_vocabulary_1',89,0,'2021-06-06 15:37:52.799000',9,8),(8,1,'senior_vocabulary_1',100,10,'2021-06-06 15:42:34.753000',9,9),(9,1,'senior_vocabulary_1',89,0,'2021-06-06 16:04:04.247000',9,8),(10,1,'senior_vocabulary_1',100,10,'2021-06-06 16:11:22.697000',9,9),(11,1,'senior_vocabulary_1',11,0,'2021-06-06 16:14:44.424000',9,1),(12,1,'senior_vocabulary_1',100,10,'2021-06-06 17:23:11.299000',5,5),(13,1,'senior_vocabulary_1',60,0,'2023-01-20 00:47:10.619000',5,3);/*Table structure for table `sys_department` */DROP TABLE IF EXISTS `sys_department`;CREATE TABLE `sys_department` (`node` int(11) NOT NULL AUTO_INCREMENT,`parent_node` int(11) NOT NULL,`is_node` tinyint(1) NOT NULL,`is_directory` tinyint(1) NOT NULL,`dept_name` varchar(50) NOT NULL,`rank` int(11) NOT NULL,PRIMARY KEY (`node`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;/*Data for the table `sys_department` */insert  into `sys_department`(`node`,`parent_node`,`is_node`,`is_directory`,`dept_name`,`rank`) values (1,0,1,1,'系统级',0);/*Table structure for table `sys_menu` */DROP TABLE IF EXISTS `sys_menu`;CREATE TABLE `sys_menu` (`node` int(11) NOT NULL AUTO_INCREMENT,`parent_node` int(11) NOT NULL,`is_node` tinyint(1) NOT NULL,`is_directory` tinyint(1) NOT NULL,`title` varchar(50) NOT NULL,`type` smallint(6) NOT NULL,`open_type` varchar(50) DEFAULT NULL,`icon` varchar(300) DEFAULT NULL,`href` varchar(300) DEFAULT NULL,`rank` int(11) NOT NULL,PRIMARY KEY (`node`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;/*Data for the table `sys_menu` */insert  into `sys_menu`(`node`,`parent_node`,`is_node`,`is_directory`,`title`,`type`,`open_type`,`icon`,`href`,`rank`) values (2,0,1,0,'系统管理',0,'_iframe','layui-icon layui-icon-set-fill','sys/manage/user',50),(3,2,1,0,'菜单管理',1,'_iframe','layui-icon layui-icon layui-icon-diamond','system/menu/main',5),(8,0,1,0,'英语词汇管理',1,'_iframe','layui-icon layui-icon layui-icon layui-icon layui-icon layui-icon layui-icon layui-icon-fire','english/word/main',18),(10,0,1,0,'英语书籍管理',1,'_iframe','layui-icon layui-icon layui-icon layui-icon layui-icon-component','english/book/main',17),(11,0,1,0,'成绩单管理',1,'_iframe','layui-icon layui-icon layui-icon layui-icon-upload','english/score/main',39),(12,2,1,0,'用户管理',1,'_iframe','layui-icon layui-icon layui-icon layui-icon layui-icon layui-icon-user','system/user/main',0),(13,2,1,0,'角色管理',1,'_iframe','layui-icon layui-icon-dialogue','system/role/main',2),(14,2,1,0,'部门管理',1,'_iframe','layui-icon layui-icon-group','system/dept/main',3),(15,0,1,0,'个人中心',0,NULL,'layui-icon layui-icon layui-icon layui-icon layui-icon-username',NULL,10),(17,15,1,0,'基本资料',1,'_iframe','layui-icon layui-icon-rate-solid','/system/user/own_center',1),(18,0,1,0,'首页',1,'_iframe','layui-icon layui-icon layui-icon layui-icon layui-icon-theme','/english/dashboard',1),(19,0,1,0,'英语学习',1,'_iframe','layui-icon layui-icon layui-icon layui-icon-read','/english/study/main',12);/*Table structure for table `sys_resource` */DROP TABLE IF EXISTS `sys_resource`;CREATE TABLE `sys_resource` (`id` int(11) NOT NULL,`resource_name` varchar(100) NOT NULL,`uri` varchar(300) NOT NULL,`type` varchar(20) NOT NULL,`operation` varchar(20) NOT NULL,`description` text,`button` varchar(500) DEFAULT NULL,PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;/*Data for the table `sys_resource` *//*Table structure for table `sys_role` */DROP TABLE IF EXISTS `sys_role`;CREATE TABLE `sys_role` (`role_id` int(11) NOT NULL AUTO_INCREMENT,`role` varchar(30) NOT NULL,`description` text,`status` smallint(6) NOT NULL,PRIMARY KEY (`role_id`),UNIQUE KEY `UK_mwbqlu5c82jfd2w9oa9d6e87d` (`role`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;/*Data for the table `sys_role` */insert  into `sys_role`(`role_id`,`role`,`description`,`status`) values (1,'超级管理员','拥有系统内所有权限!',1),(2,'学生','可查看数据面板、编辑个人信息、英语练习、英语综合测试。',1);/*Table structure for table `sys_role_menu` */DROP TABLE IF EXISTS `sys_role_menu`;CREATE TABLE `sys_role_menu` (`id` varchar(100) NOT NULL,`role_id` int(11) NOT NULL,`menu_id` int(11) NOT NULL,PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;/*Data for the table `sys_role_menu` */insert  into `sys_role_menu`(`id`,`role_id`,`menu_id`) values ('3172dd0073b54e55911107642ed17132',2,18),('488b976768ca44379e278fe2e8d9368f',2,15),('8c645a7489524ad9ae7a555261e78a6f',2,17),('a1b6ec1b136442d59ca2404a8f88e20d',2,19),('dab2fa2cc4b24e139545270708acde94',2,11);/*Table structure for table `sys_role_resource` */DROP TABLE IF EXISTS `sys_role_resource`;CREATE TABLE `sys_role_resource` (`id` varchar(100) NOT NULL,`role_id` int(11) NOT NULL,`resource_id` int(11) NOT NULL,PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;/*Data for the table `sys_role_resource` *//*Table structure for table `sys_user` */DROP TABLE IF EXISTS `sys_user`;CREATE TABLE `sys_user` (`user_id` int(11) NOT NULL AUTO_INCREMENT,`username` varchar(30) NOT NULL,`password` varchar(200) NOT NULL,`real_name` varchar(30) DEFAULT NULL,`avatar` varchar(300) NOT NULL,`sex` varchar(10) DEFAULT NULL,`dept` varchar(30) DEFAULT NULL,`duty` text,`phone` varchar(30) DEFAULT NULL,`email` varchar(50) DEFAULT NULL,`id_number` varchar(30) DEFAULT NULL,`create_time` datetime(6) NOT NULL,`last_modify_time` datetime(6) NOT NULL,`last_login_time` datetime(6) DEFAULT NULL,`status` smallint(6) NOT NULL,PRIMARY KEY (`user_id`),UNIQUE KEY `UK_51bvuyvihefoh4kp5syh2jpi4` (`username`),UNIQUE KEY `UK_emllwygadip430te0o46qf194` (`id_number`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;/*Data for the table `sys_user` */insert  into `sys_user`(`user_id`,`username`,`password`,`real_name`,`avatar`,`sex`,`dept`,`duty`,`phone`,`email`,`id_number`,`create_time`,`last_modify_time`,`last_login_time`,`status`) values (1,'SuperAdmin','$2a$10$xTFDod042ymCBOiTfTHPs.8Xs8qaox1Le2su4ihJ3bIFH5FHZBbMK','超级管理员','/admin/images/act.jpg','1','系统级','超级管理员;系统根用户','13871231212','11912321@qq.com',NULL,'2021-04-26 03:49:45.319000','2021-04-29 23:31:25.182000',NULL,1),(8,'stu123','$2a$10$mFbbLUvibyFU2QCUQE25S.UARZkz3N3plqqiLhUCycqLQPh.VI3du','学生测试账号1','/admin/images/account/portrait/default/avatar.jpg','0','系统级',NULL,'1381231231','1982139123@qq.com',NULL,'2021-05-30 10:27:36.803000','2023-01-20 00:56:10.636000',NULL,1);/*Table structure for table `sys_user_dept` */DROP TABLE IF EXISTS `sys_user_dept`;CREATE TABLE `sys_user_dept` (`id` varchar(100) NOT NULL,`user_id` int(11) NOT NULL,`dept_id` int(11) NOT NULL,PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;/*Data for the table `sys_user_dept` */insert  into `sys_user_dept`(`id`,`user_id`,`dept_id`) values ('39ea7d6f135bdcdb3fbb71defb6b4683',1,1),('a5390b528a18892686b89bb593b1d050',8,1);/*Table structure for table `sys_user_role` */DROP TABLE IF EXISTS `sys_user_role`;CREATE TABLE `sys_user_role` (`id` varchar(100) NOT NULL,`user_id` int(11) NOT NULL,`role_id` int(11) NOT NULL,PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;/*Data for the table `sys_user_role` */insert  into `sys_user_role`(`id`,`user_id`,`role_id`) values ('37f9b5a72b5f42afbb5aa37ef4a86239',1,1),('d7d3b52f5d5e4281afa2c119aa7d0b83',8,2);/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

源码获取

如需交流/获取资料,请先【关注+私信】我,私信获取源码~

http://www.lryc.cn/news/601706.html

相关文章:

  • MyBatis Plus 分页
  • WiFi Mouse PC端 v1.7.2 官方中文版
  • 《杜甫传》读书笔记与经典摘要(三)流亡与走向人民
  • SPSC无锁环形队列技术(C++)
  • 系统整理Python的循环语句和常用方法
  • CPA青少年编程能力等级测评试卷及答案 Python编程(三级)
  • 详解力扣高频SQL50题之610. 判断三角形【简单】
  • 内存泄漏问题排查
  • idea打开后project窗口未显示项目名称的解决方案
  • 24点数学游戏(穷举法求解表达式)
  • 【计算机网络架构】网状型架构简介
  • Java学习-------序列化与反序列化
  • Windows10+WSL2+Docker相关整理
  • 2025年Agent创业实战指南:从0到1打造高增长AI智能体项目
  • ABP VNext + Elastic APM:微服务性能监控
  • Kotlin递归
  • C++算法竞赛篇(五)循环嵌套题型讲解
  • 港股历史逐笔成交与分时十档买卖盘口数据深度解析
  • 标签驱动的可信金融大模型训练全流程-Agentar-Fin-R1工程思路浅尝
  • unity开发中Hash、Queue、LinkedList简单介绍
  • PandasAI连接LLM进行智能数据分析
  • LLM 多语言数据集
  • 《Java 程序设计》第 7 章 - 继承与多态
  • 9. 桥接模式
  • 递归查询美国加速-技术演进与行业应用深度解析
  • Cursor下利用Stagewise实现 “所见即改” 的前端开发体验~
  • MyBatis-Plus IService 接口全量方法实现与测试(续)
  • 【程序员私房菜】python尖椒炒口蘑
  • 神经网络模型训练需要的内存大小计算方法
  • 任务提醒工具怎么选?对比16款热门软件