秒杀系统设计
2016-06-26 09:31:31 0 举报
AI智能生成
慕课网(www.imooc.com)《Java高并发秒杀API》课程中的设计思维导图
作者其他创作
大纲/内容
业务分析
减库存
记录购买明细
数据库设计
库存明细表:seckill
seckill_id
name
create_time
start_time
end_time
number
秒杀明细表:success_killed
seckill_id
name
user_phone
create_time
state
DAO接口设计
DAO
SeckillDAO
Seckill queryById(Long seckillId)
int reduceNumber(Long seckillId, Date time)
List<Seckill> queryAll(int offet, int limit)
SuccessKilledDAO
int insertSuccessKilled(Long seckillId, Long userPhone)
SuccessKilled queryByIdWithSeckill(Long seckillId)
spring集成mybatis配置:spring-dao.xml
junit4测试
单元测试
集成测试
Service接口设计
DTO
SeckillService
List<Seckill> getSeckillList()
Seckill getById(Long seckillId)
Exposer exportSeckillUrl(Long seckillId)
SeckillExcution excuteSeckill(Long seckillId, Long userPhone, String md5)
spring管理service依赖:spring-service.xml
junit4测试
单元测试
集成测试
Web层设计
controller
SeckillController
list:/seckill/list
detail:/seckill/{seckillId}/detail
exposer
execute
result
SeckillResult<T>
jsp/js
javascript模块化
jQuery和插件
bootstrap
spring mvc配置:spring-web.xml
0 条评论
下一页