栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

基于SSM在线商城购物商城水果蔬菜批发商城(前台、后台)

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

基于SSM在线商城购物商城水果蔬菜批发商城(前台、后台)

开发工具:eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

	@RequestMapping("queryDetailsByCond.action")
	public String queryDetailsByCond(String cond, String name, String number) {
		Details details = new Details();
		if (cond != null) {
			if ("ordercode".equals(cond)) {
				details.setOrdercode(name);
			}
			if ("jiancaiid".equals(cond)) {
				details.setJiancaiid(name);
			}
			if ("num".equals(cond)) {
				details.setNum(name);
			}
			if ("price".equals(cond)) {
var interval;

function sendData2Master()
{
	var destination = window.parent.parent ;
	try
	{
		if ( destination.XDTMaster )
		{
			var t = destination.XDTMaster.read( [ gup( 'cmd' ), gup( 'data' ) ] ) ;
			window.clearInterval( interval ) ;
		}
	}
	catch (e) {}
}

function OnMessage (event) {
	        var message = event.data;




















		} catch (Exception e) {
			return "";
		}
		return day + "";
	}

	public static String getPreTime(String sj1, String jj) {
		SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		String mydate1 = "";
		try {
			Date date1 = format.parse(sj1);
			long Time = (date1.getTime() / 1000) + Integer.parseInt(jj) * 60;
			date1.setTime(Time * 1000);
			mydate1 = format.format(date1);
		} catch (Exception e) {
		}
		return mydate1;
	}

	public static String getNextDay(String nowdate, String delay) {
	@RequestMapping("getJiancaiById.action")
	public String getJiancaiById(String id) {
		Jiancai jiancai = this.jiancaiService.getJiancaiById(id);
		this.getRequest().setAttribute("jiancai", jiancai);
		List cateList = this.cateService.getAllCate();
		this.getRequest().setAttribute("cateList", cateList);
		return "admin/editjiancai";
	}

	public JiancaiService getJiancaiService() {
		return jiancaiService;
	}

			return "redirect:/index/preLogin.action";
		}
		return "users/usercenter";
	}

	@RequestMapping("userinfo.action")
	public String userinfo() {
		this.front();
		if (this.getSession().getAttribute("userid") == null) {
			return "redirect:/index/preLogin.action";
		}
		String userid = (String) this.getSession().getAttribute("userid");
		this.getSession().setAttribute("users", this.usersService.getUsersById(userid));
		return "users/userinfo";
	}

	@RequestMapping("personal.action")
	public String personal(Users users) {
		this.front();
		if (this.getSession().getAttribute("userid") == null) {
			return "redirect:/index/preLogin.action";
		Cart cart = this.cartService.getCartById(id);
		this.getRequest().setAttribute("cart", cart);
		List usersList = this.usersService.getAllUsers();
		this.getRequest().setAttribute("usersList", usersList);
		List jiancaiList = this.jiancaiService.getAllJiancai();
		this.getRequest().setAttribute("jiancaiList", jiancaiList);
		return "admin/editcart";
	}

	public CartService getCartService() {
		return cartService;
	}
				frontList.add(cate);
			}
			this.getRequest().setAttribute("frontList", frontList);
			return "users/network";
		}

	// 公告
	@RequestMapping("article.action")
	public String article(String number) {
		this.front();
		List
articleList = new ArrayList
(); List
tempList = this.articleService.getAllArticle(); int pageNumber = tempList.size(); int maxPage = pageNumber; if (maxPage % 12 == 0) { maxPage = maxPage / 12; } else { maxPage = maxPage / 12 + 1; } if (number == null) { number = "0"; } int start = Integer.parseInt(number) * 12;
		$(function() {

			var dom = document.getElementById("container");
			var myChart = echarts.init(dom);
			var app = {};
			var session = [];
			var datalist = [];
			var prolist = [];
			var addresslist = [];

			var index = 0;
			












					
    
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <% String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
			this._target = -1 * this._parameter * this.Index;
			this.onStart();
			this.Move();
		},
		//移动
		Move : function() {
			clearTimeout(this._timer);
			var oThis = this, style = this.Up ? "top" : "left", iNow = parseInt(this._slider.style[style]) || 0, iStep = this
					.GetStep(this._target, iNow);

			if (iStep != 0) {
				this._slider.style[style] = (iNow + iStep) + "px";
				this._timer = setTimeout(function() {
					oThis.Move();
				}, this.Time);
			} else {
				this._slider.style[style] = this._target + "px";
				this.onFinish();
				if (this.Auto) {
					this._timer = setTimeout(function() {
						oThis.Index++;
	// make frameset rows string prepare
	var sframesetRows = ( parseInt( oParams.firstframeh, 10 ) || '30') + ",*," + ( parseInt( oParams.thirdframeh, 10 ) || '150' ) + ',0' ;
	document.getElementById( 'itframeset' ).rows = sframesetRows ;

	// dynamic including init frames and crossdomain transport code
	// from config sproxy_js_frameset url
	var addscriptUrl = oParams.sproxy_js_frameset ;
	doLoadscript( addscriptUrl ) ;
}

	



    
    
    
    



			return "users/list";
		}
		
		// 推荐产品
		@RequestMapping("hot.action")
		public String getHost(String number) {
			this.front();
			Jiancai goods = new Jiancai();
			goods.setRecommend("是");
			List flimList = new ArrayList();
			List tempList = this.jiancaiService.getJiancaiByHot();
			int pageNumber = tempList.size();
			int maxPage = pageNumber;
			if (maxPage % 12 == 0) {
				maxPage = maxPage / 12;
			} else {
				maxPage = maxPage / 12 + 1;
			}
			if (number == null) {
				number = "0";
			}
			int start = Integer.parseInt(number) * 12;
			int over = (Integer.parseInt(number) + 1) * 12;
			int count = pageNumber - over;








	
	


新增果蔬商品信息
import com.service.UsersService;
import com.service.JiancaiService;
import com.util.PageHelper;
//定义为控制器
@Controller
// 设置路径
@RequestMapping(value = "/topic" , produces = "text/plain;charset=utf-8")
public class TopicAction extends baseAction {
	// 注入Service 由于标签的存在 所以不需要getter setter
	@Autowired
	@Resource
	private TopicService topicService;
	@Autowired
	@Resource
	private UsersService usersService;
	public static Date strToDate(String strDate) {
		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
		ParsePosition pos = new ParsePosition(0);
		Date strtodate = formatter.parse(strDate, pos);
		return strtodate;
	}

	public static Date getNow() {
		Date currentTime = new Date();
		return currentTime;
	}

	public static Date getLastDate(long day) {
		Date date = new Date();
		long date_3_hm = date.getTime() - 3600000 * 34 * day;
		Date date_3_hm_date = new Date(date_3_hm);
		return date_3_hm_date;
	}

	public static String getStringToday() {
		Date currentTime = new Date();
		SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd HHmmss");
				admin.setAddtime(name);
			}
		}

		List nameList = new ArrayList();
		List valueList = new ArrayList();
		nameList.add(cond);
		valueList.add(name);
		PageHelper.getPage(this.adminService.getAdminByLike(admin), "admin", nameList, valueList, 10, number, this.getRequest(), "query");
		name = null;
		cond = null;
		return "admin/queryadmin";
	}

	// 按主键查询数据
	@RequestMapping("getAdminById.action")
import com.service.ArticleService;
import com.util.PageHelper;
import com.util.VeDate;

//定义为控制器
@Controller
// 设置路径
@RequestMapping(value = "/article", produces = "text/plain;charset=utf-8")
public class ArticleAction extends baseAction {
	// 注入Service 由于标签的存在 所以不需要getter setter
	@Autowired
	@Resource
	private ArticleService articleService;

	public void setPeihuoService(PeihuoService peihuoService) {
		this.peihuoService = peihuoService;
	}

}
package com.action;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.entity.Topic;
import com.service.TopicService;
import com.entity.Users;
import com.entity.Jiancai;
								
							
						
    
			
			return "users/network";
		}

	// 按条件查询数据 (模糊查询)
	@RequestMapping("queryPeihuoByCond.action")
	public String queryPeihuoByCond(String cond, String name, String number) {
		Peihuo peihuo = new Peihuo();
		if (cond != null) {
			if ("peihuoname".equals(cond)) {
				peihuo.setPeihuoname(name);
			}
			if ("cityid".equals(cond)) {
				peihuo.setCityname(name);
			}
			if ("address".equals(cond)) {
				peihuo.setAddress(name);
			}
			if ("contact".equals(cond)) {
this.getRequest().setAttribute("usersList", usersList);
return "admin/addorders";
}
// 添加数据
@RequestMapping("addOrders.action")
public String addOrders(Orders orders) {
this.ordersService.insertOrders(orders);
return "redirect:/orders/createOrders.action";
}

// 通过主键删除数据
@RequestMapping("deleteOrders.action")
public String deleteOrders(String id) {
this.ordersService.deleteOrders(id);
return "redirect:/orders/getAllOrders.action";
}

// 批量删除数据
@RequestMapping("deleteOrdersByIds.action")
				visualMap : {
					min : 0,
					max : 2500,
					left : 'left',
					top : 'bottom',
					text : [ '高', '低' ], // 文本,默认为数值文本
					calculable : true
				},
				toolbox : {
					show : true,
					orient : 'vertical',
					left : 'right',
					top : 'center',
					feature : {
						mark : {
							show : true
						},
						dataView : {
							show : true,
							readonly : false
	background-color: #fff;
}

.num li.on {
	color: #fff;
	line-height: 21px;
	width: 21px;
	height: 21px;
	font-size: 16px;
	margin: 0 1px;
	border: 0;

适用

课程设计,大作业,毕业设计,项目练习,学习演示等


运行环境

Java≥6、Tomcat≥7.0、MySQL≥5.5

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

技术框架

JavaBean MVC JSP SSM(Spring SpringMVC MyBatis) MySQL Bootstrap Javascript

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

后台管理:用户、新闻公告、果蔬类型、城市信息、配货点、果蔬商品、订单、评价等管理等

前台购物:注册登录、公告、商品、购买、评价等

idea:

eclipse/myeclipse:

前台购物:

后台管理:


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/777188.html

Java相关栏目本月热门文章

我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号