基于SpringBoot的校园招聘管理系统源码和论文

本文探讨了在大学生兼职现象普遍的背景下,开发一款专门针对大学生的兼职平台,以保护他们的生命财产安全。系统采用MVC架构,结合SpringBoot、MySQL和SSM框架,实现了功能需求分析、模块划分和数据库设计,提供便捷的兼职信息查找和安全管理体系。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

作为随着时代的发展与进步,大学生兼职是一种流行趋势 并日益成为社会的热门话题,越来越多的大学生由于各种原因开始校园兼职,网络上的兼职信息量也十分庞大,信息量大且鱼龙混杂。大学生在兼职中财产受损的情况时有发生,甚至有威胁到学生的人身安全。所以如何保护大学生兼职的人生财产安全是我们急需解决的一个问题。本文为的是开发出款校园互助兼职系统,即这款专为大学生量身定制的兼职平台。对大学生快速简洁找到适合自己的兼职,对平台进行设计与实现,方便公司学校以及学生更方便更快捷找到彼此需要的人才以及岗位,建立良好完善的信息化体制管理。

本系统采用MVC核心思想,利用现在的WEB知识体系,例如开源免费数据库MySql、页面交互计算以及页面引擎技术JSP等进行设计与实现。页面本着便捷、简介为核心的思想进行设计,便于用户操作、查看。系统选用JAVA为后端核心语言,MySql为关系型数据库存储数据,将日常学习的知识体系运用到实际网站建设项目中。

在设计中完成了对兼职网站的功能需求分析、功能模块划分、数据库设计,由此设计了数据库结构和应用程序。

关键词:学生兼职;管理系统;MySQL;SSM框架

【687】基于SpringBoot的校园招聘管理系统源码和论文


Abstract

With the development and progress of The Times, college students' part-time job is a popular trend and has increasingly become a hot topic in the society. More and more college students begin to do part-time jobs on campus for various reasons. The amount of part-time job information on the network is also very large, and the amount of information is large and mixed. In the part-time job, college students' property is damaged from time to time, even threatening their personal safety. Therefore, how to protect the security of college students' life and property is an urgent problem we need to solve. The purpose of this paper is to develop a campus mutual assistance part-time system, which is a part-time platform tailored for college students. For college students to quickly and succinctly find their own part-time jobs, the platform design and implementation, convenient for the company, school and students more convenient and faster to find each other's needs of talents and positions, to establish a sound information system management.

This system adopts the MVC core thought, using the current WEB knowledge system, such as open source free database MySql, page interactive computing Servlet and page engine technology JSP design and implementation. The page is designed with the idea of convenience and introduction as the core, which is easy for users to operate and view. The system selects JAVA as the back-end core language and MySql as the relational database to store data, and applies the knowledge system of daily learning to the actual website construction project.

In the design of the completion of the part-time website functional requirements analysis, functional module division, database design, so as to design the database structure and applications.

Key word   college students part-time; Management system;SSM;

 

package cn.jia.controller;

import cn.jia.common.ServerResponse;
import cn.jia.domain.Positions;
import cn.jia.domain.User;
import cn.jia.service.PositionService;
import cn.jia.service.UserService;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * 社会兼职
 */
@Controller
@RequestMapping("/position")
public class PositionController {

    private static final int flag = 1;

