Springboot+Vue+小程序+基于微信小程序护农远程看护系统

         开发平台为idea,maven管理工具,Mybatis操作数据库,根据市场数字化需要为农户打造小程序可远程查看农场的种植情况。项目是调试,讲解服务均可有偿获取,需要可在最下方QQ二维码处联系我。

Springboot+Vue+小程序,基于微信小程序的农场信息管理系统。数据库Mysql,17张表。
前台可以查阅接受保护的农产品。
后台对请求进行管理。
后台管理功能有。
1.农户管理
2.农产品展示
3.产品类型
4.农产品订单管理
5.预采摘登记管理
6.远程看护管理
7.蔬果类型管理
8.播种管理
9.施肥信息管理
10.浇水管理
11.轮播图管理,农业活动及活动分类管理。
12.个人信息管理。

         

                 

                                  

部分数据库设计:

表名:nongchanpindingdan

功能:农产品订单

字段名称

类型

长度

字段说明

主键

默认值

id

bigint

主键

  主键

addtime

timestamp

创建时间

CURRENT_TIMESTAMP

dingdanbianhao

varchar

200

订单编号

chanpinmingcheng

varchar

200

产品名称

chanpinleixing

varchar

200

产品类型

chanpintupian

longtext

4294967295

产品图片

chandi

varchar

200

产地

guige

varchar

200

规格

shuliang

int

数量

jiage

int

价格

zonge

double

总额

goumaishijian

datetime

购买时间

dingdanbeizhu

varchar

200

订单备注

shouhuodizhi

varchar

200

收货地址

youkexingming

varchar

200

游客姓名

nonghuzhanghao

varchar

200

农户账号

nonghuxingming

varchar

200

农户姓名

表名:newstype

功能:农业活动分类

字段名称

类型

长度

字段说明

主键

默认值

id

bigint

主键

  主键

addtime

timestamp

创建时间

CURRENT_TIMESTAMP

typename

varchar

200

分类名称

表名:yucaizhaidengji

功能:预采摘登记

字段名称

类型

长度

字段说明

主键

默认值

id

bigint

主键

  主键

addtime

timestamp

创建时间

CURRENT_TIMESTAMP

caizhaichanpin

varchar

200

采摘产品

caizhaishijian

datetime

采摘时间

caizhaididian

varchar

200

采摘地点

caizhairenshu

int

采摘人数

caizhaigongju

varchar

200

采摘工具

caizhaitupian

longtext

4294967295

采摘图片

nonghuzhanghao

varchar

200

农户账号

nonghuxingming

varchar

200

农户姓名

表名:news

功能:农业活动

字段名称

类型

长度

字段说明

主键

默认值

id

bigint

主键

  主键

addtime

timestamp

创建时间

CURRENT_TIMESTAMP

title

varchar

200

标题

introduction

longtext

4294967295

简介

typename

varchar

200

分类名称

name

varchar

200

发布人

headportrait

longtext

4294967295

头像

clicknum

int

点击次数

0

clicktime

datetime

最近点击时间

thumbsupnum

int

0

crazilynum

int

0

storeupnum

int

收藏数

0

picture

longtext

4294967295

图片

content

longtext

4294967295

内容

代码示例:

1.农产品增删改查模块

