課程
/后端開發(fā)
/Java
/Java高并發(fā)秒殺API之web層
userPhone不是應該為空嗎?怎么就可以運行了?/
2017-08-08
源自:Java高并發(fā)秒殺API之web層 5-4
正在回答
success為false應該是自己給的吧,不是說獲取數(shù)據(jù)失敗返回false,后面老師不是有改false為true嗎
try {
SeckillExecution execution =seckillService.excuteSeckill(seckillId, phone, md5);
return new SeckillResult<SeckillExecution>(true, execution);
} catch (RepeatKillException e) {
SeckillExecution execution = new SeckillExecution(seckillId, SeckillStateEnum.REPEAT_KILL);
} catch (SeckillCloseException e) {
SeckillExecution execution = new SeckillExecution(seckillId, SeckillStateEnum.END);
} catch (Exception e) {
SeckillExecution execution = new SeckillExecution(seckillId, SeckillStateEnum.INNER_ERROR);
}
舉報
Java實現(xiàn)高并發(fā)秒殺API的第三門課,介紹Web層的設計和實現(xiàn)
3 回答@CookieValue cookie為空
2 回答oracle id 類型number 實體 int 為什么為空?
1 回答web為什么是紅色
1 回答為什么庫存是0
1 回答為啥前面的detail一開始檢驗seckillId為空,后面的exposer和execution沒有
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學習伙伴
掃描二維碼關注慕課網(wǎng)微信公眾號
2017-08-10
success為false應該是自己給的吧,不是說獲取數(shù)據(jù)失敗返回false,后面老師不是有改false為true嗎
try {
SeckillExecution execution =seckillService.excuteSeckill(seckillId, phone, md5);
return new SeckillResult<SeckillExecution>(true, execution);
} catch (RepeatKillException e) {
SeckillExecution execution = new SeckillExecution(seckillId, SeckillStateEnum.REPEAT_KILL);
return new SeckillResult<SeckillExecution>(true, execution);
} catch (SeckillCloseException e) {
SeckillExecution execution = new SeckillExecution(seckillId, SeckillStateEnum.END);
return new SeckillResult<SeckillExecution>(true, execution);
} catch (Exception e) {
SeckillExecution execution = new SeckillExecution(seckillId, SeckillStateEnum.INNER_ERROR);
return new SeckillResult<SeckillExecution>(true, execution);
}