@Service(value="seckillService") public class SeckillServiceImpl extends Object implements ISeckillService
Constructor and Description |
---|
SeckillServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
deleteSeckill(long seckillId)
删除秒杀售卖商品记录
|
Seckill |
getById(long seckillId)
查询单个秒杀记录
|
Long |
getSeckillCount(long seckillId)
查询秒杀售卖商品
|
List<Seckill> |
getSeckillList()
查询全部的秒杀记录
|
Result |
startSeckil(long seckillId,
long userId)
秒杀 一、会出现数量错误
|
Result |
startSeckilAopLock(long seckillId,
long userId)
秒杀 二、程序锁AOP
|
Result |
startSeckilDBOCC(long seckillId,
long userId,
long number)
秒杀 三、数据库悲观锁
|
Result |
startSeckilDBPCC_ONE(long seckillId,
long userId)
秒杀 二、数据库悲观锁
|
Result |
startSeckilDBPCC_TWO(long seckillId,
long userId)
秒杀 三、数据库悲观锁
|
Result |
startSeckilLock(long seckillId,
long userId)
秒杀 二、程序锁
|
public List<Seckill> getSeckillList()
ISeckillService
getSeckillList
in interface ISeckillService
public Seckill getById(long seckillId)
ISeckillService
getById
in interface ISeckillService
public Long getSeckillCount(long seckillId)
ISeckillService
getSeckillCount
in interface ISeckillService
@Transactional public void deleteSeckill(long seckillId)
ISeckillService
deleteSeckill
in interface ISeckillService
@Transactional public Result startSeckil(long seckillId, long userId)
ISeckillService
startSeckil
in interface ISeckillService
@Transactional public Result startSeckilLock(long seckillId, long userId)
ISeckillService
startSeckilLock
in interface ISeckillService
@Servicelock @Transactional public Result startSeckilAopLock(long seckillId, long userId)
ISeckillService
startSeckilAopLock
in interface ISeckillService
@Transactional public Result startSeckilDBPCC_ONE(long seckillId, long userId)
ISeckillService
startSeckilDBPCC_ONE
in interface ISeckillService
@Transactional public Result startSeckilDBPCC_TWO(long seckillId, long userId)
ISeckillService
startSeckilDBPCC_TWO
in interface ISeckillService
@Transactional public Result startSeckilDBOCC(long seckillId, long userId, long number)
ISeckillService
startSeckilDBOCC
in interface ISeckillService
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.