基于SpringBoot的蜗牛兼职网平台

1. 项目概述

本项目是一个名为"蜗牛兼职网"的兼职信息平台,主要功能包括兼职信息发布、职位申请、企业管理和用户管理等模块。

2. 技术栈分析

2.1 后端技术

  • 核心框架: Spring Boot 2.2.2.RELEASE
  • ORM框架: MyBatis + MyBatis-Plus 2.3
  • 数据库: MySQL 5.7.32
  • 安全框架: Apache Shiro 1.3.2
  • API文档: 未明确提及
  • 其他依赖 :
    • FastJson 1.2.8
    • Hutool-all 4.0.12
    • Commons-lang3 3.0

2.2 前端技术

  • 前端框架: Vue.js
  • UI组件库: Element UI
  • 路由管理: Vue Router
  • HTTP客户端: Axios
  • 其他库 :
    • ECharts (数据可视化)
    • Vue-json-excel (Excel导出)
    • Print-js (打印功能)

开发工具与环境

  • 构建工具: Maven
  • JDK版本: 1.8
  • Web服务器: Tomcat (内嵌)
  • 开发工具: IntelliJ IDEA, Eclipse

3. 数据库设计

3.1 主要数据表

  1. 兼职信息表(jianzhixinxi)
    • 存储兼职职位信息,包括职位名称、招聘人数、薪资待遇等字段
  2. 企业表(qiye)
    • 存储企业信息,包括企业号、名称、联系方式等字段
  3. 用户表(yonghu)
    • 存储用户信息,包括用户名、密码、联系方式等字段
  4. 职位申请表(zhiweishenqing)
    • 存储职位申请记录,包括职位名称、申请日期、简历等字段
  5. 留言板表(messages)
    • 存储用户留言信息,包括留言内容、回复内容等字段
  6. 配置表(config)
    • 存储系统配置信息,包括轮播图等配置
  7. Token表(token)
    • 存储用户认证信息

3.2 数据库关系

  • 企业与兼职信息是一对多关系
  • 用户与职位申请是一对多关系
  • 兼职信息与职位申请是一对多关系

4. 核心功能模块

4.1. 用户管理模块

  • 用户注册与登录
  • 个人信息管理
  • 职位申请记录查询

4.2. 企业管理模块

  • 企业信息管理
  • 兼职信息发布与管理
  • 职位申请审核

4.3. 兼职信息模块

  • 兼职信息列表展示
  • 兼职信息详情查看
  • 职位搜索与筛选

4.4. 职位申请模块

  • 在线职位申请
  • 申请状态查询
  • 面试通知查看

4.5. 系统管理模块

  • 轮播图配置
  • 菜单权限管理
  • 数据统计分析

5. 部分核心代码展示

5.1. 百度API工具 (BaiduUtil.java)

java

package com.utils;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.json.JSONObject;


/**
* 类说明 : 
*/

public class BaiduUtil {
	
