From 3e514859a43e61bcefe0729bdbf7d41b35eb7fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E5=BA=9C=E5=BC=BA?= <8569561+fuqiangma@user.noreply.gitee.com> Date: Wed, 8 Feb 2023 22:11:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=84=E5=88=99=E6=A0=A1=E9=AA=8C=E7=A5=9E?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- roledemo/.idea/.gitignore | 8 ++ roledemo/.idea/compiler.xml | 14 ++++ roledemo/.idea/jarRepositories.xml | 20 +++++ roledemo/.idea/misc.xml | 14 ++++ roledemo/pom.xml | 21 +++++ roledemo/roledemo.iml | 2 + .../java/com/woniu/roledemo/AbstractRule.java | 19 +++++ .../java/com/woniu/roledemo/AddressRule.java | 15 ++++ .../java/com/woniu/roledemo/BaseRule.java | 6 ++ .../java/com/woniu/roledemo/NameRule.java | 14 ++++ .../com/woniu/roledemo/NationalityRule.java | 26 ++++++ .../woniu/roledemo/NationalityRuleDto.java | 9 ++ .../java/com/woniu/roledemo/RuleConstant.java | 6 ++ .../main/java/com/woniu/roledemo/RuleDto.java | 11 +++ .../java/com/woniu/roledemo/RuleService.java | 77 ++++++++++++++++++ .../com/woniu/roledemo/RuleServiceTest.java | 52 ++++++++++++ .../com/woniu/roledemo/AbstractRule.class | Bin 0 -> 937 bytes .../com/woniu/roledemo/AddressRule.class | Bin 0 -> 871 bytes .../classes/com/woniu/roledemo/BaseRule.class | Bin 0 -> 168 bytes .../classes/com/woniu/roledemo/NameRule.class | Bin 0 -> 818 bytes .../com/woniu/roledemo/NationalityRule.class | Bin 0 -> 1467 bytes .../woniu/roledemo/NationalityRuleDto.class | Bin 0 -> 1484 bytes .../com/woniu/roledemo/RuleConstant.class | Bin 0 -> 440 bytes .../classes/com/woniu/roledemo/RuleDto.class | Bin 0 -> 2083 bytes .../com/woniu/roledemo/RuleService.class | Bin 0 -> 3024 bytes .../com/woniu/roledemo/RuleServiceTest.class | Bin 0 -> 1793 bytes 26 files changed, 314 insertions(+) create mode 100644 roledemo/.idea/.gitignore create mode 100644 roledemo/.idea/compiler.xml create mode 100644 roledemo/.idea/jarRepositories.xml create mode 100644 roledemo/.idea/misc.xml create mode 100644 roledemo/pom.xml create mode 100644 roledemo/roledemo.iml create mode 100644 roledemo/src/main/java/com/woniu/roledemo/AbstractRule.java create mode 100644 roledemo/src/main/java/com/woniu/roledemo/AddressRule.java create mode 100644 roledemo/src/main/java/com/woniu/roledemo/BaseRule.java create mode 100644 roledemo/src/main/java/com/woniu/roledemo/NameRule.java create mode 100644 roledemo/src/main/java/com/woniu/roledemo/NationalityRule.java create mode 100644 roledemo/src/main/java/com/woniu/roledemo/NationalityRuleDto.java create mode 100644 roledemo/src/main/java/com/woniu/roledemo/RuleConstant.java create mode 100644 roledemo/src/main/java/com/woniu/roledemo/RuleDto.java create mode 100644 roledemo/src/main/java/com/woniu/roledemo/RuleService.java create mode 100644 roledemo/src/main/java/com/woniu/roledemo/RuleServiceTest.java create mode 100644 roledemo/target/classes/com/woniu/roledemo/AbstractRule.class create mode 100644 roledemo/target/classes/com/woniu/roledemo/AddressRule.class create mode 100644 roledemo/target/classes/com/woniu/roledemo/BaseRule.class create mode 100644 roledemo/target/classes/com/woniu/roledemo/NameRule.class create mode 100644 roledemo/target/classes/com/woniu/roledemo/NationalityRule.class create mode 100644 roledemo/target/classes/com/woniu/roledemo/NationalityRuleDto.class create mode 100644 roledemo/target/classes/com/woniu/roledemo/RuleConstant.class create mode 100644 roledemo/target/classes/com/woniu/roledemo/RuleDto.class create mode 100644 roledemo/target/classes/com/woniu/roledemo/RuleService.class create mode 100644 roledemo/target/classes/com/woniu/roledemo/RuleServiceTest.class diff --git a/roledemo/.idea/.gitignore b/roledemo/.idea/.gitignore new file mode 100644 index 0000000..2af0652 --- /dev/null +++ b/roledemo/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/../../../../:\java project\roledemo\.idea/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/roledemo/.idea/compiler.xml b/roledemo/.idea/compiler.xml new file mode 100644 index 0000000..0cda0c8 --- /dev/null +++ b/roledemo/.idea/compiler.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/roledemo/.idea/jarRepositories.xml b/roledemo/.idea/jarRepositories.xml new file mode 100644 index 0000000..712ab9d --- /dev/null +++ b/roledemo/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/roledemo/.idea/misc.xml b/roledemo/.idea/misc.xml new file mode 100644 index 0000000..4b661a5 --- /dev/null +++ b/roledemo/.idea/misc.xml @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/roledemo/pom.xml b/roledemo/pom.xml new file mode 100644 index 0000000..cd85f01 --- /dev/null +++ b/roledemo/pom.xml @@ -0,0 +1,21 @@ + + + 4.0.0 + + com.woniu + roledemo + 1.0-SNAPSHOT + + + + org.projectlombok + lombok + 1.18.24 + + + + + + \ No newline at end of file diff --git a/roledemo/roledemo.iml b/roledemo/roledemo.iml new file mode 100644 index 0000000..78b2cc5 --- /dev/null +++ b/roledemo/roledemo.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/roledemo/src/main/java/com/woniu/roledemo/AbstractRule.java b/roledemo/src/main/java/com/woniu/roledemo/AbstractRule.java new file mode 100644 index 0000000..fd25b59 --- /dev/null +++ b/roledemo/src/main/java/com/woniu/roledemo/AbstractRule.java @@ -0,0 +1,19 @@ +package com.woniu.roledemo; + + +// 规则模板 +public abstract class AbstractRule implements BaseRule { + + protected T convert(RuleDto dto) { + return (T) dto; + } + + @Override + public boolean execute(RuleDto dto) { + return executeRule(convert(dto)); + } + + protected boolean executeRule(T t) { + return true; + } +} diff --git a/roledemo/src/main/java/com/woniu/roledemo/AddressRule.java b/roledemo/src/main/java/com/woniu/roledemo/AddressRule.java new file mode 100644 index 0000000..ba0566f --- /dev/null +++ b/roledemo/src/main/java/com/woniu/roledemo/AddressRule.java @@ -0,0 +1,15 @@ +package com.woniu.roledemo; + + +// 具体规则- 例子1 +public class AddressRule extends AbstractRule { + + @Override + public boolean execute(RuleDto dto) { + System.out.println("AddressRule invoke!"); + if (dto.getAddress().startsWith(RuleConstant.MATCH_ADDRESS_START)) { + return true; + } + return false; + } +} diff --git a/roledemo/src/main/java/com/woniu/roledemo/BaseRule.java b/roledemo/src/main/java/com/woniu/roledemo/BaseRule.java new file mode 100644 index 0000000..76064e5 --- /dev/null +++ b/roledemo/src/main/java/com/woniu/roledemo/BaseRule.java @@ -0,0 +1,6 @@ +package com.woniu.roledemo; + +// 规则抽象 +public interface BaseRule { + boolean execute(RuleDto dto); +} diff --git a/roledemo/src/main/java/com/woniu/roledemo/NameRule.java b/roledemo/src/main/java/com/woniu/roledemo/NameRule.java new file mode 100644 index 0000000..c594c39 --- /dev/null +++ b/roledemo/src/main/java/com/woniu/roledemo/NameRule.java @@ -0,0 +1,14 @@ +package com.woniu.roledemo; + + +public class NameRule extends AbstractRule { + + @Override + public boolean execute(RuleDto dto) { + System.out.println("NameRule invoke!"); + if (dto.getName().startsWith("woniu")) { + return true; + } + return false; + } +} diff --git a/roledemo/src/main/java/com/woniu/roledemo/NationalityRule.java b/roledemo/src/main/java/com/woniu/roledemo/NationalityRule.java new file mode 100644 index 0000000..cc34fd4 --- /dev/null +++ b/roledemo/src/main/java/com/woniu/roledemo/NationalityRule.java @@ -0,0 +1,26 @@ +package com.woniu.roledemo; + + +// 具体规则- 例子2 +public class NationalityRule extends AbstractRule { + + @Override + protected T convert(RuleDto dto) { + NationalityRuleDto nationalityRuleDto = new NationalityRuleDto(); + if (dto.getAddress().startsWith(RuleConstant.MATCH_ADDRESS_START)) { + nationalityRuleDto.setNationality(RuleConstant.MATCH_NATIONALITY_START); + } + return (T) nationalityRuleDto; + } + + + @Override + protected boolean executeRule(T t) { + System.out.println("NationalityRule invoke!"); + NationalityRuleDto nationalityRuleDto = (NationalityRuleDto) t; + if (nationalityRuleDto.getNationality().startsWith(RuleConstant.MATCH_NATIONALITY_START)) { + return true; + } + return false; + } +} \ No newline at end of file diff --git a/roledemo/src/main/java/com/woniu/roledemo/NationalityRuleDto.java b/roledemo/src/main/java/com/woniu/roledemo/NationalityRuleDto.java new file mode 100644 index 0000000..5310e76 --- /dev/null +++ b/roledemo/src/main/java/com/woniu/roledemo/NationalityRuleDto.java @@ -0,0 +1,9 @@ +package com.woniu.roledemo; + +import lombok.Data; + +@Data +public class NationalityRuleDto { + + private String nationality; +} diff --git a/roledemo/src/main/java/com/woniu/roledemo/RuleConstant.java b/roledemo/src/main/java/com/woniu/roledemo/RuleConstant.java new file mode 100644 index 0000000..d4eb597 --- /dev/null +++ b/roledemo/src/main/java/com/woniu/roledemo/RuleConstant.java @@ -0,0 +1,6 @@ +package com.woniu.roledemo; + +public class RuleConstant { + public static final String MATCH_ADDRESS_START = "北京"; + public static final String MATCH_NATIONALITY_START = "中国"; +} diff --git a/roledemo/src/main/java/com/woniu/roledemo/RuleDto.java b/roledemo/src/main/java/com/woniu/roledemo/RuleDto.java new file mode 100644 index 0000000..54b740b --- /dev/null +++ b/roledemo/src/main/java/com/woniu/roledemo/RuleDto.java @@ -0,0 +1,11 @@ +package com.woniu.roledemo; + +import lombok.Data; + +// 业务数据 +@Data +public class RuleDto { + private String address; + private String name; + private int age; +} diff --git a/roledemo/src/main/java/com/woniu/roledemo/RuleService.java b/roledemo/src/main/java/com/woniu/roledemo/RuleService.java new file mode 100644 index 0000000..82a2ed9 --- /dev/null +++ b/roledemo/src/main/java/com/woniu/roledemo/RuleService.java @@ -0,0 +1,77 @@ +package com.woniu.roledemo; + + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class RuleService { + + private Map> hashMap = new HashMap<>(); + private static final int AND = 1; + private static final int OR = 0; + + public static RuleService create() { + return new RuleService(); + } + + + public RuleService and(List ruleList) { + hashMap.put(AND, ruleList); + return this; + } + + public RuleService or(List ruleList) { + hashMap.put(OR, ruleList); + return this; + } + + public boolean execute(RuleDto dto) { + for (Map.Entry> item : hashMap.entrySet()) { + List ruleList = item.getValue(); + switch (item.getKey()) { + case AND: + // 如果是 and 关系,同步执行 + System.out.println("execute key = " + 1); + if (!and(dto, ruleList)) { + return false; + } + break; + case OR: + // 如果是 or 关系,并行执行 + System.out.println("execute key = " + 0); + if (!or(dto, ruleList)) { + return false; + } + break; + default: + break; + } + } + return true; + } + + private boolean and(RuleDto dto, List ruleList) { + for (BaseRule rule : ruleList) { + boolean execute = rule.execute(dto); + if (!execute) { + // and 关系匹配失败一次,返回 false + return false; + } + } + // and 关系全部匹配成功,返回 true + return true; + } + + private boolean or(RuleDto dto, List ruleList) { + for (BaseRule rule : ruleList) { + boolean execute = rule.execute(dto); + if (execute) { + // or 关系匹配到一个就返回 true + return true; + } + } + // or 关系一个都匹配不到就返回 false + return false; + } +} diff --git a/roledemo/src/main/java/com/woniu/roledemo/RuleServiceTest.java b/roledemo/src/main/java/com/woniu/roledemo/RuleServiceTest.java new file mode 100644 index 0000000..1ede370 --- /dev/null +++ b/roledemo/src/main/java/com/woniu/roledemo/RuleServiceTest.java @@ -0,0 +1,52 @@ +package com.woniu.roledemo; + + +import java.util.Arrays; + +/** + * + * 还在写大量 if 来判断?试试用一个规则执行器神器吧! + * + * if (是否海外用户) { + * return false; + * } + * + * if (刷单用户) { + * return false; + * } + * + * if (未付费用户 && 不再服务时段) { + * return false + * } + * + * if (转介绍用户 || 付费用户 || 内推用户) { + * return true; + * } + */ +public class RuleServiceTest { + + public static void main(String[] args) { + //规则执行器 + //优点:比较简单,每个规则可以独立,将规则,数据,执行器拆分出来,调用方比较规整 + //缺点:数据依赖公共传输对象 dto + + //1. 定义规则 init rule + NationalityRule nationalityRule = new NationalityRule(); + AddressRule addressRule = new AddressRule(); + NameRule nameRule = new NameRule(); + + //2. 构造需要的数据 create dto + RuleDto dto = new RuleDto(); + dto.setAge(5); + dto.setName("haha"); + dto.setAddress("南京"); + + //3. 通过以链式调用构建和执行 rule execute + boolean ruleResult = RuleService + .create() + .and(Arrays.asList(nationalityRule, addressRule)) + .or(Arrays.asList(nameRule)) + .execute(dto); + System.out.println("this rule execute result :" + ruleResult); + } +} diff --git a/roledemo/target/classes/com/woniu/roledemo/AbstractRule.class b/roledemo/target/classes/com/woniu/roledemo/AbstractRule.class new file mode 100644 index 0000000000000000000000000000000000000000..4a26e4aafcb7755a92c18e62672a7dbac793a430 GIT binary patch literal 937 zcmah{(M}UV6g{)MWno!_7O4tVtU%J1#Pz{wBBY5*h!2e>((u6BbUT41+a0oOt^9Cs7up zI#zu((80^z(4;an@3UC#2)Ln6&Q)pzo;0q5Gi=Z3oo44$p35MX$#L+mcd9}|WV>&) zKy4aNVD2C~PNd0Fa{GL@`(je4J^kixmwl>_D$ERNtWQTD3CxeN>|J1`F?nN?P=b1{ zOdbhT{~qb5v&*sCxs%#|dZ0s=^$v8FhH5|JyUWFCKjsPga53xS78ZR}afjNu;f(~A z{++zQ+BKwCa;Ugtr%qp~1o}es#~fPeLW*;=3uqOzmRjE+zEWbrqc}4vVxDq;ocmay zox?^6#pGvnV$o`Cf8khQ&gRVO=#&(g$%rMCiBrk*Wy)@2g(7RUVdrSC)!M#*bpiWx zj{4(fp`htqX?kN#hi69$to7#7m%|!%!B@GUVO?ohxQlzlStazSTdu58W#qI*+5Ozj FgWvBC!w~=g literal 0 HcmV?d00001 diff --git a/roledemo/target/classes/com/woniu/roledemo/AddressRule.class b/roledemo/target/classes/com/woniu/roledemo/AddressRule.class new file mode 100644 index 0000000000000000000000000000000000000000..f166598590e55c3b432e668b1cfc1d0979277bf9 GIT binary patch literal 871 zcmaJ<&2G~`5dJnlbz)pvk~Wl5+Js-Hg_^%x5K>jdDIi2pk$T(Mt8}UDt?YGyci@hA zhg{$gq#k$xo&#P3F`M`hgu#cI*_rvi`8>Pdf1P~;@DLAd*tk^3Ixg3+VdDxmZET@! zp;NI85SPNSn9_NWw(34P}x_3U|8zQSUk_7p-5iwVMv)qU->*d;E6Qn zJXz64GG%D@eHD3cRV*_vQK1M#q`bW#NJN^x%tFy)u*5szXPSt%+@fyN_C%{*_mGqX zS}|<=uZ>}Gpt*nijGyFE?19P>Up$pY?DE|3-8cM{J2(f&!Yv0bx(v;^dRxY)>R5Cv zY&+P&Z3}lC?7}0Z1%G99?yES}Jl3?lpC3N{I2&8I>);;lGi(+>=4KUh?hR9&a9&amQk|EBm;>6DgWw3tMvucbcv$KXSBP^Z^vz7m+Z7qW|V^2jst z)$OlfpQq*XWEW;hEKzJ)sR7HlK%O2Ynq&=_6IqG;+82}>tKq q)ygn@4OGb1Q6mv6G`>Z6!`+(Ub8cdy>MF6frbyPJ@FImJto;T*71P52 literal 0 HcmV?d00001 diff --git a/roledemo/target/classes/com/woniu/roledemo/BaseRule.class b/roledemo/target/classes/com/woniu/roledemo/BaseRule.class new file mode 100644 index 0000000000000000000000000000000000000000..0c9404407c3946d7f9caed26f03ebd28236a49d5 GIT binary patch literal 168 zcmX^0Z`VEs1_l!bPId-%b_Nbc2KLm7)a25VR7M7Q4WH!vT>bL=yv$PlqWqlHl+@gO z{h-pERF{%`Yt1M|2Cm@z(xT*4x6B-%a$cvz;#82VURGjRA|rz|7R@jvj0^%GMfy33 ndFlH8Nm;4MC2Wigj0{Xbw=gg;vM@3*Gq8YI46HzsiGd9OP%JB) literal 0 HcmV?d00001 diff --git a/roledemo/target/classes/com/woniu/roledemo/NameRule.class b/roledemo/target/classes/com/woniu/roledemo/NameRule.class new file mode 100644 index 0000000000000000000000000000000000000000..11fb3836759e03a5c6a8c575be4a03c87f8bcda3 GIT binary patch literal 818 zcmaJ}YfwoWwC~l?RQdO#2^^~HjK~&hCuN+KaaSD&HRKv1^6|6dVjI|op z9c2JS=iG&ZX&aj^w(y)`_Aa?DlXG<{Hf;DVTG+O+ z<6;*t7%IgeHuhWuc*(GQ&u}!+gzURsrc)kjGZ(cqGJ=RFgP?nvX%W+qD%T7PogyPu z@Hv%=zszcaUs94wKYs!^j_&iu-YlVmgwQmyMa5qQzF*h+` S9t~n&D3Gj4$0i+1c=!i3-@b4F literal 0 HcmV?d00001 diff --git a/roledemo/target/classes/com/woniu/roledemo/NationalityRule.class b/roledemo/target/classes/com/woniu/roledemo/NationalityRule.class new file mode 100644 index 0000000000000000000000000000000000000000..c6d06766f9de5021bf79a7d4d089b652c3698ec6 GIT binary patch literal 1467 zcmah}+fEZv6kVq+Oes^qQc!LJURyxw{Q`Kw;x(W~h(_Or_M{HBGh}*-@(ucKjK6@1 z`cMo;zjkJX_zZ#*lhu7X^;YX52#Rh3nX*l;`GURu>NW z)UnfL1)}rH$~>R5mMiU1Q-PLwJ4euxM+q)WElljDc4hBg78VHHDqqS>NlD$IKv!Zn zO7f|Ipfa)DE`jcy+OIDE)jwE4@BarcIyG!$-Yt0J9-xGAu| zj?|FtthmqRuz_19ZX<2tj;?p8LA|=n#-yefi^{Vy%9p>l0ZeuDC{|9Y>1@`MMb33R zQ9FwB%CnsuU$bL-JbfF}*s!OHk8Sm=?tQCS`XSniQq}PNM<74K+5)RZB?}yXw?sX= z{OPdW)B|!+#Fkcpj5;ffcAELUE$g7X!^-TcrZR@n#(xd{3xegak86y#6nDYBX=EMZ zBM$*|a&7jFi1Tb#&t2%|Erk6zz$l%pxCgoSe?j2MI)ZbfWrSkQWf*VKG8PM$xqhHO zSiy`j7id8k5#qL@7tsp-kdFZ$pJ?czPcSZyKHdTtU|tyF7kUjG#2{}03=wS@hpJ3o zRhbNYLL}B&hB^8jfw{3VqM8NiG=(UNFl^hFbYlZtb?8|dx9q@9^__RM_qeP?!m{r&tEz#Nu>2w}DdB5o+S86oIHo0~fd?gpV^R>eK;=T$6lpHr~N&}-|i>Danux^EaFg+2Y1p0#v)H@oFlOnW!S z5Lh&A)4k6iCX(9>(y~)B82SsQZEV!`cZ|vteaE7mNWm%U*0x?T`P$!<+_G6^m?{*V z{p@SUHf!06V;Lo5-^p&ALvPkBjBn;tL>CX(H{3RT-n@c`pU`{J>{}F@ixMicl5at{vT7(*CJZjzR+j8~di*@~=L7gt6A+TE1 z?G@eugIdL8n_viTIkigBST(uY!%ZUj z>do-W(=dRDhJJ(@CjU!x4cBp5!$rh2#CbG@1l4b!ga$pcBI)^cu>=2DTgTNV5q)<$R$zGsUmOLXbr%u2= zP#|ECY{1(@lw!?~hcHYl#%YsnP5ubsxGh=jnmmF_e)0lA2^=bw{sf^r^pJM~9yD)@ zbKo75?0%hNIwMn^<#g&jWa%jV9pXF4;!*k=#P#V^9a3XSfxIzIW8pGVg^@969E&n9;3gA6lrsfA_?PED~f=k{zgc_ z#2*YPn53Ud-vd5Ae)sd_xe79Go8x!t?};Fv;md@|@#!0ZgkR<@(VFYQ41O$o7bb}zLH4fpFcuPc!F`@*< zPKo>ZT42088fCw`RVu-UEdB-R(-ZVWf_3!rCdoxKGIjK|kB{6mK5@S_Mv8NVvi|@$ C&JEH4 literal 0 HcmV?d00001 diff --git a/roledemo/target/classes/com/woniu/roledemo/RuleConstant.class b/roledemo/target/classes/com/woniu/roledemo/RuleConstant.class new file mode 100644 index 0000000000000000000000000000000000000000..1ef495f0900e766f74810feffb6fef7a21803e2d GIT binary patch literal 440 zcmah_y-or_7@Xx_egr{9D?_IiUSp>*xqwEJ6B6!1Vnvo?gG-Lx9$DlV_WlWCDE)PA_ea7FsKWgIVK#lDVfOYs ze|$#`G5S3a?jnIC$cb2*cxHvKkwcduN0_GS;Valnv{E2Ukqio4C(K845=E4V JQ4_)#%HLXrW-tH% literal 0 HcmV?d00001 diff --git a/roledemo/target/classes/com/woniu/roledemo/RuleDto.class b/roledemo/target/classes/com/woniu/roledemo/RuleDto.class new file mode 100644 index 0000000000000000000000000000000000000000..e135c9715243b5d83d2a97df79fb4de27f50fdc8 GIT binary patch literal 2083 zcma)6TXR!Y6#jN{ZaqDP5PKmIrAWoxO1xB&v_T3jQfv#h6_p2v)8tGOOmk|Q=zsCW zH~Z2DoslpjGmgICj6cL*A>y~rIc;bfW|&F#UTd$*{?@nFK7arB+wTBo@THA0%nw1w zby;r6vS4D-=6+L_Ph`0zUP~g~7U@$H%QhU$TUe2O)xsSMcSZcn!kX;sCN>mIw_0s^ zySoa><%jNfZn5Duw~FiSR=v43tDrUAZBHTYZgEvh3dUT$S#MwEQ6_tj_8WecmXpi% zrnlPJ-t<}6&2jMd5vl>7%#9Po25b@c&F9eTej>igWlTJ~zxJ$H_SrUukecN#x z#CRn1&gMg}(w@!UCkOsfrXrJq?zd}ROTm#Erw&;i366XEP+$&OwL@E|jI6ia$~PfD4cnDdmMa(X$NoNqJuYa!9hXPDUq(=qQXS~3|;Tk z8&%;Y5#5`Ks3|-69MX%zqyR3nn!+T+95t+!c2{_ZaGz!0ipLMsR50 z9AzhTz$BA{GCAXVH27DV zk;^|qY;e)zp+{7-5F%^}SJ}aN;;))Vx*>UT$a57Mdw9-1g7&I;q??k5(;MbdQkBVk zoqX;m=-Ph%Pv}2DkMHOIfWA`5bzuZ51+&2ak7A=@tx~f}+Vo!-PH9hZY7fqIO6y|i zz}+tCbg@fDN*5pFDUy2_N$Dx$z$s`#9R0I%D+F{%V+WUlksHGUyu*2l;ax27U*y1E z=39A>l7Bd^)F7C_|SQVaTAyMv(z)34#gpU1Lbi?yk6lh zeb$AD{vioxJ8ZLlh)*Y~@JaAf5T*HtNpz-JNX*V@<#b}UCImhx2h52|-mFA^59V|i z!@;>-(!`L`B8w$#(v%hy$61;Q^G7J+nCD1Hb9H=-SxPaC64xA&#aY}0%9ON#k=xLo zlNODPC`A&W)N?xZ^q3rsK|gRf@X?MQ(T(@W8+c)l$#t>F53he@T1n^4ys~21>C|tCc?;POhs|50@|6g;zdgD&}Xq+^N=$6gc2yby87Bb8x40zySWIHN`MyoLSXpc zC|@<3w3{e66}Ko)Sju`+sNi?1hBxpAdIXwl&3`JG2nIG_qrk=$x;Ui6zzvjiOdGJ_ z7?{CFI$Q%~c#M~U3T6%5#4Ul=nt{b68<@mHpIv7mgUE zEPEo`JBrPG)YkKXi1OuRweq3Z#8U(*zHghch3BpQxtr&0q4Vp|dB?)%+DneZ)FAk6 zNlS^5?>iZ5fr@w=y{Q$jh9`PtHrIlFJ7Yj_U<z zmF}TL;FhB7B_#;PKJNCfY%ux)gB>*3`N{^_NHj}?qK`0QbnU)EIFEXPc_akRY@bI` z-~pz%F$8`_!|;xItWmqhgBrI@YTNu6EniU@804SIf%?htPvxuYTeP;UeT=qrUx)St z?GMoreWYlwEz;IKL@fH~%Rj%+9#KH^Bf1kw?l-a^HZgrE{#UgX*U*jYERsob%n^5)n1KxT?}%8M0)6eg>$6?*c>O2W$&Be!w~pY8@Kur7MDc zv9?$h=(7;ePG7-(baAk4V@A@*(%D0d-w_|w9%g16d*J|1aM#6BI*C(smqr&s^;bbD znkuwNsL&K;FDVL?f#`GS1l6s81f`ebj#HQGs{nd{n8wUKi`Ft102-vLLv;K&0iC3y cIRZNUzX5uOU?a3Qz;A-tZs5P>*}D3_03Udul>h($ literal 0 HcmV?d00001 diff --git a/roledemo/target/classes/com/woniu/roledemo/RuleServiceTest.class b/roledemo/target/classes/com/woniu/roledemo/RuleServiceTest.class new file mode 100644 index 0000000000000000000000000000000000000000..60605d8b1277a855e318c7e490cfc167a6a8b239 GIT binary patch literal 1793 zcma)7ZFdtz6n>`JWYcAlT4?DTkQUGcC=rmTEf!lUiiUtqt){4Tl8our&2G^h4l~qd&mkp?`zJGue2O*6lgw!@ZfAXYPIOGk0eHdiml{0B@sd;XDc^-mx&E z{ks+n?ccMI(tgQ88U<~Z)3~Gk`)RCbf7ikXST(U`;U3oY;6rWhYxB`4KE?wRpIDeg zA&pP9FKY8po05e`cx>V`6B`1lJC5gsD*}mZZcD(p=hv0MsiNblQoC7I!KSRboEb0r zHR*22z|rIWq!I2qErCnLn%~U-;CoIxANa1StEQjdXuGPcf~QVRZK_td%-Buocmk8z zC&fMaROVgjHS*;!aJC-FI{q zXEbm~r|Vi88yAofScsAJNPz<9V?aX%3CzX-{;fe^CT6wI-9{OkJholAOGclA?UDND z=U@JQ@vDt5uw~*)8x^pixD0Eu)f3Ug6B}RQYa8ES$HuqXNK{SKY}7#k&K~WBwYKBd zRX}RGyE0n6jQUa4+M&wuASq*J$;NkRXtQg>!JdilZMd3XoMcB778o0(d{o_2HJ(eV zrNY$)=@{7ux))83wMYUJ+4yd?^p2=;;tydcE#ub$B}0Z=$mWh~mwp$pWg>#@&~fvt zK_Cx!D^jvmbXsJ3`Ox)=_%G)oj=dckrh8L*b%C3G_JfuGk$%Ld`et8qfeYE=80!Yl zu>pnzEg!T()nt0VO|laaFUQY6<~0v_*_CXPTuScmE6r~)PTl_q-fszRoXc+aYaMz$ z2FvNtj~*0WEDAk1=l(Op*QGaim=KHI*YsQu^Ek&RS^q}B%8{X+=O|Av=#y8TLHyQR zUZ73&CTDPw|Lq8XOSsI@DBi%EoZ)7XLXt?}r!Gb+&yXl~VbCWZc9EhtOI@VtN0*Fg zBi(^DZH%Ajz@|Id!E4WPD)|S-Dv7J*igB&{9ItmUZuDjrqtWSUqk}Vr>0 zj!$(kJ(28Sri0lI<_3%lI7uc8{DfS@7`aZ7