基于ssm农产品果蔬商城java农产品销售系统

基于ssm农产品果蔬商城java农产品销售系统源码和论文PPT开题报告

21世纪的到来,国家的方方面面、各行各业都在努力与现代的先进技术接轨,智能科技时代崛起的优势,ssm有机蔬菜销售系统当然也不能排除在外。ssm有机蔬菜销售系统是以实际运用为开发背景,运用软件工程开发方法,采用SSM技术构建的一个管理系统。整个开发过程首先对软件系统进行需求分析,得出系统的主要功能。接着对系统进行总体设计和详细设计。总体设计主要包括系统总体结构设计、系统数据结构设计、系统功能设计和系统安全设计等;详细设计主要包括模块实现的关键代码,系统数据库访问和主要功能模块的具体实现等。最后对系统进行功能测试,并对测试结果进行分析总结,及时改进系统中存在的不足,为以后的系统维护提供了方便,也为今后开发类似系统提供了借鉴和帮助。

本ssm有机蔬菜销售系统采用的数据库是Mysql,使用SSM技术开发。在设计过程中,充分保证了系统代码的良好可读性、实用性、易扩展性、通用性、便于后期维护、操作方便以及页面简洁等特点。

java基于Vue有机蔬菜销售系统 果蔬商城网站ssm源码含数据库

一、源码描述

  这是一款javaWeb的前后端分离的ssm源码,前端vue.js,基于B/S模式,idea或者eclipse为开发工具,功能也比较全面,数据库mysql
二、功能介绍

管理员管理,用户权限管理,供应商功能模块。前台首页、蔬菜信息、论坛信息、新闻论坛、、注册管理,后台管理,购物车等等信息管理功能。管理员功能:首页、个人中心、用户管理、供应商管理、蔬菜信息、聊天回复、论坛管理、系统管理、供应商功能:首页、个人中心、蔬菜信息、聊天回复功能模块。用户功能模块:首页、个人中心、聊天信息、订单管理、我的收藏等功能等等从而达到对ssm有机蔬菜销售系统信息的高效管理。

三、注意事项

1、管理员账号:admin 密码:admin

2、开发环境为Eclipse/idea,数据库为mysql 使用java语言开发。

3.eclipse配置好tomcat  即可打开首页  idea tomcat部署处 必须用项目名 ,不能带_war

4.数据库连接src\main\resources\config.properties中修改

5.maven包版本apache-maven-3.3.9.

webapp文件夹里的index.jsp 是自动跳转到后台地址的哦

开发语言:Java

框架:SSM(Spring+SpringMVC+MyBatis)

前端框架:vue.js

JDK版本:JDK1.8+

服务器:tomcat8+

数据库:mysql 5.7+

数据库工具:Navicat11

后台路径地址:localhost:8080/项目名称/admin/dist/index.html

前台路径地址:localhost:8080/项目名称/front/index.html (无前台不需要输入)

jdbc_url=jdbc:mysql://127.0.0.1:3306/db_ssmlxl30?useUnicode=true&characterEncoding=UTF-8&tinyInt1isBit=false
jdbc_username=root
jdbc_password=root

关键词:ssm农产品有机蔬菜销售系统,SSM,Mysql 

【639】基于ssm农产品果蔬商城java农产品销售系统源码和论文PPT开题报告

ABSTRACT

With the advent of the 21st century, all aspects of the country and all walks of life are trying to integrate with the modern advanced technology. The advantages of the rise of intelligent technology era, of course, SSM organic vegetable sales system can not be excluded. SSM organic vegetable sales system is a management system based on practical application, software engineering development method and SSM technology. In the whole development process, firstly, the requirements of the software system are analyzed, and the main functions of the system are obtained. Then the overall design and detailed design of the system. The overall design mainly includes the overall system structure design, system data structure design, system function design and system security design; the detailed design mainly includes the key code of module implementation, system database access and the specific implementation of main function modules. Finally, the system is tested, and the test results are analyzed and summarized to improve the shortcomings of the system in time, which provides convenience for the future system maintenance, and also provides reference and help for the development of similar systems in the future

The database used in this SSM organic vegetable sales system is mysql, which is developed by SSM technology. In the design process, it fully ensures the good readability, practicability, expansibility, generality, easy maintenance, easy operation and concise page of the system code.

Key words: SSM, organic vegetable sales system, SSM, mysql

 

 

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.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.GongyingshangEntity;
import com.entity.view.GongyingshangView;

import com.service.GongyingshangService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MPUtil;
import com.utils.CommonUtil;


/**
 * 供应商
 * 后端接口
 * @author 
 * @email 
 * @date 2020-09-28 21:32:25
 */
@RestController
@RequestMapping("/gongyingshang")
public class GongyingshangController {
    @Autowired
    private GongyingshangService gongyingshangService;
    
	@Autowired
	private TokenService tokenService;
	