    @Autowired
    private PositionService positionService;
    @Autowired
    private UserService userService;
    //展现页面
    @GetMapping
    public String show(Model model, HttpServletRequest request,
                       @RequestParam(value = "pageIndex",defaultValue = "1",required = false)int pageIndex,
                       @RequestParam(value = "pageSize",defaultValue = "5",required = false)int pageSize){
        ServerResponse serverResponse = positionService.findAllBySocial(pageIndex,pageSize);
        PageInfo pageInfo =(PageInfo) serverResponse.getData();
        model.addAttribute("positions",pageInfo);
        return "www/position";
    }
    @GetMapping("/getDetail")
    public String getDetail(@RequestParam("pName")String pName,
                           Model model){
        ServerResponse serverResponse = positionService.getDeatils(pName,flag);
        model.addAttribute("detail",serverResponse.getData());
        serverResponse = positionService.findByRandom(flag);
        model.addAttribute("positions",serverResponse.getData());
        return "www/detail";
    }
    @GetMapping("/findByCondiction")
    @ResponseBody
    public ServerResponse findByCondiction(@RequestParam(value = "condition",required = false,defaultValue = "") String condition,
                                           @RequestParam(value = "keyWord",required = false,defaultValue = "")String keyWord,
                                           @RequestParam(value = "pageIndex",defaultValue = "1",required = false)int pageIndex,
                                           @RequestParam(value = "pageSize",defaultValue = "5",required = false)int pageSize,
                                           HttpServletRequest request) {
        List<String> pClassify = Lists.newArrayList();
        List<String> workSite = Lists.newArrayList();
        condition=condition.replaceAll("\\u00A0"," ");
         if (StringUtils.isNotEmpty(condition)){
             String[] arr = condition.trim().split(" ");
             for (int i = 0; i <arr.length ; i++) {
                 arr[i] = arr[i].trim();
                 if (StringUtils.isNotBlank(arr[i])){
                     if (arr[i].contains(".")){ //说明是分类
                         //去掉“.”
                         int index = arr[i].lastIndexOf(".");
                         String a = arr[i].substring(0,index);
                         pClassify.add(a.trim());
                     }else { //是地址
                       workSite.add(arr[i]);
                     }
                 }
             }
         }
        ServerResponse serverResponse = positionService.findByCondiction(pClassify,workSite,null,flag,keyWord,pageIndex,pageSize);
        return serverResponse;
    }

    //关键字搜索
   // @GetMapping("/findByKeyWord")
   // @ResponseBody
    public ServerResponse findByKeyWord(@RequestParam(value = "keyWord",required = false,defaultValue = "")String keyWord,
                                        @RequestParam(value = "pageIndex",defaultValue = "1",required = false)int pageIndex,
                                        @RequestParam(value = "pageSize",defaultValue = "5",required = false)int pageSize){
        ServerResponse serverResponse = positionService.findByKeyWord(keyWord,pageIndex,pageSize,flag);
        return ServerResponse.buildSuccessData(serverResponse.getData());
    }

    //申请职位
    @PostMapping("/apply")
    @ResponseBody
    public ServerResponse apply(HttpSession session,int pId,int resumeId){
        String username =(String) session.getAttribute("username");
        if (StringUtils.isEmpty(username)){
            return ServerResponse.buildErrorMsg("请登录");
        }
        User user = userService.findByUsername(username);
       return positionService.apply(user.getId(),pId,resumeId);
    }

    //收藏职位
    @PostMapping("/collect")
    @ResponseBody
    public ServerResponse collect(HttpSession session,int pId){
        String username =(String) session.getAttribute("username");
        if (StringUtils.isEmpty(username)){
            return ServerResponse.buildErrorMsg("请登录");
        }
        User user = userService.findByUsername(username);
        return positionService.collect(user.getId(),pId,flag);
    }

    /*----------------------------职位管理-------------------------------------*/

    @RequiresRoles("admin")
    @GetMapping("/manager")
    public String show(Model model){
        ServerResponse serverResponse = positionService.findAll(1,5);
        model.addAttribute("position",serverResponse.getData());
        return "manage/position";
    }

    @RequiresRoles("admin")
    @GetMapping("/manager/findByPage")
    @ResponseBody
    public ServerResponse findByPage(@RequestParam(value = "condition",required = false)String condition,
                                     @RequestParam(value = "pageIndex",defaultValue = "1",required = false)int pageIndex,
                                     @RequestParam(value = "pageSize",defaultValue = "5",required = false)int pageSize){

        if (StringUtils.isEmpty(condition)){
            condition = null;
        }
        //0代表无限制
        return positionService.findByKeyWord(condition,pageIndex,pageSize,0);

    }

