协同过滤-智能推荐商品购物商城系统(JAVA,JSP,SSM,MYSQL,BootStrap)(毕业论文11457字以上,共32页,程序代码,MySQL数据库)
链接:https://pan.baidu.com/s/134Ts0UHx8leiX3uuu3OrHw
提取码:8888
【运行环境】 IDEA, Eclipse JDK1.7(JDK1.8) Tomcat7(Tomcat8)
【技术栈】 JAVA, JSP, SSM, JQUERY, MYSQL, HTML, CSS, JAVASCRIPT, BootStrap
【视频教程】
【项目包含内容】
【文档包含内容】
【项目功能介绍】
本系统一共分为三个用户角色,分别为买家,卖家和后台系统管理员,下面分别对这三个用户的功能进行描述
公用部分功能: 首页展示商品, 首页轮播图, 分类展示商品, 商品详情展示, 协同过滤推荐的商品展示,
网站公告列表及详情展示, 全部商品
买家功能: 登录,注册, 退出,个人信息管理,密码修改,我的订单,我的留言,留言列表, 购物车,
收货人信息, 购物结算, 付款,确认收货
卖家功能: 登录,注册, 退出,个人信息管理,密码修改,发布商品,我的商品,我的销售
系统管理员功能: 管理员管理,商城用户管理,新闻公告管理,商品类型管理,商品信息管理,订单管理,留言管理
部分代码:
ArticleAction:
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.Article;
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;
// 准备添加数据
@RequestMapping("createArticle.action")
public String createArticle() {
return "admin/addarticle";
}
// 添加数据
@RequestMapping("addArticle.action")
public String addArticle(Article article) {
article.setAddtime(VeDate.getStringDateShort());
article.setHits("0");
this.articleService.insertArticle(article);
return "redirect:/article/createArticle.action";
}
// 通过主键删除数据
@RequestMapping("deleteArticle.action")
public String deleteArticle(String id) {
this.articleService.deleteArticle(id);
return "redirect:/article/getAllArticle.action";
}
// 批量删除数据
@RequestMapping("deleteArticleByIds.action")
public String deleteArticleByIds() {
String[] ids = this.getRequest().getParameterValues("articleid");
for (String articleid : ids) {
this.articleService.deleteArticle(articleid);
}
return "redirect:/article/getAllArticle.action";
}
// 更新数据
@RequestMapping("updateArticle.action")
public String updateArticle(Article article) {
this.articleService.updateArticle(article);
return "redirect:/article/getAllArticle.action";
}
// 显示全部数据
@RequestMapping("getAllArticle.action")
public String getAllArticle(String number) {
List articleList = this.articleService.getAllArticle();
PageHelper.getPage(articleList, "article", null, null, 10, number, this.getRequest(), null);
return "admin/listarticle";
}
// 按条件查询数据 (模糊查询)
@RequestMapping("queryArticleByCond.action")
public String queryArticleByCond(String cond, String name, String number) {
Article article = new Article();
if (cond != null) {
if ("title".equals(cond)) {
article.setTitle(name);
}
if ("image".equals(cond)) {
article.setImage(name);
}
if ("contents".equals(cond)) {
article.setContents(name);
}
if ("addtime".equals(cond)) {
article.setAddtime(name);
}
if ("hits".equals(cond)) {
article.setHits(name);
}
}
List nameList = new ArrayList();
List valueList = new ArrayList();
nameList.add(cond);
valueList.add(name);
PageHelper.getPage(this.articleService.getArticleByLike(article), "article", nameList, valueList, 10, number, this.getRequest(),
"query");
name = null;
cond = null;
return "admin/queryarticle";
}
// 按主键查询数据
@RequestMapping("getArticleById.action")
public String getArticleById(String id) {
Article article = this.articleService.getArticleById(id);
this.getRequest().setAttribute("article", article);
return "admin/editarticle";
}
public ArticleService getArticleService() {
return articleService;
}
public void setArticleService(ArticleService articleService) {
this.articleService = articleService;
}
}
CateAction.java
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.Cate;
import com.service.CateService;
import com.util.PageHelper;
//定义为控制器
@Controller
// 设置路径
@RequestMapping(value = "/cate", produces = "text/plain;charset=utf-8")
public class CateAction extends BaseAction {
// 注入Service 由于标签的存在 所以不需要getter setter
@Autowired
@Resource
private CateService cateService;
// 准备添加数据
@RequestMapping("createCate.action")
public String createCate() {
return "admin/addcate";
}
// 添加数据
@RequestMapping("addCate.action")
public String addCate(Cate cate) {
this.cateService.insertCate(cate);
return "redirect:/cate/createCate.action";
}
// 通过主键删除数据
@RequestMapping("deleteCate.action")
public String deleteCate(String id) {
this.cateService.deleteCate(id);
return "redirect:/cate/getAllCate.action";
}
// 批量删除数据
@RequestMapping("deleteCateByIds.action")
public String deleteCateByIds() {
String[] ids = this.getRequest().getParameterValues("cateid");
for (String cateid : ids) {
this.cateService.deleteCate(cateid);
}
return "redirect:/cate/getAllCate.action";
}
// 更新数据
@RequestMapping("updateCate.action")
public String updateCate(Cate cate) {
this.cateService.updateCate(cate);
return "redirect:/cate/getAllCate.action";
}
// 显示全部数据
@RequestMapping("getAllCate.action")
public String getAllCate(String number) {
List cateList = this.cateService.getAllCate();
PageHelper.getPage(cateList, "cate", null, null, 10, number, this.getRequest(), null);
return "admin/listcate";
}
// 按条件查询数据 (模糊查询)
@RequestMapping("queryCateByCond.action")
public String queryCateByCond(String cond, String name, String number) {
Cate cate = new Cate();
if (cond != null) {
if ("catename".equals(cond)) {
cate.setCatename(name);
}
if ("memo".equals(cond)) {
cate.setMemo(name);
}
}
List nameList = new ArrayList();
List valueList = new ArrayList();
nameList.add(cond);
valueList.add(name);
PageHelper.getPage(this.cateService.getCateByLike(cate), "cate", nameList, valueList, 10, number, this.getRequest(), "query");
name = null;
cond = null;
return "admin/querycate";
}
// 按主键查询数据
@RequestMapping("getCateById.action")
public String getCateById(String id) {
Cate cate = this.cateService.getCateById(id);
this.getRequest().setAttribute("cate", cate);
return "admin/editcate";
}
public CateService getCateService() {
return cateService;
}
public void setCateService(CateService cateService) {
this.cateService = cateService;
}
}
【项目代码截图】
【数据库截图】
【文档部分截图】
【项目运行截图】