	/**
	 * 登录
	 */
	@IgnoreAuth
	@RequestMapping(value = "/login")
	public R login(String username, String password, String captcha, HttpServletRequest request) {
		GongyingshangEntity user = gongyingshangService.selectOne(new EntityWrapper<GongyingshangEntity>().eq("zhanghao", username));
		if(user==null || !user.getMima().equals(password)) {
			return R.error("账号或密码不正确");
		}
		String token = tokenService.generateToken(user.getId(), username,"gongyingshang",  "供应商" );
		return R.ok().put("token", token);
	}
	
	/**
     * 注册
     */
	@IgnoreAuth
    @RequestMapping("/register")
    public R register(@RequestBody GongyingshangEntity gongyingshang){
    	//ValidatorUtils.validateEntity(gongyingshang);
    	GongyingshangEntity user = gongyingshangService.selectOne(new EntityWrapper<GongyingshangEntity>().eq("zhanghao", gongyingshang.getZhanghao()));
		if(user!=null) {
			return R.error("注册用户已存在");
		}
		Long uId = new Date().getTime();
		gongyingshang.setId(uId);
        gongyingshangService.insert(gongyingshang);
        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");
        GongyingshangEntity user = gongyingshangService.selectById(id);
        return R.ok().put("data", user);
    }
    
    /**
     * 密码重置
     */
    @IgnoreAuth
	@RequestMapping(value = "/resetPass")
    public R resetPass(String username, HttpServletRequest request){
    	GongyingshangEntity user = gongyingshangService.selectOne(new EntityWrapper<GongyingshangEntity>().eq("zhanghao", username));
    	if(user==null) {
    		return R.error("账号不存在");
    	}
    	user.setMima("123456");
        gongyingshangService.updateById(user);
        return R.ok("密码已重置为:123456");
    }


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,GongyingshangEntity gongyingshang, HttpServletRequest request){

        EntityWrapper<GongyingshangEntity> ew = new EntityWrapper<GongyingshangEntity>();
		PageUtils page = gongyingshangService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, gongyingshang), params), params));
        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,GongyingshangEntity gongyingshang, HttpServletRequest request){
        EntityWrapper<GongyingshangEntity> ew = new EntityWrapper<GongyingshangEntity>();
		PageUtils page = gongyingshangService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, gongyingshang), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( GongyingshangEntity gongyingshang){
       	EntityWrapper<GongyingshangEntity> ew = new EntityWrapper<GongyingshangEntity>();
      	ew.allEq(MPUtil.allEQMapPre( gongyingshang, "gongyingshang")); 
        return R.ok().put("data", gongyingshangService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(GongyingshangEntity gongyingshang){
        EntityWrapper< GongyingshangEntity> ew = new EntityWrapper< GongyingshangEntity>();
 		ew.allEq(MPUtil.allEQMapPre( gongyingshang, "gongyingshang")); 
		GongyingshangView gongyingshangView =  gongyingshangService.selectView(ew);
		return R.ok("查询供应商成功").put("data", gongyingshangView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") String id){
        GongyingshangEntity gongyingshang = gongyingshangService.selectById(id);
        return R.ok().put("data", gongyingshang);
    }

    /**
     * 前端详情
     */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") String id){
        GongyingshangEntity gongyingshang = gongyingshangService.selectById(id);
        return R.ok().put("data", gongyingshang);
    }
    



    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody GongyingshangEntity gongyingshang, HttpServletRequest request){
    	gongyingshang.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(gongyingshang);
    	GongyingshangEntity user = gongyingshangService.selectOne(new EntityWrapper<GongyingshangEntity>().eq("zhanghao", gongyingshang.getZhanghao()));
		if(user!=null) {
			return R.error("用户已存在");
		}

		gongyingshang.setId(new Date().getTime());
        gongyingshangService.insert(gongyingshang);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody GongyingshangEntity gongyingshang, HttpServletRequest request){
    	gongyingshang.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(gongyingshang);
    	GongyingshangEntity user = gongyingshangService.selectOne(new EntityWrapper<GongyingshangEntity>().eq("zhanghao", gongyingshang.getZhanghao()));
		if(user!=null) {
			return R.error("用户已存在");
		}

		gongyingshang.setId(new Date().getTime());
        gongyingshangService.insert(gongyingshang);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody GongyingshangEntity gongyingshang, HttpServletRequest request){
        //ValidatorUtils.validateEntity(gongyingshang);
        gongyingshangService.updateById(gongyingshang);//全部更新
        return R.ok();
    }
    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        gongyingshangService.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<GongyingshangEntity> wrapper = new EntityWrapper<GongyingshangEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}


		int count = gongyingshangService.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.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.LiaotianxinxiEntity;
import com.entity.view.LiaotianxinxiView;

import com.service.LiaotianxinxiService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MPUtil;
import com.utils.CommonUtil;


/**
 * 聊天信息
 * 后端接口
 * @author 
 * @email 
 * @date 2020-09-28 21:32:25
 */
