基于ssm智能卤菜销售平台源码和论文

摘 要

随着互联网技术的高速发展,人们生活的各方面都受到互联网技术的影响。现在人们可以通过互联网技术就能实现不出家门就可以通过网络进行系统管理,交易等,而且过程简单、快捷。同样的,在人们的工作生活中,也就需要互联网技术来方便人们的日常工作生活,实现工作办公的自动化处理,实现信息化,无纸化办公。

本智能卤菜销售平台以ssm作为框架,b/s模式以及MySql作为后台运行的数据库,同时使用Tomcat用为系统的服务器。本系统主要包括首页、个人中心、用户管理、商家管理、卤菜分类管理、卤菜信息管理、系统管理等功能,通过这些功能的实现能够基本满足日常智能卤菜销售管理的操作。

关键词:智能卤菜销售平台; ssm;MySql数据库;

基于ssm智能卤菜销售平台源码和论文750

演示视频:

基于ssm智能卤菜销售平台源码和论文


Abstract

With the rapid development of Internet technology, all aspects of people's life are affected by Internet technology. Now people can achieve through Internet technology can not go out of the house through the network system management, trading, and so on, and the process is simple and fast. Similarly, in people's work and life, Internet technology is also needed to facilitate People's Daily work and life, to achieve the automation of work and office, to achieve information, paperless office.

The intelligent stewed vegetables sales platform takes SSM as the framework, B/S mode and MySql as the background database, while Tomcat is used as the server of the system. The system mainly includes home page, personal center, user management, business management, classification management of brine, brine information management, system management and other functions, through the realization of these functions can basically meet the daily intelligent brine sales management operation.

