ssm+vue社区生鲜电商平台源码和论文

2024-02-25 12:40

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

ssm+vue社区生鲜电商平台源码和论文304

 开发工具:idea 或eclipse
 数据库mysql5.7+
 数据库链接工具:navcat,小海豚等
  技术:ssm

摘  要

社区生鲜电商平台是以社区生鲜电商平台为事例而开发的,系统以实际运用为开发背景,基于SSM框架,MYSQL数据库设计开发,充分保证系统的稳定性。系统具有界面清晰、操作简单,功能齐全的特点,使得社区生鲜电商平台工作系统化、规范化、高效化。

功能有管理员和用户两个角色。管理员功能有个人中心,用户管理,员工信息管理,商品分类管理,商品信息管理,订单评价管理,系统管理,订单管理等。

用户功能有个人中心,订单评价管理,我的收藏管理,订单管理等。

本系统的使用使管理人员从繁重的工作中解脱出来,实现无纸化办公,能够有效的提高社区生鲜电商平台效率。

[关键词]社区生鲜电商平台B/S架构;SSM框架;MYSQL数据库

Abstract

This community fresh food e-commerce platform is developed based on the community fresh food e-commerce platform as an example. The system is developed with practical application as the background, based on the SSM framework and MYSQL database design and development, which fully guarantees the stability of the system. The system has the characteristics of clear interface, simple operation and complete functions, which makes the work of the community fresh food e-commerce platform systematized, standardized and efficient.

The function has two roles: administrator and user. Administrator functions include personal center, user management, employee information management, product classification management, product information management, order evaluation management, system management, order management, etc.

User functions include personal center, order evaluation management, my collection management, order management, etc.

The use of this system frees managers from heavy work, realizes paperless office, and can effectively improve the efficiency of community fresh food e-commerce platforms.

