• 大小: 4.05MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-20
  • 语言: 其他
  • 标签: eclipse  oracle  

资源简介

这是一个在线鞋城的购鞋网站的项目。主要功能是用户登录/查询产品/产品分页/添加购物车/删除购物车/订单管理/基础的Ajax运用等

资源截图

代码片段和文件信息

package com.dao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.dao.iface.OrderDaoIface;
import com.domain.Order;
import com.domain.OrderList;
import com.domain.Product;
import com.util.DbConnection;

public class OrderDao implements OrderDaoIface{

@Override
public int count(String sql String userId) {
int result = 0;
Connection conn = null;
PreparedStatement ps = null;
ResultSet rs = null;
conn = DbConnection.getConnection();
try {
ps = conn.prepareStatement(sql);
ps.setString(1 userId);
rs = ps.executeQuery();
if(rs.next()){
result = rs.getInt(1);
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally{
DbConnection.close(rs ps conn);
}
return result;
}
@Override
public List pagingById(String sql String userIdint begin int  end) {
List orderList = new ArrayList();
Connection conn = null;
PreparedStatement ps = null;
ResultSet rs = null;
conn = DbConnection.getConnection();
try {
ps = conn.prepareStatement(sql);
ps.setString(1 userId);
ps.setInt(2 begin);
ps.setInt(3 end);
rs = ps.executeQuery();
while(rs.next()){
int orderId = rs.getInt(“order_id“);
Date createTime = rs.getTimestamp(“CREATE_TIME“);
System.out.println(createTime);
Double amount = rs.getDouble(“amount“);
Order order = new Order();
order.setOrderId(orderId);
order.setCreateTime(createTime);
order.setAmount(amount);
orderList.add(order);
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally{
DbConnection.close(rs ps conn);
}
return orderList;
}
@Override
public Order queryOrder(String sql int orderId) {
Order order = null;

Connection conn = null;
PreparedStatement ps = null;
ResultSet  rs = null;

//String sql = “SELECT empno ename job sal FROM emp WHERE empno = ?“;
try {
conn = DbConnection.getConnection();
ps = conn.prepareStatement(sql);
ps.setInt(1 orderId);

rs = ps.executeQuery();

if (rs.next()){
int orderId1 = rs.getInt(“ORDER_ID“);
Date createTime = rs.getDate(“CREATE_TIME“);
Double amount = rs.getDouble(“AMOUNT“);
String payment = rs.getString(“PAYMENT“);
String receiver = rs.getString(“RECEIVER“);
String province = rs.getString(“PROVINCE“);
String city = rs.getString(“CITY“);
String county = rs.getString(“COUNTY“);
String address = rs.getString(“ADDRESS“);
String zipCode = rs.getString(“ZIPCODE“);
String telephone = rs.getString(“TELPHONE“);
String userId = rs.getString(“USER_ID“);
order= new Order(orderId1createTimeamountpaymentreceiverprovincecitycountyaddresszi

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

     文件        834  2018-09-03 13:35  Shopstore\ShoesShop1\.classpath

     文件       1043  2018-09-03 13:35  Shopstore\ShoesShop1\.project

     文件        503  2018-09-03 13:35  Shopstore\ShoesShop1\.settings\.jsdtscope

     文件        364  2018-09-03 13:35  Shopstore\ShoesShop1\.settings\org.eclipse.jdt.core.prefs

     文件        482  2018-09-03 13:35  Shopstore\ShoesShop1\.settings\org.eclipse.wst.common.component

     文件        345  2018-09-03 13:35  Shopstore\ShoesShop1\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2018-09-03 13:35  Shopstore\ShoesShop1\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2018-09-03 13:35  Shopstore\ShoesShop1\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件        627  2018-09-27 16:39  Shopstore\ShoesShop1\build\classes\com\dao\iface\OrderDaoIface.class

     文件        990  2018-09-27 16:39  Shopstore\ShoesShop1\build\classes\com\dao\iface\ProductDaoIface.class

     文件        667  2018-09-27 16:39  Shopstore\ShoesShop1\build\classes\com\dao\iface\ShoppingCartDaoIface.class

     文件        219  2018-09-27 16:39  Shopstore\ShoesShop1\build\classes\com\dao\iface\UserDaoIface.class

     文件       6696  2018-09-27 16:39  Shopstore\ShoesShop1\build\classes\com\dao\OrderDao.class

     文件       9274  2018-09-27 16:39  Shopstore\ShoesShop1\build\classes\com\dao\ProductDao.class

     文件       5416  2018-09-27 16:39  Shopstore\ShoesShop1\build\classes\com\dao\ShoppingCartDao.class

     文件       1536  2018-09-27 16:39  Shopstore\ShoesShop1\build\classes\com\dao\UserDao.class

     文件        942  2018-09-27 16:39  Shopstore\ShoesShop1\build\classes\com\domain\Category.class

     文件       3353  2018-09-27 16:39  Shopstore\ShoesShop1\build\classes\com\domain\Order.class

     文件        797  2018-09-27 16:39  Shopstore\ShoesShop1\build\classes\com\domain\OrderList.class

     文件       3959  2018-09-27 16:39  Shopstore\ShoesShop1\build\classes\com\domain\Product.class

     文件       2211  2018-09-27 16:39  Shopstore\ShoesShop1\build\classes\com\domain\ShoppingCart.class

     文件       1660  2018-09-27 16:39  Shopstore\ShoesShop1\build\classes\com\domain\Slider.class

     文件       1134  2018-09-27 16:39  Shopstore\ShoesShop1\build\classes\com\domain\User.class

     文件       1663  2018-09-27 16:39  Shopstore\ShoesShop1\build\classes\com\filter\LoginFilter.class

     文件        513  2018-09-27 16:39  Shopstore\ShoesShop1\build\classes\com\service\iface\OrderServiceIface.class

     文件        798  2018-09-27 16:39  Shopstore\ShoesShop1\build\classes\com\service\iface\ProductIface.class

     文件        557  2018-09-27 16:39  Shopstore\ShoesShop1\build\classes\com\service\iface\ShoppingCartIface.class

     文件        213  2018-09-27 16:39  Shopstore\ShoesShop1\build\classes\com\service\iface\UserServiceIface.class

     文件       2255  2018-09-27 16:39  Shopstore\ShoesShop1\build\classes\com\service\OrderService.class

     文件       5083  2018-09-27 16:39  Shopstore\ShoesShop1\build\classes\com\service\ProductService.class

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

评论

共有 条评论