package com.fkcp.daoimp;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import com.fkcp.comm.*;
import com.fkcp.entity.GoodsInfoBean;
import com.fkcp.entity.Method_sendBean;
import com.fkcp.entity.Orders_Goods_Method_money;
import com.fkcp.entity.Orders_InfoBean;
import com.fkcp.entity.Orders_detailBean;
import com.fkcp.entitydao.Orders_InfoDao;
import com.fkcp.sqlcreate.GoodsInfoSQL;
import com.fkcp.sqlcreate.Orders_InfoSQL;
import com.fkcp.sqlcreate.Orders_detailSQL;
/**
* 订单表:
*
* @author Administrator
*
*/
public class Orders_InfoDaoImp implements Orders_InfoDao {
private DatabaseUtil data = new DatabaseUtil();
/**
* 无参查询
*/
public List<Orders_InfoBean> ordersSelect() {
// TODO Auto-generated method stub
List<Orders_InfoBean> list = new ArrayList<Orders_InfoBean>();
ResultSet set = null;
Orders_InfoBean or = null;
try {
this.data.createConnection();
String sql = Orders_InfoSQL.Orders_InfoSQL_select;
set = this.data.executeQuery(sql);
while (set.next()) {
or = new Orders_InfoBean();
or.setOrder_Id(set.getString("order_Id"));
or.setAdress(set.getString("adress"));
or.setContactman(set.getString("contactman"));
or.setDeal_date(set.getDate("deal_date"));
or.setMethod_Id(set.getInt("method_Id"));
or.setMobil(set.getString("mobil"));
or.setOrder_BeiZhu(set.getString("order_BeiZhu"));
or.setOrder_Date(set.getDate("order_Date"));
or.setOrder_Id(set.getString("order_Id"));
or.setOrdersummoney(set.getDouble("ordersummoney"));
or.setPhone(set.getString("phone"));
or.setPostcod(set.getString("postcod"));
or.setSend_Id(set.getInt("send_Id"));
or.setStates(set.getString("states"));
or.setUser_Id(set.getInt("user_Id"));
list.add(or);
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
this.data.release(set);
}
return list;
}
/**
* 有参查询
*/
public List<Orders_InfoBean> ordersSelect(Orders_InfoBean orders) {
// TODO Auto-generated method stub
List<Orders_InfoBean> list = new ArrayList<Orders_InfoBean>();
ResultSet set = null;
Orders_InfoBean or = null;
try {
this.data.createConnection();
String sql = Orders_InfoSQL.Orders_InfoSQL_selectAll;
set = this.data.executeQuery(sql, orders.getOrder_Id());
while (set.next()) {
or = new Orders_InfoBean();
or.setOrder_Id(set.getString("order_Id"));
or.setAdress(set.getString("adress"));
or.setContactman(set.getString("contactman"));
or.setDeal_date(set.getDate("deal_date"));
or.setMethod_Id(set.getInt("method_Id"));
or.setMobil(set.getString("mobil"));
or.setOrder_BeiZhu(set.getString("order_BeiZhu"));
or.setOrder_Date(set.getDate("order_Date"));
or.setOrder_Id(set.getString("order_Id"));
or.setOrdersummoney(set.getDouble("ordersummoney"));
or.setPhone(set.getString("phone"));
or.setPostcod(set.getString("postcod"));
or.setSend_Id(set.getInt("send_Id"));
or.setStates(set.getString("states"));
or.setUser_Id(set.getInt("user_Id"));
list.add(or);
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
this.data.release(set);
}
return list;
}
/**
* 有参查询 根据编号查找 String[]
*/
public List<Orders_InfoBean> order_InfoSelect_Id(String[] order_Id) {
// TODO Auto-generated method stub
List<Orders_InfoBean> list = new ArrayList<Orders_InfoBean>();
ResultSet set = null;
Orders_InfoBean or = null;
try {
this.data.createConnection();
String sql = Orders_InfoSQL.Orders_InfoSQL_selectAll;
for(String Id:order_Id){
set = this.data.executeQuery(sql,Id);
while (set.next()) {
or = new Orders_InfoBean();
or.setOrder_Id(set.getString("order_Id"));
or.setAdress(set.getString("adress"));
or.setContactman(set.getString("contactman"));
or.setDeal_date(set.getDate("deal_date"));
or.setMethod_Id(set.getInt("method_Id"));
or.setMobil(set.getString("mobil"));
or.setOrder_BeiZhu(set.getString("order_BeiZhu"));
or.setOrder_Date(set.getDate("order_Date"));
or.setOrder_Id(set.getString("order_Id"));
or.setOrdersummoney(set.getDouble("ordersummoney"));
or.setPhone(set.getString("phone"));
or.setPostcod(set.getString("postcod"));
or.setSend_Id(set.getInt("send_Id"));
or.setStates(set.getString("states"));
or.setUser_Id(set.getInt("user_Id"));
list.add(or);
}
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
this.data.release(set);
}
return list;
}
/**
* 有参查询 根据单据编号查询
*/
public Orders_InfoBean ordersSelect(String orders_Id) {
ResultSet set = null;
Orders_InfoBean or = null;
try {
this.data.createConnection();
String sql = Orders_InfoSQL.Orders_InfoSQL_selectAll;
set = this.data.executeQuery(sql, orders_Id);
while (set.next()) {
or = new Orders_InfoBean();
or.setOrder_primary(set.getInt("order_primary"));
or.setOrder_Id(set.getString("order_Id"));
or.setAdress(set.getString("adress"));
or.setContactman(set.getString("contactman"));
or.setDeal_date(set.getDate("deal_date"));
or.setMethod_Id(set.getInt("method_Id"));
or.setMobil(set.getString("mobil"));
or.setOrder_BeiZhu(set.getString("order_BeiZhu"));
or.setOrder_Date(set.getDate("order_Date"));
or.setOrder_Id(set.getString("order_Id"));
or.setOrdersummoney(set.getDouble("ordersummoney"));
or.setPhone(set.getString("phone"));
or.setPostcod(set.getString("postcod"));
or.setSend_Id(set.getInt("send_Id"));
or.setStates(set.getString("states"));
or.setUser_Id(set.getInt("user_Id"));
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
this.data.release(set);
}
return or;
}
/**
* 添加
*/
public int getInsert(Orders_InfoBean orders) {
int count = 0;
try {
this.data.createConnection();
String sql = Orders_InfoSQL.Orders_InfoSQL_insert;
count = this.data.executeUpdate(sql, orders.getOrder_Id(), orders
.getOrder_Date(), orders.getAdress(), orders
.getContactman(), orders.getPostcod(), orders
.getOrdersummoney(), orders.getMobil(), orders.getPhone(),
orders.getDeal_date(), orders.getStates(), orders
.getSend_Id(), orders.getMethod_Id(), orders
.getUser_Id(), orders.getOrder_BeiZhu());
} finally {
this.data.release();
}
return count;
}
/**
* 修改
*/
public int getUpdate(Orders_InfoBean orders) {
// TODO Auto-generated method stub
int count = 0;
try {
this.data.createConnection();
String sql = Orders_InfoSQL.Orders_InfoSQL_update;
count = this.data.executeUpdate(sql, orders.getAdress(), orders
.getContactman(), orders.getPostcod(), orders.getMobil(),
orders.getPhone(), orders.getOrder_Id());
} finally {
this.data.release();
}
return count;
}
/**
* 修改单据状态 根据编号来的 参数是String[]
*/
public int getUpdate_Orders_Id(String[] order_Id) {
// TODO Auto-generated method stub
int count = 0;
boolean bl=true;
Connection con=this.data.createConnection();
try {
con.setAutoCommit(false);
java.util.Date time=new java.util.Date();
String sql = Orders_InfoSQL.Orders_InfoSQl_UpdateStates;
for(String str:order_Id){
count=this.data.executeUpdate(sql,time, str);
if(count==0){
bl=false;
break;
}
}
if(bl==true){
con.commit();
}
else{
con.rollback();
}
} catch (SQLException e) {
// TODO Auto-generated catch bloc
没有合适的资源?快使用搜索试试~ 我知道了~
Jsp项目(凡客诚品)
共1509个文件
jpg:540个
gif:277个
js:258个
4星 · 超过85%的资源 需积分: 10 45 下载量 200 浏览量
2009-08-27
10:20:21
上传
评论 2
收藏 8.88MB RAR 举报
温馨提示
Jsp项目,内有SQL数据库,JavaBean,购物车,分布,Ajax技术
资源推荐
资源详情
资源评论
收起资源包目录
Jsp项目(凡客诚品) (1509个子文件)
12.bmp 471KB
GZCB.bmp 3KB
CCB.bmp 3KB
GZRCC.bmp 3KB
SPDB.bmp 3KB
ICBC.bmp 3KB
SDB.bmp 3KB
BCOM.bmp 3KB
ABC.bmp 3KB
BJRCB.bmp 3KB
CITIC.bmp 3KB
CEB.bmp 3KB
CMB.bmp 3KB
GDB.bmp 3KB
HXB.bmp 3KB
BOB.bmp 3KB
CBHB.bmp 3KB
SHRCC.bmp 3KB
POST.bmp 3KB
BOC.bmp 3KB
CIB.bmp 3KB
NJCB.bmp 3KB
CMBC.bmp 3KB
Orders_InfoDaoImp.class 14KB
GoodsInfoDaoImp.class 9KB
Orders_sendDaoImp.class 7KB
userInfoDaoImp.class 6KB
GoodsInfoBean.class 6KB
userInfoBean.class 4KB
Orders_detailDaoImp.class 4KB
Orders_InfoBean.class 4KB
Goods_TypeDaoImp.class 4KB
ProclaimInfoDaoImp.class 4KB
Electroa_TreadDaoImp.class 4KB
Method_sendDaoImp.class 3KB
Goods_ppInfoDaoImp.class 3KB
Procclaim_typeDaoImp.class 3KB
Orders_paymentDaoImp.class 3KB
Method_moneyDaoImp.class 3KB
Goods_statesDaoImp.class 3KB
MemberInfoDaoImp.class 3KB
DatabaseUtil.class 3KB
Orders_InfoManger.class 3KB
makeCertPic.class 2KB
Electroa_TreadBean.class 2KB
Orders_detailBean.class 2KB
Orders_paymentBean.class 2KB
PageDaoImp.class 2KB
Orders_sendManger.class 2KB
Orders_Goods_Method_money.class 2KB
Creatdanhao.class 2KB
GoodsInfoSQL.class 2KB
ProclaimInfoBean.class 2KB
Method_sendBean.class 2KB
userInfoManger.class 1KB
GoodsInfoManger.class 1KB
Orders_sendBean.class 1KB
test.class 1KB
Orders_detailManger.class 1KB
Goods_ppInfoBean.class 1KB
ProclaimInfoManger.class 1KB
Orders_paymentManger.class 1KB
Procclaim_typeManger.class 1KB
Method_moneyBean.class 1KB
Orders_Info_Send.class 1KB
Goods_TypeManger.class 1KB
Electroa_TreadManger.class 1KB
Goods_statesBean.class 1KB
MemberInfoBean.class 1KB
Goods_ppInfoManger.class 1KB
Goods_TypeBean.class 1KB
Procclaim_typeBean.class 1KB
Orders_InfoSQL.class 1KB
CarBean.class 1KB
userInfoSQL.class 1KB
Method_sendManger.class 1KB
MemberInfoManger.class 1KB
Goods_statesManger.class 1KB
Method_moneyManger.class 973B
Orders_InfoDao.class 931B
ElectroaMoneySQL.class 907B
Procclaim_typeSQL.class 885B
Electroa_TreadSQL.class 865B
Goods_TypeSQL.class 837B
ProclaimInfoSQL.class 831B
Method_sendSQL.class 807B
Method_moneySQL.class 798B
Orders_sendSQL.class 797B
Goods_statesSQL.class 790B
Goods_ppInfoSQL.class 784B
Orders_detailSQL.class 770B
MemberInfosSQL.class 759B
GoodsInfoDao.class 671B
ProclaimInfo.class 631B
Procclaim_typemtest.class 605B
userInfoDao.class 594B
Orders_paymentSQL.class 585B
Orders_detailDao.class 571B
Goods_statesDao.class 546B
Goods_ppInfoDao.class 546B
共 1509 条
- 1
- 2
- 3
- 4
- 5
- 6
- 16
资源评论
- Gao_yiliang2012-11-03分好多啊,忍痛啊
luowei8932
- 粉丝: 1
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- C语言基础-C语言编程基础之Leetcode编程题解之第39题组合总和.zip
- C语言基础-C语言编程基础之Leetcode编程题解之第38题外观数列.zip
- C语言基础-C语言编程基础之Leetcode编程题解之第37题解数独.zip
- C语言基础-C语言编程基础之Leetcode编程题解之第36题有效的数独.zip
- C语言基础-C语言编程基础之Leetcode编程题解之第35题搜索插入位置.zip
- index.wxml
- C语言基础-C语言编程基础之Leetcode编程题解之第33题搜索旋转排序数组.zip
- 基于Python实现的手写数字识别系统源码.zip
- 从网页提取禁止转载的文字
- C语言基础-C语言编程基础之Leetcode编程题解之第32题最长有效括号.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功