Browse Source

宣传能力-标签使用次数统计 暂存

master
jianjun 5 years ago
parent
commit
90d304075e
  1. 2
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/voice/ArticleGridPublishedSummaryDTO.java
  2. 44
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/voice/PublisherPublishedCountDTO.java
  3. 24
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/StatsPublicityController.java
  4. 16
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedAgencyDailyDao.java
  5. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedAgencyMonthlyDao.java
  6. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedAgencyQuarterlyDao.java
  7. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedAgencyYearlyDao.java
  8. 14
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedDepartmentDailyDao.java
  9. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedDepartmentMonthlyDao.java
  10. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedDepartmentQuarterlyDao.java
  11. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedDepartmentYearlyDao.java
  12. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedGridDailyDao.java
  13. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedGridMonthlyDao.java
  14. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedGridQuarterlyDao.java
  15. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedGridYearlyDao.java
  16. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticleDao.java
  17. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticlePublishRangeDao.java
  18. 46
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticleTagsDao.java
  19. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedAgencyMonthlyEntity.java
  20. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedAgencyQuarterlyEntity.java
  21. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedDepartmentMonthlyEntity.java
  22. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedDepartmentQuarterlyEntity.java
  23. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedGridMonthlyEntity.java
  24. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedGridQuarterlyEntity.java
  25. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedAgencyMonthlyEntity.java
  26. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedAgencyQuarterlyEntity.java
  27. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedGridMonthlyEntity.java
  28. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedGridQuarterlyEntity.java
  29. 58
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/voice/ArticleTagsEntity.java
  30. 23
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsPublicityService.java
  31. 464
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsPublicityServiceImpl.java
  32. 50
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedAgencyDailyService.java
  33. 39
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedAgencyMonthlyService.java
  34. 35
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedAgencyQuarterlyService.java
  35. 33
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedAgencyYearlyService.java
  36. 49
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedDepartmentDailyService.java
  37. 38
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedDepartmentMonthlyService.java
  38. 35
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedDepartmentQuarterlyService.java
  39. 33
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedDepartmentYearlyService.java
  40. 50
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedGridDailyService.java
  41. 38
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedGridMonthlyService.java
  42. 34
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedGridQuarterlyService.java
  43. 32
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedGridYearlyService.java
  44. 32
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedAgencyDailyService.java
  45. 31
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedAgencyMonthlyService.java
  46. 31
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedAgencyQuarterlyService.java
  47. 32
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedAgencyYearlyService.java
  48. 31
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedGridDailyService.java
  49. 31
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedGridMonthlyService.java
  50. 31
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedGridQuarterlyService.java
  51. 31
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedGridYearlyService.java
  52. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedAgencyDailyServiceImpl.java
  53. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedDepartmentDailyServiceImpl.java
  54. 16
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedGridDailyServiceImpl.java
  55. 65
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyDailyServiceImpl.java
  56. 70
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyMonthlyServiceImpl.java
  57. 53
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyQuarterlyServiceImpl.java
  58. 47
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyYearlyServiceImpl.java
  59. 64
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentDailyServiceImpl.java
  60. 70
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentMonthlyServiceImpl.java
  61. 51
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentQuarterlyServiceImpl.java
  62. 47
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentYearlyServiceImpl.java
  63. 65
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridDailyServiceImpl.java
  64. 67
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridMonthlyServiceImpl.java
  65. 52
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridQuarterlyServiceImpl.java
  66. 46
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridYearlyServiceImpl.java
  67. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticlePublishRangeService.java
  68. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticleService.java
  69. 42
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticleTagsService.java
  70. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticlePublishRangeServiceImpl.java
  71. 28
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticleServiceImpl.java
  72. 56
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticleTagsServiceImpl.java
  73. 45
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedAgencyDailyDao.xml
  74. 62
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedAgencyMonthlyDao.xml
  75. 21
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedAgencyQuarterlyDao.xml
  76. 21
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedAgencyYearlyDao.xml
  77. 47
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedDepartmentDailyDao.xml
  78. 63
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedDepartmentMonthlyDao.xml
  79. 20
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedDepartmentQuarterlyDao.xml
  80. 21
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedDepartmentYearlyDao.xml
  81. 48
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedGridDailyDao.xml
  82. 64
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedGridMonthlyDao.xml
  83. 19
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedGridQuarterlyDao.xml
  84. 20
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedGridYearlyDao.xml
  85. 21
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedGridDailyDao.xml
  86. 18
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedGridMonthlyDao.xml
  87. 18
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedGridQuarterlyDao.xml
  88. 18
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedGridYearlyDao.xml
  89. 24
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticleDao.xml
  90. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticlePublishRangeDao.xml
  91. 32
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticleTagsDao.xml

2
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/stats/ArticleGridPublishedSummaryDTO.java → epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/voice/ArticleGridPublishedSummaryDTO.java

@ -1,4 +1,4 @@
package com.epmet.dto.stats;
package com.epmet.dto.voice;
/**
* @author jianjun liu
* @email liujianjun@yunzongnet.com

44
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/voice/PublisherPublishedCountDTO.java

@ -0,0 +1,44 @@
package com.epmet.dto.voice;
/**
* @author jianjun liu
* @email liujianjun@yunzongnet.com
* @date 2020-06-17 16:43
**/
import lombok.Data;
import java.io.Serializable;
/**
* desc每个发布者发布的文章数 返回结果 dto
*
* @author liujianjun
* @date 2020/6/19 10:43
*/
@Data
public class PublisherPublishedCountDTO implements Serializable {
private static final long serialVersionUID = 6755654148306711602L;
/**
* 客户id
*/
private String customerId;
/**
* 机关id
*/
private String agencyId;
/**
* 网格Id
*/
private String gridId;
/**
* 发布者Id publish_type类型为 部门时 是部门id类型为 机关时 是机关Id
*/
private String publisherId;
/**
* 发布文章数
*/
private Integer publishedCount;
}

24
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/StatsPublicityController.java

@ -31,6 +31,28 @@ public class StatsPublicityController {
*/
@PostMapping(value = "publicitySummaryStatsjob")
public Result<Boolean> publicitySummaryStatsjob(Date statsDate) {
return new Result<Boolean>().ok(statsPublicityService.publicitySummary(statsDate));
return new Result<Boolean>().ok(statsPublicityService.articlePublishedCountDayStats(statsDate));
}
/**
* desc: 统计发表文章最多的分类 包含 机关 部门 网格
*
* @param statsDate 默认为T-1天如果传 则统计的是statsDate的数据
* @return
*/
@PostMapping(value = "tagUsedDayStatsjob")
public Result<Boolean> tagUsedDayStatsjob(Date statsDate) {
return new Result<Boolean>().ok(statsPublicityService.tagUsedDayStatsjob(statsDate));
}
/**
* desc: 统计发表文章最多的分类 包含 机关 部门 网格
*
* @param statsDate 默认为T-1天如果传 则统计的是statsDate的数据
* @return
*/
@PostMapping(value = "tagUsedMonthStatsjob")
public Result<Boolean> tagUsedMonthStatsjob(Date statsDate) {
return new Result<Boolean>().ok(statsPublicityService.tagUsedMonthStatsjob(statsDate));
}
}

16
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedAgencyDailyDao.java

@ -19,7 +19,11 @@ package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.stats.FactTagUsedAgencyDailyEntity;
import com.epmet.entity.stats.FactTagUsedGridDailyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 标签机关日统计表
@ -29,5 +33,15 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface FactTagUsedAgencyDailyDao extends BaseDao<FactTagUsedAgencyDailyEntity> {
int deleteByDateId(@Param("customerId") String customerId, @Param("dateId") String dateId);
/**
* desc:根据客户Id 和月份id 获取月的统计数
*
* @param customerId
* @param monthId
* @return
*/
List<FactTagUsedGridDailyEntity> getTagUsedCountByMonth(@Param("customerId") String customerId, @Param("monthId") String monthId);
}

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedAgencyMonthlyDao.java

@ -19,7 +19,11 @@ package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.stats.FactTagUsedAgencyMonthlyEntity;
import com.epmet.entity.stats.FactTagUsedGridMonthlyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 标签机关月统计表
@ -29,5 +33,10 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface FactTagUsedAgencyMonthlyDao extends BaseDao<FactTagUsedAgencyMonthlyEntity> {
List<FactTagUsedGridMonthlyEntity> getTagUsedCountByYearId(@Param("customerId") String customerId, @Param("yearId") String yearId);
List<FactTagUsedGridMonthlyEntity> getTagUsedCountByQuarterId(@Param("customerId") String customerId, @Param("quarterId") String quarterId);
int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId);
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedAgencyQuarterlyDao.java

@ -20,6 +20,7 @@ package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.stats.FactTagUsedAgencyQuarterlyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 标签机关季度统计表
@ -29,5 +30,6 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface FactTagUsedAgencyQuarterlyDao extends BaseDao<FactTagUsedAgencyQuarterlyEntity> {
int deleteByQuarterId(@Param("customerId") String customerId, @Param("quarterId") String quarterId);
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedAgencyYearlyDao.java

@ -20,6 +20,7 @@ package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.stats.FactTagUsedAgencyYearlyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 标签机关年度统计表
@ -29,5 +30,6 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface FactTagUsedAgencyYearlyDao extends BaseDao<FactTagUsedAgencyYearlyEntity> {
int deleteByYearId(@Param("customerId") String customerId, @Param("yearId") String yearId);
}

14
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedDepartmentDailyDao.java

@ -20,6 +20,9 @@ package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.stats.FactTagUsedDepartmentDailyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 标签部门日统计表
@ -29,5 +32,14 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface FactTagUsedDepartmentDailyDao extends BaseDao<FactTagUsedDepartmentDailyEntity> {
int deleteByDateId(@Param("customerId") String customerId, @Param("dateId") String dateId);
/**
* desc:获取部门月 统计数
* @param customerId
* @param monthId
* @return
*/
List<FactTagUsedDepartmentDailyEntity> getTagUsedCountByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId);
}

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedDepartmentMonthlyDao.java

@ -20,6 +20,9 @@ package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.stats.FactTagUsedDepartmentMonthlyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 标签部门月统计表
@ -29,5 +32,10 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface FactTagUsedDepartmentMonthlyDao extends BaseDao<FactTagUsedDepartmentMonthlyEntity> {
List<FactTagUsedDepartmentMonthlyEntity> getTagUsedCountByYearId(@Param("customerId") String customerId, @Param("yearId") String yearId);
List<FactTagUsedDepartmentMonthlyEntity> getTagUsedCountByQuarterId(@Param("customerId") String customerId, @Param("quarterId") String quarterId);
int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId);
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedDepartmentQuarterlyDao.java

@ -20,6 +20,7 @@ package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.stats.FactTagUsedDepartmentQuarterlyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 标签部门季度统计表
@ -29,5 +30,6 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface FactTagUsedDepartmentQuarterlyDao extends BaseDao<FactTagUsedDepartmentQuarterlyEntity> {
int deleteByQuarterId(@Param("customerId") String customerId, @Param("quarterId") String quarterId);
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedDepartmentYearlyDao.java

@ -20,6 +20,7 @@ package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.stats.FactTagUsedDepartmentYearlyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 标签部门年度统计表
@ -29,5 +30,6 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface FactTagUsedDepartmentYearlyDao extends BaseDao<FactTagUsedDepartmentYearlyEntity> {
int deleteByYearId(@Param("customerId") String customerId, @Param("yearId") String yearId);
}

15
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedGridDailyDao.java

@ -20,6 +20,9 @@ package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.stats.FactTagUsedGridDailyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 标签网格日统计表
@ -29,5 +32,15 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface FactTagUsedGridDailyDao extends BaseDao<FactTagUsedGridDailyEntity> {
/**
* desc:根据dateId 删除数据
*
* @param customerId
* @param dateId
* @return
*/
int deleteByDateId(@Param("customerId") String customerId, @Param("dateId") String dateId);
List<FactTagUsedGridDailyEntity> getTagUsedCountByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId);
}

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedGridMonthlyDao.java

@ -20,6 +20,9 @@ package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.stats.FactTagUsedGridMonthlyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 标签网格月统计表
@ -29,5 +32,10 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface FactTagUsedGridMonthlyDao extends BaseDao<FactTagUsedGridMonthlyEntity> {
List<FactTagUsedGridMonthlyEntity> getTagUsedCountByYearId(@Param("customerId") String customerId, @Param("yearId") String yearId);
List<FactTagUsedGridMonthlyEntity> getTagUsedCountByQuarterId(@Param("customerId") String customerId, @Param("quarterId") String quarterId);
int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId);
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedGridQuarterlyDao.java

