From 1d9b584e2f2609d019613a18a949b64395f153a9 Mon Sep 17 00:00:00 2001 From: 15892072232 <3094677748@qq.com> Date: Thu, 23 Oct 2025 11:46:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E4=BA=86=E9=A6=96=E9=A1=B5,=E5=8A=A0?= =?UTF-8?q?=E4=BA=86=E5=AD=A6=E7=94=9F=E8=A1=A8=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/system/domain/StudentInfo.java | 131 ++++++++ .../system/mapper/StudentInfoMapper.java | 61 ++++ .../system/service/IStudentInfoService.java | 69 ++++ .../service/impl/StudentInfoServiceImpl.java | 109 +++++++ .../mapper/system/StudentInfoMapper.xml | 98 ++++++ ruoyi-ui/.env.development | 2 +- ruoyi-ui/.env.production | 2 +- ruoyi-ui/.env.staging | 2 +- ruoyi-ui/package.json | 2 +- ruoyi-ui/src/api/student/info.js | 44 +++ ruoyi-ui/src/layout/components/Navbar.vue | 12 +- ruoyi-ui/src/router/index.js | 2 +- ruoyi-ui/src/settings.js | 4 +- ruoyi-ui/src/views/index.vue | 6 +- ruoyi-ui/src/views/login.vue | 2 +- ruoyi-ui/src/views/register.vue | 2 +- ruoyi-ui/src/views/system/info/index.vue | 306 ++++++++++++++++++ ruoyi-ui/vue.config.js | 2 +- sql/infoMenu.sql | 22 ++ 19 files changed, 859 insertions(+), 19 deletions(-) create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/StudentInfo.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/mapper/StudentInfoMapper.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/IStudentInfoService.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StudentInfoServiceImpl.java create mode 100644 ruoyi-system/src/main/resources/mapper/system/StudentInfoMapper.xml create mode 100644 ruoyi-ui/src/api/student/info.js create mode 100644 ruoyi-ui/src/views/system/info/index.vue create mode 100644 sql/infoMenu.sql diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/StudentInfo.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/StudentInfo.java new file mode 100644 index 000000000..741dbc031 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/StudentInfo.java @@ -0,0 +1,131 @@ +package com.ruoyi.system.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 学生信息对象 student_info + * + * @author ruoyi + * @date 2025-10-23 + */ +public class StudentInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 学生ID */ + private Long studentId; + + /** 学生姓名 */ + @Excel(name = "学生姓名") + private String studentName; + + /** 头像地址 */ + @Excel(name = "头像地址") + private String avatar; + + /** 个人介绍 */ + @Excel(name = "个人介绍") + private String introduction; + + /** 学生性别(0男 1女) */ + @Excel(name = "学生性别", readConverterExp = "0=男,1=女") + private String gender; + + /** 学生状态(0正常 1停用) */ + @Excel(name = "学生状态", readConverterExp = "0=正常,1=停用") + private String status; + + /** 删除标志(0代表存在 2代表删除) */ + private String delFlag; + + public void setStudentId(Long studentId) + { + this.studentId = studentId; + } + + public Long getStudentId() + { + return studentId; + } + + public void setStudentName(String studentName) + { + this.studentName = studentName; + } + + public String getStudentName() + { + return studentName; + } + + public void setAvatar(String avatar) + { + this.avatar = avatar; + } + + public String getAvatar() + { + return avatar; + } + + public void setIntroduction(String introduction) + { + this.introduction = introduction; + } + + public String getIntroduction() + { + return introduction; + } + + public void setGender(String gender) + { + this.gender = gender; + } + + public String getGender() + { + return gender; + } + + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + + public void setDelFlag(String delFlag) + { + this.delFlag = delFlag; + } + + public String getDelFlag() + { + return delFlag; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("studentId", getStudentId()) + .append("studentName", getStudentName()) + .append("avatar", getAvatar()) + .append("introduction", getIntroduction()) + .append("gender", getGender()) + .append("status", getStatus()) + .append("delFlag", getDelFlag()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/StudentInfoMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/StudentInfoMapper.java new file mode 100644 index 000000000..d209cf5c3 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/StudentInfoMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.StudentInfo; + +/** + * 学生信息Mapper接口 + * + * @author ruoyi + * @date 2025-10-23 + */ +public interface StudentInfoMapper +{ + /** + * 查询学生信息 + * + * @param studentId 学生信息主键 + * @return 学生信息 + */ + public StudentInfo selectStudentInfoByStudentId(Long studentId); + + /** + * 查询学生信息列表 + * + * @param studentInfo 学生信息 + * @return 学生信息集合 + */ + public List selectStudentInfoList(StudentInfo studentInfo); + + /** + * 新增学生信息 + * + * @param studentInfo 学生信息 + * @return 结果 + */ + public int insertStudentInfo(StudentInfo studentInfo); + + /** + * 修改学生信息 + * + * @param studentInfo 学生信息 + * @return 结果 + */ + public int updateStudentInfo(StudentInfo studentInfo); + + /** + * 删除学生信息 + * + * @param studentId 学生信息主键 + * @return 结果 + */ + public int deleteStudentInfoByStudentId(Long studentId); + + /** + * 批量删除学生信息 + * + * @param studentIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteStudentInfoByStudentIds(Long[] studentIds); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IStudentInfoService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IStudentInfoService.java new file mode 100644 index 000000000..1603106e2 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IStudentInfoService.java @@ -0,0 +1,69 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.StudentInfo; + +/** + * 学生信息Service接口 + * + * @author ruoyi + * @date 2025-10-23 + */ +public interface IStudentInfoService +{ + /** + * 查询学生信息 + * + * @param studentId 学生信息主键 + * @return 学生信息 + */ + public StudentInfo selectStudentInfoByStudentId(Long studentId); + + /** + * 查询学生信息列表 + * + * @param studentInfo 学生信息 + * @return 学生信息集合 + */ + public List selectStudentInfoList(StudentInfo studentInfo); + + /** + * 新增学生信息 + * + * @param studentInfo 学生信息 + * @return 结果 + */ + public int insertStudentInfo(StudentInfo studentInfo); + + /** + * 修改学生信息 + * + * @param studentInfo 学生信息 + * @return 结果 + */ + public int updateStudentInfo(StudentInfo studentInfo); + + /** + * 批量删除学生信息 + * + * @param studentIds 需要删除的学生信息主键集合 + * @return 结果 + */ + public int deleteStudentInfoByStudentIds(Long[] studentIds); + + /** + * 删除学生信息信息 + * + * @param studentId 学生信息主键 + * @return 结果 + */ + public int deleteStudentInfoByStudentId(Long studentId); + + /** + * 修改学生状态 + * + * @param studentInfo 学生信息 + * @return 结果 + */ + public int changeStudentStatus(StudentInfo studentInfo); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StudentInfoServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StudentInfoServiceImpl.java new file mode 100644 index 000000000..194ed6978 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StudentInfoServiceImpl.java @@ -0,0 +1,109 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.StudentInfoMapper; +import com.ruoyi.system.domain.StudentInfo; +import com.ruoyi.system.service.IStudentInfoService; + +/** + * 学生信息Service业务层处理 + * + * @author ruoyi + * @date 2025-10-23 + */ +@Service +public class StudentInfoServiceImpl implements IStudentInfoService +{ + @Autowired + private StudentInfoMapper studentInfoMapper; + + /** + * 查询学生信息 + * + * @param studentId 学生信息主键 + * @return 学生信息 + */ + @Override + public StudentInfo selectStudentInfoByStudentId(Long studentId) + { + return studentInfoMapper.selectStudentInfoByStudentId(studentId); + } + + /** + * 查询学生信息列表 + * + * @param studentInfo 学生信息 + * @return 学生信息 + */ + @Override + public List selectStudentInfoList(StudentInfo studentInfo) + { + return studentInfoMapper.selectStudentInfoList(studentInfo); + } + + /** + * 新增学生信息 + * + * @param studentInfo 学生信息 + * @return 结果 + */ + @Override + public int insertStudentInfo(StudentInfo studentInfo) + { + studentInfo.setCreateTime(DateUtils.getNowDate()); + return studentInfoMapper.insertStudentInfo(studentInfo); + } + + /** + * 修改学生信息 + * + * @param studentInfo 学生信息 + * @return 结果 + */ + @Override + public int updateStudentInfo(StudentInfo studentInfo) + { + studentInfo.setUpdateTime(DateUtils.getNowDate()); + return studentInfoMapper.updateStudentInfo(studentInfo); + } + + /** + * 批量删除学生信息 + * + * @param studentIds 需要删除的学生信息主键 + * @return 结果 + */ + @Override + public int deleteStudentInfoByStudentIds(Long[] studentIds) + { + return studentInfoMapper.deleteStudentInfoByStudentIds(studentIds); + } + + /** + * 删除学生信息信息 + * + * @param studentId 学生信息主键 + * @return 结果 + */ + @Override + public int deleteStudentInfoByStudentId(Long studentId) + { + return studentInfoMapper.deleteStudentInfoByStudentId(studentId); + } + + /** + * 修改学生状态 + * + * @param studentInfo 学生信息 + * @return 结果 + */ + @Override + public int changeStudentStatus(StudentInfo studentInfo) + { + studentInfo.setUpdateTime(DateUtils.getNowDate()); + return studentInfoMapper.updateStudentInfo(studentInfo); + } +} \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/StudentInfoMapper.xml b/ruoyi-system/src/main/resources/mapper/system/StudentInfoMapper.xml new file mode 100644 index 000000000..0a2307332 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/StudentInfoMapper.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + select student_id, student_name, avatar, introduction, gender, status, del_flag, create_by, create_time, update_by, update_time, remark from student_info + + + + + + + + insert into student_info + + student_name, + avatar, + introduction, + gender, + status, + del_flag, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{studentName}, + #{avatar}, + #{introduction}, + #{gender}, + #{status}, + #{delFlag}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update student_info + + student_name = #{studentName}, + avatar = #{avatar}, + introduction = #{introduction}, + gender = #{gender}, + status = #{status}, + del_flag = #{delFlag}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where student_id = #{studentId} + + + + delete from student_info where student_id = #{studentId} + + + + delete from student_info where student_id in + + #{studentId} + + + \ No newline at end of file diff --git a/ruoyi-ui/.env.development b/ruoyi-ui/.env.development index 7b61980ff..7ec2a7cc4 100644 --- a/ruoyi-ui/.env.development +++ b/ruoyi-ui/.env.development @@ -1,4 +1,4 @@ -# 页面标题 +# 系统标题 VUE_APP_TITLE = 数据资源管理系统 # 开发环境配置 diff --git a/ruoyi-ui/.env.production b/ruoyi-ui/.env.production index 51b19d26f..758b33114 100644 --- a/ruoyi-ui/.env.production +++ b/ruoyi-ui/.env.production @@ -1,4 +1,4 @@ -# 页面标题 +# 系统标题 VUE_APP_TITLE = 数据资源管理系统 # 生产环境配置 diff --git a/ruoyi-ui/.env.staging b/ruoyi-ui/.env.staging index c2dfd25b9..9dadd7eaf 100644 --- a/ruoyi-ui/.env.staging +++ b/ruoyi-ui/.env.staging @@ -1,4 +1,4 @@ -# 页面标题 +# 系统标题 VUE_APP_TITLE = 数据资源管理系统 BABEL_ENV = production diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index 5df0cedfc..ee54a9f4b 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -1,7 +1,7 @@ { "name": "ruoyi", "version": "3.9.0", - "description": "若依管理系统", + "description": "数据资源管理系统", "author": "若依", "license": "MIT", "scripts": { diff --git a/ruoyi-ui/src/api/student/info.js b/ruoyi-ui/src/api/student/info.js new file mode 100644 index 000000000..b34609b4f --- /dev/null +++ b/ruoyi-ui/src/api/student/info.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询学生信息列表 +export function listInfo(query) { + return request({ + url: '/system/info/list', + method: 'get', + params: query + }) +} + +// 查询学生信息详细 +export function getInfo(studentId) { + return request({ + url: '/system/info/' + studentId, + method: 'get' + }) +} + +// 新增学生信息 +export function addInfo(data) { + return request({ + url: '/system/info', + method: 'post', + data: data + }) +} + +// 修改学生信息 +export function updateInfo(data) { + return request({ + url: '/system/info', + method: 'put', + data: data + }) +} + +// 删除学生信息 +export function delInfo(studentId) { + return request({ + url: '/system/info/' + studentId, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/layout/components/Navbar.vue b/ruoyi-ui/src/layout/components/Navbar.vue index 1d10b91a0..2e47a2673 100644 --- a/ruoyi-ui/src/layout/components/Navbar.vue +++ b/ruoyi-ui/src/layout/components/Navbar.vue @@ -10,11 +10,11 @@ - + - + @@ -54,8 +54,8 @@ import Hamburger from '@/components/Hamburger' import Screenfull from '@/components/Screenfull' import SizeSelect from '@/components/SizeSelect' import Search from '@/components/HeaderSearch' -import RuoYiGit from '@/components/RuoYi/Git' -import RuoYiDoc from '@/components/RuoYi/Doc' +import DataResourceGit from '@/components/RuoYi/Git' +import DataResourceDoc from '@/components/RuoYi/Doc' export default { emits: ['setLayout'], @@ -66,8 +66,8 @@ export default { Screenfull, SizeSelect, Search, - RuoYiGit, - RuoYiDoc + DataResourceGit, + DataResourceDoc }, computed: { ...mapGetters([ diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index b04cfcb88..d218c6e45 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -70,7 +70,7 @@ export const constantRoutes = [ path: 'index', component: () => import('@/views/dashboard/index'), name: 'Index', - meta: { title: '首页', icon: 'dashboard', affix: true } + meta: { title: '论文首页(郑)', icon: 'dashboard', affix: true } } ] }, diff --git a/ruoyi-ui/src/settings.js b/ruoyi-ui/src/settings.js index d2dc8ce36..e885b9f43 100644 --- a/ruoyi-ui/src/settings.js +++ b/ruoyi-ui/src/settings.js @@ -2,7 +2,7 @@ module.exports = { /** * 网页标题 */ - title: process.env.VUE_APP_TITLE, + title: '数据资源管理系统', /** * 侧边栏主题 深色主题theme-dark,浅色主题theme-light @@ -52,5 +52,5 @@ module.exports = { /** * 底部版权文本内容 */ - footerContent: 'Copyright © 2018-2025 RuoYi. All Rights Reserved.' + footerContent: 'Copyright © 2018-2025 数据资源管理系统 All Rights Reserved.' } diff --git a/ruoyi-ui/src/views/index.vue b/ruoyi-ui/src/views/index.vue index 5e083524e..db87afd35 100644 --- a/ruoyi-ui/src/views/index.vue +++ b/ruoyi-ui/src/views/index.vue @@ -2,10 +2,10 @@
-

若依后台管理框架

+

数据资源管理系统

- 一直想做一款后台管理系统,看了很多优秀的开源项目但是发现没有合适自己的。于是利用空闲休息时间开始自己写一套后台系统。如此有了若依管理系统,她可以用于所有的Web应用程序,如网站管理后台,网站会员中心,CMS,CRM,OA等等,当然,您也可以对她进行深度定制,以做出更强系统。所有前端后台代码封装过后十分精简易上手,出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。 -

+ 一直想做一款后台管理系统,看了很多优秀的开源项目但是发现没有合适自己的。于是利用空闲休息时间开始自己写一套后台系统。如此有了数据资源管理系统,她可以用于所有的Web应用程序,如网站管理后台,网站会员中心,CMS,CRM,OA等等,当然,您也可以对她进行深度定制,以做出更强系统。所有前端后台代码封装过后十分精简易上手,出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。 +

当前版本: v{{ version }}

diff --git a/ruoyi-ui/src/views/login.vue b/ruoyi-ui/src/views/login.vue index f979f68b5..7d9016e02 100644 --- a/ruoyi-ui/src/views/login.vue +++ b/ruoyi-ui/src/views/login.vue @@ -56,7 +56,7 @@
diff --git a/ruoyi-ui/src/views/register.vue b/ruoyi-ui/src/views/register.vue index f1e4ea05b..0f20dca14 100644 --- a/ruoyi-ui/src/views/register.vue +++ b/ruoyi-ui/src/views/register.vue @@ -61,7 +61,7 @@ diff --git a/ruoyi-ui/src/views/system/info/index.vue b/ruoyi-ui/src/views/system/info/index.vue new file mode 100644 index 000000000..e9e230721 --- /dev/null +++ b/ruoyi-ui/src/views/system/info/index.vue @@ -0,0 +1,306 @@ + + + diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index a6bfb3b87..70e907c74 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -7,7 +7,7 @@ function resolve(dir) { const CompressionPlugin = require('compression-webpack-plugin') -const name = process.env.VUE_APP_TITLE || '若依管理系统' // 网页标题 +const name = process.env.VUE_APP_TITLE || '数据资源管理系统' // 网页标题 const baseUrl = 'http://localhost:8080' // 后端接口 diff --git a/sql/infoMenu.sql b/sql/infoMenu.sql new file mode 100644 index 000000000..ec6a884bc --- /dev/null +++ b/sql/infoMenu.sql @@ -0,0 +1,22 @@ +-- 菜单 SQL +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('学生信息', '3', '1', 'info', 'system/info/index', 1, 0, 'C', '0', '0', 'system:info:list', '#', 'admin', sysdate(), '', null, '学生信息菜单'); + +-- 按钮父菜单ID +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('学生信息查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'system:info:query', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('学生信息新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', 'system:info:add', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('学生信息修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', 'system:info:edit', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('学生信息删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'system:info:remove', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('学生信息导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'system:info:export', '#', 'admin', sysdate(), '', null, ''); \ No newline at end of file