From ba3e65c96b936fa7fcc192fcc8d2fa09a4453c34 Mon Sep 17 00:00:00 2001 From: qyx <565485304@qq.com> Date: Thu, 8 Apr 2021 16:38:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yuyou/openapi/openapi/task/ABDownTask.java | 9 +++++++-- src/main/resources/application.yml | 2 +- src/main/resources/logback.xml | 4 ++-- src/test/java/com/yuyou/openapi/openapi/SimpleTest.java | 5 +++++ 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/yuyou/openapi/openapi/task/ABDownTask.java b/src/main/java/com/yuyou/openapi/openapi/task/ABDownTask.java index e18bded..f0450a1 100644 --- a/src/main/java/com/yuyou/openapi/openapi/task/ABDownTask.java +++ b/src/main/java/com/yuyou/openapi/openapi/task/ABDownTask.java @@ -224,8 +224,13 @@ public class ABDownTask { List filterData = messageDTOList.stream() .filter(item -> (1 == item.getClientType()) || 2 == item.getClientType()) .map(item -> { - // pno通配 - String reverse = StringUtils.reverse(item.getMobile()); + // pno通配 - 增加相关的通配逻辑 + String reverse = ""; + if (StringUtils.isNotBlank(item.getMobile()) && item.getMobile().length() != 11){ + reverse = StringUtils.reverse(item.getMobile()); + }else if (item.getMobile().length() == 11){ + reverse = StringUtils.reverse(Base64Util.encode(item.getMobile())); + } item.setMobile(reverse); // startTime 通配下游到秒 Long startTime = item.getStartTime(); diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 2fff170..b51e26c 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,6 +1,6 @@ spring: profiles: - active: dev + active: prod # 序列化忽略null的k-v配置 jackson: default-property-inclusion: non_null diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index afa4c7b..77e8fb7 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -37,7 +37,7 @@ - - + + \ No newline at end of file diff --git a/src/test/java/com/yuyou/openapi/openapi/SimpleTest.java b/src/test/java/com/yuyou/openapi/openapi/SimpleTest.java index c37a2a2..5938fae 100644 --- a/src/test/java/com/yuyou/openapi/openapi/SimpleTest.java +++ b/src/test/java/com/yuyou/openapi/openapi/SimpleTest.java @@ -93,6 +93,11 @@ public class SimpleTest { } } + @Test + public void test1(){ + System.out.println(Base64.decodeStr(StringUtils.reverse("=EzN2IjN1QjNygTM"))); + } +