課程
/后端開發(fā)
/Java
/Java高并發(fā)秒殺API之web層
userPhone不是應(yīng)該為空嗎?怎么就可以運(yùn)行了?/
2017-08-08
源自:Java高并發(fā)秒殺API之web層 5-4
正在回答
success為false應(yīng)該是自己給的吧,不是說獲取數(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實(shí)現(xiàn)高并發(fā)秒殺API的第三門課,介紹Web層的設(shè)計和實(shí)現(xiàn)
3 回答@CookieValue cookie為空
2 回答oracle id 類型number 實(shí)體 int 為什么為空?
1 回答為什么庫存是0
1 回答web為什么是紅色
3 回答為什么點(diǎn)擊link,404錯誤
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2017-08-10
success為false應(yīng)該是自己給的吧,不是說獲取數(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);
}