From 3f515a9991fd719ab19a9a50048923e4dfe69ffd Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 5 Jul 2021 11:11:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=8F=82=E6=95=B0=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/task/BizDataStatsDailyTask.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/BizDataStatsDailyTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/BizDataStatsDailyTask.java index bc79053a1f..8a665e3148 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/BizDataStatsDailyTask.java +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/BizDataStatsDailyTask.java @@ -5,6 +5,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.extract.form.BizDataFormDTO; import com.epmet.service.BizDataStatsService; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -23,7 +24,10 @@ public class BizDataStatsDailyTask implements ITask { @Override public void run(String params) { log.debug("bizDataStatsDailyTask定时任务正在执行,参数为:{}", params); - BizDataFormDTO formDTO = JSON.parseObject(params, BizDataFormDTO.class); + BizDataFormDTO formDTO = new BizDataFormDTO(); + if (StringUtils.isNotBlank(params)) { + formDTO = JSON.parseObject(params, BizDataFormDTO.class); + } Result result = bizDataStatsService.exeStatsDaily(formDTO); if (result.success()){ log.debug("bizDataStatsDailyTask定时任务正在执行定时任务执行成功");