插入一条记录 打印出记录的ID 返回对象的ID 是0
public void createOrder(Bj_order ord,Integer addrId ,List<Order_item> ordItem){
try{
User_address uAddress = dao.fetch(User_address.class, addrId);
ord.setConsignee(uAddress.getName());
ord.setPhone(uAddress.getPhone());
ord.setAddress(uAddress.getAddress_detail());
Integer postal_code = uAddress.getPostal_code();
ord.setZip_code(postal_code.toString());
ord = dao.insert(ord);
System.out.print(ord.getOrder_id());
}catch (Exception e){
System.out.print(e);
}
}