+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao.crm;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.crm.CustomerEntity;
+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-03-11
+ */
+@Mapper
+public interface CustomerDao extends BaseDao {
+
+ /**
+ * 根据创建时间起止查询有效客户列表
+ * @param createTimeFrom
+ * @param createTimeTo
+ * @return
+ */
+ List listValidCustomersByCreateTime(
+ @Param("createTimeFrom") Date createTimeFrom,
+ @Param("createTimeTo") Date createTimeTo);
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerDepartmentDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerDepartmentDao.java
new file mode 100644
index 0000000000..2b9b4705ab
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerDepartmentDao.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao.org;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.org.CustomerDepartmentEntity;
+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-04-20
+ */
+@Mapper
+public interface CustomerDepartmentDao extends BaseDao {
+
+ List listDepartmentsByCreatedTime(
+ @Param("createdTimeFrom") Date createdTimeFrom,
+ @Param("createdTimeTo") Date createdTimeTo);
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerGridDao.java
new file mode 100644
index 0000000000..ee1547a190
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerGridDao.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao.org;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.org.CustomerGridEntity;
+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-03-16
+ */
+@Mapper
+public interface CustomerGridDao extends BaseDao {
+
+ /**
+ * 根据创建时间,截取时间段内的网格
+ * @param start
+ * @param end
+ * @return
+ */
+ List listGridsByCreateTime(@Param("start") Date start, @Param("end") Date end);
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/StatsCustomerAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/StatsCustomerAgencyDao.java
index ef6ab4005d..b3de9cfd02 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/StatsCustomerAgencyDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/StatsCustomerAgencyDao.java
@@ -6,6 +6,7 @@ import com.epmet.entity.org.CustomerAgencyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
+import java.util.Date;
import java.util.List;
@Mapper
@@ -13,6 +14,9 @@ public interface StatsCustomerAgencyDao extends BaseDao {
List listAllEntities();
+ List listAgenciesByCreateTime(
+ @Param("statsStartTime") Date statsStartTime,
+ @Param("statsEndTime") Date statsEndTime);
List selectAllAgency();
List selectSubAgencyByPid(@Param("pid")String pid);
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimAgencyDao.java
index a451b9e19f..9ead9c7114 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimAgencyDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimAgencyDao.java
@@ -19,9 +19,12 @@ package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.stats.DimAgencyDTO;
import com.epmet.entity.stats.DimAgencyEntity;
import org.apache.ibatis.annotations.Mapper;
+import java.util.List;
+
/**
* 机关维度
*
@@ -30,5 +33,12 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface DimAgencyDao extends BaseDao {
-
+
+ /**
+ * @param dto
+ * @return
+ * @Author sun
+ * @Description 根据客户Id查询机关维度列表数据
+ **/
+ List selectDimAgencyList(DimAgencyDTO dto);
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimCustomerDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimCustomerDao.java
index 5a8a5351ce..66ea22ad59 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimCustomerDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimCustomerDao.java
@@ -21,6 +21,8 @@ import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.stats.DimCustomerEntity;
import org.apache.ibatis.annotations.Mapper;
+import java.util.List;
+
/**
* 客户维度
*
@@ -29,5 +31,16 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface DimCustomerDao extends BaseDao {
-
+
+ /**
+ * desc: 分页获取客户id
+ *
+ * @param pageNo
+ * @param offset
+ * return: List
+ * @date: 2020/6/17 16:33
+ * @author: jianjun liu
+ * email:liujianjun@git.elinkit.com.cn
+ */
+ List selectCustomerIdPage(Integer pageNo, int offset);
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimDateDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimDateDao.java
index f07e5fab41..3a1436cbcc 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimDateDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimDateDao.java
@@ -18,9 +18,12 @@
package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.stats.DimDateDTO;
import com.epmet.entity.stats.DimDateEntity;
import org.apache.ibatis.annotations.Mapper;
+import java.util.List;
+
/**
* 日期维度表
*
@@ -29,5 +32,19 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface DimDateDao extends BaseDao {
-
+
+ /**
+ * @param dto
+ * @return
+ * @Author sun
+ * @Description 根据创建时间查询日维度信息
+ **/
+ List selectDimDate(DimDateDTO dto);
+
+ /**
+ * 最新的按日维度
+ */
+ DimDateDTO getLatestDimDate();
+
+ int insertOne(DimDateEntity dimDateEntity);
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimGridDao.java
index 4a8129f98e..a2d36e2481 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimGridDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimGridDao.java
@@ -18,9 +18,13 @@
package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.org.CustomerGridEntity;
import com.epmet.entity.stats.DimGridEntity;
import org.apache.ibatis.annotations.Mapper;
+import java.util.Date;
+import java.util.List;
+
/**
* 客户网格维度
*
@@ -29,5 +33,7 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface DimGridDao extends BaseDao {
-
+
+ DimGridEntity getLastCreatedGridDimEntity();
+
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectDailyDao.java
new file mode 100644
index 0000000000..6e961d85c9
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectDailyDao.java
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao.stats;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.stats.FactAgencyProjectDailyEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 机关下日项目数据统计 存放机关下截止到当前日期的各项总数据以及昨日新增各项数据
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-16
+ */
+@Mapper
+public interface FactAgencyProjectDailyDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectMonthlyDao.java
new file mode 100644
index 0000000000..6cd1e39250
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectMonthlyDao.java
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao.stats;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.stats.FactAgencyProjectMonthlyEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 机关下月项目数据统计 存放机关下截止到当前月份的各项总数据以及上月新增各项数据
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-16
+ */
+@Mapper
+public interface FactAgencyProjectMonthlyDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridProjectDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridProjectDailyDao.java
new file mode 100644
index 0000000000..bc4602ff38
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridProjectDailyDao.java
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao.stats;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.stats.FactGridProjectDailyEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 网格下日项目数据统计表 存放机关下截止到当前日期的各项总数据以及昨日新增各项数据
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-16
+ */
+@Mapper
+public interface FactGridProjectDailyDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridProjectMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridProjectMonthlyDao.java
new file mode 100644
index 0000000000..ea7b4c0353
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGridProjectMonthlyDao.java
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao.stats;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.stats.FactGridProjectMonthlyEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 网格下月项目数据统计表 存放机关下截止到当前月份的各项总数据以及上月新增各项数据
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-16
+ */
+@Mapper
+public interface FactGridProjectMonthlyDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/LastExecRecordDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/LastExecRecordDao.java
new file mode 100755
index 0000000000..b90c6c6856
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/LastExecRecordDao.java
@@ -0,0 +1,35 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao.stats;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.stats.LastExecRecordEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 最后一次执行记录表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-17
+ */
+@Mapper
+public interface LastExecRecordDao extends BaseDao {
+
+ LastExecRecordEntity getLastExecRecord(@Param("statsSubject") String statsSubject);
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticleDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticleDao.java
new file mode 100644
index 0000000000..4609722502
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticleDao.java
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao.voice;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.voice.ArticleEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 文章表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-17
+ */
+@Mapper
+public interface ArticleDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticlePublishRangeDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticlePublishRangeDao.java
new file mode 100644
index 0000000000..13b47c66b5
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/voice/ArticlePublishRangeDao.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao.voice;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.stats.ArticleGridPublishedSummaryDTO;
+import com.epmet.entity.voice.ArticlePublishRangeEntity;
+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 ArticlePublishRangeDao extends BaseDao {
+
+ /**
+ * desc:查询网格发布文章总数及状态为发布中的文章总数
+ *
+ * @param customerId
+ * @param createDate
+ * @return
+ */
+ List selectByCreatedDate(@Param("customerId") String customerId, @Param("createDate") Date createDate);
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/crm/CustomerEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/crm/CustomerEntity.java
new file mode 100644
index 0000000000..a2fa408a43
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/crm/CustomerEntity.java
@@ -0,0 +1,91 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity.org;
+
+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-04-20
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("customer_department")
+public class CustomerDepartmentEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 所属组织机构ID(customer_agency.id)
+ */
+ private String agencyId;
+
+ /**
+ * 部门名称
+ */
+ private String departmentName;
+
+ /**
+ * 部门职责
+ */
+ private String departmentDuty;
+
+ /**
+ * 总人数
+ */
+ private Integer totalUser;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/CustomerGridEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/CustomerGridEntity.java
new file mode 100644
index 0000000000..6c01df7df8
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/CustomerGridEntity.java
@@ -0,0 +1,82 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity.stats;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 最后一次执行记录表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-17
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("last_exec_record")
+public class LastExecRecordEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 执行主体,即每一个统计表
+ */
+ private String subject;
+
+ /**
+ * 最后一次执行时间
+ */
+ private Date execTime;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/voice/ArticleEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/voice/ArticleEntity.java
new file mode 100644
index 0000000000..98d9beb507
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/voice/ArticleEntity.java
@@ -0,0 +1,125 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.stats;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.entity.stats.FactAgencyProjectDailyEntity;
+
+/**
+ * 机关下日项目数据统计 存放机关下截止到当前日期的各项总数据以及昨日新增各项数据
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-16
+ */
+public interface FactAgencyProjectDailyService extends BaseService {
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyProjectMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyProjectMonthlyService.java
new file mode 100644
index 0000000000..38f18b9a8c
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyProjectMonthlyService.java
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.stats;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.entity.stats.FactAgencyProjectMonthlyEntity;
+
+/**
+ * 机关下月项目数据统计 存放机关下截止到当前月份的各项总数据以及上月新增各项数据
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-16
+ */
+public interface FactAgencyProjectMonthlyService extends BaseService {
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridProjectDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridProjectDailyService.java
new file mode 100644
index 0000000000..88c6aa3286
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridProjectDailyService.java
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.stats;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.entity.stats.FactGridProjectDailyEntity;
+
+/**
+ * 网格下日项目数据统计表 存放机关下截止到当前日期的各项总数据以及昨日新增各项数据
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-16
+ */
+public interface FactGridProjectDailyService extends BaseService {
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridProjectMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridProjectMonthlyService.java
new file mode 100644
index 0000000000..7beb0d019d
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGridProjectMonthlyService.java
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.stats;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.entity.stats.FactGridProjectMonthlyEntity;
+
+/**
+ * 网格下月项目数据统计表 存放机关下截止到当前月份的各项总数据以及上月新增各项数据
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-16
+ */
+public interface FactGridProjectMonthlyService extends BaseService {
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/LastExecRecordService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/LastExecRecordService.java
new file mode 100644
index 0000000000..35bf90a324
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/LastExecRecordService.java
@@ -0,0 +1,10 @@
+package com.epmet.service.stats;
+
+import com.epmet.entity.stats.LastExecRecordEntity;
+
+public interface LastExecRecordService {
+ LastExecRecordEntity getLastExecRecord(String statsSubject);
+ LastExecRecordEntity createLastExecRecord(String statsSubject);
+
+ void updateById(LastExecRecordEntity lastExecRecord);
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java
index 817c3b774f..9824d21721 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java
@@ -25,6 +25,7 @@ import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.dao.stats.DimAgencyDao;
import com.epmet.dto.stats.DimAgencyDTO;
+import com.epmet.entity.org.CustomerAgencyEntity;
import com.epmet.entity.stats.DimAgencyEntity;
import com.epmet.service.stats.DimAgencyService;
import org.apache.commons.lang3.StringUtils;
@@ -33,6 +34,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
+import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -97,4 +99,37 @@ public class DimAgencyServiceImpl extends BaseServiceImpl getDimAgencyList(DimAgencyDTO dto) {
+ return baseDao.selectDimAgencyList(dto);
+ }
+
+ @Transactional
+ @Override
+ public void addAgencyDims(List agencies) {
+ Date now = new Date();
+ for (CustomerAgencyEntity agency : agencies) {
+ DimAgencyEntity dimAgencyEntity = new DimAgencyEntity();
+ dimAgencyEntity.setAgencyName(agency.getOrganizationName());
+ dimAgencyEntity.setAllParentName(agency.getAllParentName());
+ dimAgencyEntity.setCustomerId(agency.getCustomerId());
+ dimAgencyEntity.setLevel(agency.getLevel());
+ dimAgencyEntity.setPid(agency.getPid());
+ dimAgencyEntity.setPids(agency.getPid());
+ dimAgencyEntity.setCreatedBy("APP_USER");
+ dimAgencyEntity.setUpdatedBy("APP_USER");
+ dimAgencyEntity.setCreatedTime(now);
+ dimAgencyEntity.setUpdatedTime(now);
+ dimAgencyEntity.setRevision(0);
+ dimAgencyEntity.setDelFlag("0");
+ baseDao.insert(dimAgencyEntity);
+ }
+ }
+
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java
index 4b66ed3e11..87ab6d789d 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java
@@ -20,19 +20,24 @@ package com.epmet.service.stats.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.commons.tools.constant.FieldConstant;
+import com.epmet.commons.tools.exception.EpmetErrorCode;
+import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
-import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.dao.stats.DimCustomerDao;
import com.epmet.dto.stats.DimCustomerDTO;
+import com.epmet.entity.crm.CustomerEntity;
+import com.epmet.entity.org.CustomerDepartmentEntity;
import com.epmet.entity.stats.DimCustomerEntity;
import com.epmet.service.stats.DimCustomerService;
+import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
+import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -43,6 +48,7 @@ import java.util.Map;
* @since v1.0.0 2020-06-16
*/
@Service
+@Slf4j
public class DimCustomerServiceImpl extends BaseServiceImpl implements DimCustomerService {
@Override
@@ -61,8 +67,8 @@ public class DimCustomerServiceImpl extends BaseServiceImpl getWrapper(Map params){
- String id = (String)params.get(FieldConstant.ID_HUMP);
+ private QueryWrapper getWrapper(Map params) {
+ String id = (String) params.get(FieldConstant.ID_HUMP);
QueryWrapper wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
@@ -97,4 +103,30 @@ public class DimCustomerServiceImpl extends BaseServiceImpl selectCustomerIdPage(Integer pageNo, Integer pageSize) {
+ if (pageNo == null || pageNo < 1 || pageSize == null || pageSize < 0) {
+ log.error("selectCustomerIdPage param error,pageNo:{},pageSize:{}", pageNo, pageSize);
+ throw new RenException(EpmetErrorCode.CUSTOMER_VALIDATE_ERROR.getCode(), EpmetErrorCode.CUSTOMER_VALIDATE_ERROR.getMsg());
+ }
+ return baseDao.selectCustomerIdPage(pageNo, (pageNo - 1) * pageSize);
+ }
+
+ @Transactional
+ @Override
+ public void addCustomerDims(List customers) {
+ Date now = new Date();
+ for (CustomerEntity customer : customers) {
+ DimCustomerEntity dim = new DimCustomerEntity();
+ dim.setCustomerName(customer.getCustomerName());
+ dim.setCreatedBy("APP_USER");
+ dim.setCreatedTime(now);
+ dim.setUpdatedBy("APP_USER");
+ dim.setUpdatedTime(now);
+ dim.setDelFlag("0");
+ dim.setRevision(0);
+ dim.setId(customer.getId());
+ baseDao.insert(dim);
+ }
+ }
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDateServiceImpl.java
index 7cd094209a..0d0d756c12 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDateServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDateServiceImpl.java
@@ -23,18 +23,16 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
+import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.dao.stats.DimDateDao;
import com.epmet.dto.stats.DimDateDTO;
import com.epmet.entity.stats.DimDateEntity;
import com.epmet.service.stats.DimDateService;
import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
/**
* 日期维度表
@@ -45,7 +43,6 @@ import java.util.Map;
@Service
public class DimDateServiceImpl extends BaseServiceImpl implements DimDateService {
-
@Override
public PageData page(Map params) {
IPage page = baseDao.selectPage(
@@ -98,4 +95,84 @@ public class DimDateServiceImpl extends BaseServiceImpl getDimDate(DimDateDTO dto) {
+ return baseDao.selectDimDate(dto);
+ }
+
+ @Override
+ public void initDimDate() {
+ DimDateDTO latestDimDateDto = baseDao.getLatestDimDate();
+
+ Date targetDate = DateUtils.addDateDays(DateUtils.parse(
+ DateUtils.format(new Date(), DateUtils.DATE_PATTERN_YYYYMMDD),
+ DateUtils.DATE_PATTERN_YYYYMMDD), -1);
+
+ Date lastDimDate;
+
+ if (latestDimDateDto == null) {
+ // 没有维度数据
+ initDimDate(targetDate);
+ } else if(targetDate.after(lastDimDate = DateUtils.parse(latestDimDateDto.getId(), DateUtils.DATE_PATTERN_YYYYMMDD))) {
+ // 有维度数据,并且当前日期大于最大按日维度数据的id,需要连续生成至少一天的维度数据(补缺)
+ initDimDate(lastDimDate, targetDate);
+ }
+ }
+
+ /**
+ * 连续初始化
+ * @param lastDimDate
+ * @param targetDate
+ */
+ private void initDimDate(Date lastDimDate, Date targetDate) {
+ while (lastDimDate.before(targetDate)) {
+ lastDimDate = DateUtils.addDateDays(lastDimDate, 1);
+ initDimDate(lastDimDate);
+ }
+ }
+
+ /**
+ * 初始化单日
+ * @param targetDate
+ */
+ public void initDimDate(Date targetDate) {
+ DimDateEntity dimDateEntity = generateDimDate(targetDate);
+ int c = baseDao.insertOne(dimDateEntity);
+ }
+
+ public DimDateEntity generateDimDate(Date targetDate) {
+ Date now = new Date();
+ // 日期id
+ String id = DateUtils.format(targetDate, DateUtils.DATE_PATTERN_YYYYMMDD);
+ // 月份id
+ String monthId = DateUtils.format(targetDate, DateUtils.DATE_PATTERN_YYYYMM);
+ // 日期名称字符串
+ String dateNameStr = DateUtils.format(targetDate, DateUtils.DATE_NAME_PATTERN);
+ // 星期几
+ String chineseWeekName = DateUtils.getWeekNameOfWeek(targetDate, DateUtils.WEEK_TYPE_CHINESE);
+ String englishWeekName = DateUtils.getWeekNameOfWeek(targetDate, DateUtils.WEEK_TYPE_ENGLISH);
+ // 一年的第几周
+ String weekId = DateUtils.format(targetDate, DateUtils.DATE_PATTERN_YYYY).concat("W").concat(String.valueOf(DateUtils.getWeekOfYear(targetDate)));
+
+ DimDateEntity dimDateEntity = new DimDateEntity();
+ dimDateEntity.setId(id);
+ dimDateEntity.setDateName(dateNameStr);
+ dimDateEntity.setDayOfWeek(englishWeekName);
+ dimDateEntity.setDayOfWeekName(chineseWeekName);
+ dimDateEntity.setWeekId(weekId);
+ dimDateEntity.setMonthId(monthId);
+ dimDateEntity.setDelFlag("0");
+ dimDateEntity.setCreatedBy("APP_USER");
+ dimDateEntity.setCreatedTime(now);
+ dimDateEntity.setRevision(0);
+ dimDateEntity.setUpdatedBy("APP_USER");
+ dimDateEntity.setUpdatedTime(now);
+ return dimDateEntity;
+ }
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDepartmentServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDepartmentServiceImpl.java
index 3b500d1056..a28dff6493 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDepartmentServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDepartmentServiceImpl.java
@@ -25,6 +25,7 @@ import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.dao.stats.DimDepartmentDao;
import com.epmet.dto.stats.DimDepartmentDTO;
+import com.epmet.entity.org.CustomerDepartmentEntity;
import com.epmet.entity.stats.DimDepartmentEntity;
import com.epmet.service.stats.DimDepartmentService;
import org.apache.commons.lang3.StringUtils;
@@ -33,6 +34,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
+import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -97,4 +99,22 @@ public class DimDepartmentServiceImpl extends BaseServiceImpl departments) {
+ Date now = new Date();
+ for (CustomerDepartmentEntity department : departments) {
+ DimDepartmentEntity dim = new DimDepartmentEntity();
+ dim.setAgencyId(department.getAgencyId());
+ dim.setCustomerId(department.getCustomerId());
+ dim.setDepartmentName(department.getDepartmentName());
+ dim.setCreatedBy("APP_USER");
+ dim.setUpdatedBy("APP_USER");
+ dim.setCreatedTime(now);
+ dim.setUpdatedTime(now);
+ dim.setRevision(0);
+ dim.setDelFlag("0");
+ baseDao.insert(dim);
+ }
+ }
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java
index 1a30850b2c..1a0af837a4 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java
@@ -25,14 +25,16 @@ import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.dao.stats.DimGridDao;
import com.epmet.dto.stats.DimGridDTO;
+import com.epmet.entity.org.CustomerAgencyEntity;
+import com.epmet.entity.stats.DimAgencyEntity;
import com.epmet.entity.stats.DimGridEntity;
import com.epmet.service.stats.DimGridService;
import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
+import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -97,4 +99,16 @@ public class DimGridServiceImpl extends BaseServiceImpl gridDims) {
+ for (DimGridEntity gridDim : gridDims) {
+ baseDao.insert(gridDim);
+ }
+ }
}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimMonthServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimMonthServiceImpl.java
index b495b76284..39db16d77f 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimMonthServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimMonthServiceImpl.java
@@ -23,16 +23,22 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
+import com.epmet.commons.tools.utils.DateUtils;
+import com.epmet.constant.StatsSubject;
import com.epmet.dao.stats.DimMonthDao;
import com.epmet.dto.stats.DimMonthDTO;
import com.epmet.entity.stats.DimMonthEntity;
+import com.epmet.entity.stats.LastExecRecordEntity;
import com.epmet.service.stats.DimMonthService;
+import com.epmet.service.stats.LastExecRecordService;
import org.apache.commons.lang3.StringUtils;
+import org.joda.time.LocalDate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
+import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -45,6 +51,9 @@ import java.util.Map;
@Service
public class DimMonthServiceImpl extends BaseServiceImpl implements DimMonthService {
+ @Autowired
+ private LastExecRecordService lastExecRecordService;
+
@Override
public PageData page(Map params) {
IPage page = baseDao.selectPage(
@@ -97,4 +106,62 @@ public class DimMonthServiceImpl extends BaseServiceImpl
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.stats.impl;
+
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.dao.stats.FactAgencyProjectDailyDao;
+import com.epmet.entity.stats.FactAgencyProjectDailyEntity;
+import com.epmet.service.stats.FactAgencyProjectDailyService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 机关下日项目数据统计 存放机关下截止到当前日期的各项总数据以及昨日新增各项数据
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-16
+ */
+@Service
+public class FactAgencyProjectDailyServiceImpl extends BaseServiceImpl implements FactAgencyProjectDailyService {
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectMonthlyServiceImpl.java
new file mode 100644
index 0000000000..5ad3f8eeda
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectMonthlyServiceImpl.java
@@ -0,0 +1,36 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.stats.impl;
+
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.dao.stats.FactAgencyProjectMonthlyDao;
+import com.epmet.entity.stats.FactAgencyProjectMonthlyEntity;
+import com.epmet.service.stats.FactAgencyProjectMonthlyService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 机关下月项目数据统计 存放机关下截止到当前月份的各项总数据以及上月新增各项数据
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-16
+ */
+@Service
+public class FactAgencyProjectMonthlyServiceImpl extends BaseServiceImpl implements FactAgencyProjectMonthlyService {
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectDailyServiceImpl.java
new file mode 100644
index 0000000000..2665db9d91
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectDailyServiceImpl.java
@@ -0,0 +1,36 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.stats.impl;
+
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.dao.stats.FactGridProjectDailyDao;
+import com.epmet.entity.stats.FactGridProjectDailyEntity;
+import com.epmet.service.stats.FactGridProjectDailyService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 网格下日项目数据统计表 存放机关下截止到当前日期的各项总数据以及昨日新增各项数据
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-16
+ */
+@Service
+public class FactGridProjectDailyServiceImpl extends BaseServiceImpl implements FactGridProjectDailyService {
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectMonthlyServiceImpl.java
new file mode 100644
index 0000000000..e2f5fb654c
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectMonthlyServiceImpl.java
@@ -0,0 +1,36 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.stats.impl;
+
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.dao.stats.FactGridProjectMonthlyDao;
+import com.epmet.entity.stats.FactGridProjectMonthlyEntity;
+import com.epmet.service.stats.FactGridProjectMonthlyService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 网格下月项目数据统计表 存放机关下截止到当前月份的各项总数据以及上月新增各项数据
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-16
+ */
+@Service
+public class FactGridProjectMonthlyServiceImpl extends BaseServiceImpl implements FactGridProjectMonthlyService {
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/LastExecRecordServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/LastExecRecordServiceImpl.java
new file mode 100644
index 0000000000..3e183a368b
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/LastExecRecordServiceImpl.java
@@ -0,0 +1,45 @@
+package com.epmet.service.stats.impl;
+
+import com.epmet.dao.stats.LastExecRecordDao;
+import com.epmet.entity.stats.LastExecRecordEntity;
+import com.epmet.service.stats.LastExecRecordService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+
+@Service
+public class LastExecRecordServiceImpl implements LastExecRecordService {
+ @Autowired
+ private LastExecRecordDao lastExecRecordDao;
+
+ public LastExecRecordEntity getLastExecRecord(String statsSubject) {
+ return lastExecRecordDao.getLastExecRecord(statsSubject);
+ }
+
+ /**
+ * 创建末次执行记录
+ * @param statsSubject
+ * @return
+ */
+ @Override
+ public LastExecRecordEntity createLastExecRecord(String statsSubject) {
+ Date now = new Date();
+ LastExecRecordEntity entity = new LastExecRecordEntity();
+ entity.setExecTime(now);
+ entity.setSubject(statsSubject);
+ entity.setCreatedBy("APP_USER");
+ entity.setUpdatedBy("APP_USER");
+ entity.setCreatedTime(now);
+ entity.setUpdatedTime(now);
+ entity.setDelFlag("0");
+ entity.setRevision(0);
+ lastExecRecordDao.insert(entity);
+ return entity;
+ }
+
+ @Override
+ public void updateById(LastExecRecordEntity lastExecRecord) {
+ lastExecRecordDao.updateById(lastExecRecord);
+ }
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticlePublishRangeService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticlePublishRangeService.java
new file mode 100644
index 0000000000..0f6ac51535
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticlePublishRangeService.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.voice;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.dto.stats.ArticleGridPublishedSummaryDTO;
+import com.epmet.entity.voice.ArticlePublishRangeEntity;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 文章发布范围表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-06-17
+ */
+public interface ArticlePublishRangeService extends BaseService {
+
+ /**
+ * desc: 根据客户Id 、创建日期查询 发布范围数据
+ *
+ * @param customerId
+ * @param createDate
+ * return:
+ * @date: 2020/6/17 16:59
+ * @author: jianjun liu
+ * email:liujianjun@git.elinkit.com.cn
+ */
+ List selectByCreatedDate(String customerId, Date createDate);
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticleService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticleService.java
new file mode 100644
index 0000000000..366e167ad1
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/ArticleService.java
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.voice;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.entity.voice.ArticleEntity;
+
+/**
+ * desc: 数据统计文章service
+ *
+ * return:
+ * @date: 2020/6/17 15:28
+ * @author: jianjun liu
+ * email:liujianjun@git.elinkit.com.cn
+ */
+public interface ArticleService extends BaseService {
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticlePublishRangeServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticlePublishRangeServiceImpl.java
new file mode 100644
index 0000000000..47b2e194ec
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticlePublishRangeServiceImpl.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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.constant.DataSourceConstant;
+import com.epmet.dao.voice.ArticlePublishRangeDao;
+import com.epmet.dto.stats.ArticleGridPublishedSummaryDTO;
+import com.epmet.entity.voice.ArticlePublishRangeEntity;
+import com.epmet.service.voice.ArticlePublishRangeService;
+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
+ */
+@Service
+@DataSource(DataSourceConstant.GOV_VOICE)
+public class ArticlePublishRangeServiceImpl extends BaseServiceImpl implements ArticlePublishRangeService {
+
+
+ @Override
+ public List selectByCreatedDate(String customerId, Date createDate) {
+ return baseDao.selectByCreatedDate(customerId,createDate);
+ }
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticleServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticleServiceImpl.java
new file mode 100644
index 0000000000..f1a788fc30
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/voice/impl/ArticleServiceImpl.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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.constant.DataSourceConstant;
+import com.epmet.dao.voice.ArticleDao;
+import com.epmet.entity.voice.ArticleEntity;
+import com.epmet.service.voice.ArticleService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 项目表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-05-11
+ */
+@Service
+@DataSource(DataSourceConstant.GOV_VOICE)
+public class ArticleServiceImpl extends BaseServiceImpl implements ArticleService {
+ @Autowired
+ private ArticleDao articleDao;
+
+}
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml
index b25b8a540e..5bfa6c0bb7 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml
@@ -61,19 +61,6 @@ spring:
baseline-on-migrate: true
baseline-version: 0
-#stats:
-# datasources:
-# - name: statsDatasource
-# driver-class-name: com.mysql.cj.jdbc.Driver
-# url: @datasource.druid.stats.url@
-# username: @datasource.druid.stats.username@
-# password: @datasource.druid.stats.password@
-# - name: orgDatasource
-# driver-class-name: com.mysql.cj.jdbc.Driver
-# url: @datasource.druid.org.url@
-# username: @datasource.druid.org.username@
-# password: @datasource.druid.org.password@
-
management:
endpoints:
web:
@@ -147,4 +134,22 @@ dynamic:
driver-class-name: com.mysql.cj.jdbc.Driver
url: @datasource.druid.project.url@
username: @datasource.druid.project.username@
- password: @datasource.druid.project.password@
\ No newline at end of file
+ password: @datasource.druid.project.password@
+ govVoice:
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ url: @datasource.druid.voice.url@
+ username: @datasource.druid.voice.username@
+ password: @datasource.druid.voice.password@
+ operCrm:
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ url: @datasource.druid.crm.url@
+ username: @datasource.druid.crm.username@
+ password: @datasource.druid.crm.password@
+
+thread:
+ # 线程池配置
+ threadPool:
+ corePoolSize: @thread.pool.core-pool-size@
+ maxPoolSize: @thread.pool.max-pool-size@
+ queueCapacity: @thread.pool.queue-capacity@
+ keepAlive: @thread.pool.keep-alive@
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/data_statistical.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/data_statistical.sql
new file mode 100644
index 0000000000..adeeac3769
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/data_statistical.sql
@@ -0,0 +1,650 @@
+/*================================ 宣传能力 ======================================*/
+
+/*
+ Navicat Premium Data Transfer
+
+ Source Server : localhost
+ Source Server Type : MySQL
+ Source Server Version : 50720
+ Source Host : localhost:3306
+ Source Schema : pd
+
+ Target Server Type : MySQL
+ Target Server Version : 50720
+ File Encoding : 65001
+
+ Date: 16/06/2020 18:04:53
+*/
+
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ----------------------------
+-- Table structure for fact_article_published_agency_daily
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_article_published_agency_daily`;
+CREATE TABLE `fact_article_published_agency_daily` (
+ `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID',
+ `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID',
+ `PID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级机关ID 上级机关ID',
+ `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机关ID',
+ `ARTICLE_TOTAL_COUNT` int(11) NULL DEFAULT NULL COMMENT '文章累计发文数量 文章数量',
+ `ARTICLE_PUBLISHED_COUNT` int(11) NULL DEFAULT NULL COMMENT '当前发文数量 当前未下线的文章数量',
+ `DATE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日期ID 日期ID',
+ `WEEK_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周ID 周ID eg:2020W01 = 2020年第一周',
+ `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月',
+ `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度',
+ `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年',
+ `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态',
+ `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章发布数量【机关】日统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of fact_article_published_agency_daily
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for fact_article_published_department_daily
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_article_published_department_daily`;
+CREATE TABLE `fact_article_published_department_daily` (
+ `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID',
+ `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID',
+ `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发布文章单位所属机关ID 发布文章单位所属机关ID',
+ `DEPSARTMENT_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门ID',
+ `ARTICLE_TOTAL_COUNT` int(11) NULL DEFAULT NULL COMMENT '文章累计发文数量 文章数量',
+ `ARTICLE_PUBLISHED_COUNT` int(11) NULL DEFAULT NULL COMMENT '当前发文数量 当前未下线的文章数量',
+ `DATE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日期ID 日期ID',
+ `WEEK_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周ID 周ID eg:2020W01 = 2020年第一周',
+ `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月',
+ `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度',
+ `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年',
+ `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态',
+ `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章发布数量【部门】日统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of fact_article_published_department_daily
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for fact_article_published_grid_daily
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_article_published_grid_daily`;
+CREATE TABLE `fact_article_published_grid_daily` (
+ `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID',
+ `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID',
+ `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发布单位所属机关ID 发布单位所属机关ID',
+ `GRID_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网格ID',
+ `ARTICLE_TOTAL_COUNT` int(11) NULL DEFAULT NULL COMMENT '文章累计发文数量 文章数量',
+ `ARTICLE_PUBLISHED_COUNT` int(11) NULL DEFAULT NULL COMMENT '当前发文数量 当前未下线的文章数量',
+ `DATE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日期ID 日期ID',
+ `WEEK_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周ID 周ID eg:2020W01 = 2020年第一周',
+ `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月',
+ `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度',
+ `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年',
+ `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态',
+ `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章发布数量【网格】日统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of fact_article_published_grid_daily
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for fact_tag_used_agency_daily
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_tag_used_agency_daily`;
+CREATE TABLE `fact_tag_used_agency_daily` (
+ `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID',
+ `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID',
+ `PID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级机关ID 上级机关ID',
+ `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机关ID',
+ `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID',
+ `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称',
+ `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数',
+ `DATE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日期ID 天ID eg:20200601 = 2020年6月1日、20200602 = 2020年6月2日',
+ `WEEK_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周ID 周ID eg:2020W01 = 2020年第一周',
+ `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:2020-06 = 2020年6月、2020-07 = 2020年7月',
+ `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度',
+ `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年',
+ `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态',
+ `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【机关】日统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of fact_tag_used_agency_daily
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for fact_tag_used_agency_monthly
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_tag_used_agency_monthly`;
+CREATE TABLE `fact_tag_used_agency_monthly` (
+ `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID',
+ `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID',
+ `PID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级机关ID 上级机关ID',
+ `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机关ID',
+ `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID',
+ `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称',
+ `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数',
+ `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:202006 = 2020年6月、202007 = 2020年7月',
+ `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态',
+ `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【机关】月统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of fact_tag_used_agency_monthly
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for fact_tag_used_agency_quarterly
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_tag_used_agency_quarterly`;
+CREATE TABLE `fact_tag_used_agency_quarterly` (
+ `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID',
+ `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID',
+ `PID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级机关ID 上级机关ID',
+ `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机关ID',
+ `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID',
+ `TAG_NAME` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称',
+ `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数',
+ `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度',
+ `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态',
+ `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【机关】季度统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of fact_tag_used_agency_quarterly
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for fact_tag_used_agency_yearly
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_tag_used_agency_yearly`;
+CREATE TABLE `fact_tag_used_agency_yearly` (
+ `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID',
+ `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID',
+ `PID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级机关ID 上级机关ID',
+ `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机关ID',
+ `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID',
+ `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称',
+ `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数',
+ `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年',
+ `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态',
+ `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【机关】年度统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of fact_tag_used_agency_yearly
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for fact_tag_used_department_daily
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_tag_used_department_daily`;
+CREATE TABLE `fact_tag_used_department_daily` (
+ `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID',
+ `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID',
+ `PID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级机关ID 上级机关ID',
+ `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID',
+ `DEPARTMENT_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门ID',
+ `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID',
+ `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称',
+ `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数',
+ `DATE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日期ID 天ID eg:20200601 = 2020年6月1日、20200602 = 2020年6月2日',
+ `WEEK_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周ID 周ID eg:2020W01 = 2020年第一周',
+ `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:202006 = 2020年6月、202007 = 2020年7月',
+ `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度',
+ `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年',
+ `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态',
+ `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【部门】日统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of fact_tag_used_department_daily
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for fact_tag_used_department_monthly
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_tag_used_department_monthly`;
+CREATE TABLE `fact_tag_used_department_monthly` (
+ `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID',
+ `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID',
+ `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID 文章发布所属机关ID',
+ `DEPARTMENT_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门ID',
+ `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID',
+ `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称',
+ `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数',
+ `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:202006 = 2020年6月、202007 = 2020年7月',
+ `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态',
+ `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【部门】月统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of fact_tag_used_department_monthly
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for fact_tag_used_department_quarterly
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_tag_used_department_quarterly`;
+CREATE TABLE `fact_tag_used_department_quarterly` (
+ `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID',
+ `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID',
+ `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID 文章发布所属机关ID',
+ `DEPARTMENT_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门ID',
+ `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID',
+ `TAG_NAME` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称',
+ `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数',
+ `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度',
+ `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态',
+ `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【部门】季度统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of fact_tag_used_department_quarterly
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for fact_tag_used_department_yearly
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_tag_used_department_yearly`;
+CREATE TABLE `fact_tag_used_department_yearly` (
+ `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID',
+ `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID',
+ `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID 文章发布所属机关ID',
+ `DEPARTMENT_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门ID',
+ `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID',
+ `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称',
+ `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数',
+ `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年',
+ `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态',
+ `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【部门】年度统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of fact_tag_used_department_yearly
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for fact_tag_used_grid_daily
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_tag_used_grid_daily`;
+CREATE TABLE `fact_tag_used_grid_daily` (
+ `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID',
+ `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID',
+ `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID 文章发布所属机关ID',
+ `GRID_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网格ID',
+ `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID',
+ `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称',
+ `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数',
+ `DATE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日期ID 天ID eg:20200601 = 2020年6月1日、20200602 = 2020年6月2日',
+ `WEEK_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周ID 周ID eg:2020W01 = 2020年第一周',
+ `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:202006 = 2020年6月、202007 = 2020年7月',
+ `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度',
+ `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年',
+ `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态',
+ `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【网格】日统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of fact_tag_used_grid_daily
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for fact_tag_used_grid_monthly
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_tag_used_grid_monthly`;
+CREATE TABLE `fact_tag_used_grid_monthly` (
+ `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID',
+ `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID',
+ `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID 文章发布所属机关ID',
+ `GRID_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网格ID',
+ `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID',
+ `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称',
+ `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数',
+ `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:2020-06 = 2020年6月、2020-07 = 2020年7月',
+ `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态',
+ `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【网格】月统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of fact_tag_used_grid_monthly
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for fact_tag_used_grid_quarterly
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_tag_used_grid_quarterly`;
+CREATE TABLE `fact_tag_used_grid_quarterly` (
+ `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID',
+ `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID',
+ `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID 文章发布所属机关ID',
+ `GRID_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网格ID',
+ `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID',
+ `TAG_NAME` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称',
+ `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数',
+ `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度',
+ `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态',
+ `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【网格】季度统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of fact_tag_used_grid_quarterly
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for fact_tag_used_grid_yearly
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_tag_used_grid_yearly`;
+CREATE TABLE `fact_tag_used_grid_yearly` (
+ `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID',
+ `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID',
+ `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID 文章发布所属机关ID',
+ `GRID_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网格ID',
+ `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID',
+ `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称',
+ `USED_COUNT` int(11) NULL DEFAULT NULL COMMENT '标签使用次数 标签的使用次数',
+ `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年',
+ `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态',
+ `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签【网格】年度统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of fact_tag_used_grid_yearly
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for fact_tag_viewed_agency_daily
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_tag_viewed_agency_daily`;
+CREATE TABLE `fact_tag_viewed_agency_daily` (
+ `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID',
+ `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID',
+ `PID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级机关ID 上级机关ID',
+ `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机关ID',
+ `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID',
+ `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称',
+ `TAG_READ_COUNT` int(11) NULL DEFAULT NULL COMMENT '文章引用标签阅读数 文章引用标签阅读数',
+ `DATE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日期ID 天数ID eg:20200601 = 2020年6月1日、20200602 = 2020年6月2日',
+ `WEEK_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周ID 周ID eg:2020W01 = 2020年第一周',
+ `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月',
+ `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度',
+ `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年',
+ `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态',
+ `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章引用标签阅读数量【机关】日统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of fact_tag_viewed_agency_daily
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for fact_tag_viewed_agency_monthly
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_tag_viewed_agency_monthly`;
+CREATE TABLE `fact_tag_viewed_agency_monthly` (
+ `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID',
+ `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID',
+ `PID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级机关ID 上级机关ID',
+ `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机关ID',
+ `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID',
+ `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称',
+ `TAG_READ_COUNT` int(11) NULL DEFAULT NULL COMMENT '文章引用标签阅读数 文章引用标签阅读数',
+ `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:2020-06 = 2020年6月、2020-07 = 2020年7月',
+ `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态',
+ `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章引用标签阅读数量【机关】月统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of fact_tag_viewed_agency_monthly
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for fact_tag_viewed_agency_quarterly
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_tag_viewed_agency_quarterly`;
+CREATE TABLE `fact_tag_viewed_agency_quarterly` (
+ `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID',
+ `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID',
+ `PID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级机关ID 上级机关ID',
+ `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机关ID',
+ `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID',
+ `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称',
+ `TAG_READ_COUNT` int(11) NULL DEFAULT NULL COMMENT '文章引用标签阅读数 文章引用标签阅读数',
+ `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度',
+ `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态',
+ `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章引用标签阅读数量【机关】季度统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of fact_tag_viewed_agency_quarterly
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for fact_tag_viewed_agency_yearly
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_tag_viewed_agency_yearly`;
+CREATE TABLE `fact_tag_viewed_agency_yearly` (
+ `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID',
+ `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID',
+ `PID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级机关ID 上级机关ID',
+ `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机关ID',
+ `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID',
+ `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称',
+ `TAG_READ_COUNT` int(11) NULL DEFAULT NULL COMMENT '文章引用标签阅读数 文章引用标签阅读数',
+ `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年',
+ `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态',
+ `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章引用标签阅读数量【机关】年度统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of fact_tag_viewed_agency_yearly
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for fact_tag_viewed_grid_daily
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_tag_viewed_grid_daily`;
+CREATE TABLE `fact_tag_viewed_grid_daily` (
+ `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID',
+ `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID',
+ `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID 文章发布所属机关ID',
+ `GRID_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网格ID',
+ `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID',
+ `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称',
+ `TAG_READ_COUNT` int(11) NULL DEFAULT NULL COMMENT '文章引用标签阅读数 文章引用标签阅读数',
+ `DATE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日期ID 天数ID eg:20200601 = 2020年6月1日、20200602 = 2020年6月2日',
+ `WEEK_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '周ID 周ID eg:2020W01 = 2020年第一周',
+ `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月',
+ `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度',
+ `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年',
+ `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态',
+ `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章引用标签阅读数量【网格】日统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of fact_tag_viewed_grid_daily
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for fact_tag_viewed_grid_monthly
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_tag_viewed_grid_monthly`;
+CREATE TABLE `fact_tag_viewed_grid_monthly` (
+ `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID',
+ `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID',
+ `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID 文章发布所属机关ID',
+ `GRID_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网格ID',
+ `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID',
+ `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称',
+ `TAG_READ_COUNT` int(11) NULL DEFAULT NULL COMMENT '文章引用标签阅读数 文章引用标签阅读数',
+ `MONTH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '月份ID 月份ID eg:2020-06 = 2020年6月、2020-07 = 2020年7月',
+ `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态',
+ `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章引用标签阅读数量【网格】月统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of fact_tag_viewed_grid_monthly
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for fact_tag_viewed_grid_quarterly
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_tag_viewed_grid_quarterly`;
+CREATE TABLE `fact_tag_viewed_grid_quarterly` (
+ `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID',
+ `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID',
+ `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID 文章发布所属机关ID',
+ `GRID_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网格ID',
+ `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID',
+ `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称',
+ `TAG_READ_COUNT` int(11) NULL DEFAULT NULL COMMENT '文章引用标签阅读数 文章引用标签阅读数',
+ `QUARTER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '季度ID 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度',
+ `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态',
+ `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章引用标签阅读数量【网格】季度统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of fact_tag_viewed_grid_quarterly
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for fact_tag_viewed_grid_yearly
+-- ----------------------------
+DROP TABLE IF EXISTS `fact_tag_viewed_grid_yearly`;
+CREATE TABLE `fact_tag_viewed_grid_yearly` (
+ `ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'ID ID',
+ `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户ID 客户ID',
+ `AGENCY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章发布所属机关ID 文章发布所属机关ID',
+ `GRID_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '网格ID',
+ `TAG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签ID 标签ID',
+ `TAG_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称 标签名称',
+ `TAG_READ_COUNT` int(11) NULL DEFAULT NULL COMMENT '文章引用标签阅读数 文章引用标签阅读数',
+ `YEAR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年度ID 年度ID eg:2020 = 2020年、2021 = 2021年',
+ `DEL_FLAG` int(11) NULL DEFAULT 0 COMMENT '删除状态',
+ `REVISION` int(11) NULL DEFAULT NULL COMMENT '乐观锁',
+ `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
+ `CREATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
+ `UPDATED_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`ID`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章引用标签阅读数量【网格】年度统计表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of fact_tag_viewed_grid_yearly
+-- ----------------------------
+
+SET FOREIGN_KEY_CHECKS = 1;
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerDao.xml
new file mode 100644
index 0000000000..0aac258069
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerDao.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerDepartmentDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerDepartmentDao.xml
new file mode 100644
index 0000000000..6d3bc43ce3
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerDepartmentDao.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml
new file mode 100644
index 0000000000..54e81a8d69
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml
index 937233021b..3e22e1b5c3 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml
@@ -11,6 +11,20 @@
select * from customer_agency
+
+
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimAgencyDao.xml
index c819753376..5ca1ddca1c 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimAgencyDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimAgencyDao.xml
@@ -4,6 +4,16 @@
-
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerDao.xml
index ed01bed0da..6cc8b750fd 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimCustomerDao.xml
@@ -4,6 +4,7 @@
-
-
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimDateDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimDateDao.xml
index 899d853e10..c0d460ae90 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimDateDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimDateDao.xml
@@ -3,6 +3,32 @@
+
+
+
+
+ INSERT INTO dim_date
+ (ID, DATE_NAME, DAY_OF_WEEK, DAY_OF_WEEK_NAME, WEEK_ID, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME)
+ VALUES
+ (#{id}, #{dateName}, #{dayOfWeek}, #{dayOfWeekName}, #{weekId}, #{delFlag}, #{revision}, #{createdBy}, #{createdTime}, #{updatedBy}, #{updatedTime})
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml
index 6c1d1f28ca..67d130dfde 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimGridDao.xml
@@ -3,7 +3,13 @@
-
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyProjectDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyProjectDailyDao.xml
new file mode 100644
index 0000000000..1b56baee0a
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyProjectDailyDao.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyProjectMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyProjectMonthlyDao.xml
new file mode 100644
index 0000000000..15e59960ea
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyProjectMonthlyDao.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridProjectDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridProjectDailyDao.xml
new file mode 100644
index 0000000000..42e8b29c51
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridProjectDailyDao.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridProjectMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridProjectMonthlyDao.xml
new file mode 100644
index 0000000000..67b5a3bfdd
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridProjectMonthlyDao.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/LastExecRecordDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/LastExecRecordDao.xml
new file mode 100755
index 0000000000..53f2846161
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/LastExecRecordDao.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticleDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticleDao.xml
new file mode 100644
index 0000000000..d411b3513e
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticleDao.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticlePublishRangeDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticlePublishRangeDao.xml
new file mode 100644
index 0000000000..19691045f1
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/voice/ArticlePublishRangeDao.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/InitTagFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/InitTagFormDTO.java
new file mode 100644
index 0000000000..c8517f896d
--- /dev/null
+++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/InitTagFormDTO.java
@@ -0,0 +1,18 @@
+package com.epmet.dto.form;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * desc:初始化/重新加载标签数据到数据库
+ */
+@Data
+public class InitTagFormDTO implements Serializable {
+ private static final long serialVersionUID = -4982447946629101341L;
+ /**
+ * 客户列表 list,非必填,如果不填则初始化或重新加载所有客户
+ */
+ private List customerIdList;
+}
diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/UpdateTagUseCountsResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/UpdateTagUseCountsResultDTO.java
index 8bc0f69d21..fba5e29854 100644
--- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/UpdateTagUseCountsResultDTO.java
+++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/UpdateTagUseCountsResultDTO.java
@@ -13,6 +13,15 @@ public class UpdateTagUseCountsResultDTO implements Serializable {
private static final long serialVersionUID = -6331586672885417576L;
+ public UpdateTagUseCountsResultDTO() {
+ super();
+ }
+
+ public UpdateTagUseCountsResultDTO(String tagId, String tagName) {
+ this.tagId = tagId;
+ this.tagName = tagName;
+ }
+
/**
* 标签id
*/
diff --git a/epmet-module/gov-voice/gov-voice-server/README.md b/epmet-module/gov-voice/gov-voice-server/README.md
new file mode 100644
index 0000000000..0d08501df5
--- /dev/null
+++ b/epmet-module/gov-voice/gov-voice-server/README.md
@@ -0,0 +1,6 @@
+## epmet-cloud
+
+客户(网格)标签如果redis中需要重新加载数据到redis
+执行以下命令:
+参数:customerIdList 数组 非必填;不填则刷新全部客户
+curl -H "Content-Type:application/json" -X POST --data '{"customerIdList": ["客户ID"]}' http://localhost:8105/gov/voice/tag/inittag
diff --git a/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml b/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml
index 1295d20edb..80855c22df 100644
--- a/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml
+++ b/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml
@@ -2,7 +2,7 @@ version: "3.7"
services:
gov-voice-server:
container_name: gov-voice-server-dev
- image: 192.168.1.130:10080/epmet-cloud-dev/gov-voice-server:0.3.51
+ image: 192.168.1.130:10080/epmet-cloud-dev/gov-voice-server:0.3.54
ports:
- "8105:8105"
network_mode: host # 使用现有网络
diff --git a/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-test.yml b/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-test.yml
index a9b5649b95..36b6cb3e26 100644
--- a/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-test.yml
+++ b/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-test.yml
@@ -2,7 +2,7 @@ version: "3.7"
services:
gov-voice-server:
container_name: gov-voice-server-test
- image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-voice-server:0.3.49
+ image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-voice-server:0.3.54
ports:
- "8105:8105"
network_mode: host # 使用现有网络
diff --git a/epmet-module/gov-voice/gov-voice-server/pom.xml b/epmet-module/gov-voice/gov-voice-server/pom.xml
index b4c0e841a5..713902afb2 100644
--- a/epmet-module/gov-voice/gov-voice-server/pom.xml
+++ b/epmet-module/gov-voice/gov-voice-server/pom.xml
@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- 0.3.51
+ 0.3.54gov-voicecom.epmet
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/DraftConstant.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/DraftConstant.java
index b4d0f0f12f..6ee205ec7d 100644
--- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/DraftConstant.java
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/DraftConstant.java
@@ -71,4 +71,9 @@ public interface DraftConstant {
* 草稿预览内容大小长度
*/
Integer PREVIEW_CONTENT_MAX_LENGTH = 50;
+
+ /**
+ * 草稿预览内容超过50 添加...
+ */
+ String PREVIEW_CONTENT_MORE = "...";
}
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/TagConstant.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/TagConstant.java
index b5e1375746..f2de457976 100644
--- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/TagConstant.java
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/TagConstant.java
@@ -15,30 +15,34 @@ package com.epmet.constant;
*/
public interface TagConstant {
- /**
+/* *//**
* 客户维度(政府端) 热度标签 key的前缀 【zset】
- */
+ * 完整key:GRID_TAG_KEY:客户ID
+ *//*
String GOV_TAG_KEY = "epmet:tags:customer:rankingTag:";
- /**
+ *//**
* 客户维度(政府端) 关联标签 key的前缀 【set】
- */
+ * 完整key:GRID_TAG_KEY:标签ID
+ *//*
String GOV_RETAG_KEY = "epmet:tags:customer:relationTag:";
- /**
+ *//**
* 网格热度标签(居民端) key的前缀 【zset】
- */
+ * 完整key:GRID_TAG_KEY:网格ID
+ *//*
String GRID_TAG_KEY = "epmet:tags:grid:rankingTag:";
- /**
+ *//**
* 网格关联标签(居民端) key的前缀 【set】
- */
+ * 完整key:GRID_RETAG_KEY:网格ID:标签ID
+ *//*
String GRID_RETAG_KEY ="epmet:tags:grid:relationTag:";
- /**
+ *//**
* 冒号
- */
- String COLON = ":";
+ *//*
+ String COLON = ":";*/
String BEGIN_UPDATE = "开始更新标签缓存... ...";
String SUCCESS_UPDATE = "更新标签缓存成功... ...";
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/TagController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/TagController.java
index 5dbec6fa20..bd2603685b 100644
--- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/TagController.java
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/TagController.java
@@ -1,12 +1,11 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
-import com.epmet.commons.tools.annotation.RequirePermission;
-import com.epmet.commons.tools.enums.RequirePermissionEnum;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.CorrelationTagListFormDTO;
+import com.epmet.dto.form.InitTagFormDTO;
import com.epmet.dto.form.ResiTagListFormDTO;
import com.epmet.dto.form.TagCascadeListFormDTO;
import com.epmet.dto.result.CorrelationTagListResultDTO;
@@ -72,4 +71,14 @@ public class TagController {
return new Result>().ok(tagService.tagCascadeList(formDto));
}
+ /**
+ * desc:初始化/重新加载 db标签到redis
+ * @param formDto
+ * @return
+ */
+ @PostMapping("inittag")
+ public Result initTag(@RequestBody InitTagFormDTO formDto){
+ return new Result().ok(tagService.initTag(formDto));
+ }
+
}
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticlePublishRangeDao.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticlePublishRangeDao.java
index 9d9ffa0830..9fe5fa1614 100644
--- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticlePublishRangeDao.java
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticlePublishRangeDao.java
@@ -18,7 +18,6 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
-import com.epmet.dto.ArticlePublishRangeDTO;
import com.epmet.entity.ArticlePublishRangeEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -42,5 +41,10 @@ public interface ArticlePublishRangeDao extends BaseDao selectByArticleId(ArticlePublishRangeEntity rangeEntity);
-
+ /**
+ * desc:获取网格发布的文章 用于初始化数据库标签数据到redis
+ * @param customerIdList
+ * @return
+ */
+ List selectInitData(@Param("customerIdList") List customerIdList);
}
\ No newline at end of file
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticleTagsDao.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticleTagsDao.java
index 4bba49e743..e6a006e166 100644
--- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticleTagsDao.java
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticleTagsDao.java
@@ -40,5 +40,11 @@ public interface ArticleTagsDao extends BaseDao {
* @author zxc
*/
void addArticleTags(@Param("addArticleTags")List addArticleTags);
-
+
+ /**
+ * desc:获取文章标签数据 用于初始化到redis
+ * @param customerIdList
+ * @return
+ */
+ List selectInitData(@Param("customerIdList")List customerIdList);
}
\ No newline at end of file
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/TagCustomerDao.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/TagCustomerDao.java
index ea9faaef02..edcc5ec3b5 100644
--- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/TagCustomerDao.java
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/TagCustomerDao.java
@@ -49,4 +49,10 @@ public interface TagCustomerDao extends BaseDao {
*/
void initTags(@Param("tags") List tags);
+ /**
+ * desc:获取需要初始化的客户标签
+ * @param customerIdList
+ * @return
+ */
+ List selectInitData(@Param("customerIdList") List customerIdList);
}
\ No newline at end of file
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/TagGridDao.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/TagGridDao.java
index 8dc949f8cd..26c393f3ce 100644
--- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/TagGridDao.java
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/TagGridDao.java
@@ -40,5 +40,11 @@ public interface TagGridDao extends BaseDao {
* @author zxc
*/
void updateGridTag(@Param("gridTags") List gridTags,@Param("userId")String userId);
-
+
+ /**
+ * desc:获取网格初始化数据 用于加载数据库数据到redis
+ * @param customerIdList
+ * @return
+ */
+ List selectInitData(@Param("customerIdList") List customerIdList);
}
\ No newline at end of file
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/TagRedis.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/TagRedis.java
index 47957e68dd..c8657af1a5 100644
--- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/TagRedis.java
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/redis/TagRedis.java
@@ -19,6 +19,7 @@ package com.epmet.redis;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.RenException;
+import com.epmet.commons.tools.redis.RedisKeys;
import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.constant.TagConstant;
import com.epmet.dto.form.CorrelationTagListFormDTO;
@@ -49,11 +50,28 @@ public class TagRedis {
@Autowired
private RedisTemplate redisTemplate;
- public void delete(Object[] ids) {
+ private Long zAdd(String key,Set> value) {
+ return redisTemplate.opsForZSet().add(key,value);
+ }
+ /**
+ * desc:添加或修改客户标签排行
+ * @param customerId
+ * @param value
+ * @return
+ */
+ public Long zAddCustomerTag(String customerId,Set> value){
+ return this.zAdd(RedisKeys.getCustomerTagKey(customerId),value);
}
- public void set(){
+ /**
+ * desc:添加或修改网格标签排行
+ * @param gridId
+ * @param value
+ * @return
+ */
+ public Long zAddGridTag(String gridId,Set> value){
+ return this.zAdd(RedisKeys.getGridTagKey(gridId),value);
}
/**
@@ -70,14 +88,14 @@ public class TagRedis {
if (tagIdList.size() > 1){
for (int i = NumConstant.ONE; i < tagIdList.size(); i++) {
String tagId = tagIdList.get(i);
- tagId = TagConstant.GOV_RETAG_KEY+customerId+TagConstant.COLON+tagId;
+ tagId = RedisKeys.getCustomerReTagKey(customerId,tagId);
keys.add(tagId);
}
- String key = TagConstant.GOV_RETAG_KEY+customerId+TagConstant.COLON+tagIdList.get(0);
+ String key = RedisKeys.getCustomerReTagKey(customerId,tagIdList.get(0));
objects = redisUtils.intersect(key, keys);
}else {
// 查询关联标签数量 等于1条时
- String key = TagConstant.GOV_RETAG_KEY+customerId+TagConstant.COLON+tagIdList.get(0);
+ String key = RedisKeys.getCustomerReTagKey(customerId,tagIdList.get(0));
objects = redisUtils.sMembers(key);
}
List resultList = new ArrayList<>();
@@ -95,7 +113,7 @@ public class TagRedis {
if (resultList.size() > NumConstant.ZERO) {
long start = 0;
long end = -1;
- String customerKey = TagConstant.GOV_TAG_KEY + customerId;
+ String customerKey = RedisKeys.getCustomerTagKey(customerId);
Set> typedTuples = redisUtils.zReverseRangeWithScores(customerKey, start, end);
for (CorrelationTagListResultDTO correlationTagList : resultList) {
for (ZSetOperations.TypedTuple