|
@@ -8,7 +8,6 @@ import com.tzld.piaoquan.recommend.server.util.WeightRandom;
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -29,21 +28,20 @@ public class RankProcessorInsert {
|
|
for (Map.Entry<String, Map<String, String>> entry : rulesMap.entrySet()) {
|
|
for (Map.Entry<String, Map<String, String>> entry : rulesMap.entrySet()) {
|
|
Map<String, String> value = entry.getValue();
|
|
Map<String, String> value = entry.getValue();
|
|
|
|
|
|
- // 硬编码,南北小年逻辑
|
|
|
|
- if ("小年".equals(entry.getKey())){
|
|
|
|
- String provinceCn = param.getProvince();
|
|
|
|
- if (provinceCn == null){
|
|
|
|
- provinceCn = "中国";
|
|
|
|
- }else{
|
|
|
|
- provinceCn = provinceCn.replaceAll("省$", "");
|
|
|
|
- }
|
|
|
|
- boolean ifNorth = NORTHERN_PROVINCES.contains(provinceCn);
|
|
|
|
- Calendar calendar = Calendar.getInstance();
|
|
|
|
- String date = new SimpleDateFormat("yyyyMMdd").format(calendar.getTime());
|
|
|
|
- if (ifNorth && date.compareTo("20240202") > 0) {
|
|
|
|
- continue;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+// if ("小年".equals(entry.getKey())){
|
|
|
|
+// String provinceCn = param.getProvince();
|
|
|
|
+// if (provinceCn == null){
|
|
|
|
+// provinceCn = "中国";
|
|
|
|
+// }else{
|
|
|
|
+// provinceCn = provinceCn.replaceAll("省$", "");
|
|
|
|
+// }
|
|
|
|
+// boolean ifNorth = NORTHERN_PROVINCES.contains(provinceCn);
|
|
|
|
+// Calendar calendar = Calendar.getInstance();
|
|
|
|
+// String date = new SimpleDateFormat("yyyyMMdd").format(calendar.getTime());
|
|
|
|
+// if (ifNorth && date.compareTo("20240202")>0){
|
|
|
|
+// continue;
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
|
|
String insertDates = value.get("insert_date");
|
|
String insertDates = value.get("insert_date");
|
|
String insertRules = value.get("insert");
|
|
String insertRules = value.get("insert");
|
|
@@ -127,11 +125,4 @@ public class RankProcessorInsert {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- public static boolean ifFilter(String start, String end, String dateHour) {
|
|
|
|
- if (StringUtils.isBlank(start) || StringUtils.isBlank(end) || StringUtils.isBlank(dateHour)) {
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- return dateHour.compareTo(start) >= 0 && dateHour.compareTo(end) < 0;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
}
|
|
}
|