基于SSM的大学生兼职平台的设计与实现
摘要
信息社会、信息时代造就了现在我们所拥有的科技生活。各种关于生活、社团的互联网软件逐步的走向了百姓的生活当中,移动互联网在当下的时代中有着非常成熟的应用,人们通过智能手机可以随时随地的通过网络的连接来实现在线的新闻阅读,热点搜索,在线购物以及刷视频等活动操作。移动互联网对于当下的时代进步起到了非常大的推动作用。而在移动端的应用中,众多的APP中国人最为喜爱的当属微信了,微信集合了社交、支付、新闻阅读、视频观看等多项内容于一体,成为了国民软件,是每一个国人手机中必不可少的一项重要的工具。随着勤工助学规模的日益扩大,学生人数不断增多,教学资源日趋紧张,对勤工助学工作的要求和难度也大大增加。传统的兼职管理模式已无法应对日趋复杂的管理工作,建立高效、科学、规范的兼职平台网络管理信息系统成为教学管理发展的必然趋势。
鉴于此,本次通过利用Eclipse语言来开发一款大学生兼职平台,那么技术上我们采用的手段还是以目前主流的Java技术为主,那么采用的框架是SSM框架,这样一来更加方便的进行一个团员信息的管理。数据库方面我们使用的是MYSQL数据库,可以有效的快速上手,容易我们开发。
关键字:SSM;兼职平台;MySQL数据库
系统实现页面展示
首页
企业信息
用户注册模块
在线留言页面
管理员后台管理
系统内容
对于本次的系统开发,是通过以前后端的开发方式来进行大学生兼职管理平台的搭建。本次的系统开发需要保证前后两个不同的平台能够实现有效的数据传输,特别是在简历投递、在线交流的环节要充分的保证数据的传输稳定性,让前后台能够及时的进行信息的传递和交流。本次针对平台以及管理平台其主要的功能模块开发需求如下所述:
- 前端:
- 用户的注册功能,本次的兼职平台中需要大学生在前台中进行注册登录才能够进行建立的投递和兼职选择的功能实现;
- 职业测评,在该功能中,大学生能够查看到职业测评;
- 在线留言功能,大学生能够在线与企业进行留言的互动,了解岗位的匹配信息等内容;
- 兼职公告,大学生能够在兼职公告的功能中查看到与兼职相关的攻略信息,通过攻略信息的查看来更好的掌握兼职的技巧等信息;
- 兼职信息,大学生能够在线进行面试的文字答题。
- 后台的B/S端管理平台:
在后台管理平台的设计上是按照两个不同的角色来进行设计,角色为管理员,管理员能够在后台的WEB平台中实现对各个角色的有效管理以及对不同的功能模块的信息管理。管理员可以操作的管理功能如下:
- 兼职公告管理,管理员能够对象学生出具的兼职公告内容等进行管理维护;
- 留言管理,管理员能够为学生在留言中记录的信息进行管理;
- 系统用户信息管理,针对注册的学生用户、企业用户都能够实现在线的信息维护管理;
- 兼职管理,管理员可以对刊登的兼职进行维护,能够将新的兼职发布,也能够将已经存在的兼职进行删除操作。
- 企业管理,管理员可以对企业信息进行维护。
- 测评管理,管理员可以对测评信息进行维护。
可行性分析
对于大学生大学生兼职平台的开发而言,首先可以通过此次的研究背景发现,该平台的开发意义是存在的,而在这一类的平台开发上,由于不存在任何的商业广告的植入,不会因为流量而获取其他经济利益。所以要确认整个开发的投入是否保持相对较小,而产生的可使用价值较大。在本次的开发上,平台开发者工具是开源的,鼓励开发人员通过平台开发工具开发更多的可用的平台。而后台的技术上,JAVA技术以及MYSQL技术也都是开源的。整体来看,本次在开发工具的使用投入上没有任何的成本投入,成本控制较好,经济的可行性强。
在技术的可行性操作上,本次的开发工具是国产的软件、应用的平台环境也是国产的程序,整体的开发过程是以国人的思维与传统的计算机编程思维相结合进行的系统开发,开发过程通过中文界面的操作系统能够有效的提升开发的操作简便程度,实现更好的快速开发的过程。而这些所采用的技术也是笔者长期通过实验实践所采用的技术,通过这些技术的使用可以完成本次的前端面试平台以及后台的WEB操作界面的运行实现。
当下人们对于平台的使用非常的普遍,对于平台的查找和使用上也都轻车熟路,而且本次设计的面试平台是为大学生提供一个就业岗位的查找平台,大学生在平台操作上更加的熟练,所以整体的可操作性非常强。
package com.controller;
import java.io.File;
import java.io.IOException;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.io.PrintWriter;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import com.entity.Xueshengxinxi;
import com.server.XueshengxinxiServer;
import com.util.PageBean;
import net.sf.json.JSONObject;
import com.util.db;
import java.sql.SQLException;
import java.sql.*;
@Controller
public class XueshengxinxiController {
@Resource
private XueshengxinxiServer xueshengxinxiService;
@RequestMapping("addXueshengxinxi.do")
public String addXueshengxinxi(HttpServletRequest request,Xueshengxinxi xueshengxinxi,HttpSession session) throws SQLException{
Timestamp time=new Timestamp(System.currentTimeMillis());
xueshengxinxi.setAddtime(time.toString().substring(0, 19));
xueshengxinxiService.add(xueshengxinxi);
db dbo = new db();
//kuabiaogaizhi
return "redirect:xueshengxinxi_add.jsp?ok=1";
}
@RequestMapping("addXueshengxinxiqt.do")
public String addXueshengxinxiqt(HttpServletRequest request,Xueshengxinxi xueshengxinxi,HttpSession session) throws SQLException{
Timestamp time=new Timestamp(System.currentTimeMillis());
xueshengxinxi.setAddtime(time.toString().substring(0, 19));
xueshengxinxiService.add(xueshengxinxi);
db dbo = new db();
//kuabiaogaizhi
session.setAttribute("backxx", "添加成功");
session.setAttribute("backurl", request.getHeader("Referer"));
return "redirect:postback.jsp";
}
// 处理编辑
@RequestMapping("doUpdateXueshengxinxi.do")
public String doUpdateXueshengxinxi(int id,ModelMap map,Xueshengxinxi xueshengxinxi){
xueshengxinxi=xueshengxinxiService.getById(id);
map.put("xueshengxinxi", xueshengxinxi);
return "xueshengxinxi_updt";
}
@RequestMapping("doUpdateXueshengxinxi2.do")
public String doUpdateXueshengxinxi2(ModelMap map,Xueshengxinxi xueshengxinxi,HttpServletRequest request){
xueshengxinxi=xueshengxinxiService.getById(Integer.parseInt((String)request.getSession().getAttribute("uid")));
map.put("xueshengxinxi", xueshengxinxi);
return "xueshengxinxi_updt2";
}
@RequestMapping("updateXueshengxinxi2.do")
public String updateXueshengxinxi2(int id,ModelMap map,Xueshengxinxi xueshengxinxi,HttpServletRequest request,HttpSession session){
xueshengxinxiService.update(xueshengxinxi);
session.setAttribute("backxx", "修改成功");session.setAttribute("backurl", request.getHeader("Referer"));return "redirect:postback.jsp";
}
// 后台详细
@RequestMapping("xueshengxinxiDetail.do")
public String xueshengxinxiDetail(int id,ModelMap map,Xueshengxinxi xueshengxinxi){
xueshengxinxi=xueshengxinxiService.getById(id);
map.put("xueshengxinxi", xueshengxinxi);
return "xueshengxinxi_detail";
}
// 前台详细
@RequestMapping("xsxxDetail.do")
public String xsxxDetail(int id,ModelMap map,Xueshengxinxi xueshengxinxi){
xueshengxinxi=xueshengxinxiService.getById(id);
map.put("xueshengxinxi", xueshengxinxi);
return "xueshengxinxidetail";
}
//
@RequestMapping("updateXueshengxinxi.do")
public String updateXueshengxinxi(int id,ModelMap map,Xueshengxinxi xueshengxinxi,HttpServletRequest request,HttpSession session){
xueshengxinxiService.update(xueshengxinxi);
return "redirect:"+request.getHeader("Referer")+"&ok=1";
}
// 分页查询
@RequestMapping("xueshengxinxiList.do")
public String xueshengxinxiList(@RequestParam(value="page",required=false)String page,
ModelMap map,HttpSession session,Xueshengxinxi xueshengxinxi, String xuehao, String mima, String xueshengxingming, String xingbie, String lianxihaoma, String zhuanye, String zhaopian, String issh){
if(page==null||page.equals("")){
page="1";
}
PageBean pageBean=new PageBean(Integer.parseInt(page), 5);
Map<String, Object> pmap=new HashMap<String,Object>();
pmap.put("pageno", pageBean.getStart());
pmap.put("pageSize", 5);
if(xuehao==null||xuehao.equals("")){pmap.put("xuehao", null);}else{pmap.put("xuehao", xuehao);}
if(mima==null||mima.equals("")){pmap.put("mima", null);}else{pmap.put("mima", mima);}
if(xueshengxingming==null||xueshengxingming.equals("")){pmap.put("xueshengxingming", null);}else{pmap.put("xueshengxingming", xueshengxingming);}
if(xingbie==null||xingbie.equals("")){pmap.put("xingbie", null);}else{pmap.put("xingbie", xingbie);}
if(lianxihaoma==null||lianxihaoma.equals("")){pmap.put("lianxihaoma", null);}else{pmap.put("lianxihaoma", lianxihaoma);}
if(zhuanye==null||zhuanye.equals("")){pmap.put("zhuanye", null);}else{pmap.put("zhuanye", zhuanye);}
if(zhaopian==null||zhaopian.equals("")){pmap.put("zhaopian", null);}else{pmap.put("zhaopian", zhaopian);}
int total=xueshengxinxiService.getCount(pmap);
pageBean.setTotal(total);
List<Xueshengxinxi> list=xueshengxinxiService.getByPage(pmap);
map.put("page", pageBean);
map.put("list", list);
session.setAttribute("p", 1);
return "xueshengxinxi_list";
}
@RequestMapping("xsxxList.do")
public String xsxxList(@RequestParam(value="page",required=false)String page,
ModelMap map,HttpSession session,Xueshengxinxi xueshengxinxi, String xuehao, String mima, String xueshengxingming, String xingbie, String lianxihaoma, String zhuanye, String zhaopian, String issh){
if(page==null||page.equals("")){
page="1";
}
PageBean pageBean=new PageBean(Integer.parseInt(page), 5);
Map<String, Object> pmap=new HashMap<String,Object>();
pmap.put("pageno", pageBean.getStart());
pmap.put("pageSize", 5);
if(xuehao==null||xuehao.equals("")){pmap.put("xuehao", null);}else{pmap.put("xuehao", xuehao);}
if(mima==null||mima.equals("")){pmap.put("mima", null);}else{pmap.put("mima", mima);}
if(xueshengxingming==null||xueshengxingming.equals("")){pmap.put("xueshengxingming", null);}else{pmap.put("xueshengxingming", xueshengxingming);}
if(xingbie==null||xingbie.equals("")){pmap.put("xingbie", null);}else{pmap.put("xingbie", xingbie);}
if(lianxihaoma==null||lianxihaoma.equals("")){pmap.put("lianxihaoma", null);}else{pmap.put("lianxihaoma", lianxihaoma);}
if(zhuanye==null||zhuanye.equals("")){pmap.put("zhuanye", null);}else{pmap.put("zhuanye", zhuanye);}
if(zhaopian==null||zhaopian.equals("")){pmap.put("zhaopian", null);}else{pmap.put("zhaopian", zhaopian);}
int total=xueshengxinxiService.getCount(pmap);
pageBean.setTotal(total);
List<Xueshengxinxi> list=xueshengxinxiService.getByPage(pmap);
map.put("page", pageBean);
map.put("list", list);
session.setAttribute("p", 1);
return "xueshengxinxilist";
}
@RequestMapping("xsxxListtp.do")
public String xsxxListtp(@RequestParam(value="page",required=false)String page,
ModelMap map,HttpSession session,Xueshengxinxi xueshengxinxi, String xuehao, String mima, String xueshengxingming, String xingbie, String lianxihaoma, String zhuanye, String zhaopian, String issh){
if(page==null||page.equals("")){
page="1";
}
PageBean pageBean=new PageBean(Integer.parseInt(page), 8);
Map<String, Object> pmap=new HashMap<String,Object>();
pmap.put("pageno", pageBean.getStart());
pmap.put("pageSize", 8);
if(xuehao==null||xuehao.equals("")){pmap.put("xuehao", null);}else{pmap.put("xuehao", xuehao);}
if(mima==null||mima.equals("")){pmap.put("mima", null);}else{pmap.put("mima", mima);}
if(xueshengxingming==null||xueshengxingming.equals("")){pmap.put("xueshengxingming", null);}else{pmap.put("xueshengxingming", xueshengxingming);}
if(xingbie==null||xingbie.equals("")){pmap.put("xingbie", null);}else{pmap.put("xingbie", xingbie);}
if(lianxihaoma==null||lianxihaoma.equals("")){pmap.put("lianxihaoma", null);}else{pmap.put("lianxihaoma", lianxihaoma);}
if(zhuanye==null||zhuanye.equals("")){pmap.put("zhuanye", null);}else{pmap.put("zhuanye", zhuanye);}
if(zhaopian==null||zhaopian.equals("")){pmap.put("zhaopian", null);}else{pmap.put("zhaopian", zhaopian);}
int total=xueshengxinxiService.getCount(pmap);
pageBean.setTotal(total);
List<Xueshengxinxi> list=xueshengxinxiService.getByPage(pmap);
map.put("page", pageBean);
map.put("list", list);
session.setAttribute("p", 1);
return "xueshengxinxilisttp";
}
@RequestMapping("deleteXueshengxinxi.do")
public String deleteXueshengxinxi(int id,HttpServletRequest request,HttpSession session){
xueshengxinxiService.delete(id);
return "redirect:"+request.getHeader("Referer")+"?ok=2";
}
@RequestMapping("quchongXueshengxinxi.do")
public void quchongXueshengxinxi(Xueshengxinxi xueshengxinxi,HttpServletResponse response){
Map<String,Object> map=new HashMap<String,Object>();
map.put("xuehao", xueshengxinxi.getXuehao());
System.out.println("xuehao==="+xueshengxinxi.getXuehao());
System.out.println("xuehao222==="+xueshengxinxiService.quchongXueshengxinxi(map));
JSONObject obj=new JSONObject();
if(xueshengxinxiService.quchongXueshengxinxi(map)!=null){
obj.put("info", "ng");
}else{
obj.put("info", "学号可以用!");
}
response.setContentType("text/html;charset=utf-8");
PrintWriter out=null;
try {
out=response.getWriter();
out.print(obj);
out.flush();
} catch (IOException e) {
e.printStackTrace();
}finally{
out.close();
}
}
}
系统测试
本次在完成对整个大学生兼职平台以及后台的B/S系统的开发完成后,通过将所有的功能组装,并且通过以MySQL来进行数据的串联后,整个系统完成了初次的组件以及运行的展示工作。但这并不是系统开发的终点,系统的开发还需要通过以大量的内容测试来完成对系统的各项开发过程中的内容进行检测,确保开发过程不会因为开发人员主观的开发意识而产生背离开发需求的情况出现。通过测试要确保整个系统能够完整的服务于招聘市场,形成很好的面试、简历投递、线上沟通等功能的运行服务。
本次的平台是通过利用了浏览器运行的方式来进行测试的,本次要确保浏览器的运行与真实的运行环境保持一致,实现更好的内容测试。而在整体后台的测试中通过以系统安装数据库,模拟真实的使用操作环境来进行操作的过程是可以起到对web系统的有效测试的。
本次的测试通过以两种方式来进行测试,第一种是黑盒的测试方式,针对于每一个不同的角色,学生、招聘方以及管理员来进行黑盒方式的登录测试,确保整个登录环节安全可用。再通过白盒测试,按照以系统操作说明书指引的方式来实现兼职信息的发布等功能的使用实现。
通过本次的测试,按照不同的测试方式对于整个平台端对重要的面试信息进行记录等功能模块的操作来完成对整个平台端的测试。通过对平台的程序的页面进行检查,确保页面的显示上能够有着很好的显示效果,页面的清晰度、字体的大小等都保持合理,从而最终可以确认本次所开发的系统是可以实现稳定运行效果的,最终的测试结果为通过。