防止相同商品重复秒杀
修改下单业务层实现
dao层新增查询方法
public interface SeckillOrderMapper extends Mapper<SeckillOrder> { /** * 查询秒杀订单信息 * @param username * @param id * @return */ @Select("select * from tb_seckill_order where user_id=#{username} and seckill_id=#{id}") SeckillOrder getSecKillOrderByUserNameAndGoodsId(String username, Long id); }