一、前言
疫情爆发以来,越来越多的用户借助于移动手机、电脑完成生活中的事务,许多的传统行业也更加重视与互联网的结合。本论文探讨利用不断发展和进步的网络技术,实现对个人信息修改、毕业生、老师、企业单位、企业用户、学院信息、专业信息、班级信息、资质申请、个人简历管理、招聘信息、宣教会、双选会、投递简历等主要功能的实现。
本论文介绍毕业生就业管理微信小程序软件的开发,主要是借助微信平台来完成的,框架使用的是springboot框架,编程语言使用的是Java语言,数据库使用的是Mysql数据库。
腾讯公司在2017年1月19日发布了一款不需要下载,不需要卸载,不需要存储的软件叫微信小程序,受到了很多人的喜欢。微信小程序自2017年发布至今,依托微信的社交属性和庞大的用户基数,已经渗透到生活的方方面面[1]。微信小程序可以将基于微信平台的用户和服务连起来,能够方便地通过微信进行访问和发布,并且拥有良好的应用体验。随着微信基础建设的完善(小程序、服务号、订阅号、视频号等),在微信内建立服务体系,逐步成为各行业的标配。
2.2微信开发者工具
目前腾讯发布的微信官方网站上所使用的软件开发工具主要是微信开发工具,并且有官方网站为它提供了一个前端开发平台。由于软件不能在浏览器上运行,因此在网络上是不允许使用 Document,Window等方法的。而在以往对HTML5进行加载的过程中,会受到网络环境的限制,需要对HTML、CSS以及JS进行一步又一步的加载,然后返回信息,从而渲染页面,将其在浏览器当中进行呈现。这样的方式用户需要等待许久,而且会降低用户的体验感。微信Web开发者工具与H5开发工具的预览模式存在着一定的差异,其属于一项自己的工具,因此可有效地实现同步本地文件开发和调试等流程。此外小程序开发了相关的标签语言和样式语言,并没有使用相关的HTML5+CSS3。在微信小程序软件的开发过程中,还进一步提供了原生APP的组件。而在HTML5+CSS3当中,这是需要通过模拟才能够有效实现的相关功能,但在小程序当中可以通过组件来得到有效的实现。
2.3.2 Java语言
Java是一门面向对象的编程语言,它由C++发展而来。Java保留了C++语言大部分好的优点,同时放弃了C++里很那的多继承、指针等概念。Java从根本上解决了C++的固有缺陷,形成了一种新的完全面向对象的语言,因此Java语言的句法更加清晰、规模也更加的小、更容易学等多个特征。Java语言作为静态面向对象编程语言的代表,极好地实现了面向对象理论,允许程序员以优雅的思维方式进行复杂的编程。
2.3.3 Mysql数据库
MySQL 是一种关联数据库管理系统,该系统速度快而且灵活性强,主要原因是它将数据保存在不同的表中,MySQL软件的优点是成本低、体积小、速度快,开放源码,所以一般中小型网站的开发都选择 MySQL 作为网站数据库。
2.3.4 SpringBoot框架
该框架拥有自己独特的配置方式,网站开发人员不需要再进行大量重复的样板 式的配置工作,开箱即用,不会生成额外代码量,不需要进行XML文件的配置。
二、系统功能效果
三、核心代码
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 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.QiyeyonghushenqingEntity;
import com.entity.view.QiyeyonghushenqingView;
import com.service.QiyeyonghushenqingService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
import java.io.IOException;
/**
* 企业用户申请
* 后端接口
* @author
* @email
* @date 2023-02-28 00:27:03
*/
@RestController
@RequestMapping("/qiyeyonghushenqing")
public class QiyeyonghushenqingController {
@Autowired
private QiyeyonghushenqingService qiyeyonghushenqingService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,QiyeyonghushenqingEntity qiyeyonghushenqing,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("qiyeyonghu")) {
qiyeyonghushenqing.setYonghuzhanghao((String)request.getSession().getAttribute("username"));
}
if(tableName.equals("qiyedanwei")) {
qiyeyonghushenqing.setDanweizhanghao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<QiyeyonghushenqingEntity> ew = new EntityWrapper<QiyeyonghushenqingEntity>();
PageUtils page = qiyeyonghushenqingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, qiyeyonghushenqing), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,QiyeyonghushenqingEntity qiyeyonghushenqing,
HttpServletRequest request){
EntityWrapper<QiyeyonghushenqingEntity> ew = new EntityWrapper<QiyeyonghushenqingEntity>();
PageUtils page = qiyeyonghushenqingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, qiyeyonghushenqing), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( QiyeyonghushenqingEntity qiyeyonghushenqing){
EntityWrapper<QiyeyonghushenqingEntity> ew = new EntityWrapper<QiyeyonghushenqingEntity>();
ew.allEq(MPUtil.allEQMapPre( qiyeyonghushenqing, "qiyeyonghushenqing"));
return R.ok().put("data", qiyeyonghushenqingService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(QiyeyonghushenqingEntity qiyeyonghushenqing){
EntityWrapper< QiyeyonghushenqingEntity> ew = new EntityWrapper< QiyeyonghushenqingEntity>();
ew.allEq(MPUtil.allEQMapPre( qiyeyonghushenqing, "qiyeyonghushenqing"));
QiyeyonghushenqingView qiyeyonghushenqingView = qiyeyonghushenqingService.selectView(ew);
return R.ok("查询企业用户申请成功").put("data", qiyeyonghushenqingView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
QiyeyonghushenqingEntity qiyeyonghushenqing = qiyeyonghushenqingService.selectById(id);
return R.ok().put("data", qiyeyonghushenqing);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
QiyeyonghushenqingEntity qiyeyonghushenqing = qiyeyonghushenqingService.selectById(id);
return R.ok().put("data", qiyeyonghushenqing);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody QiyeyonghushenqingEntity qiyeyonghushenqing, HttpServletRequest request){
qiyeyonghushenqing.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(qiyeyonghushenqing);
qiyeyonghushenqingService.insert(qiyeyonghushenqing);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody QiyeyonghushenqingEntity qiyeyonghushenqing, HttpServletRequest request){
qiyeyonghushenqing.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(qiyeyonghushenqing);
qiyeyonghushenqingService.insert(qiyeyonghushenqing);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody QiyeyonghushenqingEntity qiyeyonghushenqing, HttpServletRequest request){
//ValidatorUtils.validateEntity(qiyeyonghushenqing);
qiyeyonghushenqingService.updateById(qiyeyonghushenqing);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
qiyeyonghushenqingService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<QiyeyonghushenqingEntity> wrapper = new EntityWrapper<QiyeyonghushenqingEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("qiyeyonghu")) {
wrapper.eq("yonghuzhanghao", (String)request.getSession().getAttribute("username"));
}
if(tableName.equals("qiyedanwei")) {
wrapper.eq("danweizhanghao", (String)request.getSession().getAttribute("username"));
}
int count = qiyeyonghushenqingService.selectCount(wrapper);
return R.ok().put("count", count);
}
}