首页 > 其他 > 详细

增加订单明细

时间:2015-10-30 22:49:25      阅读:173      评论:0      收藏:0      [点我收藏+]

如何增加订单明细?其实就是执行一个sql语句。

 

public class ItemDao {

public void addItem(ItemInfo item) throws Exception {
String sql="insert into items values(seq_items.nextval,?,?,?,?,?,0,?)";
int cnt=new DB().update(sql,
item.getOid(),
item.getBid(),
item.getCreateDate(),
item.getCount(),
item.getPrice(),
item.getTotal_price());
if(cnt==0){
throw new Exception("增加明细失败!");
}
}

}

增加订单明细

原文:http://www.cnblogs.com/tian114527375/p/4924442.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!