    /**
     * 根据经纬度获得省市区信息
     * @param lon 纬度
     * @param lat 经度
     * @param coordtype 经纬度坐标系
     * @return
     */
    public static Map<String, String> getCityByLonLat(String key, String lng, String lat) {
        String location = lat + "," + lng;
        try {
            //拼装url
            String url = "http://api.map.baidu.com/reverse_geocoding/v3/?ak="+key+"&output=json&coordtype=wgs84ll&location="+location;
            String result = HttpClientUtils.doGet(url);
            JSONObject o = new JSONObject(result);
            Map<String, String> area = new HashMap<>();
			area.put("province", o.getJSONObject("result").getJSONObject("addressComponent").getString("province"));
			area.put("city", o.getJSONObject("result").getJSONObject("addressComponent").getString("city"));
			area.put("district", o.getJSONObject("result").getJSONObject("addressComponent").getString("district"));
			area.put("street", o.getJSONObject("result").getJSONObject("addressComponent").getString("street"));
            return area;
        }catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    /**
	     * 获取API访问token
	     * 该token有一定的有效期,需要自行管理,当失效时需重新获取.
	     * @param ak - 百度云官网获取的 API Key
	     * @param sk - 百度云官网获取的 Securet Key
	     * @return assess_token
	     */
    public static String getAuth(String ak, String sk) {
        // 获取token地址
        String authHost = "https://aip.baidubce.com/oauth/2.0/token?";
        String getAccessTokenUrl = authHost
                // 1. grant_type为固定参数
                + "grant_type=client_credentials"
                // 2. 官网获取的 API Key
                + "&client_id=" + ak
                // 3. 官网获取的 Secret Key
                + "&client_secret=" + sk;
        try {
            URL realUrl = new URL(getAccessTokenUrl);
            // 打开和URL之间的连接
            HttpURLConnection connection = (HttpURLConnection) realUrl.openConnection();
            connection.setRequestMethod("GET");
            connection.connect();
            // 获取所有响应头字段
            Map<String, List<String>> map = connection.getHeaderFields();
            // 遍历所有的响应头字段
            for (String key : map.keySet()) {
                System.err.println(key + "--->" + map.get(key));
            }
            // 定义 BufferedReader输入流来读取URL的响应
            BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
            String result = "";
            String line;
            while ((line = in.readLine()) != null) {
                result += line;
            }
            /**
             * 返回结果示例
             */
            System.err.println("result:" + result);
            org.json.JSONObject jsonObject = new org.json.JSONObject(result);
            String access_token = jsonObject.getString("access_token");
            return access_token;
        } catch (Exception e) {
            System.err.printf("获取token失败!");
            e.printStackTrace(System.err);
        }
        return null;
    }

}

5.2. 兼职信息数据访问层 (JianzhixinxiDao.xml)

xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.dao.JianzhixinxiDao">

    <!-- 可根据自己的需求,是否要使用 -->
    <resultMap type="com.entity.JianzhixinxiEntity" id="jianzhixinxiMap">
        <result property="zhiweimingcheng" column="zhiweimingcheng"/>
        <result property="tupian" column="tupian"/>
        <result property="zhaopinrenshu" column="zhaopinrenshu"/>
        <result property="xinzidaiyu" column="xinzidaiyu"/>
        <result property="zhiweijianjie" column="zhiweijianjie"/>
        <result property="gongzuoneirong" column="gongzuoneirong"/>
        <result property="faburiqi" column="faburiqi"/>
        <result property="qiyehao" column="qiyehao"/>
        <result property="qiyemingcheng" column="qiyemingcheng"/>
        <result property="lianxiren" column="lianxiren"/>
        <result property="lianxifangshi" column="lianxifangshi"/>
        <result property="dizhi" column="dizhi"/>
    </resultMap>

    <select id="selectListVO"
        resultType="com.entity.vo.JianzhixinxiVO" >
        SELECT * FROM jianzhixinxi  jianzhixinxi         
        <where> 1=1 ${ew.sqlSegment}</where>
    </select>
    
    <select id="selectVO"
        resultType="com.entity.vo.JianzhixinxiVO" >
        SELECT  jianzhixinxi.* FROM jianzhixinxi  jianzhixinxi 	
 		<where> 1=1 ${ew.sqlSegment}</where>
    </select>

    <select id="selectListView"
        resultType="com.entity.view.JianzhixinxiView" >

        SELECT  jianzhixinxi.* FROM jianzhixinxi  jianzhixinxi 		
        <where> 1=1 ${ew.sqlSegment}</where>
    </select>
    