    //管理员的权限
    @RequiresRoles("admin")
    @PostMapping("/admin/add")
    @ResponseBody
    public ServerResponse add(Positions positions,HttpSession session){
        String username =(String) session.getAttribute("username");
        if (StringUtils.isEmpty(username)){
            return ServerResponse.buildErrorMsg("请登录");
        }
        return positionService.insert(positions);
    }

    @GetMapping("/admin/getById/{id}")
    @ResponseBody
    @RequiresRoles("admin")
    public ServerResponse findById(@PathVariable int id,HttpSession session){
        String username =(String) session.getAttribute("username");
        if (StringUtils.isEmpty(username)){
            return ServerResponse.buildErrorMsg("请登录");
        }
        return positionService.findById(id);
    }
    //更新
    @PostMapping("/admin/update")
    @ResponseBody
    @RequiresRoles("admin")
    public ServerResponse update(Positions positions,HttpSession session){
        String username =(String) session.getAttribute("username");
        if (StringUtils.isEmpty(username)){
            return ServerResponse.buildErrorMsg("请登录");
        }
        return positionService.update(positions);
    }
    //删除
    @RequiresRoles("admin")
    @DeleteMapping("/admin/delete/{id}")
    @ResponseBody
    public ServerResponse delete(@PathVariable int id,HttpSession session){
        String username =(String) session.getAttribute("username");
        if (StringUtils.isEmpty(username)){
            return ServerResponse.buildErrorMsg("请登录");
        }
        return positionService.deleteById(id);
    }

    @GetMapping("/user/apply/findByPage")
    @ResponseBody
    public ServerResponse findByPageOne(
            @RequestParam(value = "pageIndex", defaultValue = "1", required = false) int pageIndex,
            @RequestParam(value = "pageSize", defaultValue = "5", required = false) int pageSize,HttpSession session) {
        String username =(String) session.getAttribute("username");
        if (StringUtils.isEmpty(username)){
            return ServerResponse.buildErrorMsg("请登录");
        }
        User user = userService.findByUsername(username);
        return positionService.findAllApply(pageIndex,pageSize,user.getId(),null);
    }
}

 

package cn.jia.controller;

import cn.jia.common.ServerResponse;
import cn.jia.domain.Information;
import cn.jia.domain.User;
import cn.jia.mapper.InformationMapper;
import cn.jia.mapper.UserMapper;
import cn.jia.service.InformationService;
import cn.jia.service.UserService;
import cn.jia.util.RandomValidateCodeUtil;

import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpSession;

@Controller
@RequestMapping("/info")
public class InformationController {

    private static final Logger logger = LoggerFactory.getLogger(InformationController.class);

    @Autowired
    private InformationService informationService;
    @Autowired
    private UserService userService;
    private String path = Thread.currentThread().getContextClassLoader().getResource("").getPath().substring(0,Thread.currentThread().getContextClassLoader().getResource("").getPath().length()-16)+"/src/main/webapp/static/upload";;


    /**
     * 新增或更新个人信息
     * @param information
     * @param httpSession
     * @return
     */
    @PostMapping("/addOrUpdate")
    @ResponseBody
    public ServerResponse addOrUpdateInfo(Information information, HttpSession httpSession){
        String username = (String) httpSession.getAttribute("username");
        if (StringUtils.isEmpty(username)){
            return ServerResponse.buildErrorMsg("请登录");
        }
        User user = userService.findByUsername(username);
        return informationService.addOrUpdate(information,user.getId());
    }

    /**
     * 查询个人信息
     * @param session
     * @return
     */
    @GetMapping
    @ResponseBody
    public ServerResponse get(HttpSession session){
        String username = (String) session.getAttribute("username");
        if (StringUtils.isEmpty(username)){
            return ServerResponse.buildErrorMsg("请登录");
        }
        User user = userService.findByUsername(username);
        return informationService.findByUserId(user.getId());
    }
    
