|
@ -42,6 +42,10 @@ public class ConsumeServiceImpl implements ConsumeService { |
|
|
User sUser = userMapper.select(detailY.getJwcode()); |
|
|
User sUser = userMapper.select(detailY.getJwcode()); |
|
|
if(ObjectUtils.isEmpty(sUser)){ |
|
|
if(ObjectUtils.isEmpty(sUser)){ |
|
|
throw new Exception("无此精网号"); |
|
|
throw new Exception("无此精网号"); |
|
|
|
|
|
} else if (detailY.getJwcode()==null||detailY.getJwcode().equals("")) { |
|
|
|
|
|
throw new Exception("精网号不能为空"); |
|
|
|
|
|
} else if (detailY.getAllGold()==null||detailY.getAllGold().compareTo(BigDecimal.ZERO) < 0) { |
|
|
|
|
|
throw new Exception("消费金币总数不能为空或小于等于0"); |
|
|
} |
|
|
} |
|
|
// 生成UUID作为订单编号 |
|
|
// 生成UUID作为订单编号 |
|
|
String uuid = UUID.randomUUID().toString().replace("-", ""); // 去掉UUID中的'-' |
|
|
String uuid = UUID.randomUUID().toString().replace("-", ""); // 去掉UUID中的'-' |
|
|