大家可以通过常用的搜索引擎,以百度为例,搜索 源码乐园 code51 ,然后再次搜索 自己想要的即可。更多的管理系统等,欢迎大家百度搜索源码乐园。
部分截图信息
评价管理界面
技术描述
开发工具: Idea/Eclipse
数据库: mysql
部分截图信息
评价管理界面
技术描述开发工具: Idea/Eclipse
数据库: mysql
Jar包仓库: Maven
前段框架:jquery/Jsp
后端框架: Spring+SpringMVC+Mybatis
资料说明
基于SSM+SpringBoot+MySQL+LayUI的高校学生评教系统,整体包含三个用例角色。教师,学生,管理员。整体功能包括个人信息管理,管理员管理,教师管理,课程管理,指标管理,学生管理,评价管理等。
代码
package com.evaluation.controller;
import com.evaluation.entity.AdminEntity;
import com.evaluation.entity.AdminEntityExample;
import com.evaluation.mapper.AdminEntityMapper;
import com.evaluation.utils.Layui;
import com.evaluation.utils.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/admin")
public class AdminController {
@Autowired
private AdminEntityMapper adminEntityMapper;
@ResponseBody
@PostMapping("/add")
public Message add(@RequestBody AdminEntity admin) {
if(StringUtils.isEmpty(admin.getUsername())){
return Message.error("请填写用户名");
}
if(StringUtils.isEmpty(admin.getUserpw())){
return Message.error("请填写密码");
}
AdminEntityExample example = new AdminEntityExample();
example.or().andUsernameEqualTo(admin.getUsername());
AdminEntity adminEntity = adminEntityMapper.selectoneByExample(example);
if(adminEntity!=null){
return Message.error("该用户名已存在");
}
if(adminEntityMapper.insert(admin)<=0){
return Message.error("添加失败!");
}
return Message.success();
}
@ResponseBody
@PostMapping(value = "/delete", consumes = "application/json")
public Message delete(@RequestBody AdminEntity entity) {
if(adminEntityMapper.deleteByPrimaryKey(entity.getUserid())<=0){
return Message.error("删除失败");
}
return Message.success("删除成功");
}
@ResponseBody
@PostMapping("/edit")
public Message update(@RequestBody AdminEntity admin) {
if(StringUtils.isEmpty(admin.getUsername())){
return Message.error("请填写用户名");
}
if(StringUtils.isEmpty(admin.getUserpw())){
return Message.error("请填写密码");
}
AdminEntityExample example = new AdminEntityExample();
example.or().andUsernameEqualTo(admin.getUsername());
AdminEntity adminEntity = adminEntityMapper.selectoneByExample(example);
if(adminEntity!=null){
if(!adminEntity.getUserid().equals(admin.getUserid())){
return Message.error("该用户名已存在");
}
}
if(adminEntityMapper.updateByPrimaryKey(admin)<=0){
return Message.error("编辑失败,请联系管理员");
}
return Message.success("编辑成功");
}
@RequestMapping("/select")
public Layui select(@RequestParam(required = false) String username,@RequestParam(value = "page")Integer page,
@RequestParam(value = "limit")Integer limit) {
AdminEntityExample example = new AdminEntityExample();
if (!StringUtils.isEmpty(username)){
example.or().andUsernameLike("%"+username+"%");
}
example.getOrderByClause();
Long cou = adminEntityMapper.countByExample(example);
if(page!=1){
page=(page-1)*10;
}else{
page=page-1;
}
return Layui.data(cou.intValue(), adminEntityMapper.selectByExamplePaging(example, page, limit));
}
@RequestMapping("/getAdmin")
public AdminEntity getAdmin(@RequestParam(value="userid")Integer userid) {
return adminEntityMapper.selectByPrimaryKey(userid);
}
}



