springboot农机电招平台源码和论文

2024-01-24 21:04

本文主要是介绍springboot农机电招平台源码和论文,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

随着农机电招行业的不断发展,农机电招在现实生活中的使用和普及,农机电招行业成为近年内出现的一个新行业,并且能够成为大群众广为认可和接受的行为和选择。设计农机电招平台的目的就是借助计算机让复杂的销售操作变简单,变高效。

农机电招平台采用了B/S结构,JAVA作为开发语言,数据库采用了B/S结构,Mysql数据库进行开发。该系统包括前台操作和后台管理两个部分,一方面,为用户提供首页,农机,系统公告,个人中心,后台管理等功能;另一方面,为管理员提供首页,个人中心,农机机主管理,使用者管理,农机类型管理,农机管理,农机预约管理,系统管理等功能。

【关键词】农机电招;JAVA;B/S结构

springboot农机电招平台源码和论文326

演示视频:

springboot农机电招平台源码和论文

Abstract

With the continuous development of the agricultural mechanical and electrical recruitment industry, the use and popularization of agricultural mechanical and electrical recruitment in real life, the agricultural mechanical and electrical recruitment industry has become a new industry that has emerged in recent years, and can become a behavior and choice widely recognized and accepted by the masses. The purpose of designing the agricultural mechanical and electrical recruitment platform is to make complex sales operations simple and efficient with the help of computers.

The agricultural mechanical and electrical recruitment platform adopts the B/S structure, JAVA as the development language, the database adopts the B/S structure, and the Mysql database is developed. The system includes two parts of front-end operation and background management, on the one hand, to provide users with the home page, agricultural machinery, system announcements, personal center, background management and other functions; on the other hand, to provide administrators with homepage, personal center, agricultural machinery master management, user management, agricultural machinery type management, agricultural machinery management, agricultural machinery appointment management, system management and other functions.

【Keywords】Agricultural mechanical and electrical moves; JAVA; B/S structure