package com.controller;import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;import com.entity.NonghuEntity;
import com.service.NonghuService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
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.annotation.IgnoreAuth;import com.entity.NongchanpinzhanshiEntity;
import com.entity.view.NongchanpinzhanshiView;import com.service.NongchanpinzhanshiService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MPUtil;/*** 农产品展示* 后端接口*/
@RestController
@RequestMapping("/nongchanpinzhanshi")
public class NongchanpinzhanshiController {@Autowiredprivate NonghuService nonghuService;@Autowiredprivate NongchanpinzhanshiService nongchanpinzhanshiService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params, NongchanpinzhanshiEntity nongchanpinzhanshi,HttpServletRequest request) {String tableName = request.getSession().getAttribute("tableName").toString();if (tableName.equals("nonghu")) {nongchanpinzhanshi.setNonghuzhanghao((String) request.getSession().getAttribute("username"));}EntityWrapper<NongchanpinzhanshiEntity> ew = new EntityWrapper<>();PageUtils page = nongchanpinzhanshiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, nongchanpinzhanshi), params), params));return R.ok().put("data", page);}/*** 前端列表*/@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params, NongchanpinzhanshiEntity nongchanpinzhanshi,HttpServletRequest request) {String tableName = request.getSession().getAttribute("tableName").toString();if (tableName.equals("nonghu")) {nongchanpinzhanshi.setNonghuzhanghao((String) request.getSession().getAttribute("username"));}EntityWrapper<NongchanpinzhanshiEntity> ew = new EntityWrapper<>();PageUtils page = nongchanpinzhanshiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, nongchanpinzhanshi), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list(NongchanpinzhanshiEntity nongchanpinzhanshi) {EntityWrapper<NongchanpinzhanshiEntity> ew = new EntityWrapper<>();ew.allEq(MPUtil.allEQMapPre(nongchanpinzhanshi, "nongchanpinzhanshi"));return R.ok().put("data", nongchanpinzhanshiService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(NongchanpinzhanshiEntity nongchanpinzhanshi) {EntityWrapper<NongchanpinzhanshiEntity> ew = new EntityWrapper<>();ew.allEq(MPUtil.allEQMapPre(nongchanpinzhanshi, "nongchanpinzhanshi"));NongchanpinzhanshiView nongchanpinzhanshiView = nongchanpinzhanshiService.selectView(ew);return R.ok("查询农产品展示成功").put("data", nongchanpinzhanshiView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id) {NongchanpinzhanshiEntity nongchanpinzhanshi = nongchanpinzhanshiService.selectById(id);nongchanpinzhanshi.setClicknum(nongchanpinzhanshi.getClicknum() + 1);nongchanpinzhanshi.setClicktime(new Date());nongchanpinzhanshiService.updateById(nongchanpinzhanshi);nongchanpinzhanshi = nongchanpinzhanshiService.selectView(new EntityWrapper<NongchanpinzhanshiEntity>().eq("id", id));return R.ok().put("data", nongchanpinzhanshi);}/*** 前端详情*/@IgnoreAuth@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id) {NongchanpinzhanshiEntity nongchanpinzhanshi = nongchanpinzhanshiService.selectById(id);nongchanpinzhanshi.setClicknum(nongchanpinzhanshi.getClicknum() + 1);nongchanpinzhanshi.setClicktime(new Date());nongchanpinzhanshiService.updateById(nongchanpinzhanshi);nongchanpinzhanshi = nongchanpinzhanshiService.selectView(new EntityWrapper<NongchanpinzhanshiEntity>().eq("id", id));return R.ok().put("data", nongchanpinzhanshi);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody NongchanpinzhanshiEntity nongchanpinzhanshi, HttpServletRequest request) {NonghuEntity nonghu = nonghuService.selectOne(new EntityWrapper<NonghuEntity>().eq("nonghuzhanghao", nongchanpinzhanshi.getNonghuzhanghao()).eq("nonghuxingming", nongchanpinzhanshi.getNonghuxingming()));if (ObjectUtils.isEmpty(nonghu)) {return R.error(404, "该账户不存在,请确认农户账号姓名");}nongchanpinzhanshiService.insert(nongchanpinzhanshi);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody NongchanpinzhanshiEntity nongchanpinzhanshi, HttpServletRequest request) {nongchanpinzhanshi.setUserid((Long) request.getSession().getAttribute("userId"));nongchanpinzhanshiService.insert(nongchanpinzhanshi);return R.ok();}/*** 修改*/@RequestMapping("/update")@Transactionalpublic R update(@RequestBody NongchanpinzhanshiEntity nongchanpinzhanshi, HttpServletRequest request) {nongchanpinzhanshiService.updateById(nongchanpinzhanshi);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids) {nongchanpinzhanshiService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 前端智能排序*/@IgnoreAuth@RequestMapping("/autoSort")public R autoSort(@RequestParam Map<String, Object> params, NongchanpinzhanshiEntity nongchanpinzhanshi, HttpServletRequest request, String pre) {EntityWrapper<NongchanpinzhanshiEntity> ew = new EntityWrapper<NongchanpinzhanshiEntity>();Map<String, Object> newMap = new HashMap<String, Object>();Map<String, Object> param = new HashMap<String, Object>();Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();while (it.hasNext()) {Map.Entry<String, Object> entry = it.next();String key = entry.getKey();String newKey = entry.getKey();if (pre.endsWith(".")) {newMap.put(pre + newKey, entry.getValue());} else if (StringUtils.isEmpty(pre)) {newMap.put(newKey, entry.getValue());} else {newMap.put(pre + "." + newKey, entry.getValue());}}params.put("sort", "clicknum");params.put("order", "desc");PageUtils page = nongchanpinzhanshiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, nongchanpinzhanshi), params), params));return R.ok().put("data", page);}
}

