|
@ -3,14 +3,12 @@ package com.epmet.service.impl; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.feign.DataStatisticalOpenFeignClient; |
|
|
import com.epmet.feign.DataStatisticalOpenFeignClient; |
|
|
import com.epmet.service.StatsTopicService; |
|
|
import com.epmet.service.StatsTopicService; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
|
|
import org.slf4j.Logger; |
|
|
import org.slf4j.Logger; |
|
|
import org.slf4j.LoggerFactory; |
|
|
import org.slf4j.LoggerFactory; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
|
|
import java.util.Date; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @Description |
|
|
* @Description |
|
@ -28,15 +26,7 @@ public class StatsTopicServiceImpl implements StatsTopicService { |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public Result execTopicStatistical(String date) { |
|
|
public Result execTopicStatistical(String date) { |
|
|
Date dateParam = null; |
|
|
|
|
|
if(StringUtils.isNotBlank(date)){ |
|
|
return dataStatisticalOpenFeignClient.execTopicStatistical(date); |
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
|
|
|
try { |
|
|
|
|
|
dateParam = format.parse(date); |
|
|
|
|
|
}catch (Exception e){ |
|
|
|
|
|
logger.error(String.format("执行话题统计时,日期格式转换异常,param:%s,e:%s"),date,e.getMessage()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return dataStatisticalOpenFeignClient.execTopicStatistical(dateParam); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|