Commit 1ecf76d0 by zhouhaibao

[+]组装周报月报的链接参数

1 parent 79c3381d
......@@ -109,8 +109,13 @@ public class WeComMessageService {
}
}
// 构建URL,添加参数
String baseUrl = env.getProperty("push.bi.week.url") == null ? "https://www.baidu.com" : env.getProperty("push.bi.week.url");
SimpleDateFormat urlDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String url = baseUrl + "?reportStartDate=" + urlDateFormat.format(startDate) + "&reportEndDate=" + urlDateFormat.format(endDate) + "&reportType=1";
// 批量发送消息
return sendBatchWechatMessage(toUsers.toString(), title, subTitle, dateRange, env.getProperty("push.bi.week.url")==null ? "https://www.baidu.com" : env.getProperty("push.bi.week.url"));
return sendBatchWechatMessage(toUsers.toString(), title, subTitle, dateRange, url);
} catch (Exception e) {
log.error("批量发送展业周报通知失败", e);
return false;
......@@ -158,8 +163,13 @@ public class WeComMessageService {
}
}
// 构建URL,添加参数
String baseUrl = env.getProperty("push.bi.month.url") == null ? "https://www.baidu.com" : env.getProperty("push.bi.month.url");
SimpleDateFormat urlDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String url = baseUrl + "?reportStartDate=" + urlDateFormat.format(startDate) + "&reportEndDate=" + urlDateFormat.format(endDate) + "&reportType=2";
// 批量发送消息
return sendBatchWechatMessage(toUsers.toString(), title, subTitle, dateRange, env.getProperty("push.bi.month.url")==null ? "https://www.baidu.com" : env.getProperty("push.bi.month.url"));
return sendBatchWechatMessage(toUsers.toString(), title, subTitle, dateRange, url);
} catch (Exception e) {
log.error("批量发送展业月报通知失败", e);
return false;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!