Loading

防止相同商品重复秒杀

修改下单业务层实现

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);
}

 

posted @ 2021-08-11 16:02  1640808365  阅读(110)  评论(0编辑  收藏  举报