Key words: intelligent brine sales platform; ssm; MySql database;

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 java.io.IOException;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.OrdersEntity;
import com.entity.view.OrdersView;import com.service.OrdersService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;/*** 订单* 后端接口* @author * @email * @date 2022-04-08 09:06:15*/
@RestController
@RequestMapping("/orders")
public class OrdersController {@Autowiredprivate OrdersService ordersService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,OrdersEntity orders, HttpServletRequest request){if(!request.getSession().getAttribute("role").toString().equals("管理员")) {orders.setUserid((Long)request.getSession().getAttribute("userId"));}String tableName = request.getSession().getAttribute("tableName").toString();if(tableName.equals("shangjia")) {orders.setShangjiazhanghao((String)request.getSession().getAttribute("username"));if(orders.getUserid()!=null) {orders.setUserid(null);}}EntityWrapper<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();PageUtils page = ordersService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, orders), params), params));return R.ok().put("data", page);}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,OrdersEntity orders, HttpServletRequest request){EntityWrapper<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();PageUtils page = ordersService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, orders), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( OrdersEntity orders){EntityWrapper<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();ew.allEq(MPUtil.allEQMapPre( orders, "orders")); return R.ok().put("data", ordersService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(OrdersEntity orders){EntityWrapper< OrdersEntity> ew = new EntityWrapper< OrdersEntity>();ew.allEq(MPUtil.allEQMapPre( orders, "orders")); OrdersView ordersView =  ordersService.selectView(ew);return R.ok("查询订单成功").put("data", ordersView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){OrdersEntity orders = ordersService.selectById(id);return R.ok().put("data", orders);}/*** 前端详情*/@IgnoreAuth@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){OrdersEntity orders = ordersService.selectById(id);return R.ok().put("data", orders);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody OrdersEntity orders, HttpServletRequest request){orders.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(orders);orders.setUserid((Long)request.getSession().getAttribute("userId"));ordersService.insert(orders);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody OrdersEntity orders, HttpServletRequest request){orders.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(orders);ordersService.insert(orders);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody OrdersEntity orders, HttpServletRequest request){//ValidatorUtils.validateEntity(orders);ordersService.updateById(orders);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){ordersService.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<OrdersEntity> wrapper = new EntityWrapper<OrdersEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}if(!request.getSession().getAttribute("role").toString().equals("管理员")) {wrapper.eq("userid", (Long)request.getSession().getAttribute("userId"));}String tableName = request.getSession().getAttribute("tableName").toString();if(tableName.equals("shangjia")) {wrapper.eq("shangjiazhanghao", (String)request.getSession().getAttribute("username"));}int count = ordersService.selectCount(wrapper);return R.ok().put("count", count);}/*** (按值统计)*/@RequestMapping("/value/{xColumnName}/{yColumnName}")public R value(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName,HttpServletRequest request) {Map<String, Object> params = new HashMap<String, Object>();params.put("xColumn", xColumnName);params.put("yColumn", yColumnName);EntityWrapper<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();String tableName = request.getSession().getAttribute("tableName").toString();if(tableName.equals("shangjia")) {ew.eq("shangjiazhanghao", (String)request.getSession().getAttribute("username"));}ew.in("status", new String[]{"已支付","已发货","已完成"});List<Map<String, Object>> result = ordersService.selectValue(params, ew);SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");for(Map<String, Object> m : result) {for(String k : m.keySet()) {if(m.get(k) instanceof Date) {m.put(k, sdf.format((Date)m.get(k)));}}}return R.ok().put("data", result);}/*** (按值统计)时间统计类型*/@RequestMapping("/value/{xColumnName}/{yColumnName}/{timeStatType}")public R valueDay(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName, @PathVariable("timeStatType") String timeStatType,HttpServletRequest request) {Map<String, Object> params = new HashMap<String, Object>();params.put("xColumn", xColumnName);params.put("yColumn", yColumnName);params.put("timeStatType", timeStatType);EntityWrapper<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();String tableName = request.getSession().getAttribute("tableName").toString();if(tableName.equals("shangjia")) {ew.eq("shangjiazhanghao", (String)request.getSession().getAttribute("username"));}ew.in("status", new String[]{"已支付","已发货","已完成"});List<Map<String, Object>> result = ordersService.selectTimeStatValue(params, ew);SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");for(Map<String, Object> m : result) {for(String k : m.keySet()) {if(m.get(k) instanceof Date) {m.put(k, sdf.format((Date)m.get(k)));}}}return R.ok().put("data", result);}/*** 分组统计*/@RequestMapping("/group/{columnName}")public R group(@PathVariable("columnName") String columnName,HttpServletRequest request) {Map<String, Object> params = new HashMap<String, Object>();params.put("column", columnName);EntityWrapper<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();String tableName = request.getSession().getAttribute("tableName").toString();if(tableName.equals("shangjia")) {ew.eq("shangjiazhanghao", (String)request.getSession().getAttribute("username"));}ew.in("status", new String[]{"已支付","已发货","已完成"});List<Map<String, Object>> result = ordersService.selectGroup(params, ew);SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");for(Map<String, Object> m : result) {for(String k : m.keySet()) {if(m.get(k) instanceof Date) {m.put(k, sdf.format((Date)m.get(k)));}}}return R.ok().put("data", result);}
}
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 java.io.IOException;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.YonghuEntity;
import com.entity.view.YonghuView;import com.service.YonghuService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;/*** 用户* 后端接口* @author * @email * @date 2022-04-08 09:06:15*/
@RestController
@RequestMapping("/yonghu")
public class YonghuController {@Autowiredprivate YonghuService yonghuService;@Autowiredprivate TokenService tokenService;/*** 登录*/@IgnoreAuth@RequestMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuzhanghao", username));if(user==null || !user.getMima().equals(password)) {return R.error("账号或密码不正确");}String token = tokenService.generateToken(user.getId(), username,"yonghu",  "用户" );return R.ok().put("token", token);}/*** 注册*/@IgnoreAuth@RequestMapping("/register")public R register(@RequestBody YonghuEntity yonghu){//ValidatorUtils.validateEntity(yonghu);YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuzhanghao", yonghu.getYonghuzhanghao()));if(user!=null) {return R.error("注册用户已存在");}Long uId = new Date().getTime();yonghu.setId(uId);yonghuService.insert(yonghu);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");YonghuEntity user = yonghuService.selectById(id);return R.ok().put("data", user);}/*** 密码重置*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request){YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuzhanghao", username));if(user==null) {return R.error("账号不存在");}user.setMima("123456");yonghuService.updateById(user);return R.ok("密码已重置为:123456");}/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,YonghuEntity yonghu, HttpServletRequest request){EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();PageUtils page = yonghuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yonghu), params), params));return R.ok().put("data", page);}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,YonghuEntity yonghu, HttpServletRequest request){EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();PageUtils page = yonghuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yonghu), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( YonghuEntity yonghu){EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();ew.allEq(MPUtil.allEQMapPre( yonghu, "yonghu")); return R.ok().put("data", yonghuService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(YonghuEntity yonghu){EntityWrapper< YonghuEntity> ew = new EntityWrapper< YonghuEntity>();ew.allEq(MPUtil.allEQMapPre( yonghu, "yonghu")); YonghuView yonghuView =  yonghuService.selectView(ew);return R.ok("查询用户成功").put("data", yonghuView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){YonghuEntity yonghu = yonghuService.selectById(id);return R.ok().put("data", yonghu);}/*** 前端详情*/@IgnoreAuth@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){YonghuEntity yonghu = yonghuService.selectById(id);return R.ok().put("data", yonghu);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody YonghuEntity yonghu, HttpServletRequest request){yonghu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(yonghu);YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuzhanghao", yonghu.getYonghuzhanghao()));if(user!=null) {return R.error("用户已存在");}yonghu.setId(new Date().getTime());yonghuService.insert(yonghu);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody YonghuEntity yonghu, HttpServletRequest request){yonghu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(yonghu);YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuzhanghao", yonghu.getYonghuzhanghao()));if(user!=null) {return R.error("用户已存在");}yonghu.setId(new Date().getTime());yonghuService.insert(yonghu);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody YonghuEntity yonghu, HttpServletRequest request){//ValidatorUtils.validateEntity(yonghu);yonghuService.updateById(yonghu);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){yonghuService.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<YonghuEntity> wrapper = new EntityWrapper<YonghuEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}int count = yonghuService.selectCount(wrapper);return R.ok().put("count", count);}}

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

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

相关文章

Keil 编译输出信息分析:Program size: Code, RO-data , RW-data, ZI-data

一般 MCU 包含的存储空间有&#xff1a;片内 Flash 与片内 RAM&#xff0c;RAM 相当于内存&#xff0c;Flash 相当于硬盘。编译器会将一个程序分类为好几个部分&#xff0c;分别存储在 MCU 不同的存储区。 如图所示&#xff0c;在Keil中编译工程成功后&#xff0c;在下面的Bul…

2023-12-05 Qt学习总结9

点击 <C 语言编程核心突破> 快速C语言入门 Qt学习总结 前言二十五 QFile文件操作总结 前言 要解决问题: 学习qt最核心知识, 多一个都不学. 二十五 QFile文件操作 QFile是Qt提供的文件读写类&#xff0c;支持对文件进行读写、复制、重命名、删除等操作。常用C函数如下&…

视频流什么意思?其工作原理和挑战有什么

流媒体是一种通过互联网传输&#xff0c;将音频、视频等多媒体内容从存储设备传输到另一个设备的技术。与传统下载方式不同&#xff0c;流媒体可以实现边下边播&#xff0c;用户无需等待完整文件下载即可开始观看&#xff0c;同时具有流畅体验。流媒体的优点在于方便快捷&#…

云渲染对高层住宅立面渲染图优势、作用、影响

建筑设计不仅仅是技术的展现&#xff0c;更是一种艺术表达。在这个过程中&#xff0c;立面渲染图扮演着至关重要的角色&#xff0c;它能生动地将设计师的创新意图和细节呈现给观众&#xff0c;让他们感受设计的美学与功能性。得益于科技的不断发展&#xff0c;云渲染现在已经成…

短链接技术探究与应用

一、引言 在互联网世界中&#xff0c;URL&#xff08;统一资源定位符&#xff09;是网络资源的标识&#xff0c;但由于URL的长度限制和不易记忆等问题&#xff0c;短链接应运而生。短链接是一种将长URL转换为短地址的技术&#xff0c;不仅提高了用户体验&#xff0c;还为网站运…

用户管理第2节课 -- idea 2023.2 创建表

一、懂得 1.1编码格式是防止乱码的&#xff0c;utf-8是完全够的&#xff0c;那几个基本没差别 网址&#xff1a; 【IDEA——连接MySQL数据库&#xff0c;创建库和表】_idea中数据库-CSDN博客 这些是MySQL数据库中的一些术语&#xff0c;可以简单解释如下&#xff1a; 1、col…

自定义日志打印功能--C++

一、介绍 日志是计算机程序中用于记录运行时事件和状态的重要工具。通过记录关键信息和错误情况&#xff0c;日志可以帮助程序开发人员和维护人员追踪程序的执行过程&#xff0c;排查问题和改进性能。 在软件开发中&#xff0c;日志通常记录如下类型的信息&#xff1a; 事件信…

星融元携手合作伙伴探索开放网络之旅

12月8日&#xff0c;星融元数据技术有限公司&#xff08;下文简称“星融元”&#xff09;与核心合作伙伴的“开放网络之旅”主题活动在苏州顺利举办。此次活动中星融元分享了公司发展历程、开放网络在国内外的趋势及星融元软硬件上的核心创新技术&#xff0c;多家合作伙伴一起探…

鱼fish数据集VOC+yolo-1400张(labelImg标注)

鱼类&#xff0c;是最古老的脊椎动物。易蓄积重金属。 部分不同染色体数目的杂交的后代依然有生育能力。它们几乎栖居于地球上所有的水生环境&#xff0c;从淡水的湖泊、河流到咸水的大海和大洋。 今天要介绍鱼的数据集。 数据集名称&#xff1a;鱼 fish 数据集格式&#xf…

运动重定向:C-3PO-v1

TeachMe: Three-phase learning framework for robotic motion imitation based on interactive teaching and reinforcement learning解析 摘要1. 简介2. 相关工作2.1 基于编码器-解码器的架构2.2 强化学习 3. 方法3.1 问题表述3.2 NTU-DB3.3 阶段1: 编码器和解码器3.4 阶段2:…

系列二十七、Apache Jmeter使用

一、安装 下载安装包>解压到指定目录>双击打开D:\Programs\apache-jmeter-5.5\bin\ApacheJmeter.jar即可。我分享的ApacheJmeter链接&#xff1a; 链接&#xff1a;https://pan.baidu.com/s/1VI7f3buIWZbQEeq2CRbwlg?pwdyyds 提取码&#xff1a;yyds 二、使用 2.1、添…

三天精通Selenium Web 自动化 - Selenium(Java)环境搭建

1 下载JDK JDK下载地址&#xff1a;http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html 2 安装和配置JDK 安装目录尽量不要有空格 D:\Java\jdk1.8.0_91; D:\Java\jre8设置环境变量&#xff1a; “我的电脑”->右键->“属性”->…