Selaa lähdekoodia

将categoryCode 改成categoryId

2507040827 9 tuntia sitten
vanhempi
commit
c239e51e4f

+ 5 - 5
server/yusp-tagging-core/src/main/java/cn/com/yusys/yusp/service/DistributedScheduledTask.java

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