    public static String decode(String s) {
        StringBuffer sbuf = new StringBuffer();
        int l = s.length();
        int ch = -1;
        int b, sumb = 0;
        for (int i = 0, more = -1; i < l; i++) {
            /* Get next byte b from URL segment s */
            switch (ch = s.charAt(i)) {
            case '%':
                ch = s.charAt(++i);
                int hb = (Character.isDigit((char) ch) ? ch - '0'
                        : 10 + Character.toLowerCase((char) ch) - 'a') & 0xF;
                ch = s.charAt(++i);
                int lb = (Character.isDigit((char) ch) ? ch - '0'
                        : 10 + Character.toLowerCase((char) ch) - 'a') & 0xF;
                b = (hb << 4) | lb;
                break;
            case '+':
                b = ' ';
                break;
            default:
                b = ch;
            }
            /* Decode byte b as UTF-8, sumb collects incomplete chars */
            if ((b & 0xc0) == 0x80) { // 10xxxxxx (continuation byte)  
                sumb = (sumb << 6) | (b & 0x3f); // Add 6 bits to sumb  
                if (--more == 0)
                    sbuf.append((char) sumb); // Add char to sbuf  
            } else if ((b & 0x80) == 0x00) { // 0xxxxxxx (yields 7 bits)  
                sbuf.append((char) b); // Store in sbuf  
            } else if ((b & 0xe0) == 0xc0) { // 110xxxxx (yields 5 bits)  
                sumb = b & 0x1f;
                more = 1; // Expect 1 more byte  
            } else if ((b & 0xf0) == 0xe0) { // 1110xxxx (yields 4 bits)  
                sumb = b & 0x0f;
                more = 2; // Expect 2 more bytes  
            } else if ((b & 0xf8) == 0xf0) { // 11110xxx (yields 3 bits)  
                sumb = b & 0x07;
                more = 3; // Expect 3 more bytes  
            } else if ((b & 0xfc) == 0xf8) { // 111110xx (yields 2 bits)  
                sumb = b & 0x03;
                more = 4; // Expect 4 more bytes  
            } else /*if ((b & 0xfe) == 0xfc)*/{ // 1111110x (yields 1 bit)  
                sumb = b & 0x01;
                more = 5; // Expect 5 more bytes  
            }
            /* We don't test if the UTF-8 encoding is well-formed */
        }
        return sbuf.toString();
    }
    /**
     * 上传文件
     * @param filename
     * @param session
     * @return
     */
    @PostMapping("/upload")
    @ResponseBody
    public ServerResponse uploadPhoto(@RequestParam("filename")MultipartFile filename, HttpSession session,String verifyInput){
        String username =(String) session.getAttribute("username");
        if (StringUtils.isEmpty(username)){
            return ServerResponse.buildErrorMsg("用户未登录");
        }
        //检验验证码
        String originalVerify = (String)session.getAttribute(RandomValidateCodeUtil.RANDOMCODEKEY);
//        if(!StringUtils.equals(originalVerify,verifyInput)){
//            return ServerResponse.buildErrorMsg("验证码错误");
//        }
        User user = userService.findByUsername(username);
        path = decode(path);
        logger.error("path:{}",path);
        return informationService.upload(filename,path,user.getId());
    }

    @PostMapping("/uploadFile")
    @ResponseBody
    public ServerResponse uploadFiles(@RequestParam("filename")MultipartFile filename, HttpSession session){
        String username =(String) session.getAttribute("username");
        if (StringUtils.isEmpty(username)){
            return ServerResponse.buildErrorMsg("用户未登录");
        }
        User user = userService.findByUsername(username);
        return informationService.upload(filename,path,user.getId());
    }

    @DeleteMapping("/delete")
    @ResponseBody
    public ServerResponse deleteFile(HttpSession session){
        String username =(String) session.getAttribute("username");
        if (StringUtils.isEmpty(username)){
            return ServerResponse.buildErrorMsg("用户未登录");
        }
        User user = userService.findByUsername(username);
        return informationService.deleteFile(user.getId(),path);
    }

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序猿毕业分享网

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值