冲突区域逻辑去除
This commit is contained in:
parent
354f75401b
commit
e8f75b753f
@ -346,36 +346,7 @@ public class UserRegionGatewayImpl implements UserRegionGateway {
|
|||||||
@Override
|
@Override
|
||||||
public boolean checkBusinessRegionCode(String regionOne, String regionTwo) {
|
public boolean checkBusinessRegionCode(String regionOne, String regionTwo) {
|
||||||
// 区域相同
|
// 区域相同
|
||||||
if (equalsRegion(regionOne, regionTwo)) {
|
return equalsRegion(regionOne, regionTwo);
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 互通区域 = 法国 and 伊朗
|
|
||||||
List<String> frRegions = List.of("FR", "IR");
|
|
||||||
boolean isOnFr = equalsRegion(frRegions, regionOne);
|
|
||||||
boolean isTwoFr = equalsRegion(frRegions, regionTwo);
|
|
||||||
if (isOnFr && isTwoFr) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 互通区域1 = 阿拉伯 and 土耳其
|
|
||||||
List<String> arRegions = List.of("AR", "TR","DE");
|
|
||||||
boolean isOnAr = equalsRegion(arRegions, regionOne);
|
|
||||||
boolean isTwoAr = equalsRegion(arRegions, regionTwo);
|
|
||||||
if (isOnAr && isTwoAr) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 互通区域2 = 不是阿拉伯 and 不是土耳其
|
|
||||||
// 2024.08.12 孟加拉,印度,测试区,单独隔离ID 印尼1区 IA印尼2区
|
|
||||||
List<String> notPassRegions = List.of("AR", "TR", "BD", "Test", "IN", "UK", "ID", "ID-02", "AR-02");
|
|
||||||
boolean isOneNotPassRegions = equalsRegion(notPassRegions, regionOne);
|
|
||||||
boolean isTwoNotPassRegions = equalsRegion(notPassRegions, regionTwo);
|
|
||||||
if (!isOneNotPassRegions && !isTwoNotPassRegions) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user