Browse Source

job参数空对象处理

master
jianjun 5 years ago
parent
commit
ebe66289a6
  1. 6
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityArticleSummaryDailyStatsTask.java
  2. 2
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedDailyStatsTask.java
  3. 2
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedMonthlyStatsTask.java
  4. 2
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedQuarterlyAndYearlyStatsTask.java
  5. 2
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedDailyStatsTask.java
  6. 2
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedMonthlyStatsTask.java
  7. 2
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedQuarterlyAndYearlyhlyStatsTask.java

6
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityArticleSummaryDailyStatsTask.java

@ -24,7 +24,7 @@ public class PublicityArticleSummaryDailyStatsTask implements ITask {
@Override
public void run(String params) {
logger.info("publicityArticleSummaryDailyStatsTask定时任务正在执行,参数为:{}", params);
StatsFormDTO formDTO = null;
StatsFormDTO formDTO = new StatsFormDTO();
if (StringUtils.isNotBlank(params)){
formDTO = JSON.parseObject(params,StatsFormDTO.class);
}
@ -32,12 +32,12 @@ public class PublicityArticleSummaryDailyStatsTask implements ITask {
if (result.success()) {
logger.info("publicityArticleSummaryDailyStatsTask定时任务执行成功");
} else {
logger.error("publicityArticleSummaryDailyStatsTask定时任务正在执行定时任务执行失败:" + result.getMsg());
logger.error("publicityArticleSummaryDailyStatsTask定时任务执行失败:" + result.getMsg());
}
}
public static void main(String[] args) {
StatsFormDTO formDTO = null;
StatsFormDTO formDTO = new StatsFormDTO();
String params = "{'date':'\"2020-06-20','customerId':'123'}";
if (StringUtils.isNotBlank(params)){
formDTO = JSON.parseObject(params,StatsFormDTO.class);

2
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedDailyStatsTask.java

@ -24,7 +24,7 @@ public class PublicityTagUsedDailyStatsTask implements ITask {
@Override
public void run(String params) {
logger.info("publicityTagUsedDailyStatsTask定时任务正在执行,参数为:{}", params);
StatsFormDTO formDTO = null;
StatsFormDTO formDTO = new StatsFormDTO();
if (StringUtils.isNotBlank(params)){
formDTO = JSON.parseObject(params,StatsFormDTO.class);
}

2
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedMonthlyStatsTask.java

@ -24,7 +24,7 @@ public class PublicityTagUsedMonthlyStatsTask implements ITask {
@Override
public void run(String params) {
logger.info("publicityTagUsedMonthlyStatsTask定时任务正在执行,参数为:{}", params);
StatsFormDTO formDTO = null;
StatsFormDTO formDTO = new StatsFormDTO();
if (StringUtils.isNotBlank(params)){
formDTO = JSON.parseObject(params,StatsFormDTO.class);
}

2
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagUsedQuarterlyAndYearlyStatsTask.java

@ -24,7 +24,7 @@ public class PublicityTagUsedQuarterlyAndYearlyStatsTask implements ITask {
@Override
public void run(String params) {
logger.info("publicityTagUsedQuarterlyAndYearlyStatsTask定时任务正在执行,参数为:{}", params);
StatsFormDTO formDTO = null;
StatsFormDTO formDTO = new StatsFormDTO();
if (StringUtils.isNotBlank(params)){
formDTO = JSON.parseObject(params,StatsFormDTO.class);
}

2
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedDailyStatsTask.java

@ -24,7 +24,7 @@ public class PublicityTagViewedDailyStatsTask implements ITask {
@Override
public void run(String params) {
logger.info("publicityTagViewedDailyStatsTask定时任务正在执行,参数为:{}", params);
StatsFormDTO formDTO = null;
StatsFormDTO formDTO = new StatsFormDTO();
if (StringUtils.isNotBlank(params)){
formDTO = JSON.parseObject(params,StatsFormDTO.class);
}

2
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedMonthlyStatsTask.java

@ -24,7 +24,7 @@ public class PublicityTagViewedMonthlyStatsTask implements ITask {
@Override
public void run(String params) {
logger.info("publicityTagViewedMonthlyStatsTask定时任务正在执行,参数为:{}", params);
StatsFormDTO formDTO = null;
StatsFormDTO formDTO = new StatsFormDTO();
if (StringUtils.isNotBlank(params)){
formDTO = JSON.parseObject(params,StatsFormDTO.class);
}

2
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/PublicityTagViewedQuarterlyAndYearlyhlyStatsTask.java

@ -24,7 +24,7 @@ public class PublicityTagViewedQuarterlyAndYearlyhlyStatsTask implements ITask {
@Override
public void run(String params) {
logger.info("publicityTagViewedMonthlyStatsTask定时任务正在执行,参数为:{}", params);
StatsFormDTO formDTO = null;
StatsFormDTO formDTO = new StatsFormDTO();
if (StringUtils.isNotBlank(params)){
formDTO = JSON.parseObject(params,StatsFormDTO.class);
}

Loading…
Cancel
Save