|
@@ -1404,31 +1404,63 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
|
|
|
.eq("enumdiccode", "currency")
|
|
.eq("enumdiccode", "currency")
|
|
|
.eq("enumitemname", goods.getCurrencyid()));
|
|
.eq("enumitemname", goods.getCurrencyid()));
|
|
|
if (item != null && StringUtils.isNotBlank(item.getParam1()) && !"0".equals(item.getParam1())) {
|
|
if (item != null && StringUtils.isNotBlank(item.getParam1()) && !"0".equals(item.getParam1())) {
|
|
|
- BigDecimal Cude = new BigDecimal(Math.pow(10, Integer.valueOf(item.getParam1())));
|
|
|
|
|
- for (int i = 0; i < feeList.size(); i++) {
|
|
|
|
|
|
|
+ BigDecimal Cude = BigDecimal.valueOf(Math.pow(10, Integer.parseInt(item.getParam1())));
|
|
|
|
|
+ for (FeesConfigVo feesConfigVo : feeList) {
|
|
|
//小数位放大
|
|
//小数位放大
|
|
|
- if (feeList.get(i).getFeealgorithm() == 2) {
|
|
|
|
|
- if (feeList.get(i).getExchangevalue() != null
|
|
|
|
|
- && feeList.get(i).getExchangevalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
|
|
- feeList.get(i).setExchangevalue(feeList.get(i).getExchangevalue().divide(Cude));
|
|
|
|
|
|
|
+ if (feesConfigVo.getFeealgorithm() == 2) {
|
|
|
|
|
+ if (feesConfigVo.getExchangevalue() != null
|
|
|
|
|
+ && feesConfigVo.getExchangevalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
|
|
+ feesConfigVo.setExchangevalue(feesConfigVo.getExchangevalue().divide(Cude));
|
|
|
}
|
|
}
|
|
|
- if (feeList.get(i).getDvalue() != null
|
|
|
|
|
- && feeList.get(i).getDvalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
|
|
- feeList.get(i).setDvalue(feeList.get(i).getDvalue().divide(Cude));
|
|
|
|
|
|
|
+ if (feesConfigVo.getDvalue() != null
|
|
|
|
|
+ && feesConfigVo.getDvalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
|
|
+ feesConfigVo.setDvalue(feesConfigVo.getDvalue().divide(Cude));
|
|
|
}
|
|
}
|
|
|
- if (feeList.get(i).getGvalue() != null
|
|
|
|
|
- && feeList.get(i).getGvalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
|
|
- feeList.get(i).setGvalue(feeList.get(i).getGvalue().divide(Cude));
|
|
|
|
|
|
|
+ if (feesConfigVo.getGvalue() != null
|
|
|
|
|
+ && feesConfigVo.getGvalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
|
|
+ feesConfigVo.setGvalue(feesConfigVo.getGvalue().divide(Cude));
|
|
|
}
|
|
}
|
|
|
- if (feeList.get(i).getCvalue() != null
|
|
|
|
|
- && feeList.get(i).getCvalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
|
|
- feeList.get(i).setCvalue(feeList.get(i).getCvalue().divide(Cude));
|
|
|
|
|
|
|
+ if (feesConfigVo.getCvalue() != null
|
|
|
|
|
+ && feesConfigVo.getCvalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
|
|
+ feesConfigVo.setCvalue(feesConfigVo.getCvalue().divide(Cude));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ if (feeList != null && !feeList.isEmpty()) {
|
|
|
|
|
+ for (FeesConfigVo feesConfigVo : feeList) {
|
|
|
|
|
+ if (feesConfigVo.getFeealgorithm() == 1) {
|
|
|
|
|
+ if (feesConfigVo.getExchangevalue() != null
|
|
|
|
|
+ && feesConfigVo.getExchangevalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
|
|
+ feesConfigVo.setExchangevalue(feesConfigVo.getExchangevalue().multiply(new BigDecimal("10000")));
|
|
|
|
|
+ }
|
|
|
|
|
+ if (feesConfigVo.getDvalue() != null
|
|
|
|
|
+ && feesConfigVo.getDvalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
|
|
+ feesConfigVo.setDvalue(feesConfigVo.getDvalue().multiply(new BigDecimal("10000")));
|
|
|
|
|
+ }
|
|
|
|
|
+ if (feesConfigVo.getGvalue() != null
|
|
|
|
|
+ && feesConfigVo.getGvalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
|
|
+ feesConfigVo.setGvalue(feesConfigVo.getGvalue().multiply(new BigDecimal("10000")));
|
|
|
|
|
+ }
|
|
|
|
|
+ if (feesConfigVo.getCvalue() != null
|
|
|
|
|
+ && feesConfigVo.getCvalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
|
|
+ feesConfigVo.setCvalue(feesConfigVo.getCvalue().multiply(new BigDecimal("10000")));
|
|
|
|
|
+ }
|
|
|
|
|
+ if (feesConfigVo.getMembermaxvalue() != null
|
|
|
|
|
+ && feesConfigVo.getMembermaxvalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
|
|
+ feesConfigVo.setMembermaxvalue(feesConfigVo.getMembermaxvalue().multiply(new BigDecimal("10000")));
|
|
|
|
|
+ }
|
|
|
|
|
+ if (feesConfigVo.getMemberminvalue() != null
|
|
|
|
|
+ && feesConfigVo.getMemberminvalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
|
|
+ feesConfigVo.setMemberminvalue(feesConfigVo.getMemberminvalue().multiply(new BigDecimal("10000")));
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
UserGroupTradeConfigVo detail = new UserGroupTradeConfigVo();
|
|
UserGroupTradeConfigVo detail = new UserGroupTradeConfigVo();
|
|
|
|
|
|
|
|
detail.setDruleList(ruleList);
|
|
detail.setDruleList(ruleList);
|