@RestController
@RequestMapping("/liaotianxinxi")
public class LiaotianxinxiController {
    @Autowired
    private LiaotianxinxiService liaotianxinxiService;
    


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,LiaotianxinxiEntity liaotianxinxi, HttpServletRequest request){

		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("gongyingshang")) {
			liaotianxinxi.setZhanghao((String)request.getSession().getAttribute("username"));
		}
		if(tableName.equals("yonghu")) {
			liaotianxinxi.setYonghuming((String)request.getSession().getAttribute("username"));
		}
        EntityWrapper<LiaotianxinxiEntity> ew = new EntityWrapper<LiaotianxinxiEntity>();
		PageUtils page = liaotianxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, liaotianxinxi), params), params));
        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,LiaotianxinxiEntity liaotianxinxi, HttpServletRequest request){
        EntityWrapper<LiaotianxinxiEntity> ew = new EntityWrapper<LiaotianxinxiEntity>();
		PageUtils page = liaotianxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, liaotianxinxi), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( LiaotianxinxiEntity liaotianxinxi){
       	EntityWrapper<LiaotianxinxiEntity> ew = new EntityWrapper<LiaotianxinxiEntity>();
      	ew.allEq(MPUtil.allEQMapPre( liaotianxinxi, "liaotianxinxi")); 
        return R.ok().put("data", liaotianxinxiService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(LiaotianxinxiEntity liaotianxinxi){
        EntityWrapper< LiaotianxinxiEntity> ew = new EntityWrapper< LiaotianxinxiEntity>();
 		ew.allEq(MPUtil.allEQMapPre( liaotianxinxi, "liaotianxinxi")); 
		LiaotianxinxiView liaotianxinxiView =  liaotianxinxiService.selectView(ew);
		return R.ok("查询聊天信息成功").put("data", liaotianxinxiView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") String id){
        LiaotianxinxiEntity liaotianxinxi = liaotianxinxiService.selectById(id);
        return R.ok().put("data", liaotianxinxi);
    }

    /**
     * 前端详情
     */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") String id){
        LiaotianxinxiEntity liaotianxinxi = liaotianxinxiService.selectById(id);
        return R.ok().put("data", liaotianxinxi);
    }
    



    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody LiaotianxinxiEntity liaotianxinxi, HttpServletRequest request){
    	liaotianxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(liaotianxinxi);

        liaotianxinxiService.insert(liaotianxinxi);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody LiaotianxinxiEntity liaotianxinxi, HttpServletRequest request){
    	liaotianxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(liaotianxinxi);

        liaotianxinxiService.insert(liaotianxinxi);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody LiaotianxinxiEntity liaotianxinxi, HttpServletRequest request){
        //ValidatorUtils.validateEntity(liaotianxinxi);
        liaotianxinxiService.updateById(liaotianxinxi);//全部更新
        return R.ok();
    }
    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        liaotianxinxiService.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<LiaotianxinxiEntity> wrapper = new EntityWrapper<LiaotianxinxiEntity>();
		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("gongyingshang")) {
			wrapper.eq("zhanghao", (String)request.getSession().getAttribute("username"));
		}
		if(tableName.equals("yonghu")) {
			wrapper.eq("yonghuming", (String)request.getSession().getAttribute("username"));
		}

		int count = liaotianxinxiService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	


}

  • 17
    点赞
  • 27
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
基于ssm(Spring+SpringMVC+MyBatis)框架的农场农作物管理系统是一个用于管理农场种植和农作物生长的信息化系统。该系统采用了先进的技术,结合了Spring的IoC、AOP特性,SpringMVC的MVC结构,以及MyBatis的ORM映射技术,实现了农场农作物管理的全面功能。 该系统主要包括以下模块:用户管理、农场管理、作物管理、种植管理和统计分析。 用户管理模块允许管理员对农场成员进行管理,包括添加用户、删除用户、修改用户信息等操作。农场管理模块支持农场基本信息的维护,包括农场名称、地址等。作物管理模块可以管理现有作物的基本信息,包括作物名称、种植周期等。种植管理模块允许管理员对不同作物进行种植计划的制定、种植任务的分配和监控。统计分析模块可以通过图表展示农场的种植情况、作物产量等数据。 该系统具有以下特点:首先,采用ssm框架,结合了Spring的高效、灵活和易于扩展的特性,能够提高系统的可维护性和可扩展性。其次,使用MyBatis作为ORM工具,通过简洁的XML配置文件实现对象与数据库表之间的映射,提高了开发效率和数据库操作的性能。再次,引入了统计分析模块,能够根据实际数据生成图表,帮助管理员更好地进行决策和规划。 综上所述,基于ssm的农场农作物管理系统为农场管理者提供了一种高效、便捷的农作物管理方式,能够提高农场的生产效率和管理水平,实现农业信息化的目标。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序猿毕业分享网

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值