    <select id="selectView"
        resultType="com.entity.view.JianzhixinxiView" >
        SELECT * FROM jianzhixinxi  jianzhixinxi <where> 1=1 ${ew.sqlSegment}</where>
    </select>
    
</mapper>

5.3. 前端路由配置 (router-static.js)

javascript

import Vue from 'vue';
//配置路由
import VueRouter from 'vue-router'
Vue.use(VueRouter);
//1.创建组件
import Index from '@/views/index'
import Home from '@/views/home'
import Login from '@/views/login'
import NotFound from '@/views/404'
import UpdatePassword from '@/views/update-password'
import pay from '@/views/pay'
import register from '@/views/register'
import center from '@/views/center'
    import qiye from '@/views/modules/qiye/list'
    import zhiweishenqing from '@/views/modules/zhiweishenqing/list'
    import yonghu from '@/views/modules/yonghu/list'
    import jianzhixinxi from '@/views/modules/jianzhixinxi/list'
    import messages from '@/views/modules/messages/list'
    import config from '@/views/modules/config/list'


//2.配置路由   注意:名字
const routes = [{
    path: '/index',
    name: '首页',
    component: Index,
    children: [{
      // 这里不设置值,是把main作为默认页面
      path: '/',
      name: '首页',
      component: Home,
      meta: {icon:'', title:'center'}
    }, {
      path: '/updatePassword',
      name: '修改密码',
      component: UpdatePassword,
      meta: {icon:'', title:'updatePassword'}
    }, {
      path: '/pay',
      name: '支付',
      component: pay,
      meta: {icon:'', title:'pay'}
    }, {
      path: '/center',
      name: '个人信息',
      component: center,
      meta: {icon:'', title:'center'}
    }
          ,{
    path: '/qiye',
        name: '企业',
        component: qiye
      }
          ,{
    path: '/zhiweishenqing',
        name: '职位申请',
        component: zhiweishenqing
      }
          ,{
    path: '/yonghu',
        name: '用户',
        component: yonghu
      }
          ,{
    path: '/jianzhixinxi',
        name: '兼职信息',
        component: jianzhixinxi
      }
          ,{
    path: '/messages',
        name: '留言板管理',
        component: messages
      }
          ,{
    path: '/config',
        name: '轮播图管理',
        component: config
      }
        ]
  },
  {
    path: '/login',
    name: 'login',
    component: Login,
    meta: {icon:'', title:'login'}
  },
  {
    path: '/register',
    name: 'register',
    component: register,
    meta: {icon:'', title:'register'}
  },
  {
    path: '/',
    name: '首页',
    redirect: '/index'
  }, /*默认跳转路由*/
  {
    path: '*',
    component: NotFound
  }
]
//3.实例化VueRouter  注意:名字
const router = new VueRouter({
  mode: 'hash',
  /*hash模式改为history*/
  routes // (缩写)相当于 routes: routes
})

export default router;

6. 部分截图

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

7. 项目总结

7.1 项目主要成果

  1. 功能实现
    • 成功实现了兼职信息发布与管理功能
    • 完成了企业与用户的角色分离和权限控制
    • 开发了职位申请与审核流程
    • 构建了留言反馈机制
  2. 技术架构
    • 采用Spring Boot + Vue前后端分离架构,提高了系统可维护性和扩展性
    • 使用MyBatis-Plus简化数据库操作,提高开发效率
    • 引入Shiro框架实现权限管理,保障系统安全
    • 采用RESTful API设计风格,规范接口开发
  3. 性能优化
    • 数据库索引优化,提高查询效率
    • 前端资源压缩与缓存策略,提升页面加载速度
    • 分页查询实现,减少数据传输量

7.2 项目亮点与创新点

  1. 用户体验优化
    • 轮播图展示热门兼职信息,提高信息曝光率
    • 简洁直观的操作界面,降低用户学习成本
  2. 安全性保障
    • 密码加密存储,保护用户隐私
    • Token认证机制,防止未授权访问
    • 数据校验与过滤,防止恶意输入
  3. 可扩展性设计
    • 模块化开发,便于功能扩展
    • 配置文件与代码分离,便于部署与维护
    • 接口标准化,便于第三方系统集成

7.3. 总结

本项目作为一个兼职信息平台,成功实现了企业与求职者之间的信息对接功能,为双方提供了便捷的服务。系统采用现代化的技术架构,保证了系统的稳定性和可扩展性。

在线演示:
后台:http://springbootc8v27.xiaobias.com/springbootc8v27/admin/dist/index.html
前台:http://springbootc8v27.xiaobias.com/springbootc8v27/front/index.html
管理员:abo/abo
用户:用户1/123456,用户2/123456
企业:企业1/123456,企业2/123456
资源:https://fifteen.xiaobias.com/source/36

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值