• 大小: 23.03MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-06-19
  • 语言: Java
  • 标签: java  

资源简介

基于java的运动商城设计,使用java,tomcat,serverlet

资源截图

代码片段和文件信息

package com.lyq.action;

import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import org.apache.struts2.interceptor.ApplicationAware;
import org.apache.struts2.interceptor.RequestAware;
import org.apache.struts2.interceptor.SessionAware;
import org.springframework.beans.factory.annotation.Autowired;

import com.lyq.dao.order.OrderDao;
import com.lyq.dao.product.ProductCategoryDao;
import com.lyq.dao.product.ProductDao;
import com.lyq.dao.product.UploadFileDao;
import com.lyq.dao.user.CustomerDao;
import com.lyq.dao.user.UserDao;
import com.lyq.model.order.OrderItem;
import com.lyq.model.user.Customer;
import com.lyq.model.user.User;
import com.opensymphony.xwork2.ActionSupport;
/**
 * 基本Action对象,其它Action的父类
 * @author Li Yongqiang
 */
public class baseAction extends ActionSupport implements RequestAware
SessionAware ApplicationAware {
private static final long serialVersionUID = 1L;
protected Integer id;
protected Integer[] ids;
protected int pageNo = 1;
protected int pageSize = 3;

public static final String LIST = “list“;
public static final String EDIT = “edit“;
public static final String ADD = “add“;
public static final String SELECT = “select“;
public static final String QUERY = “query“;
public static final String LEFT = “left“;
public static final String RIGHT = “right“;
public static final String INDEX = “index“;
public static final String MAIN = “main“;
public static final String MANAGER = “manager“;
public static final String TOP = “top“;
public static final String REG = “reg“;
public static final String USER_LOGIN = “userLogin“;
public static final String CUSTOMER_LOGIN = “customerLogin“;
public static final String LOGOUT = “logout“;
// 获取用户id
// 获取用户对象
public Customer getLoginCustomer(){
if(session.get(“customer“) != null){
return (Customer) session.get(“customer“);
}
return null;
}
// 获取管理员id
// 获取管理员对象
public User getLoginUser(){
if(session.get(“admin“) != null){
return (User) session.get(“admin“);
}
return null;
}
// 从session中取出购物车
@SuppressWarnings(“unchecked“)
protected Set getCart(){
object obj = session.get(“cart“);
if(obj == null){
return new HashSet();
}else{
return (Set) obj;
}
}

// 注入Dao
@Autowired
protected ProductCategoryDao categoryDao;
@Autowired
protected ProductDao productDao;
@Autowired
protected OrderDao orderDao;
@Autowired
protected UserDao userDao;
@Autowired
protected CustomerDao customerDao;
@Autowired
protected UploadFileDao uploadFileDao;


// Map类型的request
protected Mapject> request;
// Map类型的session
protected Mapject> session;
// Map类型的application
protected Mapject> application;

@Override
public void setRequest(Mapject> request) {
// 获取Map类型的request赋值
this.request = request;
}
@Override
public void setApplication

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

     文件        953  2017-06-09 11:38  Shop\.classpath

     文件        904  2017-06-09 11:20  Shop\.project

     文件        567  2017-06-09 11:20  Shop\.settings\.jsdtscope

     文件        364  2017-06-09 11:20  Shop\.settings\org.eclipse.jdt.core.prefs

     文件        464  2017-06-09 11:20  Shop\.settings\org.eclipse.wst.common.component

     文件        345  2017-06-09 11:20  Shop\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2017-06-09 11:20  Shop\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2017-06-09 11:20  Shop\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件       1715  2017-06-09 11:21  Shop\build\classes\applicationContext-common.xml

     文件        901  2017-06-09 11:21  Shop\build\classes\com\lyq\action\baseAction-logon-validation.xml

     文件       4635  2017-06-12 23:06  Shop\build\classes\com\lyq\action\baseAction.class

     文件       2802  2017-06-12 23:06  Shop\build\classes\com\lyq\action\IndexAction.class

     文件       1341  2017-06-12 23:06  Shop\build\classes\com\lyq\action\interceptor\CustomerLoginInteceptor.class

     文件       1325  2017-06-12 23:06  Shop\build\classes\com\lyq\action\interceptor\UserLoginInterceptor.class

     文件       3103  2017-06-12 23:06  Shop\build\classes\com\lyq\action\order\CartAction.class

     文件       1304  2017-06-09 11:21  Shop\build\classes\com\lyq\action\order\OrderAction-order_confirm-validation.xml

     文件       6861  2017-06-12 23:06  Shop\build\classes\com\lyq\action\order\OrderAction.class

     文件      12212  2017-06-12 23:06  Shop\build\classes\com\lyq\action\product\ProductAction.class

     文件        592  2017-06-09 11:21  Shop\build\classes\com\lyq\action\product\ProductCategoryAction-category_save-validation.xml

     文件       3519  2017-06-12 23:06  Shop\build\classes\com\lyq\action\product\ProductCategoryAction.class

     文件       2762  2017-06-09 11:21  Shop\build\classes\com\lyq\action\struts-admin.xml

     文件       1293  2017-06-09 11:21  Shop\build\classes\com\lyq\action\struts-default.xml

     文件       2451  2017-06-09 11:21  Shop\build\classes\com\lyq\action\struts-front.xml

     文件       1487  2017-06-09 11:21  Shop\build\classes\com\lyq\action\user\CustomerAction-customer_save-validation.xml

     文件       2834  2017-06-12 23:06  Shop\build\classes\com\lyq\action\user\CustomerAction.class

     文件       2208  2017-06-12 23:06  Shop\build\classes\com\lyq\action\user\UserAction.class

     文件       1154  2017-06-12 23:06  Shop\build\classes\com\lyq\dao\baseDao.class

     文件       7372  2017-06-12 23:06  Shop\build\classes\com\lyq\dao\DaoSupport.class

     文件       1515  2017-06-12 23:06  Shop\build\classes\com\lyq\dao\DaoSupportTest.class

     文件        291  2017-06-12 23:06  Shop\build\classes\com\lyq\dao\order\OrderDao.class

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

评论

共有 条评论