Parcourir la source

producePlanAuditExport fix

wangyunpeng il y a 6 mois
Parent
commit
ef9fd350e3

+ 2 - 2
long-article-recommend-service/src/main/resources/mapper/aigc/AigcBaseMapper.xml

@@ -304,8 +304,8 @@
         <foreach collection="planIds" item="item" open="(" close=")" separator=",">
             #{item}
         </foreach>
-        and ((pper.audit_status in (1, 2)
-        and pper.audit_timestamp between #{timeStart} and #{timeEnd}) or (prr.review_status = 0))
+        and ((pper.audit_status in (1, 2) and pper.audit_timestamp between #{timeStart} and #{timeEnd})
+                 or (prr.review_status = 0 and pper.create_timestamp &lt; #{timeStart}))
         GROUP BY pper.plan_id, pper.audit_status
     </select>
 

+ 9 - 0
long-article-recommend-service/src/test/java/com/tzld/longarticle/recommend/server/DataDashboardTest.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.tzld.longarticle.recommend.server.model.vo.IntermediateIndicatorsExport;
 import com.tzld.longarticle.recommend.server.model.vo.NewSortStrategyExport;
 import com.tzld.longarticle.recommend.server.service.recommend.DataDashboardService;
+import com.tzld.longarticle.recommend.server.util.DateUtils;
 import lombok.extern.slf4j.Slf4j;
 import org.junit.jupiter.api.Test;
 import org.springframework.boot.test.context.SpringBootTest;
@@ -31,4 +32,12 @@ public class DataDashboardTest {
         log.info(JSONObject.toJSONString(result));
     }
 
+    @Test
+    public void producePlanAuditExport() {
+        List<String> dateStrList = DateUtils.getBeforeDays(null, null, 90);
+        for (String dateStr : dateStrList) {
+            dataDashboardService.producePlanAuditExport(dateStr);
+        }
+    }
+
 }