江体小程序和zlb接口开发 #1
@@ -56,6 +56,25 @@ public class VenueInfoUtils {
|
|||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int sortVenueInfo4Zlb(String placeName) {
|
||||||
|
if (placeName.contains("10号")) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (placeName.contains("9号")) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if (placeName.contains("2号")) {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
if (placeName.contains("8号")) {
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
if (placeName.contains("7号")) {
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
|
||||||
public static List<VenueInfoDO> filterVenueList(String siteTimeName, List<VenueInfoDO> venueInfoDOS) {
|
public static List<VenueInfoDO> filterVenueList(String siteTimeName, List<VenueInfoDO> venueInfoDOS) {
|
||||||
if (StringUtils.equals(siteTimeName, "18:00")) {
|
if (StringUtils.equals(siteTimeName, "18:00")) {
|
||||||
return venueInfoDOS.stream().filter(VenueInfoUtils::get628VenueInfo).collect(Collectors.toList());
|
return venueInfoDOS.stream().filter(VenueInfoUtils::get628VenueInfo).collect(Collectors.toList());
|
||||||
|
|||||||
@@ -145,6 +145,6 @@ public class ZlbUserConfigTask extends BaseScheduleTaskTemplate {
|
|||||||
if (CollectionUtils.isEmpty(siteInfoList)) {
|
if (CollectionUtils.isEmpty(siteInfoList)) {
|
||||||
return Lists.newArrayList();
|
return Lists.newArrayList();
|
||||||
}
|
}
|
||||||
return siteInfoList.stream().sorted(Comparator.comparing(item -> VenueInfoUtils.sortVenueInfo(item.getPlaceName()))).collect(Collectors.toList());
|
return siteInfoList.stream().sorted(Comparator.comparing(item -> VenueInfoUtils.sortVenueInfo4Zlb(item.getPlaceName()))).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user