• 大小: 16.9MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-14
  • 语言: 其他
  • 标签: 毕业设计  SSM  J2EE  

资源简介

基于SSM框架的网上体育用品商城项目源代码,适合本科毕业设计

资源截图

代码片段和文件信息

package com.xy.ssm.controller;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.xy.ssm.po.Categories;
import com.xy.ssm.service.AdminService;
import com.xy.ssm.service.CategoriesService;
import com.xy.ssm.service.UserService;

@Controller
@RequestMapping(“/admin“)
public class AdminCategoriesController {
@Autowired
private CategoriesService categoriesService;

// 添加根类别
@RequestMapping(“/categories/categoriesBasicAdd“)
public String adminInsertBasicCategories() throws Exception {
return “admin/categories/categoriesBasicAdd“;
}

@RequestMapping(“/categories/categoriesBasicAddSubmit“)
public String adminInsertBasicCategoriesSubmit(HttpServletRequest request
Categories categories) throws Exception {
categoriesService.insertBasicCategories(request categories);
return “admin/categories/categoriesBasicAdd“;
}

// 添加子类别
@RequestMapping(“/categories/categoriesChildAdd“)
public String adminInsertChildCategories(Integer pid Integer grade
Model model) throws Exception {
// 1.将get传递的参数添加到model模型里面,用OGNL语言可直接将其赋值给表单中的input,
// 2.然后提交表单时随着input的值一起赋给Categories对象
// 3.并在service层进行数据库表信息的插入
model.addAttribute(“pid“ pid);
model.addAttribute(“grade“ grade);
return “admin/categories/categoriesChildAdd“;
}

@RequestMapping(“/categories/categoriesChildAddSubmit“)
public String adminInsertChildCategoriesSubmit(HttpServletRequest request
Categories categories) throws Exception {
categoriesService.insertChildCategories(request categories);
return “admin/categories/categoriesChildAdd“;
}

@RequestMapping(“/categories/categoriesList“)
public String adminFindCategoriesList(Model model) throws Exception {
List categoriesList = categoriesService
.findCategoriesList();
model.addAttribute(“categoriesList“ categoriesList);
return “admin/categories/categoriesList“;
}

// 先通过id找到要修改的categories对象
@RequestMapping(“/categories/categoriesUpdate“)
public String adminFindCategoriesById(Integer id Model model)
throws Exception {
Categories categories = categoriesService.findCategoriesById(id);
model.addAttribute(“categories“ categories);
return “admin/categories/categoriesUpdate“;
}

// 再将修改后的categories对象传回数据库
@RequestMapping(“/categories/categoriesUpdateSubmit“)
public String adminUpdateCategoriesSumbit(Integer id Categories categories)
throws Exception {
categoriesService.updateCategories(id categories);
return “admin/categories/categoriesUpdate“;
}

@RequestMapping(“/categories/categoriesDelete“)
public String adminDeleteCategories(Integer id Integer isleaf)
throws Exception {
categoriesService.deleteCategoriesById(id

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1181  2017-04-07 09:47  E_SportsMall\.classpath

     文件       1519  2017-05-01 18:05  E_SportsMall\.myeclipse\profiler\E_SportsMall on Tomcat  7.x.xml

     文件       1337  2017-04-07 11:20  E_SportsMall\.project

     文件        522  2017-04-07 09:12  E_SportsMall\.settings\.jsdtscope

     文件         86  2017-04-08 11:42  E_SportsMall\.settings\org.eclipse.core.resources.prefs

     文件        364  2017-04-07 09:12  E_SportsMall\.settings\org.eclipse.jdt.core.prefs

     文件        647  2017-04-07 09:47  E_SportsMall\.settings\org.eclipse.wst.common.component

     文件        414  2017-04-07 09:12  E_SportsMall\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2017-04-07 09:12  E_SportsMall\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2017-04-07 09:12  E_SportsMall\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件        228  2017-04-30 21:32  E_SportsMall\config\customValidationMessages.properties

     文件        167  2017-04-07 09:58  E_SportsMall\config\db.properties

     文件        265  2017-04-04 23:20  E_SportsMall\config\log4j.properties

     文件       1686  2017-04-08 18:05  E_SportsMall\config\mybatis\generatorConfig.xml

     文件        314  2017-04-07 10:12  E_SportsMall\config\mybatis\sqlMapConfig.xml

     文件       2167  2017-04-07 19:51  E_SportsMall\config\spring\applicationContext_mapper.xml

     文件       1084  2017-04-07 18:21  E_SportsMall\config\spring\applicationContext_service.xml

     文件       1995  2017-04-11 10:26  E_SportsMall\config\spring\applicationContext_transaction.xml

     文件       3172  2017-04-18 16:45  E_SportsMall\config\springmvc\springmvc.xml

     文件      12451  2017-05-05 21:55  E_SportsMall\SportsMalll_mysql.sql

     文件       3159  2017-04-20 21:11  E_SportsMall\src\com\xy\ssm\controller\AdminCategoriesController.java

     文件       2114  2017-04-09 23:05  E_SportsMall\src\com\xy\ssm\controller\AdminController.java

     文件       1977  2017-04-25 22:02  E_SportsMall\src\com\xy\ssm\controller\AdminOrdersController.java

     文件       5133  2017-04-18 17:36  E_SportsMall\src\com\xy\ssm\controller\AdminProductController.java

     文件        970  2017-04-08 23:53  E_SportsMall\src\com\xy\ssm\controller\AdminUserController.java

     文件       1085  2017-04-28 16:49  E_SportsMall\src\com\xy\ssm\controller\UserCategoriesController.java

     文件       3778  2017-05-02 20:12  E_SportsMall\src\com\xy\ssm\controller\UserController.java

     文件       3226  2017-04-25 21:22  E_SportsMall\src\com\xy\ssm\controller\UserOrdersController.java

     文件        320  2017-04-18 12:14  E_SportsMall\src\com\xy\ssm\exception\CustomException.java

     文件       1326  2017-04-18 14:15  E_SportsMall\src\com\xy\ssm\exception\CustomExceptionResolver.java

............此处省略907个文件信息

评论

共有 条评论