|
@@ -530,7 +530,12 @@ public class RuleGroupServiceImpl extends ServiceImpl<RuleGroupMapper, RuleGroup
|
|
}
|
|
}
|
|
Long newBid = 0L;
|
|
Long newBid = 0L;
|
|
if ("to".equals(operationType)) {
|
|
if ("to".equals(operationType)) {
|
|
- newBid = new BigDecimal(operationThreshold).multiply(new BigDecimal(1000 + "")).longValue();
|
|
|
|
|
|
+ //金额直接赋值
|
|
|
|
+ if ("price".equals(operationValue)) {
|
|
|
|
+ newBid = new BigDecimal(operationThreshold).multiply(new BigDecimal(1000 + "")).longValue();
|
|
|
|
+ } else {//百分比需计算
|
|
|
|
+ newBid = new BigDecimal(operationThreshold).multiply(oldBid).longValue();
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
newBid = calculatedValue(oldBid, operationType, operationValue, operationThreshold, maxValue, minValue);
|
|
newBid = calculatedValue(oldBid, operationType, operationValue, operationThreshold, maxValue, minValue);
|
|
}
|
|
}
|
|
@@ -552,7 +557,12 @@ public class RuleGroupServiceImpl extends ServiceImpl<RuleGroupMapper, RuleGroup
|
|
}
|
|
}
|
|
Long newBudget = 0L;
|
|
Long newBudget = 0L;
|
|
if ("to".equals(operationType)) {
|
|
if ("to".equals(operationType)) {
|
|
- newBudget = new BigDecimal(operationThreshold).multiply(new BigDecimal(1000 + "")).longValue();
|
|
|
|
|
|
+ //金额直接赋值
|
|
|
|
+ if ("price".equals(operationValue)) {
|
|
|
|
+ newBudget = new BigDecimal(operationThreshold).multiply(new BigDecimal(1000 + "")).longValue();
|
|
|
|
+ } else {//百分比需计算
|
|
|
|
+ newBudget = new BigDecimal(operationThreshold).multiply(oldBudget).longValue();
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
newBudget = calculatedValue(oldBudget, operationType, operationValue, operationThreshold, maxValue, minValue);
|
|
newBudget = calculatedValue(oldBudget, operationType, operationValue, operationThreshold, maxValue, minValue);
|
|
}
|
|
}
|
|
@@ -603,7 +613,12 @@ public class RuleGroupServiceImpl extends ServiceImpl<RuleGroupMapper, RuleGroup
|
|
}
|
|
}
|
|
Long newBid = 0L;
|
|
Long newBid = 0L;
|
|
if ("to".equals(operationType)) {
|
|
if ("to".equals(operationType)) {
|
|
- newBid = new BigDecimal(operationThreshold).multiply(new BigDecimal(1000 + "")).longValue();
|
|
|
|
|
|
+ //金额直接赋值
|
|
|
|
+ if ("price".equals(operationValue)) {
|
|
|
|
+ newBid = new BigDecimal(operationThreshold).multiply(new BigDecimal(1000 + "")).longValue();
|
|
|
|
+ } else {//百分比需计算
|
|
|
|
+ newBid = new BigDecimal(operationThreshold).multiply(oldBidDecimal).longValue();
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
newBid = calculatedValue(oldBidDecimal, operationType, operationValue, operationThreshold, maxValue, minValue);
|
|
newBid = calculatedValue(oldBidDecimal, operationType, operationValue, operationThreshold, maxValue, minValue);
|
|
}
|
|
}
|
|
@@ -645,7 +660,12 @@ public class RuleGroupServiceImpl extends ServiceImpl<RuleGroupMapper, RuleGroup
|
|
}
|
|
}
|
|
Long newBudget = 0L;
|
|
Long newBudget = 0L;
|
|
if ("to".equals(operationType)) {
|
|
if ("to".equals(operationType)) {
|
|
- newBudget = new BigDecimal(operationThreshold).multiply(new BigDecimal(1000 + "")).longValue();
|
|
|
|
|
|
+ //金额直接赋值
|
|
|
|
+ if ("price".equals(operationValue)) {
|
|
|
|
+ newBudget = new BigDecimal(operationThreshold).multiply(new BigDecimal(1000 + "")).longValue();
|
|
|
|
+ } else {//百分比需计算
|
|
|
|
+ newBudget = new BigDecimal(operationThreshold).multiply(oldBudgetDecimal).longValue();
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
newBudget = calculatedValue(oldBudgetDecimal, operationType, operationValue, operationThreshold, maxValue, minValue);
|
|
newBudget = calculatedValue(oldBudgetDecimal, operationType, operationValue, operationThreshold, maxValue, minValue);
|
|
}
|
|
}
|
|
@@ -1621,6 +1641,7 @@ public class RuleGroupServiceImpl extends ServiceImpl<RuleGroupMapper, RuleGroup
|
|
RuleBase ruleBase = new RuleBase();
|
|
RuleBase ruleBase = new RuleBase();
|
|
ruleBase.setRuleName(ruleDetailJson.getString("ruleName"));
|
|
ruleBase.setRuleName(ruleDetailJson.getString("ruleName"));
|
|
ruleBase.setIndicatorCode(ruleDetailJson.getString("indicatorCode"));
|
|
ruleBase.setIndicatorCode(ruleDetailJson.getString("indicatorCode"));
|
|
|
|
+ ruleBase.setCindicatorCode(ruleDetailJson.getString("cindicatorCode"));
|
|
ruleBase.setRuleCondition(ruleDetailJson.getString("ruleCondition"));
|
|
ruleBase.setRuleCondition(ruleDetailJson.getString("ruleCondition"));
|
|
ruleBase.setThreshold(ruleDetailJson.getString("threshold"));
|
|
ruleBase.setThreshold(ruleDetailJson.getString("threshold"));
|
|
ruleBase.setVariableType(ruleDetailJson.getInteger("variableType"));
|
|
ruleBase.setVariableType(ruleDetailJson.getInteger("variableType"));
|