资源简介

添加我的订单功能

资源截图

代码片段和文件信息

package com.shop.action;
import java.util.List;

import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import com.shop.model.Catagory;
import com.shop.service.CatagoryManager;

public class CatagoryAction extends ActionSupport implements ModelDriven{
private static final long serialVersionUID = 1L;
private CatagoryManager catagoryManager;
private List catagories;
private Catagory catagory=new Catagory();
private int curPage;
private int pageSize;
private int toalPage;

//查找总共页数
public void count(int pageSize){
if(pageSize==0){
pageSize=6;
}
int count=catagoryManager.findCount(pageSize);
if(count%pageSize==0){
toalPage=count/pageSize;
}else {
toalPage=count/pageSize+1;
}
}

//添加商品分类
public String addCatagory() throws Exception {
catagoryManager.add(catagory);
return “add“;
}

//获取修改的商品分类信息
public String find() {
catagory=catagoryManager.findByid(catagory.getId());
catagories=catagoryManager.findPid();
return “find“;
}
//修改商品分类
public String modify() {
catagoryManager.modify(catagory);
return “modify“;
}

//查找所有商品分类
public String execute() {
if(curPage==0){
curPage=1;
}
if(pageSize==0){
pageSize=6;
}
count(pageSize);
catagories=catagoryManager.findAll(curPagepageSize);
return SUCCESS;
}
//查找所有大商品分类
public String findPid() {
catagories=catagoryManager.findPid();
return “allPic“;
}

//删除该分类
public String delete(){
catagoryManager.deleteCatagory(catagory);
return “delete“;
}
public List getCatagories() {
return catagories;
}
public Catagory getCatagory() {
return catagory;
}
public CatagoryManager getCatagoryManager() {
return catagoryManager;
}
public Catagory getModel() {
return catagory;
}
public void setCatagories(List catagories) {
this.catagories = catagories;
}
public void setCatagory(Catagory catagory) {
this.catagory = catagory;
}

public void setCatagoryManager(CatagoryManager catagoryManager) {
this.catagoryManager = catagoryManager;
}
public int getCurPage() {
return curPage;
}
public void setCurPage(int curPage) {
this.curPage = curPage;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getToalPage() {
return toalPage;
}
public void setToalPage(int toalPage) {
this.toalPage = toalPage;
}

}

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

     文件        529  2014-03-17 14:42  shop\.classpath

     文件        519  2014-03-20 08:35  shop\.myhibernatedata

     文件        285  2015-04-24 21:09  shop\.mymetadata

     文件       1949  2014-03-20 08:35  shop\.project

     文件        500  2014-03-17 14:43  shop\.settings\.jsdtscope

     文件         88  2015-04-24 21:10  shop\.settings\org.eclipse.core.resources.prefs

     文件        364  2014-03-17 14:42  shop\.settings\org.eclipse.jdt.core.prefs

     文件        450  2014-03-17 14:42  shop\.settings\org.eclipse.wst.common.component

     文件        252  2014-03-17 14:42  shop\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2014-03-17 14:42  shop\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2014-03-17 14:42  shop\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件       3534  2015-04-24 22:57  shop\src\beans.xml

     文件       2662  2014-04-10 17:35  shop\src\com\shop\action\CatagoryAction.java

     文件      19834  2014-04-19 10:10  shop\src\com\shop\action\DataAction.java

     文件       2570  2014-04-02 21:03  shop\src\com\shop\action\LeavesAction.java

     文件       1441  2014-04-03 22:44  shop\src\com\shop\action\LoginAction.java

     文件       2352  2014-04-02 15:13  shop\src\com\shop\action\NewsAction.java

     文件       4964  2015-04-26 23:40  shop\src\com\shop\action\OrderAction.java

     文件       6244  2014-04-11 20:22  shop\src\com\shop\action\ProductAction.java

     文件       4737  2014-04-11 19:56  shop\src\com\shop\action\UserAction.java

     文件        820  2014-04-06 23:29  shop\src\com\shop\dao\CatagoryDao.java

     文件       2663  2014-04-10 17:36  shop\src\com\shop\dao\impl\CatagoryDaoImpl.java

     文件       2308  2014-04-09 21:56  shop\src\com\shop\dao\impl\LeavesDaoImpl.java

     文件       2232  2014-04-10 23:17  shop\src\com\shop\dao\impl\NewsDaoImpl.java

     文件       4142  2015-04-26 20:21  shop\src\com\shop\dao\impl\OrderDaoImpl.java

     文件       3849  2014-04-19 10:13  shop\src\com\shop\dao\impl\ProductDaoImpl.java

     文件       2623  2014-04-02 13:59  shop\src\com\shop\dao\impl\UserDaoImpl.java

     文件        355  2014-04-09 21:55  shop\src\com\shop\dao\LeavesDao.java

     文件        360  2014-04-06 10:23  shop\src\com\shop\dao\NewsDao.java

     文件        803  2015-04-26 20:22  shop\src\com\shop\dao\OrderDao.java

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

评论

共有 条评论