| | |
| | | JhyOrder order = jhyOrderMapper.selectByPrimaryKey(confirmDto.getOrderId()); |
| | | AccountInfo jhyAccount = accountMapper.selectAccountInfoByUserId(order.getJhyId()); |
| | | BigDecimal collectScore = StrUtil.isNotBlank(jhyAccount.getCollectScore()) ? new BigDecimal(jhyAccount.getCollectScore()) : BigDecimal.ZERO; |
| | | log.info("===={}======{}====", collectScore, totalScore); |
| | | if (totalScore.compareTo(collectScore) > 0) { |
| | | throw new RestException(-3, "剩余积分不足"); |
| | | } |
| | |
| | | distribService.distribRecord(order.getId(), order.getUserId()); |
| | | // 推荐返利 |
| | | distribService.inviteAddOrderScore(order.getUserId(), order.getId().toString()); |
| | | } catch (RestException e) { |
| | | throw new RestException(e.getMessage()); |
| | | } catch (Exception e) { |
| | | log.error("异常", e); |
| | | throw new RestException("支付失败"); |