From e1ea384d948fed14b558aeb98a732a6328aa6a0e Mon Sep 17 00:00:00 2001 From: wangsiyuan <2392948297@qq.com> Date: Tue, 12 Dec 2023 18:43:56 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20WeChatMsgTest.java?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test/java/com/kimgo/wepush/model/WeChatMsgTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/kimgo/wepush/model/WeChatMsgTest.java b/src/test/java/com/kimgo/wepush/model/WeChatMsgTest.java index 07cce6d..1a7c899 100644 --- a/src/test/java/com/kimgo/wepush/model/WeChatMsgTest.java +++ b/src/test/java/com/kimgo/wepush/model/WeChatMsgTest.java @@ -13,7 +13,7 @@ class WeChatMsgTest { weChatMsg.setTitle("Example Title"); weChatMsg.setSender("Example Sender"); weChatMsg.setMessage("Example Message"); - + weChatMsg.setCurrentTime("2023-12-12 18:43:04"); assertFalse(weChatMsg.isInvalid(), "WeChatMsg should be valid when all fields are valid."); } From 2834117f0f5af7e932a2b5be53775d79445371f7 Mon Sep 17 00:00:00 2001 From: wangsiyuan <2392948297@qq.com> Date: Tue, 12 Dec 2023 18:43:59 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20QyWeChatAppInfoMapperT?= =?UTF-8?q?est.java?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/kimgo/wepush/QyWeChatAppInfoMapperTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/test/java/com/kimgo/wepush/QyWeChatAppInfoMapperTest.java b/src/test/java/com/kimgo/wepush/QyWeChatAppInfoMapperTest.java index a8d7364..50e510c 100644 --- a/src/test/java/com/kimgo/wepush/QyWeChatAppInfoMapperTest.java +++ b/src/test/java/com/kimgo/wepush/QyWeChatAppInfoMapperTest.java @@ -15,6 +15,7 @@ public class QyWeChatAppInfoMapperTest { @Autowired private QyWeChatAppInfoMapper qyWeChatAppInfoMapper; + @Test public void testSelect() { System.out.println(("----- select by id test ------")); @@ -41,12 +42,11 @@ public class QyWeChatAppInfoMapperTest { System.out.println("Test complete"); } + @Test - public void testAllColum(){ - for (int i = 1; i < 12; i++) { - QyWeChatAppInfo qyWeChatAppInfo = qyWeChatAppInfoMapper.selectById(i); - PhoneNumberValidation phoneNumberValidation = new PhoneNumberValidation(); - phoneNumberValidation.isValidPhoneNumber(qyWeChatAppInfo.getPhoneNumber()); - } + public void testAllColum() { + QyWeChatAppInfo qyWeChatAppInfo = qyWeChatAppInfoMapper.selectById(1); + PhoneNumberValidation phoneNumberValidation = new PhoneNumberValidation(); + phoneNumberValidation.isValidPhoneNumber(qyWeChatAppInfo.getPhoneNumber()); } } From 28c97c4819883cecf9d4b6377a1aba16339ab256 Mon Sep 17 00:00:00 2001 From: wangsiyuan <2392948297@qq.com> Date: Tue, 12 Dec 2023 18:47:52 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20HandleWeChatMsgService?= =?UTF-8?q?.java?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/kimgo/wepush/service/HandleWeChatMsgService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/kimgo/wepush/service/HandleWeChatMsgService.java b/src/main/java/com/kimgo/wepush/service/HandleWeChatMsgService.java index 6002d57..f9e3134 100644 --- a/src/main/java/com/kimgo/wepush/service/HandleWeChatMsgService.java +++ b/src/main/java/com/kimgo/wepush/service/HandleWeChatMsgService.java @@ -49,10 +49,11 @@ public class HandleWeChatMsgService { textMessage.setEnable_duplicate_check(apiSettingService.getApiSetting().getEnableDuplicateCheck()); textMessage.setDuplicate_check_interval(apiSettingService.getApiSetting().getDuplicateCheckInterval()); TextMessage.Text text = new TextMessage.Text(); - text.setContent("你收到一条微信通知\n 接受时间: " +weChatMsg.getCurrentTime() + + text.setContent("你有一条微信通知\n"+ "\nsender: " + weChatMsg.getSender() + "\ntitle: "+ weChatMsg.getTitle() + - "\n内容: \n"+ weChatMsg.getMessage()); + "接受时间: " +weChatMsg.getCurrentTime() + + "\n内容: \n\n"+ weChatMsg.getMessage()); textMessage.setText(text); logger.info("TextMessage: {}", textMessage); return textMessage;