提交 0fe29b3b 编写于 作者: zhouweidong's avatar zhouweidong

补充值规则异常信息

上级 725b8ee6
...@@ -31,7 +31,7 @@ public @interface ValueRuleCheck { ...@@ -31,7 +31,7 @@ public @interface ValueRuleCheck {
Class<? extends Payload>[] payload() default {}; Class<? extends Payload>[] payload() default {};
@Target({FIELD, METHOD, PARAMETER, ANNOTATION_TYPE}) @Target({TYPE_USE})
@Retention(RUNTIME) @Retention(RUNTIME)
@Documented @Documented
@interface List { @interface List {
......
...@@ -65,7 +65,9 @@ public class ValueRuleValidator implements ConstraintValidator<ValueRuleCheck, D ...@@ -65,7 +65,9 @@ public class ValueRuleValidator implements ConstraintValidator<ValueRuleCheck, D
<#assign ruleName=(de.codeName+"_"+deRule.getPSDEField().codeName+"_"+deRule.codeName)?lower_case> <#assign ruleName=(de.codeName+"_"+deRule.getPSDEField().codeName+"_"+deRule.codeName)?lower_case>
<#assign ruleCond=getGroupCond(group)> <#assign ruleCond=getGroupCond(group)>
<#assign ruleMessage=getGroupMessage(group)> <#assign ruleMessage=getGroupMessage(group)>
<#if ruleCond!="">
sysRule.put("${ruleName}", new ValueRule("${ruleCond}","${ruleMessage}")); sysRule.put("${ruleName}", new ValueRule("${ruleCond}","${ruleMessage}"));
</#if>
</#if> </#if>
</#if> </#if>
</#list> </#list>
...@@ -80,7 +82,7 @@ public class ValueRuleValidator implements ConstraintValidator<ValueRuleCheck, D ...@@ -80,7 +82,7 @@ public class ValueRuleValidator implements ConstraintValidator<ValueRuleCheck, D
<#comment>获取组条件表达式</#comment> <#comment>获取组条件表达式</#comment>
<#function getGroupCond group> <#function getGroupCond group>
<#assign strRuleCond="("> <#assign strRuleCond="">
<#if group.getPSDEFVRConditions()??> <#if group.getPSDEFVRConditions()??>
<#assign condOp=group.getCondOp()?replace("AND","&&")?replace("OR","||")> <#assign condOp=group.getCondOp()?replace("AND","&&")?replace("OR","||")>
<#list group.getPSDEFVRConditions() as childRule> <#list group.getPSDEFVRConditions() as childRule>
...@@ -95,7 +97,9 @@ public class ValueRuleValidator implements ConstraintValidator<ValueRuleCheck, D ...@@ -95,7 +97,9 @@ public class ValueRuleValidator implements ConstraintValidator<ValueRuleCheck, D
</#if> </#if>
</#list> </#list>
</#if> </#if>
<#assign strRuleCond=strRuleCond+")"> <#if strRuleCond!="">
<#assign strRuleCond="("+strRuleCond+")">
</#if>
<#return strRuleCond/> <#return strRuleCond/>
</#function> </#function>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册