package org.seckill.dao;

import org.apache.ibatis.annotations.Param;
import org.seckill.entity.Seckill;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created by wchb7 on 16-5-8.
 */
public interface SeckillDao {

    /**
     * 减库存
     *
     * @param seckillId
     * @param killTime
     * @return 如果更新行数大于1,表示更新的行数
     */
    int reduceNumber(@Param("seckillId") long seckillId, @Param("killTime") Date killTime);


    /**
     * 根据ID查询秒杀对象
     *
     * @param seckillId
     * @return
     */
    Seckill queryById(long seckillId);


    /**
     * 根据偏移量查询秒杀商品列表
     *
     * @param offset
     * @param limit
     * @return
     */
    List<Seckill> queryAll(@Param("offset") int offset, @Param("limit") int limit);

    /**
     * 使用存储过程执行秒杀
     *
     * @param paramMap
     */
    void killByProcedure(Map<String, Object> paramMap);

}
最近下载更多
dapeng0011  LV13 2月24日
笛卡尔积  LV6 2023年2月17日
弹指又十年  LV8 2022年9月18日
asd6260647  LV4 2022年7月2日
moneyla  LV5 2022年3月11日
李可以  LV5 2022年2月19日
xuweisong2010  LV27 2021年10月28日
qiheideguang  LV16 2021年10月17日
ltq50736  LV4 2021年9月3日
qiangmin1223  LV12 2021年8月25日
最近浏览更多
dapeng0011  LV13 2月24日
limin123  LV6 2023年10月16日
西瓜哥哥  LV4 2023年8月16日
yqyqyqyqy  LV4 2023年8月10日
cunbie  LV4 2023年6月13日
aaaahao  LV13 2023年5月29日
杨亚洲 2023年5月5日
暂无贡献等级
aaaaooa  LV4 2023年4月22日
微信网友_6442962125967360  LV2 2023年4月21日
1613619109  LV6 2023年3月24日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友