fix: 异常加上状态码
parent
eddde958a5
commit
8ee487046c
|
@ -1502,7 +1502,7 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
||||||
rechargeGearDOList.forEach(rechargeGearDO -> {
|
rechargeGearDOList.forEach(rechargeGearDO -> {
|
||||||
Boolean flag = phoneRecordService.verifyPhone(request.getUserPhone(), rechargeGearDO.getRefundAmount().intValue() + "");
|
Boolean flag = phoneRecordService.verifyPhone(request.getUserPhone(), rechargeGearDO.getRefundAmount().intValue() + "");
|
||||||
if (flag) {
|
if (flag) {
|
||||||
throw new ServiceException("该挡位:" + rechargeGearDO.getName() + "你已购买,请勿重复操作");
|
throw new ServiceException(200, "该挡位:" + rechargeGearDO.getName() + "你已购买,请勿重复操作");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1516,7 +1516,7 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
||||||
Map<Long, List<PhoneRecordDO>> collect1 = infoDOS.stream().collect(Collectors.groupingBy(PhoneRecordDO::getRechargeGearId));
|
Map<Long, List<PhoneRecordDO>> collect1 = infoDOS.stream().collect(Collectors.groupingBy(PhoneRecordDO::getRechargeGearId));
|
||||||
orderInfos.forEach(info -> {
|
orderInfos.forEach(info -> {
|
||||||
if (!CollectionUtils.isEmpty(collect1.get(info.getGearId()))) {
|
if (!CollectionUtils.isEmpty(collect1.get(info.getGearId()))) {
|
||||||
throw new ServiceException("该挡位:" + info.getName() + "你已购买,请勿重复操作");
|
throw new ServiceException(200, "该挡位:" + info.getName() + "你已购买,请勿重复操作");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue