Compare commits

...

6 Commits

3 changed files with 4 additions and 5 deletions

View File

@ -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;

View File

@ -48,6 +48,5 @@ public class QyWeChatAppInfoMapperTest {
QyWeChatAppInfo qyWeChatAppInfo = qyWeChatAppInfoMapper.selectById(1);
PhoneNumberValidation phoneNumberValidation = new PhoneNumberValidation();
phoneNumberValidation.isValidPhoneNumber(qyWeChatAppInfo.getPhoneNumber());
}
}

View File

@ -13,8 +13,7 @@ class WeChatMsgTest {
weChatMsg.setTitle("Example Title");
weChatMsg.setSender("Example Sender");
weChatMsg.setMessage("Example Message");
weChatMsg.setCurrentTime("dqdd");
weChatMsg.setCurrentTime("2023-12-12 18:43:04");
assertFalse(weChatMsg.isInvalid(), "WeChatMsg should be valid when all fields are valid.");
}