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

补充值规则异常信息

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