@Service public class SeckillDistributedServiceImpl extends Object implements ISeckillDistributedService
Constructor and Description |
---|
SeckillDistributedServiceImpl() |
Modifier and Type | Method and Description |
---|---|
Result |
startSeckilLock(long seckillId,
long userId,
long number)
秒杀 二 多个商品
|
Result |
startSeckilRedisLock(long seckillId,
long userId)
秒杀 一 单个商品
|
Result |
startSeckilZksLock(long seckillId,
long userId)
秒杀 一 单个商品
|
@Transactional public Result startSeckilRedisLock(long seckillId, long userId)
ISeckillDistributedService
startSeckilRedisLock
in interface ISeckillDistributedService
seckillId
- 秒杀商品IDuserId
- 用户ID@Transactional public Result startSeckilZksLock(long seckillId, long userId)
ISeckillDistributedService
startSeckilZksLock
in interface ISeckillDistributedService
seckillId
- 秒杀商品IDuserId
- 用户ID@Transactional public Result startSeckilLock(long seckillId, long userId, long number)
ISeckillDistributedService
startSeckilLock
in interface ISeckillDistributedService
seckillId
- 秒杀商品IDuserId
- 用户IDnumber
- 秒杀商品数量Copyright © 2018 Pivotal Software, Inc.. All rights reserved.