2.农产品展示实体:

package com.entity.vo;import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;/*** 农产品展示*/
public class NongchanpinzhanshiVO implements Serializable {private static final long serialVersionUID = 1L;/*** 产品类型*/private String chanpinleixing;/*** 产地*/private String chandi;/*** 规格*/private String guige;/*** 数量*/private Integer shuliang;/*** 价格*/private Integer jiage;/*** 采摘日期*/@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")@DateTimeFormatprivate Date caizhairiqi;/*** 保质期*/private String baozhiqi;/*** 产品描述*/private String chanpinmiaoshu;/*** 产品图片*/private String chanpintupian;/*** 农户账号*/private String nonghuzhanghao;/*** 农户姓名*/private String nonghuxingming;/*** 最近点击时间*/@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")@DateTimeFormatprivate Date clicktime;/*** 点击次数*/private Integer clicknum;/*** 用户id*/private Long userid;/*** 设置:产品类型*/public void setChanpinleixing(String chanpinleixing) {this.chanpinleixing = chanpinleixing;}/*** 获取:产品类型*/public String getChanpinleixing() {return chanpinleixing;}/*** 设置:产地*/public void setChandi(String chandi) {this.chandi = chandi;}/*** 获取:产地*/public String getChandi() {return chandi;}/*** 设置:规格*/public void setGuige(String guige) {this.guige = guige;}/*** 获取:规格*/public String getGuige() {return guige;}/*** 设置:数量*/public void setShuliang(Integer shuliang) {this.shuliang = shuliang;}/*** 获取:数量*/public Integer getShuliang() {return shuliang;}/*** 设置:价格*/public void setJiage(Integer jiage) {this.jiage = jiage;}/*** 获取:价格*/public Integer getJiage() {return jiage;}/*** 设置:采摘日期*/public void setCaizhairiqi(Date caizhairiqi) {this.caizhairiqi = caizhairiqi;}/*** 获取:采摘日期*/public Date getCaizhairiqi() {return caizhairiqi;}/*** 设置:保质期*/public void setBaozhiqi(String baozhiqi) {this.baozhiqi = baozhiqi;}/*** 获取:保质期*/public String getBaozhiqi() {return baozhiqi;}/*** 设置:产品描述*/public void setChanpinmiaoshu(String chanpinmiaoshu) {this.chanpinmiaoshu = chanpinmiaoshu;}/*** 获取:产品描述*/public String getChanpinmiaoshu() {return chanpinmiaoshu;}/*** 设置:产品图片*/public void setChanpintupian(String chanpintupian) {this.chanpintupian = chanpintupian;}/*** 获取:产品图片*/public String getChanpintupian() {return chanpintupian;}/*** 设置:农户账号*/public void setNonghuzhanghao(String nonghuzhanghao) {this.nonghuzhanghao = nonghuzhanghao;}/*** 获取:农户账号*/public String getNonghuzhanghao() {return nonghuzhanghao;}/*** 设置:农户姓名*/public void setNonghuxingming(String nonghuxingming) {this.nonghuxingming = nonghuxingming;}/*** 获取:农户姓名*/public String getNonghuxingming() {return nonghuxingming;}/*** 设置:最近点击时间*/public void setClicktime(Date clicktime) {this.clicktime = clicktime;}/*** 获取:最近点击时间*/public Date getClicktime() {return clicktime;}/*** 设置:点击次数*/public void setClicknum(Integer clicknum) {this.clicknum = clicknum;}/*** 获取:点击次数*/public Integer getClicknum() {return clicknum;}/*** 设置:用户id*/public void setUserid(Long userid) {this.userid = userid;}/*** 获取:用户id*/public Long getUserid() {return userid;}
}

                                     

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/diannao/5701.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【UE5】数字人基础

