|
|
@ -56,7 +56,20 @@ public class PublicityServiceImpl implements PublicityService { |
|
|
|
@Override |
|
|
|
public FactPublishedAgencyDailyDTO summaryInfo(TokenDto tokenDto) { |
|
|
|
String agencyId = this.getLoginUserDetails(tokenDto); |
|
|
|
return publicityDao.summaryInfo(agencyId); |
|
|
|
FactPublishedAgencyDailyDTO factPublishedAgencyDailyDTO = publicityDao.summaryInfo(agencyId); |
|
|
|
if (null == factPublishedAgencyDailyDTO) { |
|
|
|
factPublishedAgencyDailyDTO = new FactPublishedAgencyDailyDTO(); |
|
|
|
Date dateFact = DateUtils.addDateDays(new Date(), -1); |
|
|
|
String strDate = DateUtils.format(dateFact, DateUtils.DATE_PATTERN_YYYYMMDD); |
|
|
|
String yearId = strDate.substring(0, 4); |
|
|
|
String monthId = strDate.substring(5, 6); |
|
|
|
String dayId = strDate.substring(7, 8); |
|
|
|
factPublishedAgencyDailyDTO.setPublishedTotal(0); |
|
|
|
factPublishedAgencyDailyDTO.setPublishingTotal(0); |
|
|
|
factPublishedAgencyDailyDTO.setDateName(yearId + "." + monthId + "." + dayId); |
|
|
|
} |
|
|
|
|
|
|
|
return factPublishedAgencyDailyDTO; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|