@ -20,6 +20,7 @@ package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.stats.FactTagUsedGridQuarterlyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 标签网格季度统计表
@ -29,5 +30,6 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface FactTagUsedGridQuarterlyDao extends BaseDao<FactTagUsedGridQuarterlyEntity> {
int deleteByQuarterId(@Param("customerId") String customerId, @Param("quarterId") String quarterId);
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactTagUsedGridYearlyDao.java

@ -20,6 +20,7 @@ package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.stats.FactTagUsedGridYearlyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 标签网格年度统计表
@ -29,5 +30,6 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface FactTagUsedGridYearlyDao extends BaseDao<FactTagUsedGridYearlyEntity> {
int deleteByYearId(@Param("customerId") String customerId, @Param("yearId") String yearId);
}

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticleDao.java

@ -18,7 +18,7 @@
package com.epmet.dao.voice;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.stats.ArticleGridPublishedSummaryDTO;
import com.epmet.dto.voice.ArticleGridPublishedSummaryDTO;
import com.epmet.entity.voice.ArticleEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -44,4 +44,14 @@ public interface ArticleDao extends BaseDao<ArticleEntity> {
* @return
*/
List<ArticleGridPublishedSummaryDTO> getAllPublishedCount(@Param("customerId") String customerId, @Param("publishDate") Date publishDate, @Param("publisherType") String publisherType);
/**
* desc:根据客户Id 和发布时间 获取文章数据
*
* @param customerId
* @param publishDate
* @param publisherType
* @return
*/
List<ArticleEntity> getPublishedArticleByDay(@Param("customerId") String customerId, @Param("publishDate") Date publishDate, @Param("publisherType") String publisherType);
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticlePublishRangeDao.java

@ -18,7 +18,7 @@
package com.epmet.dao.voice;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.stats.ArticleGridPublishedSummaryDTO;
import com.epmet.dto.voice.ArticleGridPublishedSummaryDTO;
import com.epmet.entity.voice.ArticlePublishRangeEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

46
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticleTagsDao.java

@ -0,0 +1,46 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao.voice;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.voice.ArticleTagsEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
/**
* 文章标签表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-17
*/
@Mapper
public interface ArticleTagsDao extends BaseDao<ArticleTagsEntity> {
/**
* desc:根据客户id 创建时间 获取文章标签数据
*
* @param customerId
* @param startTime
* @param endTime
* @return
*/
List<ArticleTagsEntity> getArticleTagsByDay(@Param("customerId") String customerId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);
}

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedAgencyMonthlyEntity.java

@ -70,4 +70,14 @@ public class FactTagUsedAgencyMonthlyEntity extends BaseEpmetEntity {
*/
private String monthId;
/**
* 季度ID
*/
private String quarterId;
/**
* 年D
*/
private String yearId;
}

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedAgencyQuarterlyEntity.java

@ -70,4 +70,9 @@ public class FactTagUsedAgencyQuarterlyEntity extends BaseEpmetEntity {
*/
private String quarterId;
/**
* 年D
*/
private String yearId;
}

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedDepartmentMonthlyEntity.java

@ -70,4 +70,13 @@ public class FactTagUsedDepartmentMonthlyEntity extends BaseEpmetEntity {
*/
private String monthId;
/**
* 季度ID
*/
private String quarterId;
/**
* 年D
*/
private String yearId;
}

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedDepartmentQuarterlyEntity.java

@ -70,4 +70,9 @@ public class FactTagUsedDepartmentQuarterlyEntity extends BaseEpmetEntity {
*/
private String quarterId;
/**
* 年D
*/
private String yearId;
}

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedGridMonthlyEntity.java

@ -70,4 +70,14 @@ public class FactTagUsedGridMonthlyEntity extends BaseEpmetEntity {
*/
private String monthId;
/**
* 季度ID
*/
private String quarterId;
/**
* 年D
*/
private String yearId;
}

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagUsedGridQuarterlyEntity.java

@ -70,4 +70,9 @@ public class FactTagUsedGridQuarterlyEntity extends BaseEpmetEntity {
*/
private String quarterId;
/**
* 年D
*/
private String yearId;
}

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedAgencyMonthlyEntity.java

@ -70,4 +70,14 @@ public class FactTagViewedAgencyMonthlyEntity extends BaseEpmetEntity {
*/
private String monthId;
/**
* 季度ID
*/
private String quarterId;
/**
* 年D
*/
private String yearId;
}

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedAgencyQuarterlyEntity.java

@ -70,4 +70,9 @@ public class FactTagViewedAgencyQuarterlyEntity extends BaseEpmetEntity {
*/
private String quarterId;
/**
* 年D
*/
private String yearId;
}

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedGridMonthlyEntity.java

@ -70,4 +70,14 @@ public class FactTagViewedGridMonthlyEntity extends BaseEpmetEntity {
*/
private String monthId;
/**
* 季度ID
*/
private String quarterId;
/**
* 年D
*/
private String yearId;
}

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactTagViewedGridQuarterlyEntity.java

@ -70,4 +70,9 @@ public class FactTagViewedGridQuarterlyEntity extends BaseEpmetEntity {
*/
private String quarterId;
/**
* 年D
*/
private String yearId;
}

58
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/voice/ArticleTagsEntity.java

@ -0,0 +1,58 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity.voice;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 文章标签表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-17
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("article_tags")
public class ArticleTagsEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 文章ID
*/
private String articleId;
/**
* 标签ID
*/
private String tagId;
/**
* 标签名称
*/
private String tagName;
}

23
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsPublicityService.java

@ -12,6 +12,27 @@ public interface StatsPublicityService {
* @author: jianjun liu
* email:liujianjun@git.elinkit.com.cn
*/
Boolean publicitySummary(Date statsDate);
Boolean articlePublishedCountDayStats(Date statsDate);
/**
* desc: 按日 统计每个标签被引用的使用文章数
*
* @return: Boolean
* @date: 2020/6/17 16:11
* @author: jianjun liu
* email:liujianjun@git.elinkit.com.cn
*/
Boolean tagUsedDayStatsjob(Date statsDate);
/**
* desc: 按月 统计每个标签被引用的使用文章数
*
* @param
* @return:
* @date: 2020/6/19 18:44
* @author: jianjun liu
* email:liujianjun@git.elinkit.com.cn
*/
Boolean tagUsedMonthStatsjob(Date statsDate);
}

464
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsPublicityServiceImpl.java

@ -1,14 +1,20 @@
package com.epmet.service.impl;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.dto.stats.ArticleGridPublishedSummaryDTO;
import com.epmet.constant.ProjectConstant;
import com.epmet.dto.voice.ArticleGridPublishedSummaryDTO;
import com.epmet.entity.stats.*;
import com.epmet.entity.voice.ArticleEntity;
import com.epmet.entity.voice.ArticleTagsEntity;
import com.epmet.service.StatsPublicityService;
import com.epmet.service.stats.*;
import com.epmet.service.voice.ArticlePublishRangeService;
import com.epmet.service.voice.ArticleService;
import com.epmet.service.voice.ArticleTagsService;
import com.epmet.util.DimIdGenerator;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@ -19,7 +25,9 @@ import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.stream.Collectors;
/**
* desc: 宣传能力数据统计 service
@ -49,7 +57,8 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
private DimGridService dimGridService;
@Autowired
private DimDepartmentService dimDepartmentService;
@Autowired
private ArticleTagsService articleTagsService;
@Autowired
private ArticleService articleService;
@Autowired
@ -60,19 +69,77 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
private FactArticlePublishedDepartmentDailyService factArticlePublishedDepartmentDailyService;
@Autowired
private FactArticlePublishedAgencyDailyService factArticlePublishedAgencyDailyService;
@Autowired
private FactTagUsedGridDailyService factTagUsedGridDailyService;
@Autowired
private FactTagUsedDepartmentDailyService factTagUsedDepartmentDailyService;
@Autowired
private FactTagUsedAgencyDailyService factTagUsedAgencyDailyService;
@Autowired
private FactTagUsedGridMonthlyService factTagUsedGridMonthlyService;
@Autowired
private FactTagUsedDepartmentMonthlyService factTagUsedDepartmentMonthlyService;
@Autowired
private FactTagUsedAgencyMonthlyService factTagUsedAgencyMonthlyService;
@Autowired
private FactTagUsedGridQuarterlyService factTagUsedGridQuarterlyService;
@Autowired
private FactTagUsedDepartmentQuarterlyService factTagUsedDepartmentQuarterlyService;
@Autowired
private FactTagUsedAgencyQuarterlyService factTagUsedAgencyQuarterlyService;
@Autowired
private FactTagUsedGridYearlyService factTagUsedGridYearlyService;
@Autowired
private FactTagUsedDepartmentYearlyService factTagUsedDepartmentYearlyService;
@Autowired
private FactTagUsedAgencyYearlyService factTagUsedAgencyYearlyService;
@Autowired
private ExecutorService executorService;
@Override
public Boolean publicitySummary(Date statsDate) {
public Boolean articlePublishedCountDayStats(Date statsDate) {
//如果不传时间 则统计数据为今天之前的数据和,否则统计的是截止到传入的日期数据的和
if (statsDate == null) {
//当天的凌晨时间 即为今天之前的数据
statsDate = DateUtils.integrate(new Date(), DateUtils.DATE_PATTERN);
} else {
statsDate = DateUtils.integrate(DateUtils.addDateDays(statsDate, 1), DateUtils.DATE_PATTERN);
}
DimIdGenerator.DimIdBean dimIdBean = DimIdGenerator.getDimIdBean(statsDate);
int pageNo = 1;
int pageSize = 100;
List<String> customerIdList = null;
do {
customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize);
if (!CollectionUtils.isEmpty(customerIdList)) {
for (String customerId : customerIdList) {
Date finalStatsDate = statsDate;
executorService.submit(() -> {
try {
//key:所在机关Id
Map<String, ArticleGridPublishedSummaryDTO> agencySummaryMap = new HashMap<>();
statsPublishedGridDaily(finalStatsDate, dimIdBean, customerId, agencySummaryMap);
statsPublishedDepartmentDaily(finalStatsDate, dimIdBean, customerId, agencySummaryMap);
statsPublishedAgencyDaily(finalStatsDate, dimIdBean, customerId, agencySummaryMap);
} catch (Exception e) {
log.error("articlePublishedCountDayStats exception", e);
}
});
}
}
} while (!CollectionUtils.isEmpty(customerIdList) && customerIdList.size() >= pageSize);
return true;
}
@Override
public Boolean tagUsedDayStatsjob(Date statsDate) {
//如果不传时间 则统计数据为今天之前的数据和,否则统计的是截止到传入的日期数据的和
if (statsDate == null) {
//当天的凌晨时间 即为今天之前的数据
statsDate = DateUtils.integrate(new Date(),DateUtils.DATE_PATTERN);
}else{
statsDate = DateUtils.integrate(DateUtils.addDateDays(statsDate,1),DateUtils.DATE_PATTERN);
statsDate = DateUtils.integrate(DateUtils.addDateDays(new Date(), -1), DateUtils.DATE_PATTERN);
} else {
statsDate = DateUtils.integrate(statsDate, DateUtils.DATE_PATTERN);
}
DimIdGenerator.DimIdBean dimIdBean = DimIdGenerator.getDimIdBean(statsDate);
int pageNo = 1;
@ -82,14 +149,69 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize);
if (!CollectionUtils.isEmpty(customerIdList)) {
for (String customerId : customerIdList) {
/*executorService.submit(()->{
Date finalStatsDate = statsDate;
executorService.submit(() -> {
//key:所在机关Id
Map<String, ArticleGridPublishedSummaryDTO> agencySummaryMap = new HashMap<>();
//统计
statsTagUsedDaily(finalStatsDate, dimIdBean, customerId, agencySummaryMap);
});
}
}
} while (!CollectionUtils.isEmpty(customerIdList) && customerIdList.size() >= pageSize);
return true;
}
});*/
//key:所在机关Id
Map<String, ArticleGridPublishedSummaryDTO> agencySummaryMap = new HashMap<>();
statsPublishedGridDaily(statsDate, dimIdBean, customerId,agencySummaryMap);
statsPublishedDepartmentDaily(statsDate, dimIdBean, customerId,agencySummaryMap);
statsPublishedAgencyDaily(statsDate, dimIdBean, customerId,agencySummaryMap);
@Override
public Boolean tagUsedMonthStatsjob(Date statsDate) {
//如果不传时间 则统计数据为今天之前的数据和,否则统计的是截止到传入的日期数据的和
if (statsDate == null) {
//当天的凌晨时间 即为今天之前的数据
statsDate = DateUtils.integrate(new Date(), DateUtils.DATE_PATTERN);
} else {
statsDate = DateUtils.integrate(DateUtils.addDateDays(statsDate, 1), DateUtils.DATE_PATTERN);
}
DimIdGenerator.DimIdBean dimIdBean = DimIdGenerator.getDimIdBean(statsDate);
int pageNo = 1;
int pageSize = 100;
List<String> customerIdList = null;
CountDownLatch countDownLatch = new CountDownLatch(1);
do {
customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize);
if (!CollectionUtils.isEmpty(customerIdList)) {
for (String customerId : customerIdList) {
executorService.submit(() -> {
try {
statsTagUsedMonthly(dimIdBean.getMonthId(), customerId);
//statsTagUsedQuarterly(dimIdBean.getQuarterId(), customerId);
//statsTagUsedYearly(dimIdBean.getYearId(), customerId);
countDownLatch.countDown();
} catch (Exception e) {
log.error("statsTagUsedMonthly exception", e);
}
});
log.debug("start === statsTagUsedQuarterly ");
try {
countDownLatch.await();
} catch (InterruptedException e) {
log.error("countDownLatch.await() interrupted", e);
}
executorService.submit(() -> {
try {
log.debug("start === statsTagUsedQuarterly ");
statsTagUsedQuarterly(dimIdBean.getQuarterId(), customerId);
} catch (Exception e) {
log.error("statsTagUsedQuarterly exception", e);
}
});
executorService.submit(() -> {
try {
log.debug("start === statsTagUsedQuarterly ");
statsTagUsedYearly(dimIdBean.getYearId(), customerId);
} catch (Exception e) {
log.error("statsTagUsedYearly exception", e);
}
});
}
}
} while (!CollectionUtils.isEmpty(customerIdList) && customerIdList.size() >= pageSize);
@ -106,7 +228,7 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
//转换为 需要插入的Entity
Map<String, FactArticlePublishedDepartmentDailyEntity> departmentDailyEntityMap = convertDepartmentDailyEntity(departmentDTOList, dimIdBean);
//获取当天的业务数据
List<ArticleGridPublishedSummaryDTO> publishedArticleCount = articleService.getAllDepartmentPublishedCount(customerId,DateUtils.integrate(statsDate,DateUtils.DATE_PATTERN));
List<ArticleGridPublishedSummaryDTO> publishedArticleCount = articleService.getAllDepartmentPublishedCount(customerId, DateUtils.integrate(statsDate, DateUtils.DATE_PATTERN));
if (!CollectionUtils.isEmpty(publishedArticleCount)) {
for (ArticleGridPublishedSummaryDTO summaryDTO : publishedArticleCount) {
@ -126,6 +248,7 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
/**
* desc:同一个机关下的数据进行类型处理
*
* @param result
* @param summaryDTO
*/
@ -140,23 +263,24 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
summary.setPublisherId(summaryDTO.getPublisherId());
summary.setArticleTotalCount(summaryDTO.getArticleTotalCount());
summary.setArticlePublishedCount(summaryDTO.getArticlePublishedCount());
result.put(summaryDTO.getPublisherId(),summaryDTO);
}else{
publishedSummaryDTO.setArticlePublishedCount(publishedSummaryDTO.getArticlePublishedCount()+summaryDTO.getArticlePublishedCount());
publishedSummaryDTO.setArticleTotalCount(publishedSummaryDTO.getArticleTotalCount()+summaryDTO.getArticlePublishedCount());
result.put(summaryDTO.getPublisherId(), summaryDTO);
} else {
publishedSummaryDTO.setArticlePublishedCount(publishedSummaryDTO.getArticlePublishedCount() + summaryDTO.getArticlePublishedCount());
publishedSummaryDTO.setArticleTotalCount(publishedSummaryDTO.getArticleTotalCount() + summaryDTO.getArticlePublishedCount());
}
}
/**
* desc:按日统计 网格纬度的 文章总数数据
* @param statsDate
*
* @param statsDate
* @param dimIdBean
* @param customerId
* @param agencySummaryMap
*/
private void statsPublishedGridDaily(Date statsDate, DimIdGenerator.DimIdBean dimIdBean, String customerId, Map<String, ArticleGridPublishedSummaryDTO> agencySummaryMap) {
//key:所在机关Id
Map<String,ArticleGridPublishedSummaryDTO> result = new HashMap<>();
Map<String, ArticleGridPublishedSummaryDTO> result = new HashMap<>();
//获取所有网格
List<DimGridEntity> gridDTOList = dimGridService.getGridListByCustomerId(customerId);
if (CollectionUtils.isEmpty(gridDTOList)) {
@ -170,13 +294,13 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
List<ArticleGridPublishedSummaryDTO> publishedArticleCount = articleService.getAllGridPublishedCount(customerId, statsDate);
if (!CollectionUtils.isEmpty(publishedArticleCount)) {
for (ArticleGridPublishedSummaryDTO summaryDTO : publishedArticleCount) {
FactArticlePublishedGridDailyEntity gridDailyEntities = gridDailyEntityMap.get(summaryDTO.getGridId());
if (gridDailyEntities == null) {
FactArticlePublishedGridDailyEntity gridDailyEntity = gridDailyEntityMap.get(summaryDTO.getGridId());
if (gridDailyEntity == null) {
log.error("publicitySummary getAllGridPublishedCount gridId:{} not exist in dimGrid", summaryDTO.getGridId());
continue;
}
gridDailyEntities.setArticleTotalCount(summaryDTO.getArticleTotalCount());
gridDailyEntities.setArticlePublishedCount(summaryDTO.getArticlePublishedCount());
gridDailyEntity.setArticleTotalCount(summaryDTO.getArticleTotalCount());
gridDailyEntity.setArticlePublishedCount(summaryDTO.getArticlePublishedCount());
//同一个机关下数据累加
buildAgencySummaryData(agencySummaryMap, summaryDTO);
}
@ -194,8 +318,8 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
//转换为 需要插入的Entity
Map<String, FactArticlePublishedAgencyDailyEntity> agencyDailyEntityMap = convertAgencyDailyEntity(agencyDTOList, dimIdBean);
//获取当天的业务数据
List<ArticleGridPublishedSummaryDTO> publishedArticleCount = articleService.getAllAgencyPublishedCount(customerId,statsDate);
List<ArticleGridPublishedSummaryDTO> publishedArticleCount = articleService.getAllAgencyPublishedCount(customerId, statsDate);
Map<String, FactArticlePublishedAgencyDailyEntity> haveDataAgencyDailyMap = new HashMap<>();
if (!CollectionUtils.isEmpty(publishedArticleCount)) {
for (ArticleGridPublishedSummaryDTO summaryDTO : publishedArticleCount) {
FactArticlePublishedAgencyDailyEntity gridDailyEntities = agencyDailyEntityMap.get(summaryDTO.getPublisherId());
@ -207,36 +331,220 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
gridDailyEntities.setArticlePublishedCount(summaryDTO.getArticlePublishedCount());
//同一个机关下数据累加
buildAgencySummaryData(agencySummaryMap, summaryDTO);
haveDataAgencyDailyMap.put(summaryDTO.getAgencyId(), gridDailyEntities);
}
}
//数据向上级机关添加
if (!CollectionUtils.isEmpty(agencySummaryMap)){
for (Map.Entry<String, ArticleGridPublishedSummaryDTO> entry : agencySummaryMap.entrySet()) {
if (!CollectionUtils.isEmpty(haveDataAgencyDailyMap)) {
for (Map.Entry<String, FactArticlePublishedAgencyDailyEntity> entry : haveDataAgencyDailyMap.entrySet()) {
String agencyId = entry.getKey();
ArticleGridPublishedSummaryDTO summary = entry.getValue();
FactArticlePublishedAgencyDailyEntity summary = entry.getValue();
FactArticlePublishedAgencyDailyEntity dailyEntity = agencyDailyEntityMap.get(agencyId);
if (dailyEntity == null) {
log.error("publicitySummary bizData agencyId:{} not exist in dimAgency", agencyId);
continue;
}
setData2ParentAgency(agencyDailyEntityMap,summary, dailyEntity);
setPublishedData2ParentAgency(agencyDailyEntityMap, summary, dailyEntity);
}
}
boolean b = factArticlePublishedAgencyDailyService.deleteAndInsertBatch(customerId, dimIdBean.getDateId(), agencyDailyEntityMap.values());
}
private void setData2ParentAgency(Map<String, FactArticlePublishedAgencyDailyEntity> agencyDailyEntityMap, ArticleGridPublishedSummaryDTO agencySummary, FactArticlePublishedAgencyDailyEntity summary) {
/**
* desc:按日统计 网格纬度的 标签被使用的次数
*
* @param statsDate
* @param dimIdBean
* @param customerId
* @param agencySummaryMap
*/
private void statsTagUsedDaily(Date statsDate, DimIdGenerator.DimIdBean dimIdBean, String customerId, Map<String, ArticleGridPublishedSummaryDTO> agencySummaryMap) {
//1.业务数据来源 发布时间为统计时间的
// 因为一个客户的发布文章数在同一天不会特别的多,所以以客户为单位查询今天发布的所有带有标签的文章 根据发布单位类型进行拆分
// 1.1查出今天所有的文章标签 根据网格Id
// 1.2
//获取所有网格
List<DimAgencyEntity> agencyDTOList = dimAgencyService.getAgencyListByCustomerId(customerId);
if (CollectionUtils.isEmpty(agencyDTOList)) {
log.warn("publicitySummary getAgencyListByCustomerId return empty,customerId:{}", customerId);
return;
}
//转换为 需要插入的Entity
Map<String, DimAgencyEntity> dimAgencyEntityMap = agencyDTOList.stream().collect(Collectors.toMap(DimAgencyEntity::getId, o -> o));
//转换为 需要插入的Entity key gridId_tagId
Map<String, FactTagUsedGridDailyEntity> tagUsedGridDailyMap = new HashMap<>();
Map<String, FactTagUsedDepartmentDailyEntity> tagUsedDeptDailyMap = new HashMap<>();
Map<String, FactTagUsedAgencyDailyEntity> tagUsedAgencyDailyMap = new HashMap<>();
//获取当天的业务数据
//1获取文章及机关id,网格Id
List<ArticleEntity> publishedArticleList = articleService.getPublishedArticleByPublishTime(customerId, statsDate);
if (CollectionUtils.isEmpty(publishedArticleList)) {
return;
}
//KEY 文章Id
Map<String, ArticleEntity> articleMap = publishedArticleList.stream().collect(Collectors.toMap(ArticleEntity::getId, o -> o));
Date startTime = DateUtils.integrate(statsDate, DateUtils.DATE_PATTERN);
Date endTime = DateUtils.integrate(DateUtils.addDateDays(statsDate, 1), DateUtils.DATE_PATTERN);
//2 获取文章标签
List<ArticleTagsEntity> articleTagsList = articleTagsService.getArticleTagsByCreateTime(customerId, startTime, endTime);
if (CollectionUtils.isEmpty(articleTagsList)) {
log.error("publicitySummary getArticleTagsByCreateTime customerId:{} have not articleTags,publishedArticleList:{}", customerId, JSON.toJSONString(publishedArticleList));
return;
}
//tagId
for (ArticleTagsEntity tagEntity : articleTagsList) {
ArticleEntity articleEntity = articleMap.get(tagEntity.getArticleId());
if (articleEntity == null) {
log.error("publicitySummary articleMap articleId:{} ", tagEntity.getArticleId());
return;
}
DimAgencyEntity dimAgencyEntity = dimAgencyEntityMap.get(articleEntity.getOrgId());
convertTagUsedAgencyDailyEntity(dimAgencyEntity.getPid(), tagUsedAgencyDailyMap, articleEntity, tagEntity, dimIdBean);
switch (articleEntity.getPublisherType()) {
case ProjectConstant.PUBLISHER_TYPE_GRID:
convertTagUsedGridDailyEntity(tagUsedGridDailyMap, articleEntity, tagEntity, dimIdBean);
break;
case ProjectConstant.PUBLISHER_TYPE_DEPT:
convertTagUsedDepartmentDailyEntity(tagUsedDeptDailyMap, articleEntity, tagEntity, dimIdBean);
break;
}
convertTagUsedGridDailyEntity(tagUsedGridDailyMap, articleEntity, tagEntity, dimIdBean);
}
factTagUsedGridDailyService.deleteAndInsertBatch(customerId, dimIdBean.getDateId(), tagUsedGridDailyMap.values());
factTagUsedDepartmentDailyService.deleteAndInsertBatch(customerId, dimIdBean.getDateId(), tagUsedDeptDailyMap.values());
//向上级机关递归添加 数据
Map<String, FactTagUsedAgencyDailyEntity> finalTagUsedAgencyDailyMap = new HashMap<>();
finalTagUsedAgencyDailyMap.putAll(tagUsedAgencyDailyMap);
for (Map.Entry<String, FactTagUsedAgencyDailyEntity> entry : tagUsedAgencyDailyMap.entrySet()) {
String agencyId = entry.getKey();
FactTagUsedAgencyDailyEntity currentEntity = entry.getValue();
DimAgencyEntity dimAgencyEntity = dimAgencyEntityMap.get(currentEntity.getAgencyId());
if (dimAgencyEntity == null) {
log.error("dimAgencyEntityMap bizData agencyId:{} not exist in dimAgency", agencyId);
continue;
}
setTagUsedData2ParentAgency(dimAgencyEntityMap, finalTagUsedAgencyDailyMap, currentEntity, dimIdBean);
}
factTagUsedAgencyDailyService.deleteAndInsertBatch(customerId, dimIdBean.getDateId(), finalTagUsedAgencyDailyMap.values());
}
/**
* desc:按月统计 标签使用数
*
* @param monthId
* @param customerId
*/
private void statsTagUsedMonthly(String monthId, String customerId) {
List<FactTagUsedGridDailyEntity> gridDailyList = factTagUsedGridDailyService.getTagUsedCountByMonth(customerId, monthId);
if (!CollectionUtils.isEmpty(gridDailyList)) {
List<FactTagUsedGridMonthlyEntity> gridMonthlyList = ConvertUtils.sourceToTarget(gridDailyList, FactTagUsedGridMonthlyEntity.class);
factTagUsedGridMonthlyService.deleteAndInsertByMonthId(customerId,monthId,gridMonthlyList);
}
List<FactTagUsedDepartmentDailyEntity> deptDailyList = factTagUsedDepartmentDailyService.getTagUsedCountByMonth(customerId, monthId);
if (!CollectionUtils.isEmpty(deptDailyList)) {
List<FactTagUsedDepartmentMonthlyEntity> gridMonthlyList = ConvertUtils.sourceToTarget(deptDailyList, FactTagUsedDepartmentMonthlyEntity.class);
factTagUsedDepartmentMonthlyService.deleteAndInsertByMonthId(customerId,monthId,gridMonthlyList);
}
List<FactTagUsedGridDailyEntity> agencyDailyList = factTagUsedAgencyDailyService.getTagUsedCountByMonth(customerId, monthId);
if (!CollectionUtils.isEmpty(agencyDailyList)) {
List<FactTagUsedAgencyMonthlyEntity> agencyMonthlyList = ConvertUtils.sourceToTarget(agencyDailyList, FactTagUsedAgencyMonthlyEntity.class);
factTagUsedAgencyMonthlyService.deleteAndInsertByMonthId(customerId,monthId,(agencyMonthlyList));
}
}
/**
* desc:按季统计 标签使用数
*
* @param quarterId
* @param customerId
*/
private void statsTagUsedQuarterly(String quarterId, String customerId) {
List<FactTagUsedGridMonthlyEntity> gridMonthlyList = factTagUsedGridMonthlyService.getTagUsedCountByQuarterId(customerId, quarterId);
if (!CollectionUtils.isEmpty(gridMonthlyList)) {
List<FactTagUsedGridQuarterlyEntity> gridQuarterlyList = ConvertUtils.sourceToTarget(gridMonthlyList, FactTagUsedGridQuarterlyEntity.class);
factTagUsedGridQuarterlyService.deleteAndInsertByQuarterId(customerId,quarterId,gridQuarterlyList);
}
List<FactTagUsedDepartmentMonthlyEntity> deptMonthlyList = factTagUsedDepartmentMonthlyService.getTagUsedCountByQuarterId(customerId, quarterId);
if (!CollectionUtils.isEmpty(deptMonthlyList)) {
List<FactTagUsedDepartmentQuarterlyEntity> deptQuarterlyList = ConvertUtils.sourceToTarget(deptMonthlyList, FactTagUsedDepartmentQuarterlyEntity.class);
factTagUsedDepartmentQuarterlyService.deleteAndInsertByQuarterId(customerId,quarterId,deptQuarterlyList);
}
//TODO 机关的需要添加 pid
List<FactTagUsedGridMonthlyEntity> agencyMonthlyList = factTagUsedAgencyMonthlyService.getTagUsedCountByQuarterId(customerId, quarterId);
if (!CollectionUtils.isEmpty(agencyMonthlyList)) {
List<FactTagUsedAgencyQuarterlyEntity> agencyQuarterlyList = ConvertUtils.sourceToTarget(agencyMonthlyList, FactTagUsedAgencyQuarterlyEntity.class);
factTagUsedAgencyQuarterlyService.deleteAndInsertByQuarterId(customerId, quarterId,agencyQuarterlyList);
}
}
/**
* desc:按年统计 标签使用数
*
* @param yearId
* @param customerId
*/
private void statsTagUsedYearly(String yearId, String customerId) {
List<FactTagUsedGridMonthlyEntity> gridMonthlyList = factTagUsedGridMonthlyService.getTagUsedCountByYearId(customerId, yearId);
if (!CollectionUtils.isEmpty(gridMonthlyList)) {
List<FactTagUsedGridYearlyEntity> gridYearlyList = ConvertUtils.sourceToTarget(gridMonthlyList, FactTagUsedGridYearlyEntity.class);
//TODO 改为一个方法 添加事务
factTagUsedGridYearlyService.deleteByYearId(customerId, yearId);
factTagUsedGridYearlyService.insertBatch(gridYearlyList);
}
List<FactTagUsedDepartmentMonthlyEntity> deptMonthlyList = factTagUsedDepartmentMonthlyService.getTagUsedCountByYearId(customerId, yearId);
if (!CollectionUtils.isEmpty(deptMonthlyList)) {
List<FactTagUsedDepartmentYearlyEntity> gridYearlyList = ConvertUtils.sourceToTarget(deptMonthlyList, FactTagUsedDepartmentYearlyEntity.class);
factTagUsedDepartmentYearlyService.deleteByYearId(customerId, yearId);
factTagUsedDepartmentYearlyService.insertBatch(gridYearlyList);
}
List<FactTagUsedGridMonthlyEntity> agencyMonthlyList = factTagUsedAgencyMonthlyService.getTagUsedCountByYearId(customerId, yearId);
if (!CollectionUtils.isEmpty(agencyMonthlyList)) {
List<FactTagUsedAgencyYearlyEntity> agencyYearlyList = ConvertUtils.sourceToTarget(agencyMonthlyList, FactTagUsedAgencyYearlyEntity.class);
factTagUsedAgencyYearlyService.deleteByYearId(customerId, yearId);
factTagUsedAgencyYearlyService.insertBatch(agencyYearlyList);
}
}
private void setTagUsedData2ParentAgency(Map<String, DimAgencyEntity> dimAgencyEntityMap, Map<String, FactTagUsedAgencyDailyEntity> agencyDailyEntityMap, FactTagUsedAgencyDailyEntity currentEntity, DimIdGenerator.DimIdBean dimIdBean) {
String pid = currentEntity.getPid();
String tagId = currentEntity.getTagId();
String key = pid.concat(StrConstant.UNDER_LINE).concat(tagId);
FactTagUsedAgencyDailyEntity parentAgencyDailyEntity = agencyDailyEntityMap.get(key);
DimAgencyEntity currentDimAgency = dimAgencyEntityMap.get(pid);
if (currentDimAgency == null) {
return;
}
if (parentAgencyDailyEntity == null) {
parentAgencyDailyEntity = ConvertUtils.sourceToTarget(dimIdBean, FactTagUsedAgencyDailyEntity.class);
parentAgencyDailyEntity.setCustomerId(currentEntity.getCustomerId());
parentAgencyDailyEntity.setPid(currentDimAgency.getPid());
parentAgencyDailyEntity.setAgencyId(currentDimAgency.getId());
parentAgencyDailyEntity.setTagId(currentEntity.getTagId());
parentAgencyDailyEntity.setTagName(currentEntity.getTagName());
parentAgencyDailyEntity.setUsedCount(currentEntity.getUsedCount());
agencyDailyEntityMap.put(key, parentAgencyDailyEntity);
} else {
parentAgencyDailyEntity.setUsedCount(parentAgencyDailyEntity.getUsedCount() + currentEntity.getUsedCount());
}
pid = currentDimAgency.getPid();
if (!NumConstant.ZERO_STR.equals(pid)) {
setTagUsedData2ParentAgency(dimAgencyEntityMap, agencyDailyEntityMap, parentAgencyDailyEntity, dimIdBean);
}
}
private void setPublishedData2ParentAgency(Map<String, FactArticlePublishedAgencyDailyEntity> agencyDailyEntityMap, FactArticlePublishedAgencyDailyEntity agencySummary, FactArticlePublishedAgencyDailyEntity summary) {
String pid = summary.getPid();
FactArticlePublishedAgencyDailyEntity parentAgency = agencyDailyEntityMap.get(pid);
if (parentAgency == null){
if (parentAgency == null) {
return;
}
parentAgency.setArticleTotalCount(parentAgency.getArticleTotalCount()+agencySummary.getArticleTotalCount());
parentAgency.setArticlePublishedCount(parentAgency.getArticlePublishedCount()+agencySummary.getArticlePublishedCount());
parentAgency.setArticleTotalCount(parentAgency.getArticleTotalCount() + agencySummary.getArticleTotalCount());
parentAgency.setArticlePublishedCount(parentAgency.getArticlePublishedCount() + agencySummary.getArticlePublishedCount());
pid = parentAgency.getPid();
if (!NumConstant.ZERO_STR.equals(pid)){
setData2ParentAgency(agencyDailyEntityMap, agencySummary,parentAgency);
if (!NumConstant.ZERO_STR.equals(pid)) {
setPublishedData2ParentAgency(agencyDailyEntityMap, agencySummary, parentAgency);
}
}
@ -302,4 +610,84 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
});
return result;
}
/**
* desc:将网格对象构建为 tagUsedGridDaily 对象
*
* @param dimGridEntities
* @param dimIdBean
* @return
*/
private Map<String, FactTagUsedGridDailyEntity> convertTagUsedGridDailyEntity(List<DimGridEntity> dimGridEntities, DimIdGenerator.DimIdBean dimIdBean) {
Map<String, FactTagUsedGridDailyEntity> result = new HashMap<>();
dimGridEntities.forEach(dimGridEntity -> {
FactTagUsedGridDailyEntity entity = ConvertUtils.sourceToTarget(dimIdBean, FactTagUsedGridDailyEntity.class);
entity.setCustomerId(dimGridEntity.getCustomerId());
entity.setAgencyId(dimGridEntity.getAgencyId());
entity.setGridId(dimGridEntity.getId());
entity.setTagId("");
entity.setTagName("");
entity.setUsedCount(0);
result.put(dimGridEntity.getId(), entity);
});
return result;
}
private void convertTagUsedGridDailyEntity(Map<String, FactTagUsedGridDailyEntity> result, ArticleEntity articleEntity, ArticleTagsEntity tagEntity, DimIdGenerator.DimIdBean dimIdBean) {
String gridId = articleEntity.getPublisherId();
String tagId = tagEntity.getTagId();
String key = gridId.concat(StrConstant.UNDER_LINE).concat(tagId);
FactTagUsedGridDailyEntity entity = result.get(key);
if (entity == null) {
entity = ConvertUtils.sourceToTarget(dimIdBean, FactTagUsedGridDailyEntity.class);
entity.setCustomerId(articleEntity.getCustomerId());
entity.setAgencyId(articleEntity.getOrgId());
entity.setGridId(gridId);
entity.setTagId(tagId);
entity.setTagName(tagEntity.getTagName());
entity.setUsedCount(1);
result.put(key, entity);
} else {
entity.setUsedCount(entity.getUsedCount() + 1);
}
}
private void convertTagUsedDepartmentDailyEntity(Map<String, FactTagUsedDepartmentDailyEntity> result, ArticleEntity articleEntity, ArticleTagsEntity tagEntity, DimIdGenerator.DimIdBean dimIdBean) {
String publisherId = articleEntity.getPublisherId();
String tagId = tagEntity.getTagId();
String key = publisherId.concat(StrConstant.UNDER_LINE).concat(tagId);
FactTagUsedDepartmentDailyEntity entity = result.get(key);
if (entity == null) {
entity = ConvertUtils.sourceToTarget(dimIdBean, FactTagUsedDepartmentDailyEntity.class);
entity.setCustomerId(articleEntity.getCustomerId());
entity.setAgencyId(articleEntity.getOrgId());
entity.setDepartmentId(publisherId);
entity.setTagId(tagId);
entity.setTagName(tagEntity.getTagName());
entity.setUsedCount(1);
result.put(key, entity);
} else {
entity.setUsedCount(entity.getUsedCount() + 1);
}
}
private void convertTagUsedAgencyDailyEntity(String pid, Map<String, FactTagUsedAgencyDailyEntity> result, ArticleEntity articleEntity, ArticleTagsEntity tagEntity, DimIdGenerator.DimIdBean dimIdBean) {
String publisherId = articleEntity.getPublisherId();
String tagId = tagEntity.getTagId();
String key = publisherId.concat(StrConstant.UNDER_LINE).concat(tagId);
FactTagUsedAgencyDailyEntity entity = result.get(key);
if (entity == null) {
entity = ConvertUtils.sourceToTarget(dimIdBean, FactTagUsedAgencyDailyEntity.class);
entity.setPid(pid);
entity.setCustomerId(articleEntity.getCustomerId());
entity.setAgencyId(publisherId);
entity.setTagId(tagId);
entity.setTagName(tagEntity.getTagName());
entity.setUsedCount(1);
result.put(key, entity);
} else {
entity.setUsedCount(entity.getUsedCount() + 1);
}
}
}

50
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedAgencyDailyService.java

@ -0,0 +1,50 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.stats.FactTagUsedAgencyDailyEntity;
import com.epmet.entity.stats.FactTagUsedGridDailyEntity;
import java.util.Collection;
import java.util.List;
/**
* 标签机关日统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
public interface FactTagUsedAgencyDailyService extends BaseService<FactTagUsedAgencyDailyEntity> {
/**
* desc:删除并插入数据
* @param customerId
* @param dateId
* @param values
* @return
*/
boolean deleteAndInsertBatch(String customerId, String dateId, Collection<FactTagUsedAgencyDailyEntity> values);
/**
* desc根据月份获取 机关汇总数据
* @param customerId
* @param monthId
* @return
*/
List<FactTagUsedGridDailyEntity> getTagUsedCountByMonth(String customerId, String monthId);
}

39
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedAgencyMonthlyService.java

@ -0,0 +1,39 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.stats.FactTagUsedAgencyMonthlyEntity;
import com.epmet.entity.stats.FactTagUsedGridMonthlyEntity;
import java.util.List;
/**
* 标签机关月统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
public interface FactTagUsedAgencyMonthlyService extends BaseService<FactTagUsedAgencyMonthlyEntity> {
List<FactTagUsedGridMonthlyEntity> getTagUsedCountByYearId(String customerId, String monthId);
List<FactTagUsedGridMonthlyEntity> getTagUsedCountByQuarterId(String customerId, String quarterId);
Boolean deleteAndInsertByMonthId(String customerId, String monthId, List<FactTagUsedAgencyMonthlyEntity> agencyMonthlyList);
}

35
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedAgencyQuarterlyService.java

@ -0,0 +1,35 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.stats.FactTagUsedAgencyQuarterlyEntity;
import java.util.List;
/**
* 标签机关季度统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
public interface FactTagUsedAgencyQuarterlyService extends BaseService<FactTagUsedAgencyQuarterlyEntity> {
boolean deleteAndInsertByQuarterId(String customerId, String quarterId, List<FactTagUsedAgencyQuarterlyEntity> agencyQuarterlyList);
}

33
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedAgencyYearlyService.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.stats.FactTagUsedAgencyYearlyEntity;
/**
* 标签机关年度统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
public interface FactTagUsedAgencyYearlyService extends BaseService<FactTagUsedAgencyYearlyEntity> {
int deleteByYearId(String customerId,String yearId);
}

49
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedDepartmentDailyService.java

@ -0,0 +1,49 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.stats.FactTagUsedDepartmentDailyEntity;
import java.util.Collection;
import java.util.List;
/**
* 标签部门日统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
public interface FactTagUsedDepartmentDailyService extends BaseService<FactTagUsedDepartmentDailyEntity> {
/**
* desc:删除并插入数据
* @param customerId
* @param dateId
* @param values
* @return
*/
boolean deleteAndInsertBatch(String customerId, String dateId, Collection<FactTagUsedDepartmentDailyEntity> values);
/**
* desc:根据客户Id月份Id 按照部门Id 标签Id分组
* @param customerId
* @param monthId
* @return
*/
List<FactTagUsedDepartmentDailyEntity> getTagUsedCountByMonth(String customerId, String monthId);
}

38
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedDepartmentMonthlyService.java

@ -0,0 +1,38 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.stats.FactTagUsedDepartmentMonthlyEntity;
import java.util.List;
/**
* 标签部门月统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
public interface FactTagUsedDepartmentMonthlyService extends BaseService<FactTagUsedDepartmentMonthlyEntity> {
List<FactTagUsedDepartmentMonthlyEntity> getTagUsedCountByYearId(String customerId, String monthId);
List<FactTagUsedDepartmentMonthlyEntity> getTagUsedCountByQuarterId(String customerId, String quarterId);
Boolean deleteAndInsertByMonthId(String customerId, String monthId, List<FactTagUsedDepartmentMonthlyEntity> gridMonthlyList);
}

35
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedDepartmentQuarterlyService.java

@ -0,0 +1,35 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.stats.FactTagUsedDepartmentQuarterlyEntity;
import java.util.List;
/**
* 标签部门季度统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
public interface FactTagUsedDepartmentQuarterlyService extends BaseService<FactTagUsedDepartmentQuarterlyEntity> {
Boolean deleteAndInsertByQuarterId(String customerId, String quarterId, List<FactTagUsedDepartmentQuarterlyEntity> deptQuarterlyList);
}

33
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedDepartmentYearlyService.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.stats.FactTagUsedDepartmentYearlyEntity;
/**
* 标签部门年度统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
public interface FactTagUsedDepartmentYearlyService extends BaseService<FactTagUsedDepartmentYearlyEntity> {
Integer deleteByYearId(String customerId, String yearId);
}

50
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedGridDailyService.java

@ -0,0 +1,50 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.stats.FactTagUsedGridDailyEntity;
import java.util.Collection;
import java.util.List;
/**
* 标签网格日统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
public interface FactTagUsedGridDailyService extends BaseService<FactTagUsedGridDailyEntity> {
/**
* desc:删除并插入数据
* @param customerId
* @param dateId
* @param values
* @return
*/
boolean deleteAndInsertBatch(String customerId, String dateId, Collection<FactTagUsedGridDailyEntity> values);
/**
* desc:根据客户Id 获取网格 某月数据按照网格分组
* @param customerId
* @param monthId
* @return
*/
List<FactTagUsedGridDailyEntity> getTagUsedCountByMonth(String customerId, String monthId);
}

38
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedGridMonthlyService.java

@ -0,0 +1,38 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.stats.FactTagUsedGridMonthlyEntity;
import java.util.List;
/**
* 标签网格月统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
public interface FactTagUsedGridMonthlyService extends BaseService<FactTagUsedGridMonthlyEntity> {
List<FactTagUsedGridMonthlyEntity> getTagUsedCountByYearId(String customerId, String monthId);
List<FactTagUsedGridMonthlyEntity> getTagUsedCountByQuarterId(String customerId, String quarterId);
Boolean deleteAndInsertByMonthId(String customerId, String monthId, List<FactTagUsedGridMonthlyEntity> gridMonthlyList);
}

34
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedGridQuarterlyService.java

@ -0,0 +1,34 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.stats.FactTagUsedGridQuarterlyEntity;
import java.util.List;
/**
* 标签网格季度统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
public interface FactTagUsedGridQuarterlyService extends BaseService<FactTagUsedGridQuarterlyEntity> {
Boolean deleteAndInsertByQuarterId(String customerId, String quarterId, List<FactTagUsedGridQuarterlyEntity> gridQuarterlyList);
}

32
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagUsedGridYearlyService.java

@ -0,0 +1,32 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.stats.FactTagUsedGridYearlyEntity;
/**
* 标签网格年度统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
public interface FactTagUsedGridYearlyService extends BaseService<FactTagUsedGridYearlyEntity> {
Integer deleteByYearId(String customerId, String yearId);
}

32
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedAgencyDailyService.java

@ -0,0 +1,32 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.stats.FactTagViewedAgencyDailyEntity;
/**
* 文章引用标签阅读数量机关日统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
public interface FactTagViewedAgencyDailyService extends BaseService<FactTagViewedAgencyDailyEntity> {
}

31
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedAgencyMonthlyService.java

@ -0,0 +1,31 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.stats.FactTagViewedAgencyMonthlyEntity;
/**
* 文章引用标签阅读数量机关月统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
public interface FactTagViewedAgencyMonthlyService extends BaseService<FactTagViewedAgencyMonthlyEntity> {
}

31
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedAgencyQuarterlyService.java

@ -0,0 +1,31 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.stats.FactTagViewedAgencyQuarterlyEntity;
/**
* 文章引用标签阅读数量机关季度统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
public interface FactTagViewedAgencyQuarterlyService extends BaseService<FactTagViewedAgencyQuarterlyEntity> {
}

32
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedAgencyYearlyService.java

@ -0,0 +1,32 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.stats.FactTagViewedAgencyYearlyEntity;
/**
* 文章引用标签阅读数量机关年度统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
public interface FactTagViewedAgencyYearlyService extends BaseService<FactTagViewedAgencyYearlyEntity> {
}

31
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedGridDailyService.java

@ -0,0 +1,31 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.stats.FactTagViewedGridDailyEntity;
/**
* 文章引用标签阅读数量网格日统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
public interface FactTagViewedGridDailyService extends BaseService<FactTagViewedGridDailyEntity> {
}

31
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedGridMonthlyService.java

@ -0,0 +1,31 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.stats.FactTagViewedGridMonthlyEntity;
/**
* 文章引用标签阅读数量网格月统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
public interface FactTagViewedGridMonthlyService extends BaseService<FactTagViewedGridMonthlyEntity> {
}

31
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedGridQuarterlyService.java

@ -0,0 +1,31 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.stats.FactTagViewedGridQuarterlyEntity;
/**
* 文章引用标签阅读数量网格季度统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
public interface FactTagViewedGridQuarterlyService extends BaseService<FactTagViewedGridQuarterlyEntity> {
}

31
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactTagViewedGridYearlyService.java

@ -0,0 +1,31 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.stats.FactTagViewedGridYearlyEntity;
/**
* 文章引用标签阅读数量网格年度统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
public interface FactTagViewedGridYearlyService extends BaseService<FactTagViewedGridYearlyEntity> {
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedAgencyDailyServiceImpl.java

@ -24,6 +24,7 @@ import com.epmet.service.stats.FactArticlePublishedAgencyDailyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.Collection;
@ -41,6 +42,9 @@ public class FactArticlePublishedAgencyDailyServiceImpl extends BaseServiceImpl<
@Override
@Transactional(rollbackFor = Exception.class)
public boolean deleteAndInsertBatch(String customerId, String dateId, Collection<FactArticlePublishedAgencyDailyEntity> values) {
if (CollectionUtils.isEmpty(values)){
return false;
}
int i = baseDao.deleteByDateId(customerId, dateId);
log.debug("deleteAndInsertBatch delete customerId:{},rows:{}", customerId,i);
this.insertBatch(values, 100);

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedDepartmentDailyServiceImpl.java

@ -23,6 +23,7 @@ import com.epmet.entity.stats.FactArticlePublishedDepartmentDailyEntity;
import com.epmet.service.stats.FactArticlePublishedDepartmentDailyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.Collection;
@ -39,6 +40,9 @@ public class FactArticlePublishedDepartmentDailyServiceImpl extends BaseServiceI
@Override
public boolean deleteAndInsertBatch(String customerId, String dateId, Collection<FactArticlePublishedDepartmentDailyEntity> values) {
if (CollectionUtils.isEmpty(values)){
return false;
}
int i = baseDao.deleteByDateId(customerId, dateId);
log.debug("deleteAndInsertBatch delete customerId:{},rows:{}", customerId,i);
this.insertBatch(values, 100);

16
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedGridDailyServiceImpl.java

@ -28,6 +28,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.Collection;
import java.util.List;
@ -45,18 +46,21 @@ public class FactArticlePublishedGridDailyServiceImpl extends BaseServiceImpl<Fa
@Override
public List<FactArticlePublishedAgencyDailyEntity> getByBeforeDay(String customerId, String dateId) {
log.debug("getByBeforeDay param customerId:{},dateId:{}",customerId,dateId);
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(dateId)){
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
log.debug("getByBeforeDay param customerId:{},dateId:{}", customerId, dateId);
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(dateId)) {
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
return baseDao.getByBeforeDay(customerId,dateId);
return baseDao.getByBeforeDay(customerId, dateId);
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean deleteAndInsertBatch(String customerId,String dateId, Collection<FactArticlePublishedGridDailyEntity> values) {
public boolean deleteAndInsertBatch(String customerId, String dateId, Collection<FactArticlePublishedGridDailyEntity> values) {
if (CollectionUtils.isEmpty(values)) {
return false;
}
int i = baseDao.deleteByDateId(customerId, dateId);
log.debug("deleteAndInsertBatch delete customerId:{},rows:{}", customerId,i);
log.debug("deleteAndInsertBatch delete customerId:{},rows:{}", customerId, i);
this.insertBatch(values, 100);
return true;
}

65
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyDailyServiceImpl.java

@ -0,0 +1,65 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats.impl;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.dao.stats.FactTagUsedAgencyDailyDao;
import com.epmet.entity.stats.FactTagUsedAgencyDailyEntity;
import com.epmet.entity.stats.FactTagUsedGridDailyEntity;
import com.epmet.service.stats.FactTagUsedAgencyDailyService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.Collection;
import java.util.List;
/**
* 标签机关日统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
@Slf4j
@Service
public class FactTagUsedAgencyDailyServiceImpl extends BaseServiceImpl<FactTagUsedAgencyDailyDao, FactTagUsedAgencyDailyEntity> implements FactTagUsedAgencyDailyService {
@Override
@Transactional(rollbackFor = Exception.class)
public boolean deleteAndInsertBatch(String customerId, String dateId, Collection<FactTagUsedAgencyDailyEntity> values) {
if (CollectionUtils.isEmpty(values)){
return false;
}
int i = baseDao.deleteByDateId(customerId, dateId);
log.debug("deleteAndInsertBatch delete customerId:{},rows:{}", customerId, i);
this.insertBatch(values, 100);
return true;
}
@Override
public List<FactTagUsedGridDailyEntity> getTagUsedCountByMonth(String customerId, String monthId) {
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId)){
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
return baseDao.getTagUsedCountByMonth(customerId,monthId);
}
}

70
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyMonthlyServiceImpl.java

@ -0,0 +1,70 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats.impl;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.dao.stats.FactTagUsedAgencyMonthlyDao;
import com.epmet.entity.stats.FactTagUsedAgencyMonthlyEntity;
import com.epmet.entity.stats.FactTagUsedGridMonthlyEntity;
import com.epmet.service.stats.FactTagUsedAgencyMonthlyService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.List;
/**
* 标签机关月统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
@Slf4j
@Service
public class FactTagUsedAgencyMonthlyServiceImpl extends BaseServiceImpl<FactTagUsedAgencyMonthlyDao, FactTagUsedAgencyMonthlyEntity> implements FactTagUsedAgencyMonthlyService {
@Override
public List<FactTagUsedGridMonthlyEntity> getTagUsedCountByYearId(String customerId, String monthId) {
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId)){
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
return baseDao.getTagUsedCountByYearId(customerId,monthId);
}
@Override
public List<FactTagUsedGridMonthlyEntity> getTagUsedCountByQuarterId(String customerId, String quarterId) {
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(quarterId)){
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
return baseDao.getTagUsedCountByQuarterId(customerId,quarterId);
}
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean deleteAndInsertByMonthId(String customerId, String monthId, List<FactTagUsedAgencyMonthlyEntity> agencyMonthlyList) {
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId) || CollectionUtils.isEmpty(agencyMonthlyList)){
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
baseDao.deleteByMonthId(customerId,monthId);
return this.insertBatch(agencyMonthlyList, 100);
}
}

53
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyQuarterlyServiceImpl.java

@ -0,0 +1,53 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats.impl;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.dao.stats.FactTagUsedAgencyQuarterlyDao;
import com.epmet.entity.stats.FactTagUsedAgencyQuarterlyEntity;
import com.epmet.service.stats.FactTagUsedAgencyQuarterlyService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.List;
/**
* 标签机关季度统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
@Slf4j
@Service
public class FactTagUsedAgencyQuarterlyServiceImpl extends BaseServiceImpl<FactTagUsedAgencyQuarterlyDao, FactTagUsedAgencyQuarterlyEntity> implements FactTagUsedAgencyQuarterlyService {
@Override
@Transactional(rollbackFor = Exception.class)
public boolean deleteAndInsertByQuarterId(String customerId, String quarterId, List<FactTagUsedAgencyQuarterlyEntity> agencyQuarterlyList) {
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(quarterId) || CollectionUtils.isEmpty(agencyQuarterlyList)){
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
baseDao.deleteByQuarterId(customerId,quarterId);
return this.insertBatch(agencyQuarterlyList, 100);
}
}

47
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyYearlyServiceImpl.java

@ -0,0 +1,47 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats.impl;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.dao.stats.FactTagUsedAgencyYearlyDao;
import com.epmet.entity.stats.FactTagUsedAgencyYearlyEntity;
import com.epmet.service.stats.FactTagUsedAgencyYearlyService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
/**
* 标签机关年度统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
@Slf4j
@Service
public class FactTagUsedAgencyYearlyServiceImpl extends BaseServiceImpl<FactTagUsedAgencyYearlyDao, FactTagUsedAgencyYearlyEntity> implements FactTagUsedAgencyYearlyService {
@Override
public int deleteByYearId(String customerId, String yearId) {
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(yearId)){
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
return baseDao.deleteByYearId(customerId,yearId);
}
}

64
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentDailyServiceImpl.java

@ -0,0 +1,64 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats.impl;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.dao.stats.FactTagUsedDepartmentDailyDao;
import com.epmet.entity.stats.FactTagUsedDepartmentDailyEntity;
import com.epmet.service.stats.FactTagUsedDepartmentDailyService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.Collection;
import java.util.List;
/**
* 标签部门日统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
@Slf4j
@Service
public class FactTagUsedDepartmentDailyServiceImpl extends BaseServiceImpl<FactTagUsedDepartmentDailyDao, FactTagUsedDepartmentDailyEntity> implements FactTagUsedDepartmentDailyService {
@Override
@Transactional(rollbackFor = Exception.class)
public boolean deleteAndInsertBatch(String customerId, String dateId, Collection<FactTagUsedDepartmentDailyEntity> values) {
if (CollectionUtils.isEmpty(values)){
return false;
}
int i = baseDao.deleteByDateId(customerId, dateId);
log.debug("deleteAndInsertBatch delete customerId:{},rows:{}", customerId,i);
this.insertBatch(values, 100);
return true;
}
@Override
public List<FactTagUsedDepartmentDailyEntity> getTagUsedCountByMonth(String customerId, String monthId) {
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId)){
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
return baseDao.getTagUsedCountByMonthId(customerId,monthId);
}
}

70
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentMonthlyServiceImpl.java

@ -0,0 +1,70 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats.impl;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.dao.stats.FactTagUsedDepartmentMonthlyDao;
import com.epmet.entity.stats.FactTagUsedDepartmentMonthlyEntity;
import com.epmet.service.stats.FactTagUsedDepartmentMonthlyService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.List;
/**
* 标签部门月统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
@Slf4j
@Service
public class FactTagUsedDepartmentMonthlyServiceImpl extends BaseServiceImpl<FactTagUsedDepartmentMonthlyDao, FactTagUsedDepartmentMonthlyEntity> implements FactTagUsedDepartmentMonthlyService {
@Override
public List<FactTagUsedDepartmentMonthlyEntity> getTagUsedCountByYearId(String customerId, String yearId) {
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(yearId)){
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
return baseDao.getTagUsedCountByYearId(customerId,yearId);
}
@Override
public List<FactTagUsedDepartmentMonthlyEntity> getTagUsedCountByQuarterId(String customerId, String quarterId) {
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(quarterId)){
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
return baseDao.getTagUsedCountByQuarterId(customerId,quarterId);
}
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean deleteAndInsertByMonthId(String customerId, String monthId, List<FactTagUsedDepartmentMonthlyEntity> gridMonthlyList) {
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId) || CollectionUtils.isEmpty(gridMonthlyList)){
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
baseDao.deleteByMonthId(customerId,monthId);
return this.insertBatch(gridMonthlyList, 100);
}
}

51
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentQuarterlyServiceImpl.java

@ -0,0 +1,51 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats.impl;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.dao.stats.FactTagUsedDepartmentQuarterlyDao;
import com.epmet.entity.stats.FactTagUsedDepartmentQuarterlyEntity;
import com.epmet.service.stats.FactTagUsedDepartmentQuarterlyService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.List;
/**
* 标签部门季度统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
@Service
public class FactTagUsedDepartmentQuarterlyServiceImpl extends BaseServiceImpl<FactTagUsedDepartmentQuarterlyDao, FactTagUsedDepartmentQuarterlyEntity> implements FactTagUsedDepartmentQuarterlyService {
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean deleteAndInsertByQuarterId(String customerId, String quarterId, List<FactTagUsedDepartmentQuarterlyEntity> deptQuarterlyList) {
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(quarterId) || CollectionUtils.isEmpty(deptQuarterlyList)){
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
baseDao.deleteByQuarterId(customerId,quarterId);
return this.insertBatch(deptQuarterlyList, 100);
}
}

47
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentYearlyServiceImpl.java

@ -0,0 +1,47 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats.impl;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.dao.stats.FactTagUsedDepartmentYearlyDao;
import com.epmet.entity.stats.FactTagUsedDepartmentYearlyEntity;
import com.epmet.service.stats.FactTagUsedDepartmentYearlyService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
/**
* 标签部门年度统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
@Slf4j
@Service
public class FactTagUsedDepartmentYearlyServiceImpl extends BaseServiceImpl<FactTagUsedDepartmentYearlyDao, FactTagUsedDepartmentYearlyEntity> implements FactTagUsedDepartmentYearlyService {
@Override
public Integer deleteByYearId(String customerId, String yearId) {
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(yearId)){
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
return baseDao.deleteByYearId(customerId,yearId);
}
}

65
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridDailyServiceImpl.java

@ -0,0 +1,65 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats.impl;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.dao.stats.FactTagUsedGridDailyDao;
import com.epmet.entity.stats.FactTagUsedGridDailyEntity;
import com.epmet.service.stats.FactTagUsedGridDailyService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.Collection;
import java.util.List;
/**
* 标签网格日统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
@Slf4j
@Service
public class FactTagUsedGridDailyServiceImpl extends BaseServiceImpl<FactTagUsedGridDailyDao, FactTagUsedGridDailyEntity> implements FactTagUsedGridDailyService {
@Override
@Transactional(rollbackFor = Exception.class)
public boolean deleteAndInsertBatch(String customerId, String dateId, Collection<FactTagUsedGridDailyEntity> values) {
if (CollectionUtils.isEmpty(values)){
return false;
}
int i = baseDao.deleteByDateId(customerId, dateId);
log.debug("deleteAndInsertBatch delete customerId:{},rows:{}", customerId,i);
this.insertBatch(values, 100);
return true;
}
@Override
public List<FactTagUsedGridDailyEntity> getTagUsedCountByMonth(String customerId, String monthId) {
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId)){
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
return baseDao.getTagUsedCountByMonthId(customerId,monthId);
}
}

67
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridMonthlyServiceImpl.java

@ -0,0 +1,67 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats.impl;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.dao.stats.FactTagUsedGridMonthlyDao;
import com.epmet.entity.stats.FactTagUsedGridMonthlyEntity;
import com.epmet.service.stats.FactTagUsedGridMonthlyService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.List;
/**
* 标签网格月统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
@Service
public class FactTagUsedGridMonthlyServiceImpl extends BaseServiceImpl<FactTagUsedGridMonthlyDao, FactTagUsedGridMonthlyEntity> implements FactTagUsedGridMonthlyService {
@Override
public List<FactTagUsedGridMonthlyEntity> getTagUsedCountByYearId(String customerId, String yearId) {
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(yearId)){
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
return baseDao.getTagUsedCountByYearId(customerId,yearId);
}
@Override
public List<FactTagUsedGridMonthlyEntity> getTagUsedCountByQuarterId(String customerId, String quarterId) {
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(quarterId)){
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
return baseDao.getTagUsedCountByQuarterId(customerId,quarterId);
}
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean deleteAndInsertByMonthId(String customerId, String monthId, List<FactTagUsedGridMonthlyEntity> gridMonthlyList) {
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId) || CollectionUtils.isEmpty(gridMonthlyList)){
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
baseDao.deleteByMonthId(customerId,monthId);
return this.insertBatch(gridMonthlyList, 100);
}
}

52
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridQuarterlyServiceImpl.java

@ -0,0 +1,52 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats.impl;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.dao.stats.FactTagUsedGridQuarterlyDao;
import com.epmet.entity.stats.FactTagUsedGridQuarterlyEntity;
import com.epmet.service.stats.FactTagUsedGridQuarterlyService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.List;
/**
* 标签网格季度统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
@Service
public class FactTagUsedGridQuarterlyServiceImpl extends BaseServiceImpl<FactTagUsedGridQuarterlyDao, FactTagUsedGridQuarterlyEntity> implements FactTagUsedGridQuarterlyService {
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean deleteAndInsertByQuarterId(String customerId, String quarterId, List<FactTagUsedGridQuarterlyEntity> gridQuarterlyList) {
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(quarterId) || CollectionUtils.isEmpty(gridQuarterlyList)){
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
baseDao.deleteByQuarterId(customerId,quarterId);
return this.insertBatch(gridQuarterlyList, 100);
}
}

46
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridYearlyServiceImpl.java

@ -0,0 +1,46 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.stats.impl;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.dao.stats.FactTagUsedGridYearlyDao;
import com.epmet.entity.stats.FactTagUsedGridYearlyEntity;
import com.epmet.service.stats.FactTagUsedGridYearlyService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
/**
* 标签网格年度统计表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-18
*/
@Service
public class FactTagUsedGridYearlyServiceImpl extends BaseServiceImpl<FactTagUsedGridYearlyDao, FactTagUsedGridYearlyEntity> implements FactTagUsedGridYearlyService {
@Override
public Integer deleteByYearId(String customerId, String yearId) {
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(yearId)){
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
return baseDao.deleteByYearId(customerId,yearId);
}
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticlePublishRangeService.java

@ -18,7 +18,7 @@
package com.epmet.service.voice;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dto.stats.ArticleGridPublishedSummaryDTO;
import com.epmet.dto.voice.ArticleGridPublishedSummaryDTO;
import com.epmet.entity.voice.ArticlePublishRangeEntity;
import java.util.Date;

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticleService.java

@ -18,7 +18,7 @@
package com.epmet.service.voice;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dto.stats.ArticleGridPublishedSummaryDTO;
import com.epmet.dto.voice.ArticleGridPublishedSummaryDTO;
import com.epmet.entity.voice.ArticleEntity;
import java.util.Date;
@ -55,4 +55,12 @@ public interface ArticleService extends BaseService<ArticleEntity> {
* @return
*/
List<ArticleGridPublishedSummaryDTO> getAllGridPublishedCount(String customerId, Date publishDate);
/**
* desc根据客户id发布时间 获取文章数据
* @param customerId
* @param statsDate
* @return
*/
List<ArticleEntity> getPublishedArticleByPublishTime(String customerId, Date statsDate);
}

42
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticleTagsService.java

@ -0,0 +1,42 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.voice;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.voice.ArticleTagsEntity;
import java.util.Date;
import java.util.List;
/**
* 文章标签表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-17
*/
public interface ArticleTagsService extends BaseService<ArticleTagsEntity> {
/**
* desc:根据客户Id 创建时间获取 文章便签数据
* @param customerId
* @param startTime
* @param endTime
* @return
*/
List<ArticleTagsEntity> getArticleTagsByCreateTime(String customerId, Date startTime, Date endTime);
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticlePublishRangeServiceImpl.java

@ -21,7 +21,7 @@ import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.voice.ArticlePublishRangeDao;
import com.epmet.dto.stats.ArticleGridPublishedSummaryDTO;
import com.epmet.dto.voice.ArticleGridPublishedSummaryDTO;
import com.epmet.entity.voice.ArticlePublishRangeEntity;
import com.epmet.service.voice.ArticlePublishRangeService;
import lombok.extern.slf4j.Slf4j;

28
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticleServiceImpl.java

@ -24,7 +24,7 @@ import com.epmet.commons.tools.exception.RenException;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.ProjectConstant;
import com.epmet.dao.voice.ArticleDao;
import com.epmet.dto.stats.ArticleGridPublishedSummaryDTO;
import com.epmet.dto.voice.ArticleGridPublishedSummaryDTO;
import com.epmet.entity.voice.ArticleEntity;
import com.epmet.service.voice.ArticleService;
import org.apache.commons.lang3.StringUtils;
@ -45,25 +45,33 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
@Override
public List<ArticleGridPublishedSummaryDTO> getAllDepartmentPublishedCount(String customerId, Date publishDate) {
if (StringUtils.isBlank(customerId) || publishDate == null){
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
checkParam(customerId, publishDate);
return baseDao.getAllPublishedCount(customerId,publishDate, ProjectConstant.PUBLISHER_TYPE_DEPT);
}
@Override
public List<ArticleGridPublishedSummaryDTO> getAllAgencyPublishedCount(String customerId, Date publishDate) {
if (StringUtils.isBlank(customerId) || publishDate == null){
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
checkParam(customerId, publishDate);
return baseDao.getAllPublishedCount(customerId,publishDate, ProjectConstant.PUBLISHER_TYPE_AGENCY);
}
@Override
public List<ArticleGridPublishedSummaryDTO> getAllGridPublishedCount(String customerId, Date publishDate) {
if (StringUtils.isBlank(customerId) || publishDate == null){
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
checkParam(customerId, publishDate);
return baseDao.getAllPublishedCount(customerId,publishDate, ProjectConstant.PUBLISHER_TYPE_GRID);
}
@Override
public List<ArticleEntity> getPublishedArticleByPublishTime(String customerId, Date publishDate) {
checkParam(customerId, publishDate);
return baseDao.getPublishedArticleByDay(customerId,publishDate, ProjectConstant.PUBLISHER_TYPE_GRID);
}
private void checkParam(String customerId, Date publishDate) {
if (StringUtils.isBlank(customerId) || publishDate == null) {
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
}
}

56
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticleTagsServiceImpl.java

@ -0,0 +1,56 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.voice.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.voice.ArticleTagsDao;
import com.epmet.entity.voice.ArticleTagsEntity;
import com.epmet.service.voice.ArticleTagsService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
* 文章标签表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-17
*/
@Slf4j
@Service
@DataSource(DataSourceConstant.GOV_VOICE)
public class ArticleTagsServiceImpl extends BaseServiceImpl<ArticleTagsDao, ArticleTagsEntity> implements ArticleTagsService {
@Override
public List<ArticleTagsEntity> getArticleTagsByCreateTime(String customerId, Date startTime, Date endTime) {
this.checkParam(customerId,endTime,endTime);
return baseDao.getArticleTagsByDay(customerId,startTime, endTime);
}
private void checkParam(String customerId, Date starTime,Date endTime) {
if (StringUtils.isBlank(customerId) || starTime == null || endTime == null) {
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
}
}
}

45
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedAgencyDailyDao.xml

@ -3,26 +3,31 @@
<mapper namespace="com.epmet.dao.stats.FactTagUsedAgencyDailyDao">
<resultMap type="com.epmet.entity.stats.FactTagUsedAgencyDailyEntity" id="factTagUsedAgencyDailyMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="pid" column="PID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="tagId" column="TAG_ID"/>
<result property="tagName" column="TAG_NAME"/>
<result property="usedCount" column="USED_COUNT"/>
<result property="dateId" column="DATE_ID"/>
<result property="weekId" column="WEEK_ID"/>
<result property="monthId" column="MONTH_ID"/>
<result property="quarterId" column="QUARTER_ID"/>
<result property="yearId" column="YEAR_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<delete id="deleteByDateId">
DELETE FROM fact_tag_used_agency_daily WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND DATE_ID = #{dateId,jdbcType=VARCHAR}
</delete>
<select id="getTagUsedCountByMonth" resultType="com.epmet.entity.stats.FactTagUsedGridDailyEntity">
SELECT
CUSTOMER_ID,
PID,
AGENCY_ID,
TAG_ID,
TAG_NAME,
COUNT( USED_COUNT ) USED_COUNT,
MONTH_ID,
QUARTER_ID,
YEAR_ID
FROM
fact_tag_used_agency_daily
WHERE
CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
AND DEL_FLAG = 0
AND MONTH_ID = #{monthId,jdbcType=VARCHAR}
GROUP BY
CUSTOMER_ID,
AGENCY_ID,
TAG_ID
</select>
</mapper>

62
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedAgencyMonthlyDao.xml

@ -3,22 +3,52 @@
<mapper namespace="com.epmet.dao.stats.FactTagUsedAgencyMonthlyDao">
<resultMap type="com.epmet.entity.stats.FactTagUsedAgencyMonthlyEntity" id="factTagUsedAgencyMonthlyMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="pid" column="PID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="tagId" column="TAG_ID"/>
<result property="tagName" column="TAG_NAME"/>
<result property="usedCount" column="USED_COUNT"/>
<result property="monthId" column="MONTH_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="getTagUsedCountByYearId" resultType="com.epmet.entity.stats.FactTagUsedGridMonthlyEntity">
SELECT
CUSTOMER_ID,
PID,
AGENCY_ID,
TAG_ID,
TAG_NAME,
COUNT( USED_COUNT ) USED_COUNT,
MONTH_ID,
QUARTER_ID,
YEAR_ID
FROM
fact_tag_used_agency_monthly
WHERE
CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
AND DEL_FLAG = 0
AND YEAR_ID = #{yearId,jdbcType=VARCHAR}
GROUP BY
CUSTOMER_ID,
AGENCY_ID,
TAG_ID
</select>
<select id="getTagUsedCountByQuarterId" resultType="com.epmet.entity.stats.FactTagUsedGridMonthlyEntity">
SELECT
CUSTOMER_ID,
AGENCY_ID,
TAG_ID,
TAG_NAME,
COUNT( USED_COUNT ) USED_COUNT,
MONTH_ID,
QUARTER_ID,
YEAR_ID
FROM
fact_tag_used_agency_monthly
WHERE
CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
AND DEL_FLAG = 0
AND QUARTER_ID = #{quarterId,jdbcType=VARCHAR}
GROUP BY
CUSTOMER_ID,
AGENCY_ID,
TAG_ID
</select>
<delete id="deleteByMonthId">
DELETE FROM fact_tag_used_agency_monthly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND MONTH_ID = #{monthId,jdbcType=VARCHAR}
</delete>
</mapper>

21
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedAgencyQuarterlyDao.xml

@ -3,22 +3,7 @@
<mapper namespace="com.epmet.dao.stats.FactTagUsedAgencyQuarterlyDao">
<resultMap type="com.epmet.entity.stats.FactTagUsedAgencyQuarterlyEntity" id="factTagUsedAgencyQuarterlyMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="pid" column="PID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="tagId" column="TAG_ID"/>
<result property="tagName" column="TAG_NAME"/>
<result property="usedCount" column="USED_COUNT"/>
<result property="quarterId" column="QUARTER_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<delete id="deleteByQuarterId">
DELETE FROM fact_tag_used_agency_quarterly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND QUARTER_ID = #{quarterId,jdbcType=VARCHAR}
</delete>
</mapper>

21
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedAgencyYearlyDao.xml

@ -3,22 +3,7 @@
<mapper namespace="com.epmet.dao.stats.FactTagUsedAgencyYearlyDao">
<resultMap type="com.epmet.entity.stats.FactTagUsedAgencyYearlyEntity" id="factTagUsedAgencyYearlyMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="pid" column="PID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="tagId" column="TAG_ID"/>
<result property="tagName" column="TAG_NAME"/>
<result property="usedCount" column="USED_COUNT"/>
<result property="yearId" column="YEAR_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<delete id="deleteByYearId">
DELETE FROM fact_tag_used_agency_yearly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND YEAR_ID = #{yearId,jdbcType=VARCHAR}
</delete>
</mapper>

47
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedDepartmentDailyDao.xml

@ -3,27 +3,32 @@
<mapper namespace="com.epmet.dao.stats.FactTagUsedDepartmentDailyDao">
<resultMap type="com.epmet.entity.stats.FactTagUsedDepartmentDailyEntity" id="factTagUsedDepartmentDailyMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="pid" column="PID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="departmentId" column="DEPARTMENT_ID"/>
<result property="tagId" column="TAG_ID"/>
<result property="tagName" column="TAG_NAME"/>
<result property="usedCount" column="USED_COUNT"/>
<result property="dateId" column="DATE_ID"/>
<result property="weekId" column="WEEK_ID"/>
<result property="monthId" column="MONTH_ID"/>
<result property="quarterId" column="QUARTER_ID"/>
<result property="yearId" column="YEAR_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<delete id="deleteByDateId">
DELETE FROM fact_tag_used_department_daily WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND DATE_ID = #{dateId,jdbcType=VARCHAR}
</delete>
<select id="getTagUsedCountByMonthId" resultType="com.epmet.entity.stats.FactTagUsedDepartmentDailyEntity">
SELECT
CUSTOMER_ID,
PID,
AGENCY_ID,
DEPARTMENT_ID,
TAG_ID,
TAG_NAME,
COUNT( USED_COUNT ) USED_COUNT,
MONTH_ID,
QUARTER_ID,
YEAR_ID
FROM
fact_tag_used_department_daily
WHERE
CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
AND DEL_FLAG = 0
AND MONTH_ID = #{monthId,jdbcType=VARCHAR}
GROUP BY
CUSTOMER_ID,
DEPARTMENT_ID,
TAG_ID
</select>
</mapper>

63
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedDepartmentMonthlyDao.xml

@ -3,22 +3,53 @@
<mapper namespace="com.epmet.dao.stats.FactTagUsedDepartmentMonthlyDao">
<resultMap type="com.epmet.entity.stats.FactTagUsedDepartmentMonthlyEntity" id="factTagUsedDepartmentMonthlyMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="departmentId" column="DEPARTMENT_ID"/>
<result property="tagId" column="TAG_ID"/>
<result property="tagName" column="TAG_NAME"/>
<result property="usedCount" column="USED_COUNT"/>
<result property="monthId" column="MONTH_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="getTagUsedCountByYearId" resultType="com.epmet.entity.stats.FactTagUsedDepartmentMonthlyEntity">
SELECT
CUSTOMER_ID,
AGENCY_ID,
DEPARTMENT_ID,
TAG_ID,
TAG_NAME,
COUNT( USED_COUNT ) USED_COUNT,
MONTH_ID,
QUARTER_ID,
YEAR_ID
FROM
fact_tag_used_department_monthly
WHERE
CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
AND DEL_FLAG = 0
AND YEAR_ID = #{yearId,jdbcType=VARCHAR}
GROUP BY
CUSTOMER_ID,
DEPARTMENT_ID,
TAG_ID
</select>
<select id="getTagUsedCountByQuarterId" resultType="com.epmet.entity.stats.FactTagUsedDepartmentMonthlyEntity">
SELECT
CUSTOMER_ID,
AGENCY_ID,
DEPARTMENT_ID,
TAG_ID,
TAG_NAME,
COUNT( USED_COUNT ) USED_COUNT,
MONTH_ID,
QUARTER_ID,
YEAR_ID
FROM
fact_tag_used_department_monthly
WHERE
CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
AND DEL_FLAG = 0
AND QUARTER_ID = #{quarterId,jdbcType=VARCHAR}
GROUP BY
CUSTOMER_ID,
DEPARTMENT_ID,
TAG_ID
</select>
<delete id="deleteByMonthId">
DELETE FROM fact_tag_used_department_monthly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND MONTH_ID = #{monthId,jdbcType=VARCHAR}
</delete>
</mapper>

20
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedDepartmentQuarterlyDao.xml

@ -3,22 +3,8 @@
<mapper namespace="com.epmet.dao.stats.FactTagUsedDepartmentQuarterlyDao">
<resultMap type="com.epmet.entity.stats.FactTagUsedDepartmentQuarterlyEntity" id="factTagUsedDepartmentQuarterlyMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="departmentId" column="DEPARTMENT_ID"/>
<result property="tagId" column="TAG_ID"/>
<result property="tagName" column="TAG_NAME"/>
<result property="usedCount" column="USED_COUNT"/>
<result property="quarterId" column="QUARTER_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<delete id="deleteByQuarterId">
DELETE FROM fact_tag_used_department_quarterly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND QUARTER_ID = #{quarterId,jdbcType=VARCHAR}
</delete>
</mapper>

21
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedDepartmentYearlyDao.xml

@ -3,22 +3,7 @@
<mapper namespace="com.epmet.dao.stats.FactTagUsedDepartmentYearlyDao">
<resultMap type="com.epmet.entity.stats.FactTagUsedDepartmentYearlyEntity" id="factTagUsedDepartmentYearlyMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="departmentId" column="DEPARTMENT_ID"/>
<result property="tagId" column="TAG_ID"/>
<result property="tagName" column="TAG_NAME"/>
<result property="usedCount" column="USED_COUNT"/>
<result property="yearId" column="YEAR_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<delete id="deleteByYearId">
DELETE FROM fact_tag_used_department_yearly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND YEAR_ID = #{yearId,jdbcType=VARCHAR}
</delete>
</mapper>

48
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedGridDailyDao.xml

@ -2,27 +2,29 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.stats.FactTagUsedGridDailyDao">
<resultMap type="com.epmet.entity.stats.FactTagUsedGridDailyEntity" id="factTagUsedGridDailyMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="gridId" column="GRID_ID"/>
<result property="tagId" column="TAG_ID"/>
<result property="tagName" column="TAG_NAME"/>
<result property="usedCount" column="USED_COUNT"/>
<result property="dateId" column="DATE_ID"/>
<result property="weekId" column="WEEK_ID"/>
<result property="monthId" column="MONTH_ID"/>
<result property="quarterId" column="QUARTER_ID"/>
<result property="yearId" column="YEAR_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<delete id="deleteByDateId">
DELETE FROM fact_tag_used_grid_daily WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND DATE_ID = #{dateId,jdbcType=VARCHAR}
</delete>
<select id="getTagUsedCountByMonthId" resultType="com.epmet.entity.stats.FactTagUsedGridDailyEntity">
SELECT
CUSTOMER_ID,
AGENCY_ID,
GRID_ID,
TAG_ID,
TAG_NAME,
COUNT( USED_COUNT ) USED_COUNT,
MONTH_ID,
QUARTER_ID,
YEAR_ID
FROM
fact_tag_used_grid_daily
WHERE
CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
AND DEL_FLAG = 0
AND MONTH_ID = #{monthId,jdbcType=VARCHAR}
GROUP BY
CUSTOMER_ID,
GRID_ID,
TAG_ID
</select>
</mapper>

64
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedGridMonthlyDao.xml

@ -3,22 +3,54 @@
<mapper namespace="com.epmet.dao.stats.FactTagUsedGridMonthlyDao">
<resultMap type="com.epmet.entity.stats.FactTagUsedGridMonthlyEntity" id="factTagUsedGridMonthlyMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="gridId" column="GRID_ID"/>
<result property="tagId" column="TAG_ID"/>
<result property="tagName" column="TAG_NAME"/>
<result property="usedCount" column="USED_COUNT"/>
<result property="monthId" column="MONTH_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="getTagUsedCountByYearId" resultType="com.epmet.entity.stats.FactTagUsedGridMonthlyEntity">
SELECT
CUSTOMER_ID,
AGENCY_ID,
GRID_ID,
TAG_ID,
TAG_NAME,
COUNT( USED_COUNT ) USED_COUNT,
MONTH_ID,
QUARTER_ID,
YEAR_ID
FROM
fact_tag_used_grid_monthly
WHERE
CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
AND DEL_FLAG = 0
AND YEAR_ID = #{yearId,jdbcType=VARCHAR}
GROUP BY
CUSTOMER_ID,
GRID_ID,
TAG_ID
</select>
<select id="getTagUsedCountByQuarterId" resultType="com.epmet.entity.stats.FactTagUsedGridMonthlyEntity">
SELECT
CUSTOMER_ID,
AGENCY_ID,
GRID_ID,
TAG_ID,
TAG_NAME,
COUNT( USED_COUNT ) USED_COUNT,
MONTH_ID,
QUARTER_ID,
YEAR_ID
FROM
fact_tag_used_grid_monthly
WHERE
CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
AND DEL_FLAG = 0
AND QUARTER_ID = #{quarterId,jdbcType=VARCHAR}
GROUP BY
CUSTOMER_ID,
GRID_ID,
TAG_ID
</select>
<delete id="deleteByMonthId">
DELETE FROM fact_tag_used_grid_monthly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND MONTH_ID = #{monthId,jdbcType=VARCHAR}
</delete>
</mapper>

19
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedGridQuarterlyDao.xml

@ -3,22 +3,9 @@
<mapper namespace="com.epmet.dao.stats.FactTagUsedGridQuarterlyDao">
<resultMap type="com.epmet.entity.stats.FactTagUsedGridQuarterlyEntity" id="factTagUsedGridQuarterlyMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="gridId" column="GRID_ID"/>
<result property="tagId" column="TAG_ID"/>
<result property="tagName" column="TAG_NAME"/>
<result property="usedCount" column="USED_COUNT"/>
<result property="quarterId" column="QUARTER_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<delete id="deleteByQuarterId">
DELETE FROM fact_tag_used_grid_quarterly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND QUARTER_ID = #{quarterId,jdbcType=VARCHAR}
</delete>
</mapper>

20
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagUsedGridYearlyDao.xml

@ -2,23 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.stats.FactTagUsedGridYearlyDao">
<resultMap type="com.epmet.entity.stats.FactTagUsedGridYearlyEntity" id="factTagUsedGridYearlyMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="gridId" column="GRID_ID"/>
<result property="tagId" column="TAG_ID"/>
<result property="tagName" column="TAG_NAME"/>
<result property="usedCount" column="USED_COUNT"/>
<result property="yearId" column="YEAR_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<delete id="deleteByYearId">
DELETE FROM fact_tag_used_grid_yearly WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND YEAR_ID = #{yearId,jdbcType=VARCHAR}
</delete>
</mapper>

21
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedGridDailyDao.xml

@ -3,26 +3,5 @@
<mapper namespace="com.epmet.dao.stats.FactTagViewedGridDailyDao">
<resultMap type="com.epmet.entity.stats.FactTagViewedGridDailyEntity" id="factTagViewedGridDailyMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="gridId" column="GRID_ID"/>
<result property="tagId" column="TAG_ID"/>
<result property="tagName" column="TAG_NAME"/>
<result property="tagReadCount" column="TAG_READ_COUNT"/>
<result property="dateId" column="DATE_ID"/>
<result property="weekId" column="WEEK_ID"/>
<result property="monthId" column="MONTH_ID"/>
<result property="quarterId" column="QUARTER_ID"/>
<result property="yearId" column="YEAR_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

18
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedGridMonthlyDao.xml

@ -3,22 +3,4 @@
<mapper namespace="com.epmet.dao.stats.FactTagViewedGridMonthlyDao">
<resultMap type="com.epmet.entity.stats.FactTagViewedGridMonthlyEntity" id="factTagViewedGridMonthlyMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="gridId" column="GRID_ID"/>
<result property="tagId" column="TAG_ID"/>
<result property="tagName" column="TAG_NAME"/>
<result property="tagReadCount" column="TAG_READ_COUNT"/>
<result property="monthId" column="MONTH_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

18
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedGridQuarterlyDao.xml

@ -3,22 +3,4 @@
<mapper namespace="com.epmet.dao.stats.FactTagViewedGridQuarterlyDao">
<resultMap type="com.epmet.entity.stats.FactTagViewedGridQuarterlyEntity" id="factTagViewedGridQuarterlyMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="gridId" column="GRID_ID"/>
<result property="tagId" column="TAG_ID"/>
<result property="tagName" column="TAG_NAME"/>
<result property="tagReadCount" column="TAG_READ_COUNT"/>
<result property="quarterId" column="QUARTER_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

18
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactTagViewedGridYearlyDao.xml

@ -3,22 +3,4 @@
<mapper namespace="com.epmet.dao.stats.FactTagViewedGridYearlyDao">
<resultMap type="com.epmet.entity.stats.FactTagViewedGridYearlyEntity" id="factTagViewedGridYearlyMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="gridId" column="GRID_ID"/>
<result property="tagId" column="TAG_ID"/>
<result property="tagName" column="TAG_NAME"/>
<result property="tagReadCount" column="TAG_READ_COUNT"/>
<result property="yearId" column="YEAR_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

24
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticleDao.xml

@ -29,7 +29,7 @@
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="getAllPublishedCount" resultType="com.epmet.dto.stats.ArticleGridPublishedSummaryDTO">
<select id="getAllPublishedCount" resultType="com.epmet.dto.voice.ArticleGridPublishedSummaryDTO">
SELECT
ORG_ID AS agencyId,
PUBLISHER_ID,
@ -38,14 +38,30 @@
FROM
article
WHERE
DEL_FLAG = 0
AND CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
AND PUBLISHER_TYPE = #{publisherType,jdbcType=VARCHAR}
CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
AND PUBLISH_DATE <![CDATA[ <#{publishDate,jdbcType=TIMESTAMP}]]>
AND DEL_FLAG = 0
AND PUBLISHER_TYPE = #{publisherType,jdbcType=VARCHAR}
GROUP BY
CUSTOMER_ID,
PUBLISHER_ID
</select>
<select id="getPublishedArticleByDay" resultType="com.epmet.entity.voice.ArticleEntity">
SELECT
ID,
CUSTOMER_ID,
PUBLISHER_ID,
PUBLISHER_TYPE,
ORG_ID
FROM
article
WHERE
PUBLISH_DATE = #{publishDate,jdbcType=TIMESTAMP}
AND DEL_FLAG = 0
AND TAGS IS NOT NULL
AND CUSTOMER_ID = #{customerId,jdbcType=VARCHAR
AND PUBLISHER_TYPE = #{publisherType,jdbcType=VARCHAR}
</select>
</mapper>

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticlePublishRangeDao.xml

@ -21,7 +21,7 @@
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="getAllPublishedCount" resultType="com.epmet.dto.stats.ArticleGridPublishedSummaryDTO">
<select id="getAllPublishedCount" resultType="com.epmet.dto.voice.ArticleGridPublishedSummaryDTO">
SELECT
AGENCY_ID,
GRID_ID,
@ -37,7 +37,7 @@
CUSTOMER_ID,
GRID_ID
</select>
<select id="getOneDayPublishedCount" resultType="com.epmet.dto.stats.ArticleGridPublishedSummaryDTO">
<select id="getOneDayPublishedCount" resultType="com.epmet.dto.voice.ArticleGridPublishedSummaryDTO">
SELECT
GRID_ID,
count(ID) publishedCount,

32
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticleTagsDao.xml

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.voice.ArticleTagsDao">
<resultMap type="com.epmet.entity.voice.ArticleTagsEntity" id="articleTagsMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="articleId" column="ARTICLE_ID"/>
<result property="tagId" column="TAG_ID"/>
<result property="tagName" column="TAG_NAME"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="getArticleTagsByDay" resultMap="articleTagsMap">
SELECT
TAG_ID,
TAG_NAME,
CUSTOMER_ID,
ARTICLE_ID
FROM
article_tags
WHERE
DEL_FLAG = 0
AND CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
AND CREATED_TIME BETWEEN #{startTime,jdbcType=TIMESTAMP} AND #{endTime,jdbcType=TIMESTAMP}
</select>
</mapper>
Loading…
Cancel
Save