这里主要记录一下自己在实现数字人得过程中涉及导XSens惯性动捕&#xff0c;视频动捕&#xff0c;LiveLinkFace表捕&#xff0c;GRoom物理头发等。 一、导入骨骼网格体 骨骼网格体即模型要在模型雕刻阶段就要雕刻好表捕所需的表情体(blendshape)&#xff0c;后面表捕的效果直…

API安全

一&#xff0c;什么是API API指的是应用程序编程接口&#xff08;Application Programming Interface&#xff09;&#xff0c;是一组定义了软件组件如何相互交互的规范。通过API&#xff0c;不同的软件可以相互通信和交换数据&#xff0c;实现不同软件之间的集成和互操作。 …

代码随想录算法训练营DAY45|C++动态规划Part7|70.爬楼梯(进阶版)、322. 零钱兑换、279.完全平方数

文章目录 70.爬楼梯&#xff08;进阶版&#xff09;322. 零钱兑换思路CPP代码 279.完全平方数思路CPP代码 70.爬楼梯&#xff08;进阶版&#xff09; 卡码网&#xff1a;57. 爬楼梯 文章讲解&#xff1a;70.爬楼梯(进阶版) 322. 零钱兑换 力扣题目链接 文章讲解&#xff1a;322…

llama_index微调BGE模型

微调模型是为了让模型在特殊领域表现良好,帮助其学习到专业术语等。 本文采用llama_index框架微调BGE模型,跑通整个流程,并学习模型微调的方法。 一、环境准备 Linux环境,GPU L20 48G,Python3.8.10。 pip该库即可。 二、数据准备 该框架实现了读取各种类型的文件,给…

LNMP部署及应用(Linux+Nginx+MySQL+PHP)

LNMP 我们为什么采用LNMP这种架构? 采用Linux、PHP、MySQL的优点我们不必多说。 Nginx是一个小巧而高效的Linux下的Web服务器软件&#xff0c;是由 Igor Sysoev 为俄罗斯访问量第二的 Rambler.ru 站点开发的&#xff0c;已经在一些俄罗斯的大型网站上运行多年&#xff0c;目…

数据分析及AI技术在旅游行业的应用

引言 旅游行业是一个充满潜力和机遇的领域&#xff0c;而数据分析和人工智能&#xff08;AI&#xff09;技术的迅猛发展为这个行业带来了前所未有的机遇和挑战。本文将探讨数据分析及AI技术在旅游行业中的具体应用及其带来的影响。 数据分析在旅游行业的4种应用 在旅游行业…

windows编程中的位图操作,界面中插入位图方法

在界面中插入位图&#xff0c;主要用到BitBlt这个函数 BOOL CDC::BitBlt(int x, int y, int width, int height, CDC *src, int src_x, int src_y, DWORD dwRop)用法说明见官方说明 这里要注意的是&#xff0c;这个函数是把源图像从src这个设备上下文传递到目标设备上下文(这…

LangChain:1. Prompt基本使用

1. Prompt基本使用 from langchain_core.prompts import PromptTemplate from langchain_core.prompts import ChatPromptTemplate这里有两种prompt&#xff0c;其对应两种形式&#xff1a;PromptTemplate 和 ChatPromptTemplate 从某种意义来说&#xff0c;前者是一个通用形…

如何从 iPhone 恢复已删除或丢失的联系人?

不小心删除了您的 iPhone 联系人&#xff1f;不用担心。我们将向您展示如何从 iPhone或 iPad恢复已删除或丢失的联系人。当您从 iPhone 中删除联系人时&#xff0c;您可能认为无法将其恢复。但事实是&#xff0c;您可以从 iPhone 或 iPad 恢复已删除的联系人&#xff0c;因为它…

链表经典练习题

目录 前言&#xff1a; 一、反转单链表 二、链表的中间结点 三、合并两个有序链表 四、分割链表 五、约瑟夫问题 六、判断链表是否有环&#xff1f; 七、求环形链表的入口点 八、输入一个链表&#xff0c;输出该链表中倒数第k个结点 九、输入两个链表&#xff0c;找出…

