江体小程序和zlb接口开发 #1

Merged
XiangZ merged 32 commits from feat/script_v1 into master 2026-05-10 09:06:35 +00:00
3 changed files with 19 additions and 12 deletions
Showing only changes of commit cb21b38287 - Show all commits

View File

@@ -92,6 +92,7 @@ public class JntyzxUserInfoConfigTask extends BaseScheduleTaskTemplate {
return taskResult; return taskResult;
} }
venueInfoDOS = venueInfoDOS.stream() venueInfoDOS = venueInfoDOS.stream()
.filter(item -> !item.getPlaceName().contains("小馆"))
.sorted(Comparator.comparing(item -> VenueInfoUtils.sortVenueInfo(item.getPlaceName()))) .sorted(Comparator.comparing(item -> VenueInfoUtils.sortVenueInfo(item.getPlaceName())))
.toList(); .toList();
@@ -103,6 +104,7 @@ public class JntyzxUserInfoConfigTask extends BaseScheduleTaskTemplate {
List<UserInfoDO> list = Lists.newArrayList(); List<UserInfoDO> list = Lists.newArrayList();
int i = 0; int i = 0;
userInfoService.delAll();
for (UserTokenInfoDO user : users) { for (UserTokenInfoDO user : users) {
VenueInfoDO venueInfoDO = venueInfoDOS.get(i); VenueInfoDO venueInfoDO = venueInfoDOS.get(i);
UserInfoDO userInfoDO = new UserInfoDO(); UserInfoDO userInfoDO = new UserInfoDO();

View File

@@ -121,18 +121,23 @@ public class JtVenuePullTask extends BaseScheduleTaskTemplate {
} }
venueService.saveOrUpdateTodayVenueInfo(sitePositionLists); venueService.saveOrUpdateTodayVenueInfo(sitePositionLists);
List<SitePositionList> sitePositionLists6_8 = handleMsgSendList(sitePositionLists, 1); StringBuffer msg = new StringBuffer();
StringBuffer msg = new StringBuffer(
"查询到18:00-20:00空闲场地信息=====>\n时间:" + DateUtils.getDateFromDate(LocalDate.now()) + "\n");
sitePositionLists6_8.forEach(item -> {
msg.append(item.getPlaceName()).append("\n");
});
List<SitePositionList> sitePositionLists8_10 = handleMsgSendList(sitePositionLists, 2);
msg.append("查询到18:00-20:00空闲场地信息=====>\n时间:").append(DateUtils.getDateFromDate(LocalDate.now())).append("\n");
sitePositionLists8_10.forEach(item -> msg.append(item.getPlaceName()).append("\n"));
String key = RedisKeyConstant.JNTYZX_VENUE_MSG_SEND_KEY + RedisKeyConstant.getDate(); List<SitePositionList> sitePositionLists6_8 = handleMsgSendList(sitePositionLists, 1);
msgSendUtils.sendMsgRestrict1Hours(key, msg.toString()); if (CollectionUtils.isNotEmpty(sitePositionLists6_8)) {
msg.append("查询到18:00-20:00空闲场地信息=====>\n时间:").append(DateUtils.getDateFromDate(LocalDate.now())).append("\n");
sitePositionLists6_8.forEach(item -> msg.append(item.getPlaceName()).append("\n"));
}
List<SitePositionList> sitePositionLists8_10 = handleMsgSendList(sitePositionLists, 2);
if (CollectionUtils.isNotEmpty(sitePositionLists8_10)) {
msg.append("查询到20:00-22:00空闲场地信息=====>\n时间:").append(DateUtils.getDateFromDate(LocalDate.now())).append("\n");
sitePositionLists8_10.forEach(item -> msg.append(item.getPlaceName()).append("\n"));
}
if (StringUtils.isNotBlank(msg)) {
String key = RedisKeyConstant.JNTYZX_VENUE_MSG_SEND_KEY + RedisKeyConstant.getDate();
msgSendUtils.sendMsgRestrict1Hours(key, msg.toString());
}
taskResult.setSuccess(true); taskResult.setSuccess(true);
taskResult.setSummary("查询场地信息成功!时间:" + now); taskResult.setSummary("查询场地信息成功!时间:" + now);
return taskResult; return taskResult;

View File

@@ -125,7 +125,7 @@ public class JtVenueTomorrowPullTask extends BaseScheduleTaskTemplate {
} }
map.put(sitePositionList.getPlaceName(), sitePositionList); map.put(sitePositionList.getPlaceName(), sitePositionList);
} }
StringBuffer msg = new StringBuffer("查询江体场地信息=====>\n时间:" + DateUtils.getDateFromDate(LocalDate.now().plusDays(1)) + time + "\n"); StringBuffer msg = new StringBuffer("查询江体场地信息=====>\n时间:" + DateUtils.getDateFromDate(LocalDate.now().plusDays(1)) + " " + time + "\n");
map.forEach((placeName, sitePositionList) -> { map.forEach((placeName, sitePositionList) -> {
msg.append(placeName).append("订购人:").append(sitePositionList.getContacts()).append("\n"); msg.append(placeName).append("订购人:").append(sitePositionList.getContacts()).append("\n");
}); });