fix
Helius
2021-11-10 c4d8357ad30bb39968279957d1fb594ef8dfdf5f
gc-order/src/main/java/com/xzx/gc/order/service/JhyOrderService.java
@@ -102,13 +102,13 @@
            for (JhyOrder order : addressExist) {
                String orderAddr = order.getArea() + order.getAddress() + order.getUnitName() + order.getHouseNumber();
                if (orderAddr.equals(addressInfo.getAddressArea() + addressInfo.getDetailAddress() + addressInfo.getUnitName() + addressInfo.getHouseNumber())) {
                if (orderAddr.equals(addressInfo.getAddressArea() + addressInfo.getDetailAddress() + addressInfo.getHouseName() + addressInfo.getUnitName() + addressInfo.getHouseNumber())) {
                    throw new RestException(-3, "同一地址仅能有一单在进行中");
                }
            }
        }
        jhyOrder.setAddress(addressInfo.getDetailAddress());
        jhyOrder.setAddress(addressInfo.getDetailAddress()+addressInfo.getHouseName());
        jhyOrder.setUnitName(addressInfo.getUnitName());
        jhyOrder.setHouseNumber(addressInfo.getHouseNumber());
        jhyOrder.setUsername(addressInfo.getRelaName());
@@ -240,6 +240,7 @@
                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, "剩余积分不足");
                }
@@ -282,6 +283,8 @@
                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("支付失败");