云原生Kubernetes: K8S 1.29版本 部署Sonarqube

一、实验 1.环境 &#xff08;1&#xff09;主机 表1 主机 主机架构版本IP备注masterK8S master节点1.29.0192.168.204.8 node1K8S node节点1.29.0192.168.204.9node2K8S node节点1.29.0192.168.204.10已部署Kuboard &#xff08;2&#xff09;master节点查看集群 1&…

开箱子咸鱼之王H5游戏源码_内购修复优化_附带APK完美运营无bug最终版__GM总运营后台_附带安卓版本

内容目录 一、详细介绍二、效果展示2.效果图展示 三、学习资料下载 一、详细介绍 1.包括原生打包APK&#xff0c;资源全部APK本地化&#xff0c;基本上不跑服务器宽带 2.优化后端&#xff0c;基本上不再一直跑内存&#xff0c;不炸服响应快&#xff01; 3.优化前端&#xff0c…

WSL2-Ubuntu使用Conda配置百度飞浆paddlepaddle虚拟环境

0x00 缘起 本文将介绍在WSL2-Ubuntu系统中,使用Conda配置百度飞浆paddlepaddle虚拟环境中所出现的各种问题以及解决方法,最终运行"run_check()"通过测试。 在WSL2中配置paddlepaddle不像配置Pytorch那样顺滑,会出现各种问题(如:库的文件缺失、不知道如何匹配C…

设计模式-02 设计模式-接口隔离原则案例分析

1.定义 接口隔离原则&#xff08;Interface Segregation Principle&#xff0c;简称 ISP&#xff09;是设计模式中的一个原则&#xff0c;它规定客户端不应该依赖它不使用的方法。 换句话说&#xff0c;接口应该被细分为更小的、更具体的接口&#xff0c;以便客户端只依赖于它…

Hive 与 MySQL 的数据库限制对比

数据库的大小 Hive: 由于Hive是建立在Hadoop生态系统之上&#xff0c;理论上其数据库大小仅受Hadoop分布式文件系统&#xff08;HDFS&#xff09;的限制&#xff0c;可以达到PB级别或更高。MySQL: MySQL数据库的大小受到磁盘空间和文件系统的限制。在实践中&#xff0c;单个实例…

Web后端开发中对三层架构解耦之控制反转与依赖注入

内聚与耦合 内聚 比如说我们刚刚书写的员工的实现类 在这里我们仅仅书写的是和员工相关的代码 而与员工无关的代码都没有放到这里 说明内聚程度较高 耦合 以后软件开发要高内聚 低耦合 提高程序灵活性 扩拓展性 分析代码 如何解耦 创建容器 提供一个容器 存储东西 存储E…

STM32 F103C8T6学习笔记16:1.3寸OLED的驱动显示日历

今天尝试使用STM32 F103C8T6驱动显示 1.3寸的OLED&#xff0c;显示数字、字符串、汉字、图片等 本质与0.96寸的OLED是完全相同的原理&#xff1a; 而且经过我的研究发现: 1.3寸大小的OLED并未比0.96寸的有更多的显示像素点数来显示&#xff0c;也是128*64的像素点数显示: 也…

AI期末复习(PolyU)

文档详见评论链接 Tutorial 2-Search Algorithm Breadth-first search宽度优先搜索 [图片] [图片] open表由queue队列实现&#xff0c;因此加在尾部。 [图片] Depth-first search深度优先搜索 [图片] [图片] open表由stack栈实现&#xff0c;因此加在头部。 [图片] Hill climbi…

【设计模式】之单例模式

系列文章目录 【设计模式】之责任链模式【设计模式】之策略模式【设计模式】之模板方法模式 文章目录 系列文章目录 前言 一、什么是单例模式 二、如何使用单例模式 1.单线程使用 2.多线程使用&#xff08;一&#xff09; 3.多线程使用&#xff08;二&#xff09; 4.多线程使用…

uni框架下的前端小知识

<movable-area> 和 <movable-view> 组件来创建一个可以移动的区域&#xff0c;这通常用于模拟地图或座位图等场景的拖动效果。 1、direction&#xff1a;移动方向&#xff0c;可选值为all、vertical、horizontal分别表示所有方向、垂直、水平方向。 2、inertia&am…