Commit 13e72158 by 叶立庆

发送企微应用消息优化判断

1 parent 63b5f3d0
......@@ -70,6 +70,9 @@ public class StaffMonthSalaryJob implements SimpleJob {
}
for (StaffBaseInfo staffBaseInfo : staffBaseInfos) {
try {
if (StringUtils.isBlank(staffBaseInfo.getStaffName()) || StringUtils.isBlank(staffBaseInfo.getStaffPhone())) {
continue;
}
StaffMonthSalarySlip slip = new StaffMonthSalarySlip();
slip.setSalaryMonth(statMonth);
slip.setUpdatedBy(CommonConstants.DEFAULT_UPDATE_BY);
......@@ -203,7 +206,11 @@ public class StaffMonthSalaryJob implements SimpleJob {
requestDTO.setToUser(userId);
requestDTO.setMsgType(WorkWechatAppMessageTypeEnum.TEXTCARD.getValue());
String title = String.format(titleEnv, monthSalary.getSalaryMonth().substring(0, 4));
String description = String.format(descriptionEvn, monthSalary.getSalaryMonth().substring(5, 7));
String month = monthSalary.getSalaryMonth().substring(5, 7);
if (month.startsWith("0")) {
month = month.substring(1);
}
String description = String.format(descriptionEvn, month);
WorkWechatTextCardMessageDTO textCard = new WorkWechatTextCardMessageDTO();
textCard.setTitle(title);
textCard.setDescription(description);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!