package com.dangdang.service;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Set;
import java.util.UUID;
import org.apache.ibatis.session.SqlSession;
import com.dangdang.dao.AddressDAO;
import com.dangdang.dao.OrderDAO;
import com.dangdang.dao.OrderDetallDAO;
import com.dangdang.entity.BuyAddress;
import com.dangdang.entity.Order;
import com.dangdang.entity.OrderDetall;
import com.dangdang.entity.User;
import com.dangdang.util.MyBatisUtil;
import com.dangdang.vo.Cart;
import com.dangdang.vo.OrderItem;
public class OrderServiceImpl implements OrderService{
//收货地址入库、订单入库、订单项表入库
@Override
public void orderOrder(BuyAddress address, User user, Cart cart) {
try {
//收货地址入库
address.setuId(user.getId());
address.setAddrstatus(0);
address.setIsDefault(0);
//把User对象存放在Buyaddress
address.setUser(user);
AddressDAO ad = (AddressDAO) MyBat
mybatis一个业务多次提交事务commit造成主键不顺序递增(触发器的原因)
最新推荐文章于 2024-06-05 17:03:48 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)