• 大小: 15.01MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-21
  • 语言: Java
  • 标签: Java  

资源简介

基于jsp+servlet的在线购物网站,可以实现购物车,订单等等很多功能

资源截图

代码片段和文件信息

package com.hnkjzy.dao;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import com.hnkjzy.entity.Address;

public class AddressDao extends baseDao {

public List
 findAll(int userid){
String sql = “select * from address where userid=?“;
ResultSet rs = executeQuery(sqluserid);
List
 list = new ArrayList
();
try {
while(rs.next()){
Address a = new Address(rs.getInt(1) rs.getString(2) rs.getString(3) rs.getString(4)rs.getInt(5));
list.add(a);
}
} catch (SQLException e) {
e.printStackTrace();
} finally{
close();
}
return list;
}
//根据id查询地址信息
public Address findById(String id){
String sql = “select * from address where id=?“;
ResultSet rs = executeQuery(sqlid);
Address a = null;
try {
if(rs.next()){
 a = new Address(rs.getInt(1) rs.getString(2) rs.getString(3) rs.getString(4)rs.getInt(5));
}
} catch (SQLException e) {
e.printStackTrace();
} finally{
close();
}
return a;
}
//根据id删除地址
public boolean remove(String id){
String sql = “delete from address where id=?“;
return executeUpdate(sql id);
}
//添加一条地址信息
public boolean add(Address a){
String sql = “insert into address values(?????)“;
return executeUpdate(sql a.getConsignee()a.getAddress()a.getTel()a.getUserid());
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-11-26 22:52  ShopProject\
     文件        1093  2018-01-05 10:59  ShopProject\.classpath
     文件        1336  2018-01-05 11:01  ShopProject\.project
     目录           0  2018-11-26 22:52  ShopProject\.settings\
     文件         522  2018-01-05 10:59  ShopProject\.settings\.jsdtscope
     文件          73  2018-01-05 11:01  ShopProject\.settings\com.genuitec.eclipse.core.prefs
     文件         364  2018-01-05 10:59  ShopProject\.settings\org.eclipse.jdt.core.prefs
     文件         492  2018-01-05 10:59  ShopProject\.settings\org.eclipse.wst.common.component
     文件         414  2018-01-05 10:59  ShopProject\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2018-01-05 10:59  ShopProject\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2018-01-05 10:59  ShopProject\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2018-11-26 22:52  ShopProject\src\
     目录           0  2018-11-26 22:52  ShopProject\src\com\
     目录           0  2018-11-26 22:52  ShopProject\src\com\hnkjzy\
     目录           0  2018-11-26 22:52  ShopProject\src\com\hnkjzy\dao\
     文件        1471  2018-01-19 11:41  ShopProject\src\com\hnkjzy\dao\AddressDao.java
     文件        2369  2018-01-19 23:37  ShopProject\src\com\hnkjzy\dao\baseDao.java
     文件        1091  2018-01-18 19:50  ShopProject\src\com\hnkjzy\dao\NewsDao.java
     文件        3690  2018-01-18 19:50  ShopProject\src\com\hnkjzy\dao\OrderDao.java
     文件        1039  2018-01-18 20:04  ShopProject\src\com\hnkjzy\dao\OrderDetailDao.java
     文件        4382  2018-01-18 23:46  ShopProject\src\com\hnkjzy\dao\ProductDao.java
     文件        1715  2018-01-18 19:53  ShopProject\src\com\hnkjzy\dao\ShoppingDao.java
     文件        2470  2018-01-18 19:54  ShopProject\src\com\hnkjzy\dao\UserDao.java
     目录           0  2018-11-26 22:52  ShopProject\src\com\hnkjzy\entity\
     文件        1147  2018-01-18 19:40  ShopProject\src\com\hnkjzy\entity\Address.java
     文件        1016  2018-01-18 19:54  ShopProject\src\com\hnkjzy\entity\News.java
     文件        2011  2018-01-18 19:54  ShopProject\src\com\hnkjzy\entity\Order.java
     文件        1261  2018-01-18 19:54  ShopProject\src\com\hnkjzy\entity\Order_detail.java
     文件        1540  2018-01-18 22:09  ShopProject\src\com\hnkjzy\entity\Product.java
     文件        1091  2018-01-18 19:55  ShopProject\src\com\hnkjzy\entity\Shopping.java
     文件        1943  2018-01-18 19:55  ShopProject\src\com\hnkjzy\entity\Users.java
............此处省略372个文件信息

评论

共有 条评论