[Keywords]: Community fresh food e-commerce platform; B/S architecture; SSM framework; 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 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.DingdanpingjiaEntity;
import com.entity.view.DingdanpingjiaView;import com.service.DingdanpingjiaService;
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 2021-04-25 10:42:40*/
@RestController
@RequestMapping("/dingdanpingjia")
public class DingdanpingjiaController {@Autowiredprivate DingdanpingjiaService dingdanpingjiaService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,DingdanpingjiaEntity dingdanpingjia, HttpServletRequest request){String tableName = request.getSession().getAttribute("tableName").toString();if(tableName.equals("yonghu")) {dingdanpingjia.setYonghuming((String)request.getSession().getAttribute("username"));}EntityWrapper<DingdanpingjiaEntity> ew = new EntityWrapper<DingdanpingjiaEntity>();PageUtils page = dingdanpingjiaService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, dingdanpingjia), params), params));return R.ok().put("data", page);}/*** 前端列表*/@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,DingdanpingjiaEntity dingdanpingjia, HttpServletRequest request){EntityWrapper<DingdanpingjiaEntity> ew = new EntityWrapper<DingdanpingjiaEntity>();PageUtils page = dingdanpingjiaService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, dingdanpingjia), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( DingdanpingjiaEntity dingdanpingjia){EntityWrapper<DingdanpingjiaEntity> ew = new EntityWrapper<DingdanpingjiaEntity>();ew.allEq(MPUtil.allEQMapPre( dingdanpingjia, "dingdanpingjia")); return R.ok().put("data", dingdanpingjiaService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(DingdanpingjiaEntity dingdanpingjia){EntityWrapper< DingdanpingjiaEntity> ew = new EntityWrapper< DingdanpingjiaEntity>();ew.allEq(MPUtil.allEQMapPre( dingdanpingjia, "dingdanpingjia")); DingdanpingjiaView dingdanpingjiaView =  dingdanpingjiaService.selectView(ew);return R.ok("查询订单评价成功").put("data", dingdanpingjiaView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){DingdanpingjiaEntity dingdanpingjia = dingdanpingjiaService.selectById(id);return R.ok().put("data", dingdanpingjia);}/*** 前端详情*/@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){DingdanpingjiaEntity dingdanpingjia = dingdanpingjiaService.selectById(id);return R.ok().put("data", dingdanpingjia);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody DingdanpingjiaEntity dingdanpingjia, HttpServletRequest request){dingdanpingjia.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(dingdanpingjia);dingdanpingjiaService.insert(dingdanpingjia);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody DingdanpingjiaEntity dingdanpingjia, HttpServletRequest request){dingdanpingjia.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(dingdanpingjia);dingdanpingjiaService.insert(dingdanpingjia);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody DingdanpingjiaEntity dingdanpingjia, HttpServletRequest request){//ValidatorUtils.validateEntity(dingdanpingjia);dingdanpingjiaService.updateById(dingdanpingjia);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){dingdanpingjiaService.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<DingdanpingjiaEntity> wrapper = new EntityWrapper<DingdanpingjiaEntity>();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("yonghu")) {wrapper.eq("yonghuming", (String)request.getSession().getAttribute("username"));}int count = dingdanpingjiaService.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.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 2021-04-25 10:42:40*/
@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"));}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("/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);}/*** 前端详情*/@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"));}int count = ordersService.selectCount(wrapper);return R.ok().put("count", count);}}

这篇关于ssm+vue社区生鲜电商平台源码和论文的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



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

相关文章

vue解决子组件样式覆盖问题scoped deep

《vue解决子组件样式覆盖问题scopeddeep》文章主要介绍了在Vue项目中处理全局样式和局部样式的方法,包括使用scoped属性和深度选择器(/deep/)来覆盖子组件的样式,作者建议所有组件... 目录前言scoped分析deep分析使用总结所有组件必须加scoped父组件覆盖子组件使用deep前言

VUE动态绑定class类的三种常用方式及适用场景详解

《VUE动态绑定class类的三种常用方式及适用场景详解》文章介绍了在实际开发中动态绑定class的三种常见情况及其解决方案,包括根据不同的返回值渲染不同的class样式、给模块添加基础样式以及根据设... 目录前言1.动态选择class样式(对象添加:情景一)2.动态添加一个class样式(字符串添加:情

spring6+JDK17实现SSM起步配置文件

《spring6+JDK17实现SSM起步配置文件》本文介绍了使用Spring6和JDK17配置SSM(Spring+SpringMVC+MyBatis)框架,文中通过示例代码介绍的非常详细,对大家的... 目录1.配置POM文件2.在resource目录下新建beans.XML文件,用于配置spirng3

Java汇编源码如何查看环境搭建

《Java汇编源码如何查看环境搭建》:本文主要介绍如何在IntelliJIDEA开发环境中搭建字节码和汇编环境,以便更好地进行代码调优和JVM学习,首先,介绍了如何配置IntelliJIDEA以方... 目录一、简介二、在IDEA开发环境中搭建汇编环境2.1 在IDEA中搭建字节码查看环境2.1.1 搭建步

React实现原生APP切换效果

《React实现原生APP切换效果》最近需要使用Hybrid的方式开发一个APP,交互和原生APP相似并且需要IM通信,本文给大家介绍了使用React实现原生APP切换效果,文中通过代码示例讲解的非常... 目录背景需求概览技术栈实现步骤根据 react-router-dom 文档配置好路由添加过渡动画使用

使用Vue.js报错:ReferenceError: “Vue is not defined“ 的原因与解决方案

《使用Vue.js报错:ReferenceError:“Vueisnotdefined“的原因与解决方案》在前端开发中,ReferenceError:Vueisnotdefined是一个常见... 目录一、错误描述二、错误成因分析三、解决方案1. 检查 vue.js 的引入方式2. 验证 npm 安装3.

vue如何监听对象或者数组某个属性的变化详解

《vue如何监听对象或者数组某个属性的变化详解》这篇文章主要给大家介绍了关于vue如何监听对象或者数组某个属性的变化,在Vue.js中可以通过watch监听属性变化并动态修改其他属性的值,watch通... 目录前言用watch监听深度监听使用计算属性watch和计算属性的区别在vue 3中使用watchE

python解析HTML并提取span标签中的文本

《python解析HTML并提取span标签中的文本》在网页开发和数据抓取过程中,我们经常需要从HTML页面中提取信息,尤其是span元素中的文本,span标签是一个行内元素,通常用于包装一小段文本或... 目录一、安装相关依赖二、html 页面结构三、使用 BeautifulSoup javascript

Vue3 的 shallowRef 和 shallowReactive:优化性能

大家对 Vue3 的 ref 和 reactive 都很熟悉,那么对 shallowRef 和 shallowReactive 是否了解呢? 在编程和数据结构中,“shallow”(浅层)通常指对数据结构的最外层进行操作,而不递归地处理其内部或嵌套的数据。这种处理方式关注的是数据结构的第一层属性或元素,而忽略更深层次的嵌套内容。 1. 浅层与深层的对比 1.1 浅层(Shallow) 定义

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

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