• 大小: 10.94MB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2023-10-08
  • 语言: Java
  • 标签: 汽车销售  

资源简介

为前台和后台两大模块 电子商务类网站 JSP+SQL SERVER SSH

资源截图

代码片段和文件信息

package com.action;



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

import org.apache.struts2.ServletActionContext;

import com.dao.TCatelogDAO;
import com.dao.TGoodsDAO;
import com.dao.TOrderItemDAO;
import com.model.TGoods;
import com.opensymphony.xwork2.ActionSupport;

public class indexAction extends ActionSupport
{
private TGoodsDAO goodsDAO;

private TOrderItemDAO orderItemDAO;


public String index()
{
Map request=(Map)ServletActionContext.getContext().get(“request“);



String sql=“from TGoods where goodsDel=‘no‘ and goodsIsnottejia=‘yes‘ order by goodsId desc“;
List goodsYesTejiaList=goodsDAO.getHibernateTemplate().find(sql);
if(goodsYesTejiaList.size()>5)
{
goodsYesTejiaList=goodsYesTejiaList.subList(0 5);
}
request.put(“goodsYesTejiaList“ goodsYesTejiaList);



sql=“from TGoods where goodsDel=‘no‘ and goodsIsnottejia=‘no‘ order by goodsId desc“;
List goodsNoTejiaList=goodsDAO.getHibernateTemplate().find(sql);
if(goodsNoTejiaList.size()>5)
{
goodsNoTejiaList=goodsNoTejiaList.subList(0 5);
}
request.put(“goodsNoTejiaList“ goodsNoTejiaList);


//paihangbang
List goodsList=new ArrayList();
sql=“select sum(goodsQuantity)goodsId from TOrderItem group by goodsId order by sum(goodsQuantity) desc“;
List list=orderItemDAO.getHibernateTemplate().find(sql);
for(int i=0;i {
object[] b=(object[])list.get(i);
int goodsId=Integer.parseInt(b[1].toString());
System.out.println(goodsId+“&&“);
TGoods goods=goodsDAO.findById(goodsId);
goodsList.add(goods);
}
if(goodsList.size()>5)
{
goodsList=goodsList.subList(0 5);
}
request.put(“goodsList“ goodsList);
//paihangbang


return ActionSupport.SUCCESS;
}


public TGoodsDAO getGoodsDAO()
{
return goodsDAO;
}

public void setGoodsDAO(TGoodsDAO goodsDAO)
{
this.goodsDAO = goodsDAO;
}


public TOrderItemDAO getOrderItemDAO()
{
return orderItemDAO;
}


public void setOrderItemDAO(TOrderItemDAO orderItemDAO)
{
this.orderItemDAO = orderItemDAO;
}


}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-05-13 12:34  360JSP汽车销售系统\
     文件     1048576  2015-05-13 13:00  360JSP汽车销售系统\db_shangcheng_Data.MDF
     文件     1048576  2015-05-13 13:00  360JSP汽车销售系统\db_shangcheng_Log.LDF
     文件     6794752  2015-05-13 10:35  360JSP汽车销售系统\JSP汽车销售系统录像.avi
     目录           0  2015-05-13 12:26  360JSP汽车销售系统\wlgw\
     文件        5186  2011-05-08 18:13  360JSP汽车销售系统\wlgw\.classpath
     目录           0  2015-05-13 12:26  360JSP汽车销售系统\wlgw\.myeclipse\
     文件         527  2011-04-01 03:20  360JSP汽车销售系统\wlgw\.myhibernatedata
     文件         285  2015-05-13 10:29  360JSP汽车销售系统\wlgw\.mymetadata
     文件        1632  2011-04-01 03:20  360JSP汽车销售系统\wlgw\.project
     目录           0  2015-05-13 12:26  360JSP汽车销售系统\wlgw\.settings\
     文件         330  2010-07-16 17:19  360JSP汽车销售系统\wlgw\.settings\org.eclipse.jdt.core.prefs
     文件         273  2010-09-16 14:38  360JSP汽车销售系统\wlgw\.springBeans
     目录           0  2015-05-13 12:26  360JSP汽车销售系统\wlgw\src\
     目录           0  2015-05-13 12:26  360JSP汽车销售系统\wlgw\src\com\
     目录           0  2015-05-13 12:35  360JSP汽车销售系统\wlgw\src\com\action\
     文件        2189  2011-03-10 15:48  360JSP汽车销售系统\wlgw\src\com\action\indexAction.java
     目录           0  2015-05-13 12:35  360JSP汽车销售系统\wlgw\src\com\dao\
     文件        4153  2011-03-03 18:12  360JSP汽车销售系统\wlgw\src\com\dao\TLiuyanDAO.java
     文件        4475  2011-03-03 18:12  360JSP汽车销售系统\wlgw\src\com\dao\TOrderDAO.java
     目录           0  2015-05-13 12:35  360JSP汽车销售系统\wlgw\src\com\model\
     文件        2327  2011-03-03 18:12  360JSP汽车销售系统\wlgw\src\com\model\TGonggao.hbm.xml
     文件        3782  2011-03-03 18:12  360JSP汽车销售系统\wlgw\src\com\model\TGonggao.java
     文件        1510  2011-03-03 18:12  360JSP汽车销售系统\wlgw\src\com\model\TOrder.hbm.xml
     文件        2183  2011-03-03 18:12  360JSP汽车销售系统\wlgw\src\com\model\TOrder.java
     目录           0  2015-05-13 12:35  360JSP汽车销售系统\wlgw\src\com\service\
     文件        2622  2011-03-03 18:12  360JSP汽车销售系统\wlgw\src\com\service\loginService.java
     目录           0  2015-05-13 12:35  360JSP汽车销售系统\wlgw\src\com\util\
     文件        2922  2011-03-03 18:12  360JSP汽车销售系统\wlgw\src\com\util\upload.java
     文件        2534  2011-03-03 18:12  360JSP汽车销售系统\wlgw\src\com\util\Util.java
     文件        1589  2010-08-08 19:54  360JSP汽车销售系统\wlgw\src\log4j.properties
............此处省略998个文件信息

评论

共有 条评论