|
@@ -305,6 +305,16 @@ public class RuleTemplateServiceImpl extends ServiceImpl<RuleTemplateMapper, Rul
|
|
groupJson.put("operation", group.getOperation());
|
|
groupJson.put("operation", group.getOperation());
|
|
groupJson.put("operationType", group.getOperationType());
|
|
groupJson.put("operationType", group.getOperationType());
|
|
groupJson.put("operationValue", group.getOperationValue());
|
|
groupJson.put("operationValue", group.getOperationValue());
|
|
|
|
+ QueryWrapper<RuleAccountThreshold> wrapper = new QueryWrapper<>();
|
|
|
|
+ wrapper.eq("account_id", accountId);
|
|
|
|
+ wrapper.eq("group_id", groupId);
|
|
|
|
+ wrapper.orderByDesc("operation_threshold").last("limit 1");
|
|
|
|
+ RuleAccountThreshold thresholds = accountThresholdService.getOne(wrapper); // 查询基础规则绑定的阈值
|
|
|
|
+ if (!Check.isNull(thresholds)) {
|
|
|
|
+ groupJson.put("operationThreshold", thresholds.getOperationThreshold());
|
|
|
|
+ groupJson.put("maxValue", thresholds.getMaxValue());
|
|
|
|
+ groupJson.put("minValue", thresholds.getMinValue());
|
|
|
|
+ }
|
|
JSONArray ruleDetail = new JSONArray();
|
|
JSONArray ruleDetail = new JSONArray();
|
|
|
|
|
|
if (group.getIsCopy() == 0) { // 规则不可复制
|
|
if (group.getIsCopy() == 0) { // 规则不可复制
|
|
@@ -476,6 +486,16 @@ public class RuleTemplateServiceImpl extends ServiceImpl<RuleTemplateMapper, Rul
|
|
groupJson.put("operation", group.getOperation());
|
|
groupJson.put("operation", group.getOperation());
|
|
groupJson.put("operationType", group.getOperationType());
|
|
groupJson.put("operationType", group.getOperationType());
|
|
groupJson.put("operationValue", group.getOperationValue());
|
|
groupJson.put("operationValue", group.getOperationValue());
|
|
|
|
+ QueryWrapper<RuleAccountThreshold> wrapper = new QueryWrapper<>();
|
|
|
|
+// wrapper.eq("account_id", accountId);
|
|
|
|
+ wrapper.eq("group_id", groupId);
|
|
|
|
+ wrapper.orderByDesc("operation_threshold").last("limit 1");
|
|
|
|
+ RuleAccountThreshold thresholds = accountThresholdService.getOne(wrapper); // 查询基础规则绑定的阈值
|
|
|
|
+ if (!Check.isNull(thresholds)) {
|
|
|
|
+ groupJson.put("operationThreshold", thresholds.getOperationThreshold());
|
|
|
|
+ groupJson.put("maxValue", thresholds.getMaxValue());
|
|
|
|
+ groupJson.put("minValue", thresholds.getMinValue());
|
|
|
|
+ }
|
|
JSONArray ruleIds = JSONArray.parseArray(group.getRuleIds());
|
|
JSONArray ruleIds = JSONArray.parseArray(group.getRuleIds());
|
|
if (Check.isNull(ruleIds)) {
|
|
if (Check.isNull(ruleIds)) {
|
|
continue;
|
|
continue;
|