package com.controller;import java.text.SimpleDateFormat;
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.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.NongjijizhuEntity;
import com.entity.view.NongjijizhuView;import com.service.NongjijizhuService;
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 2022-04-18 15:38:13*/
@RestController
@RequestMapping("/nongjijizhu")
public class NongjijizhuController {@Autowiredprivate NongjijizhuService nongjijizhuService;@Autowiredprivate TokenService tokenService;/*** 登录*/@IgnoreAuth@RequestMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {NongjijizhuEntity user = nongjijizhuService.selectOne(new EntityWrapper<NongjijizhuEntity>().eq("jizhuzhanghao", username));if(user==null || !user.getMima().equals(password)) {return R.error("账号或密码不正确");}String token = tokenService.generateToken(user.getId(), username,"nongjijizhu",  "农机机主" );return R.ok().put("token", token);}/*** 注册*/@IgnoreAuth@RequestMapping("/register")public R register(@RequestBody NongjijizhuEntity nongjijizhu){//ValidatorUtils.validateEntity(nongjijizhu);NongjijizhuEntity user = nongjijizhuService.selectOne(new EntityWrapper<NongjijizhuEntity>().eq("jizhuzhanghao", nongjijizhu.getJizhuzhanghao()));if(user!=null) {return R.error("注册用户已存在");}Long uId = new Date().getTime();nongjijizhu.setId(uId);nongjijizhuService.insert(nongjijizhu);return R.ok();}/*** 退出*/@RequestMapping("/logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 获取用户的session用户信息*/@RequestMapping("/session")public R getCurrUser(HttpServletRequest request){Long id = (Long)request.getSession().getAttribute("userId");NongjijizhuEntity user = nongjijizhuService.selectById(id);return R.ok().put("data", user);}/*** 密码重置*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request){NongjijizhuEntity user = nongjijizhuService.selectOne(new EntityWrapper<NongjijizhuEntity>().eq("jizhuzhanghao", username));if(user==null) {return R.error("账号不存在");}user.setMima("123456");nongjijizhuService.updateById(user);return R.ok("密码已重置为:123456");}/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,NongjijizhuEntity nongjijizhu,HttpServletRequest request){EntityWrapper<NongjijizhuEntity> ew = new EntityWrapper<NongjijizhuEntity>();PageUtils page = nongjijizhuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, nongjijizhu), params), params));return R.ok().put("data", page);}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,NongjijizhuEntity nongjijizhu, HttpServletRequest request){EntityWrapper<NongjijizhuEntity> ew = new EntityWrapper<NongjijizhuEntity>();PageUtils page = nongjijizhuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, nongjijizhu), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( NongjijizhuEntity nongjijizhu){EntityWrapper<NongjijizhuEntity> ew = new EntityWrapper<NongjijizhuEntity>();ew.allEq(MPUtil.allEQMapPre( nongjijizhu, "nongjijizhu")); return R.ok().put("data", nongjijizhuService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(NongjijizhuEntity nongjijizhu){EntityWrapper< NongjijizhuEntity> ew = new EntityWrapper< NongjijizhuEntity>();ew.allEq(MPUtil.allEQMapPre( nongjijizhu, "nongjijizhu")); NongjijizhuView nongjijizhuView =  nongjijizhuService.selectView(ew);return R.ok("查询农机机主成功").put("data", nongjijizhuView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){NongjijizhuEntity nongjijizhu = nongjijizhuService.selectById(id);return R.ok().put("data", nongjijizhu);}/*** 前端详情*/@IgnoreAuth@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){NongjijizhuEntity nongjijizhu = nongjijizhuService.selectById(id);return R.ok().put("data", nongjijizhu);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody NongjijizhuEntity nongjijizhu, HttpServletRequest request){nongjijizhu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(nongjijizhu);NongjijizhuEntity user = nongjijizhuService.selectOne(new EntityWrapper<NongjijizhuEntity>().eq("jizhuzhanghao", nongjijizhu.getJizhuzhanghao()));if(user!=null) {return R.error("用户已存在");}nongjijizhu.setId(new Date().getTime());nongjijizhuService.insert(nongjijizhu);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody NongjijizhuEntity nongjijizhu, HttpServletRequest request){nongjijizhu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(nongjijizhu);NongjijizhuEntity user = nongjijizhuService.selectOne(new EntityWrapper<NongjijizhuEntity>().eq("jizhuzhanghao", nongjijizhu.getJizhuzhanghao()));if(user!=null) {return R.error("用户已存在");}nongjijizhu.setId(new Date().getTime());nongjijizhuService.insert(nongjijizhu);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody NongjijizhuEntity nongjijizhu, HttpServletRequest request){//ValidatorUtils.validateEntity(nongjijizhu);nongjijizhuService.updateById(nongjijizhu);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){nongjijizhuService.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<NongjijizhuEntity> wrapper = new EntityWrapper<NongjijizhuEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}int count = nongjijizhuService.selectCount(wrapper);return R.ok().put("count", count);}}
package com.controller;import java.text.SimpleDateFormat;
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.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.ShiyongzheEntity;
import com.entity.view.ShiyongzheView;import com.service.ShiyongzheService;
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 2022-04-18 15:38:13*/
@RestController
@RequestMapping("/shiyongzhe")
public class ShiyongzheController {@Autowiredprivate ShiyongzheService shiyongzheService;@Autowiredprivate TokenService tokenService;/*** 登录*/@IgnoreAuth@RequestMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {ShiyongzheEntity user = shiyongzheService.selectOne(new EntityWrapper<ShiyongzheEntity>().eq("yonghuming", username));if(user==null || !user.getMima().equals(password)) {return R.error("账号或密码不正确");}String token = tokenService.generateToken(user.getId(), username,"shiyongzhe",  "使用者" );return R.ok().put("token", token);}/*** 注册*/@IgnoreAuth@RequestMapping("/register")public R register(@RequestBody ShiyongzheEntity shiyongzhe){//ValidatorUtils.validateEntity(shiyongzhe);ShiyongzheEntity user = shiyongzheService.selectOne(new EntityWrapper<ShiyongzheEntity>().eq("yonghuming", shiyongzhe.getYonghuming()));if(user!=null) {return R.error("注册用户已存在");}Long uId = new Date().getTime();shiyongzhe.setId(uId);shiyongzheService.insert(shiyongzhe);return R.ok();}/*** 退出*/@RequestMapping("/logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 获取用户的session用户信息*/@RequestMapping("/session")public R getCurrUser(HttpServletRequest request){Long id = (Long)request.getSession().getAttribute("userId");ShiyongzheEntity user = shiyongzheService.selectById(id);return R.ok().put("data", user);}/*** 密码重置*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request){ShiyongzheEntity user = shiyongzheService.selectOne(new EntityWrapper<ShiyongzheEntity>().eq("yonghuming", username));if(user==null) {return R.error("账号不存在");}user.setMima("123456");shiyongzheService.updateById(user);return R.ok("密码已重置为:123456");}/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,ShiyongzheEntity shiyongzhe,HttpServletRequest request){EntityWrapper<ShiyongzheEntity> ew = new EntityWrapper<ShiyongzheEntity>();PageUtils page = shiyongzheService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shiyongzhe), params), params));return R.ok().put("data", page);}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,ShiyongzheEntity shiyongzhe, HttpServletRequest request){EntityWrapper<ShiyongzheEntity> ew = new EntityWrapper<ShiyongzheEntity>();PageUtils page = shiyongzheService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shiyongzhe), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( ShiyongzheEntity shiyongzhe){EntityWrapper<ShiyongzheEntity> ew = new EntityWrapper<ShiyongzheEntity>();ew.allEq(MPUtil.allEQMapPre( shiyongzhe, "shiyongzhe")); return R.ok().put("data", shiyongzheService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(ShiyongzheEntity shiyongzhe){EntityWrapper< ShiyongzheEntity> ew = new EntityWrapper< ShiyongzheEntity>();ew.allEq(MPUtil.allEQMapPre( shiyongzhe, "shiyongzhe")); ShiyongzheView shiyongzheView =  shiyongzheService.selectView(ew);return R.ok("查询使用者成功").put("data", shiyongzheView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){ShiyongzheEntity shiyongzhe = shiyongzheService.selectById(id);return R.ok().put("data", shiyongzhe);}/*** 前端详情*/@IgnoreAuth@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){ShiyongzheEntity shiyongzhe = shiyongzheService.selectById(id);return R.ok().put("data", shiyongzhe);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody ShiyongzheEntity shiyongzhe, HttpServletRequest request){shiyongzhe.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(shiyongzhe);ShiyongzheEntity user = shiyongzheService.selectOne(new EntityWrapper<ShiyongzheEntity>().eq("yonghuming", shiyongzhe.getYonghuming()));if(user!=null) {return R.error("用户已存在");}shiyongzhe.setId(new Date().getTime());shiyongzheService.insert(shiyongzhe);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody ShiyongzheEntity shiyongzhe, HttpServletRequest request){shiyongzhe.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(shiyongzhe);ShiyongzheEntity user = shiyongzheService.selectOne(new EntityWrapper<ShiyongzheEntity>().eq("yonghuming", shiyongzhe.getYonghuming()));if(user!=null) {return R.error("用户已存在");}shiyongzhe.setId(new Date().getTime());shiyongzheService.insert(shiyongzhe);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody ShiyongzheEntity shiyongzhe, HttpServletRequest request){//ValidatorUtils.validateEntity(shiyongzhe);shiyongzheService.updateById(shiyongzhe);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){shiyongzheService.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<ShiyongzheEntity> wrapper = new EntityWrapper<ShiyongzheEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}int count = shiyongzheService.selectCount(wrapper);return R.ok().put("count", count);}}

这篇关于springboot农机电招平台源码和论文的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/640993

相关文章

JVM 的类初始化机制

前言 当你在 Java 程序中new对象时,有没有考虑过 JVM 是如何把静态的字节码(byte code)转化为运行时对象的呢,这个问题看似简单,但清楚的同学相信也不会太多,这篇文章首先介绍 JVM 类初始化的机制,然后给出几个易出错的实例来分析,帮助大家更好理解这个知识点。 JVM 将字节码转化为运行时对象分为三个阶段,分别是:loading 、Linking、initialization

Spring Security 基于表达式的权限控制

前言 spring security 3.0已经可以使用spring el表达式来控制授权,允许在表达式中使用复杂的布尔逻辑来控制访问的权限。 常见的表达式 Spring Security可用表达式对象的基类是SecurityExpressionRoot。 表达式描述hasRole([role])用户拥有制定的角色时返回true (Spring security默认会带有ROLE_前缀),去

浅析Spring Security认证过程

类图 为了方便理解Spring Security认证流程,特意画了如下的类图,包含相关的核心认证类 概述 核心验证器 AuthenticationManager 该对象提供了认证方法的入口,接收一个Authentiaton对象作为参数; public interface AuthenticationManager {Authentication authenticate(Authenti

Spring Security--Architecture Overview

1 核心组件 这一节主要介绍一些在Spring Security中常见且核心的Java类,它们之间的依赖,构建起了整个框架。想要理解整个架构,最起码得对这些类眼熟。 1.1 SecurityContextHolder SecurityContextHolder用于存储安全上下文(security context)的信息。当前操作的用户是谁,该用户是否已经被认证,他拥有哪些角色权限…这些都被保

Spring Security基于数据库验证流程详解

Spring Security 校验流程图 相关解释说明(认真看哦) AbstractAuthenticationProcessingFilter 抽象类 /*** 调用 #requiresAuthentication(HttpServletRequest, HttpServletResponse) 决定是否需要进行验证操作。* 如果需要验证,则会调用 #attemptAuthentica

Spring Security 从入门到进阶系列教程

Spring Security 入门系列 《保护 Web 应用的安全》 《Spring-Security-入门(一):登录与退出》 《Spring-Security-入门(二):基于数据库验证》 《Spring-Security-入门(三):密码加密》 《Spring-Security-入门(四):自定义-Filter》 《Spring-Security-入门(五):在 Sprin

Java架构师知识体认识

源码分析 常用设计模式 Proxy代理模式Factory工厂模式Singleton单例模式Delegate委派模式Strategy策略模式Prototype原型模式Template模板模式 Spring5 beans 接口实例化代理Bean操作 Context Ioc容器设计原理及高级特性Aop设计原理Factorybean与Beanfactory Transaction 声明式事物

流媒体平台/视频监控/安防视频汇聚EasyCVR播放暂停后视频画面黑屏是什么原因?

视频智能分析/视频监控/安防监控综合管理系统EasyCVR视频汇聚融合平台,是TSINGSEE青犀视频垂直深耕音视频流媒体技术、AI智能技术领域的杰出成果。该平台以其强大的视频处理、汇聚与融合能力,在构建全栈视频监控系统中展现出了独特的优势。视频监控管理系统EasyCVR平台内置了强大的视频解码、转码、压缩等技术,能够处理多种视频流格式,并以多种格式(RTMP、RTSP、HTTP-FLV、WebS

Java进阶13讲__第12讲_1/2

多线程、线程池 1.  线程概念 1.1  什么是线程 1.2  线程的好处 2.   创建线程的三种方式 注意事项 2.1  继承Thread类 2.1.1 认识  2.1.2  编码实现  package cn.hdc.oop10.Thread;import org.slf4j.Logger;import org.slf4j.LoggerFactory

综合安防管理平台LntonAIServer视频监控汇聚抖动检测算法优势

LntonAIServer视频质量诊断功能中的抖动检测是一个专门针对视频稳定性进行分析的功能。抖动通常是指视频帧之间的不必要运动,这种运动可能是由于摄像机的移动、传输中的错误或编解码问题导致的。抖动检测对于确保视频内容的平滑性和观看体验至关重要。 优势 1. 提高图像质量 - 清晰度提升:减少抖动,提高图像的清晰度和细节表现力,使得监控画面更加真实可信。 - 细节增强:在低光条件下,抖