資源簡介
功能:
(1) 后臺管理員對商品、訂單等增刪改查
(2) 后臺用戶管理
(3) 用戶注冊,登錄,退出,個人信息修改,訂單查詢
(4) 購買商品, 搜索商品(模糊搜索)
(5) 用戶充值
(6) 所有查詢相關的頁面都要實現分頁
(7) 實現購物車功能
(8) 用戶針對商品進行留言咨詢,管理員可以回答咨詢(顯示在商品界面)
(9) 查詢商品的時候可以篩選排序(按價格、銷量排序,篩選價格區間) 等等
代碼片段和文件信息
package?com.lin.action;
import?javax.servlet.ServletContext;
import?javax.servlet.http.HttpServletRequest;
import?javax.servlet.http.HttpServletResponse;
import?javax.servlet.http.HttpSession;
import?org.apache.struts2.interceptor.ServletRequestAware;
import?org.apache.struts2.interceptor.ServletResponseAware;
import?org.apache.struts2.util.ServletContextAware;
import?org.springframework.beans.factory.annotation.Autowired;
import?com.lin.service.AdminService;
import?com.lin.service.CustomerService;
import?com.lin.service.ShopService;
import?com.opensymphony.xwork2.ActionSupport;
public?class?baseAction?extends?ActionSupport?implements?ServletRequestAware
ServletResponseAware?ServletContextAware?{
private?static?final?long?serialVersionUID?=?1L;
//常用結果集
public?static?final?String?LIST?=?“list“;
public?static?final?String?MODIFY?=?“modify“;
public?static?final?String?MODIFY_SUCCESS?=?“modify_success“;
public?static?final?String?ADD?=?“add“;
public?static?final?String?ADD_SUCCESS?=?“add_success“;
public?static?final?String?SELECT?=?“select“;
public?static?final?String?QUERY?=?“query“;
public?static?final?String?INDEX?=?“index“;
public?static?final?String?MAIN?=?“main“;
public?static?final?String?MANAGER?=?“manager“;
public?static?final?String?REGIST?=?“regist“;
public?static?final?String?MANAGER_LOGIN?=?“managerLogin“;
public?static?final?String?CUSTOMER_LOGIN?=?“customerLogin“;
public?static?final?String?LOGOUT?=?“logout“;
/*
?*?注入Service
?*/
@Autowired
protected?AdminService?adminService;
@Autowired
protected?CustomerService?customerService;
@Autowired?
protected?ShopService?shopService;
//context
protected?HttpServletResponse?response;
protected?HttpServletRequest?request;
protected?HttpSession?session;
protected?ServletContext?application;
//分頁頁數和頁大小?默認第一頁?一頁8個結果
protected?int?pageNo?=?1;
protected?int?pageSize?=?8;
//最大訂單
public?static?final?int?maxOrders?=?50;
//getter?and?setter
public?int?getPageNo()?{
return?pageNo;
}
public?void?setPageNo(int?pageNo)?{
this.pageNo?=?pageNo;
}
public?int?getPageSize()?{
return?pageSize;
}
public?void?setPageSize(int?pageSize)?{
this.pageSize?=?pageSize;
}
@Override
public?void?setServletContext(ServletContext?application)?{
//?TODO?Auto-generated?method?stub
this.application?=?application;
}
@Override
public?void?setServletResponse(HttpServletResponse?response)?{
//?TODO?Auto-generated?method?stub
this.response?=?response;
}
@Override
public?void?setServletRequest(HttpServletRequest?request)?{
//?TODO?Auto-generated?method?stub
this.request?=?request;
this.session?=?this.request.getSession();
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-05-27?19:40??MyShop\
?????文件????????1110??2016-05-27?16:06??MyShop\.classpath
?????目錄???????????0??2016-05-27?19:40??MyShop\.myeclipse\
?????目錄???????????0??2016-05-27?19:40??MyShop\.myeclipse\profiler\
?????文件????????1640??2016-05-25?19:46??MyShop\.myeclipse\profiler\MyShop?on?MyEclipse?Tomcat?7.xm
?????文件????????1181??2016-05-25?19:49??MyShop\.project
?????目錄???????????0??2016-05-27?19:40??MyShop\.settings\
?????文件?????????503??2013-07-10?21:41??MyShop\.settings\.jsdtscope
?????文件??????????80??2016-04-30?13:54??MyShop\.settings\com.genuitec.eclipse.migration.prefs
?????文件??????????75??2016-05-27?18:22??MyShop\.settings\org.eclipse.core.resources.prefs
?????文件?????????364??2013-07-10?21:41??MyShop\.settings\org.eclipse.jdt.core.prefs
?????文件?????????470??2016-05-27?16:06??MyShop\.settings\org.eclipse.wst.common.component
?????文件?????????348??2016-04-30?13:54??MyShop\.settings\org.eclipse.wst.common.project.facet.core.xm
?????文件??????????49??2013-07-10?21:41??MyShop\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件???????????6??2013-07-10?21:41??MyShop\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????目錄???????????0??2016-05-27?19:40??MyShop\WebContent\
?????目錄???????????0??2016-05-27?19:40??MyShop\WebContent\me
?????文件??????????39??2013-07-10?21:41??MyShop\WebContent\me
?????目錄???????????0??2016-05-27?19:40??MyShop\WebContent\WEB-INF\
?????目錄???????????0??2016-05-27?19:40??MyShop\WebContent\WEB-INF\classes\
?????文件????????5402??2016-05-25?21:48??MyShop\WebContent\WEB-INF\classes\applicationContext.xm
?????目錄???????????0??2016-05-27?19:40??MyShop\WebContent\WEB-INF\classes\com\
?????目錄???????????0??2016-05-27?19:40??MyShop\WebContent\WEB-INF\classes\com\lin\
?????目錄???????????0??2016-05-27?19:40??MyShop\WebContent\WEB-INF\classes\com\lin\action\
?????文件????????2671??2016-05-27?19:40??MyShop\WebContent\WEB-INF\classes\com\lin\action\ba
?????文件????????1779??2016-05-27?19:40??MyShop\WebContent\WEB-INF\classes\com\lin\action\HomeAction.class
?????目錄???????????0??2016-05-27?19:40??MyShop\WebContent\WEB-INF\classes\com\lin\action\consultation\
?????文件????????2691??2016-05-27?19:40??MyShop\WebContent\WEB-INF\classes\com\lin\action\consultation\ConsultationAction.class
?????目錄???????????0??2016-05-27?19:40??MyShop\WebContent\WEB-INF\classes\com\lin\action\customers\
?????文件????????2413??2016-05-27?19:40??MyShop\WebContent\WEB-INF\classes\com\lin\action\customers\CartAction.class
?????文件????????2234??2016-05-22?17:21??MyShop\WebContent\WEB-INF\classes\com\lin\action\customers\CustomerAction-customer_save-validation.xm
............此處省略435個文件信息
- 上一篇:酷炫網站后臺框架(40個)
- 下一篇:基于SSM的客戶管理系統源碼
評論
共有 條評論