From e77d9696b3492150211cfe07089387a8ec5575df Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 1 Jul 2020 19:53:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AE=A2=E6=88=B7id=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../task/PublicityArticleSummaryDailyStatsTask.java | 13 +++++++++++-- .../epmet/task/PublicityTagUsedDailyStatsTask.java | 4 ++-- .../task/PublicityTagUsedMonthlyStatsTask.java | 4 ++-- ...PublicityTagUsedQuarterlyAndYearlyStatsTask.java | 4 ++-- .../task/PublicityTagViewedDailyStatsTask.java | 4 ++-- .../task/PublicityTagViewedMonthlyStatsTask.java | 4 ++-- ...cityTagViewedQuarterlyAndYearlyhlyStatsTask.java | 4 ++-- 7 files changed, 23 insertions(+), 14 deletions(-) diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityArticleSummaryDailyStatsTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityArticleSummaryDailyStatsTask.java index c3ee22aedc..1b2f7a37e8 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityArticleSummaryDailyStatsTask.java +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityArticleSummaryDailyStatsTask.java @@ -1,6 +1,6 @@ package com.epmet.task; -import com.epmet.commons.tools.utils.ConvertUtils; +import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.StatsFormDTO; import com.epmet.service.StatsPublicityTaskService; @@ -26,7 +26,7 @@ public class PublicityArticleSummaryDailyStatsTask implements ITask { logger.debug("publicityArticleSummaryDailyStatsTask定时任务正在执行,参数为:{}", params); StatsFormDTO formDTO = null; if (StringUtils.isNotBlank(params)){ - formDTO = ConvertUtils.sourceToTarget(params, StatsFormDTO.class); + formDTO = JSON.parseObject(params,StatsFormDTO.class); } Result result = statsPublicityTaskService.articleSummaryDailyStatsjob(formDTO); if (result.success()) { @@ -35,4 +35,13 @@ public class PublicityArticleSummaryDailyStatsTask implements ITask { logger.debug("publicityArticleSummaryDailyStatsTask定时任务正在执行定时任务执行失败:" + result.getMsg()); } } + + public static void main(String[] args) { + StatsFormDTO formDTO = null; + String params = "{'date':'\"2020-06-20','customerId':'123'}"; + if (StringUtils.isNotBlank(params)){ + formDTO = JSON.parseObject(params,StatsFormDTO.class); + } + System.out.println(JSON.toJSONString(formDTO)); + } } diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedDailyStatsTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedDailyStatsTask.java index 7c007bb700..7888be0829 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedDailyStatsTask.java +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedDailyStatsTask.java @@ -1,6 +1,6 @@ package com.epmet.task; -import com.epmet.commons.tools.utils.ConvertUtils; +import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.StatsFormDTO; import com.epmet.service.StatsPublicityTaskService; @@ -26,7 +26,7 @@ public class PublicityTagUsedDailyStatsTask implements ITask { logger.debug("publicityTagUsedDailyStatsjob定时任务正在执行,参数为:{}", params); StatsFormDTO formDTO = null; if (StringUtils.isNotBlank(params)){ - formDTO = ConvertUtils.sourceToTarget(params, StatsFormDTO.class); + formDTO = JSON.parseObject(params,StatsFormDTO.class); } Result result = statsPublicityTaskService.tagUsedDailyStatsjob(formDTO); if (result.success()) { diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedMonthlyStatsTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedMonthlyStatsTask.java index 948790c4bb..09857791e3 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedMonthlyStatsTask.java +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedMonthlyStatsTask.java @@ -1,6 +1,6 @@ package com.epmet.task; -import com.epmet.commons.tools.utils.ConvertUtils; +import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.StatsFormDTO; import com.epmet.service.StatsPublicityTaskService; @@ -26,7 +26,7 @@ public class PublicityTagUsedMonthlyStatsTask implements ITask { logger.debug("publicityTagUsedMonthlyStatsjob定时任务正在执行,参数为:{}", params); StatsFormDTO formDTO = null; if (StringUtils.isNotBlank(params)){ - formDTO = ConvertUtils.sourceToTarget(params, StatsFormDTO.class); + formDTO = JSON.parseObject(params,StatsFormDTO.class); } Result result = statsPublicityTaskService.tagUsedMonthlyStatsjob(formDTO); if (result.success()) { diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedQuarterlyAndYearlyStatsTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedQuarterlyAndYearlyStatsTask.java index afc02304e6..40b570a036 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedQuarterlyAndYearlyStatsTask.java +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedQuarterlyAndYearlyStatsTask.java @@ -1,6 +1,6 @@ package com.epmet.task; -import com.epmet.commons.tools.utils.ConvertUtils; +import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.StatsFormDTO; import com.epmet.service.StatsPublicityTaskService; @@ -26,7 +26,7 @@ public class PublicityTagUsedQuarterlyAndYearlyStatsTask implements ITask { logger.debug("publicityTagUsedMonthlyStatsjob定时任务正在执行,参数为:{}", params); StatsFormDTO formDTO = null; if (StringUtils.isNotBlank(params)){ - formDTO = ConvertUtils.sourceToTarget(params, StatsFormDTO.class); + formDTO = JSON.parseObject(params,StatsFormDTO.class); } Result result = statsPublicityTaskService.tagUsedQuarterlyStatsjob(formDTO); if (result.success()) { diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedDailyStatsTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedDailyStatsTask.java index 899386fc35..83376f511c 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedDailyStatsTask.java +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedDailyStatsTask.java @@ -1,6 +1,6 @@ package com.epmet.task; -import com.epmet.commons.tools.utils.ConvertUtils; +import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.StatsFormDTO; import com.epmet.service.StatsPublicityTaskService; @@ -26,7 +26,7 @@ public class PublicityTagViewedDailyStatsTask implements ITask { logger.debug("publicityTagViewedDailyStatsTask定时任务正在执行,参数为:{}", params); StatsFormDTO formDTO = null; if (StringUtils.isNotBlank(params)){ - formDTO = ConvertUtils.sourceToTarget(params, StatsFormDTO.class); + formDTO = JSON.parseObject(params,StatsFormDTO.class); } Result result = statsPublicityTaskService.tagViewedDailyStatsjob(formDTO); if (result.success()) { diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedMonthlyStatsTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedMonthlyStatsTask.java index bc16c6b497..a42e1d02ee 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedMonthlyStatsTask.java +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedMonthlyStatsTask.java @@ -1,6 +1,6 @@ package com.epmet.task; -import com.epmet.commons.tools.utils.ConvertUtils; +import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.StatsFormDTO; import com.epmet.service.StatsPublicityTaskService; @@ -26,7 +26,7 @@ public class PublicityTagViewedMonthlyStatsTask implements ITask { logger.debug("publicityTagViewedMonthlyStatsTask定时任务正在执行,参数为:{}", params); StatsFormDTO formDTO = null; if (StringUtils.isNotBlank(params)){ - formDTO = ConvertUtils.sourceToTarget(params, StatsFormDTO.class); + formDTO = JSON.parseObject(params,StatsFormDTO.class); } Result result = statsPublicityTaskService.tagViewedMonthlyStatsjob(formDTO); if (result.success()) { diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedQuarterlyAndYearlyhlyStatsTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedQuarterlyAndYearlyhlyStatsTask.java index 105f3ad987..837f7066f2 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedQuarterlyAndYearlyhlyStatsTask.java +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedQuarterlyAndYearlyhlyStatsTask.java @@ -1,6 +1,6 @@ package com.epmet.task; -import com.epmet.commons.tools.utils.ConvertUtils; +import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.StatsFormDTO; import com.epmet.service.StatsPublicityTaskService; @@ -26,7 +26,7 @@ public class PublicityTagViewedQuarterlyAndYearlyhlyStatsTask implements ITask { logger.debug("publicityTagViewedMonthlyStatsTask定时任务正在执行,参数为:{}", params); StatsFormDTO formDTO = null; if (StringUtils.isNotBlank(params)){ - formDTO = ConvertUtils.sourceToTarget(params, StatsFormDTO.class); + formDTO = JSON.parseObject(params,StatsFormDTO.class); } Result result = statsPublicityTaskService.tagViewedQuarterlyStatsjob(formDTO); if (result.success()) {