作者主页:夜未央5788
简介:Java领域优质创作者、Java项目、学习资料、技术互助
文末获取源码
项目介绍
基于SSM的高校研招信息及专业信息共享系统
角色:管理员、学生、第三方,分为前后台;
管理员:登录进入高校研招信息及专业信息共享系统可以查看主页、个人中心、学生管理、第三方管理、院系管理、专业管理、院校信息管理、专业信息管理、专业辅导管理、交流论坛、系统管理等信息进行详细操作;
学生:学生登录进入系统可以查看首页、院校信息、专业信息、专业辅导、交流论坛、新闻资讯、在线客服、个人中心等内容,并进行详细操作
第三方:第三方登录进入高校研招信息及专业信息共享系统可以查看主页、院校信息、专业信息、专业辅导、交流论坛、新闻资讯、在线客服、个人中心等内容,
使用人群:
正在做毕设的学生,或者需要项目实战练习的Java学习者
由于本程序规模不大,可供课程设计,毕业设计学习演示之用
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
4.Tomcat环境:Tomcat 7.x,8.x,9.x版本均可
5.数据库:MySql 5.7/8.0版本均可;
6.是否Maven项目:是;
技术栈
后端:SSM(Spring+SpringMVC+Mybatis)
前端:JSP+CSS+JS+JQUERY+Layui
使用说明
项目运行:
1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令,然后运行;
3. 将项目中config.properties配置文件中的数据库配置改为自己的配置,然后运行;
前台地址:http://localhost:8080/jspml609s/front/index.jsp
学生账号密码:学号1 密码:123456
第三方:第三方账号1 密码:123456
后台地址:http://localhost:8080/jspml609s/jsp/login.jsp
管理员账号密码:admin 密码:admin
运行截图
前台界面
后台界面
相关代码
StoreupController
package com.controller;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.StoreupEntity;
import com.entity.view.StoreupView;
import com.service.StoreupService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
/**
* 收藏表
* 后端接口
* @author
* @email
* @date 2023-06-29 10:33:57
*/
@RestController
@RequestMapping("/storeup")
public class StoreupController {
@Autowired
private StoreupService storeupService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,StoreupEntity storeup,
HttpServletRequest request){
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
storeup.setUserid((Long)request.getSession().getAttribute("userId"));
}
EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>();
PageUtils page = storeupService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, storeup), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,StoreupEntity storeup,
HttpServletRequest request){
EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>();
PageUtils page = storeupService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, storeup), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( StoreupEntity storeup){
EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>();
ew.allEq(MPUtil.allEQMapPre( storeup, "storeup"));
return R.ok().put("data", storeupService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(StoreupEntity storeup){
EntityWrapper< StoreupEntity> ew = new EntityWrapper< StoreupEntity>();
ew.allEq(MPUtil.allEQMapPre( storeup, "storeup"));
StoreupView storeupView = storeupService.selectView(ew);
return R.ok("查询收藏表成功").put("data", storeupView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
StoreupEntity storeup = storeupService.selectById(id);
return R.ok().put("data", storeup);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
StoreupEntity storeup = storeupService.selectById(id);
return R.ok().put("data", storeup);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody StoreupEntity storeup, HttpServletRequest request){
storeup.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(storeup);
storeup.setUserid((Long)request.getSession().getAttribute("userId"));
storeupService.insert(storeup);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody StoreupEntity storeup, HttpServletRequest request){
storeup.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(storeup);
storeupService.insert(storeup);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody StoreupEntity storeup, HttpServletRequest request){
//ValidatorUtils.validateEntity(storeup);
storeupService.updateById(storeup);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
storeupService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
}
YuanxiController
package com.controller;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.YuanxiEntity;
import com.entity.view.YuanxiView;
import com.service.YuanxiService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
/**
* 院系
* 后端接口
* @author
* @email
* @date 2023-06-29 10:33:56
*/
@RestController
@RequestMapping("/yuanxi")
public class YuanxiController {
@Autowired
private YuanxiService yuanxiService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,YuanxiEntity yuanxi,
HttpServletRequest request){
EntityWrapper<YuanxiEntity> ew = new EntityWrapper<YuanxiEntity>();
PageUtils page = yuanxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yuanxi), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,YuanxiEntity yuanxi,
HttpServletRequest request){
EntityWrapper<YuanxiEntity> ew = new EntityWrapper<YuanxiEntity>();
PageUtils page = yuanxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yuanxi), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( YuanxiEntity yuanxi){
EntityWrapper<YuanxiEntity> ew = new EntityWrapper<YuanxiEntity>();
ew.allEq(MPUtil.allEQMapPre( yuanxi, "yuanxi"));
return R.ok().put("data", yuanxiService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(YuanxiEntity yuanxi){
EntityWrapper< YuanxiEntity> ew = new EntityWrapper< YuanxiEntity>();
ew.allEq(MPUtil.allEQMapPre( yuanxi, "yuanxi"));
YuanxiView yuanxiView = yuanxiService.selectView(ew);
return R.ok("查询院系成功").put("data", yuanxiView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
YuanxiEntity yuanxi = yuanxiService.selectById(id);
return R.ok().put("data", yuanxi);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
YuanxiEntity yuanxi = yuanxiService.selectById(id);
return R.ok().put("data", yuanxi);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody YuanxiEntity yuanxi, HttpServletRequest request){
yuanxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(yuanxi);
yuanxiService.insert(yuanxi);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody YuanxiEntity yuanxi, HttpServletRequest request){
yuanxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(yuanxi);
yuanxiService.insert(yuanxi);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody YuanxiEntity yuanxi, HttpServletRequest request){
//ValidatorUtils.validateEntity(yuanxi);
yuanxiService.updateById(yuanxi);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
yuanxiService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
}
如果也想学习本系统,下面领取。关注并回复:333ssm