|
@@ -75,14 +75,14 @@ public class DistributedScheduledTask {
|
|
|
Map<String,Integer> count = new HashMap<>();
|
|
Map<String,Integer> count = new HashMap<>();
|
|
|
for (AitagTagLogEntity aitagTagLog:aitagTagLogEntities){
|
|
for (AitagTagLogEntity aitagTagLog:aitagTagLogEntities){
|
|
|
String feedback = aitagTagLog.getFeedback();
|
|
String feedback = aitagTagLog.getFeedback();
|
|
|
- String categoryCode = aitagTagLog.getCategoryCode();
|
|
|
|
|
|
|
+ String categoryId = aitagTagLog.getCategoryId();
|
|
|
String result = null;
|
|
String result = null;
|
|
|
if(FEEDBACK_RESULT_REJECT.equals(feedback)){
|
|
if(FEEDBACK_RESULT_REJECT.equals(feedback)){
|
|
|
result = aitagTagLog.getFeedbackResult();
|
|
result = aitagTagLog.getFeedbackResult();
|
|
|
}else{
|
|
}else{
|
|
|
result = aitagTagLog.getResult();
|
|
result = aitagTagLog.getResult();
|
|
|
}
|
|
}
|
|
|
- duCount(result, count,categoryCode);
|
|
|
|
|
|
|
+ duCount(result, count,categoryId);
|
|
|
}
|
|
}
|
|
|
AitagTagDailyAggEntity aitagTagLog = new AitagTagDailyAggEntity();
|
|
AitagTagDailyAggEntity aitagTagLog = new AitagTagDailyAggEntity();
|
|
|
for (String key : count.keySet()){
|
|
for (String key : count.keySet()){
|
|
@@ -91,18 +91,18 @@ public class DistributedScheduledTask {
|
|
|
aitagTagLog.setTagCount(count.get(key));
|
|
aitagTagLog.setTagCount(count.get(key));
|
|
|
String[] split = key.split(":");
|
|
String[] split = key.split(":");
|
|
|
aitagTagLog.setTagNm(split[0]);
|
|
aitagTagLog.setTagNm(split[0]);
|
|
|
- aitagTagLog.setCategoryCode(split[1]);
|
|
|
|
|
|
|
+ aitagTagLog.setCategoryId(split[1]);
|
|
|
aitagTagDailyAggDao.insert(aitagTagLog);
|
|
aitagTagDailyAggDao.insert(aitagTagLog);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private static void duCount(String result, Map<String, Integer> count,String categoryCode) {
|
|
|
|
|
|
|
+ private static void duCount(String result, Map<String, Integer> count,String categoryId) {
|
|
|
List<Map> results = JSONArray.parseArray(result, Map.class);
|
|
List<Map> results = JSONArray.parseArray(result, Map.class);
|
|
|
for (int i = 0 ;i<results.size();i++){
|
|
for (int i = 0 ;i<results.size();i++){
|
|
|
Map resultMap = results.get(i);
|
|
Map resultMap = results.get(i);
|
|
|
- String labe = resultMap.getOrDefault("tag_name","").toString()+":"+categoryCode;
|
|
|
|
|
|
|
+ String labe = resultMap.getOrDefault("tag_name","").toString()+":"+categoryId;
|
|
|
if(count.containsKey(labe)){
|
|
if(count.containsKey(labe)){
|
|
|
Integer integer = count.get(labe);
|
|
Integer integer = count.get(labe);
|
|
|
count.put(labe,integer+1);
|
|
count.put(labe,integer+1);
|