• 大小: 15.42MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-08-05
  • 语言: 其他
  • 标签: 购物商城  

资源简介

网络服装购物商城系统源码网络服装购物商城系统源码网络服装购物商城系统源码

资源截图

代码片段和文件信息

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

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-06-02 03:34  Shop\
     文件        3361  2012-06-02 01:53  Shop\.classpath
     文件        1253  2012-05-29 21:54  Shop\.project
     目录           0  2012-06-02 03:34  Shop\.settings\
     文件         454  2010-04-20 09:27  Shop\.settings\.jsdtscope
     文件        1040  2012-05-31 20:44  Shop\.settings\com.genuitec.eclipse.j2eedt.core.prefs
     文件         330  2010-04-20 09:27  Shop\.settings\org.eclipse.jdt.core.prefs
     文件         486  2012-05-31 21:28  Shop\.settings\org.eclipse.wst.common.component
     文件         320  2010-04-20 09:27  Shop\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2010-04-20 09:27  Shop\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2010-04-20 09:27  Shop\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2018-04-19 17:01  Shop\src\
     文件        1662  2010-04-27 16:34  Shop\src\applicationContext-common.xml
     目录           0  2012-06-02 03:34  Shop\src\com\
     目录           0  2012-06-02 03:34  Shop\src\com\lyq\
     目录           0  2012-06-02 03:34  Shop\src\com\lyq\action\
     文件         899  2010-04-20 09:28  Shop\src\com\lyq\action\baseAction-logon-validation.xml
     文件        4365  2010-04-20 09:28  Shop\src\com\lyq\action\baseAction.java
     文件        1860  2010-04-20 09:28  Shop\src\com\lyq\action\IndexAction.java
     目录           0  2012-06-02 03:34  Shop\src\com\lyq\action\interceptor\
     文件         852  2010-05-04 14:46  Shop\src\com\lyq\action\interceptor\CustomerLoginInteceptor.java
     文件         863  2010-04-20 09:28  Shop\src\com\lyq\action\interceptor\UserLoginInterceptor.java
     目录           0  2012-06-02 03:34  Shop\src\com\lyq\action\order\
     文件        2228  2010-04-30 11:53  Shop\src\com\lyq\action\order\CartAction.java
     文件        1302  2010-04-20 09:28  Shop\src\com\lyq\action\order\OrderAction-order_confirm-validation.xml
     文件        5804  2010-05-06 14:16  Shop\src\com\lyq\action\order\OrderAction.java
     目录           0  2012-06-02 03:34  Shop\src\com\lyq\action\product\
     文件       10761  2010-05-08 14:13  Shop\src\com\lyq\action\product\ProductAction.java
     文件         590  2010-04-20 09:28  Shop\src\com\lyq\action\product\ProductCategoryAction-category_save-validation.xml
     文件        2732  2010-05-05 16:49  Shop\src\com\lyq\action\product\ProductCategoryAction.java
     文件        2765  2010-05-06 11:11  Shop\src\com\lyq\action\struts-admin.xml
............此处省略323个文件信息

评论

共有 条评论