——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明






基于javaweb的SSM果园采摘园系统(java+ssm+jsp+jquery+mysql)
项目介绍
管理员角色: 管理员登录,管理员信息管理,用户信息查询,新闻公告管理,采摘园类型管理,采摘基地管理,管理用户提交的订单,管理评价等功能。
用户角色包含以下功能: 查看采摘园列表,查看公告信息,推荐采摘园给用户,查看采摘网络,用户注册,登录,购买,评论,下订单,修改个人信息,密码,查看个人订单等功能。
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.是否Maven项目: 否; 6.数据库:MySql 5.7等版本均可;
技术栈
- 后端:Spring+springmvc+mybatis 2. 前端:JSP+css+javascript+jQuery
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2.使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,配置tomcat 3. 将项目中springmvc-servlet.xml配置文件中的数据库配置改为自己的配置; 4. 运行项目,在浏览器中输入http://localhost:8080/ 登录 用户账号/密码: user/123456 管理员账号/密码:admin/admin
——————————CodeStart——————————
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| nameList.add(cond); valueList.add(name); PageHelper.getPage(this.topicService.getTopicByLike(topic), "topic", nameList, valueList, 10, number, this.getRequest(), "query"); name = null; cond = null; return "admin/querytopic"; }
@RequestMapping("getTopicById.action") public String getTopicById(String id ) { Topic topic = this.topicService.getTopicById(id); this.getRequest().setAttribute("topic", topic); List<Users> usersList = this.usersService.getAllUsers(); this.getRequest().setAttribute("usersList", usersList); List<Jiancai> jiancaiList = this.jiancaiService.getAllJiancai(); this.getRequest().setAttribute("jiancaiList", jiancaiList); return "admin/edittopic"; }
public TopicService getTopicService() { return topicService; }
public void setTopicService(TopicService topicService) { this.topicService = topicService; }
} package com.action;
@Controller
@RequestMapping(value = "/cart", produces = "text/plain;charset=utf-8") public class CartAction extends BaseAction { @Autowired @Resource
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
| private TopicService topicService; @Autowired @Resource private UsersService usersService; @Autowired @Resource private JiancaiService jiancaiService;
@RequestMapping("createTopic.action") public String createTopic() { List<Users> usersList = this.usersService.getAllUsers(); this.getRequest().setAttribute("usersList", usersList); List<Jiancai> jiancaiList = this.jiancaiService.getAllJiancai(); this.getRequest().setAttribute("jiancaiList", jiancaiList); return "admin/addtopic"; }
@RequestMapping("addTopic.action") public String addTopic(Topic topic) { this.topicService.insertTopic(topic); return "redirect:/topic/createTopic.action"; }
@RequestMapping("deleteTopic.action") public String deleteTopic(String id) { this.topicService.deleteTopic(id); return "redirect:/topic/getAllTopic.action"; }
@RequestMapping("deleteTopicByIds.action") public String deleteTopicByIds() { String[] ids = this.getRequest().getParameterValues("topicid"); for (String topicid : ids) { this.topicService.deleteTopic(topicid); } return "redirect:/topic/getAllTopic.action"; }
@RequestMapping("updateTopic.action") public String updateTopic(Topic topic) { this.topicService.updateTopic(topic); return "redirect:/topic/getAllTopic.action"; }
@RequestMapping("getAllTopic.action") public String getAllTopic(String number) {
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| @RequestMapping("exit.action") public String exit() { this.front(); this.getSession().removeAttribute("userid"); this.getSession().removeAttribute("username"); this.getSession().removeAttribute("users"); return "index"; }
@RequestMapping("prePwd.action") public String prePwd() { this.front(); if (this.getSession().getAttribute("userid") == null) { return "redirect:/index/preLogin.action"; } return "users/editpwd"; }
@RequestMapping("editpwd.action") public String editpwd() { this.front(); if (this.getSession().getAttribute("userid") == null) { return "redirect:/index/preLogin.action"; } String userid = (String) this.getSession().getAttribute("userid"); String password = this.getRequest().getParameter("password"); String repassword = this.getRequest().getParameter("repassword"); Users users = this.usersService.getUsersById(userid); if (password.equals(users.getPassword())) { users.setPassword(repassword); this.usersService.updateUsers(users); } else { this.getSession().setAttribute("message", "旧密码错误"); return "redirect:/index/prePwd.action"; } return "redirect:/index/prePwd.action"; }
@RequestMapping("usercenter.action") public String usercenter() { this.front(); if (this.getSession().getAttribute("userid") == null) { return "redirect:/index/preLogin.action"; } return "users/usercenter"; }
@RequestMapping("userinfo.action")
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| }
public void setArticleService(ArticleService articleService) { this.articleService = articleService; }
} package com.action;
@Controller
@RequestMapping(value = "/users" , produces = "text/plain;charset=utf-8") public class UsersAction extends BaseAction {
@Autowired @Resource private UsersService usersService;
@RequestMapping("createUsers.action") public String createUsers() { return "admin/addusers"; }
@RequestMapping("addUsers.action") public String addUsers(Users users) { users.setRegdate(VeDate.getStringDateShort()); this.usersService.insertUsers(users); return "redirect:/users/createUsers.action";
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
@Controller
@RequestMapping(value = "/details", produces = "text/plain;charset=utf-8") public class DetailsAction extends BaseAction { @Autowired @Resource private DetailsService detailsService; @Autowired @Resource private JiancaiService jiancaiService; @Autowired @Resource private CityService cityService; @Autowired @Resource private PeihuoService peihuoService;
@RequestMapping("createDetails.action") public String createDetails() { List<Jiancai> jiancaiList = this.jiancaiService.getAllJiancai(); this.getRequest().setAttribute("jiancaiList", jiancaiList); List<City> cityList = this.cityService.getAllCity(); this.getRequest().setAttribute("cityList", cityList); List<Peihuo> peihuoList = this.peihuoService.getAllPeihuo(); this.getRequest().setAttribute("peihuoList", peihuoList); return "admin/adddetails"; }
@RequestMapping("addDetails.action") public String addDetails(Details details) {
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=471023491103200yv
https://javayms.pages.dev?id=471023491103200yv