同步任务修改,逐日数据统计修改

dev
徐杰盟 2024-06-17 11:12:27 +08:00
parent 3d3c4f90f0
commit a0bc0282f7
3 changed files with 15 additions and 3 deletions

View File

@ -101,6 +101,9 @@ public class OrderEndService extends BaseService {
public void queryList(String stm,String etm,String supermarketId) {
queryList(null,null,null,stm,etm);
}
public void queryList(String tm,String customerId,String supermarketId,String stm,String etm) {

View File

@ -968,8 +968,16 @@ public class OrderStatService {
String productParams = "";
if (supermarket_id != null && supermarket_id > 0) {
productParams += " and t.supermarket_id = ?\n";
paramsArray.add(supermarket_id);
if (6 == supermarket_id){
productParams += " and (t.supermarket_id = ? OR t.supermarket_id = ? OR t.supermarket_id = ?)\n";
paramsArray.add(6);
paramsArray.add(8);
paramsArray.add(10);
}else{
productParams += " and t.supermarket_id = ?\n";
paramsArray.add(supermarket_id);
}
}
if (stat_product) {
if (product_id != null && product_id > 0) {

View File

@ -16,7 +16,8 @@ public class OrderEndJob implements Job {
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
// 获取前一天的数据
log.info("开始同步");
OrderEndService.me.syncOrderTemp(LocalDate.now().minusDays(1).toString()); // 每天早上更新数据
LocalDate localDate = LocalDate.now().minusDays(1);
OrderEndService.me.queryList(localDate.minusDays(60).toString(),localDate.toString()); // 最近60天的数据
}