瀏覽代碼

公众号统计数据拆分

wangyunpeng 2 月之前
父節點
當前提交
fe08ffd0f7
共有 21 個文件被更改,包括 3519 次插入37 次删除
  1. 25 1
      api-module/src/main/java/com/tzld/piaoquan/api/controller/contentplatform/ContentPlatformDatastatController.java
  2. 30 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ContentPlatformFwhDataStatMapper.java
  3. 30 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ContentPlatformFwhDataStatTotalMapper.java
  4. 30 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ContentPlatformGzhDataStatTotalMapper.java
  5. 25 4
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ext/ContentPlatformDataStatMapperExt.java
  6. 296 12
      api-module/src/main/java/com/tzld/piaoquan/api/job/ContentPlatformDatastatJob.java
  7. 1 1
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/GzhDatastatListParam.java
  8. 90 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformFwhDataStat.java
  9. 641 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformFwhDataStatExample.java
  10. 90 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformFwhDataStatTotal.java
  11. 651 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformFwhDataStatTotalExample.java
  12. 90 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformGzhDataStatTotal.java
  13. 651 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformGzhDataStatTotalExample.java
  14. 1 1
      api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/ContentPlatformPlanService.java
  15. 37 1
      api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformDatastatServiceImpl.java
  16. 2 2
      api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformPlanServiceImpl.java
  17. 246 0
      api-module/src/main/resources/mapper/contentplatform/ContentPlatformFwhDataStatMapper.xml
  18. 246 0
      api-module/src/main/resources/mapper/contentplatform/ContentPlatformFwhDataStatTotalMapper.xml
  19. 246 0
      api-module/src/main/resources/mapper/contentplatform/ContentPlatformGzhDataStatTotalMapper.xml
  20. 88 15
      api-module/src/main/resources/mapper/contentplatform/ext/ContentPlatformDataStatMapperExt.xml
  21. 3 0
      api-module/src/main/resources/mybatis-api-contentPlatform-generator-config.xml

+ 25 - 1
api-module/src/main/java/com/tzld/piaoquan/api/controller/contentplatform/ContentPlatformDatastatController.java

@@ -48,7 +48,7 @@ public class ContentPlatformDatastatController {
         return CommonResponse.success(datastatService.qwDatastatExport(param));
     }
 
-    @ApiOperation(value = "公众号数据统计同步任务", hidden = true)
+    @ApiOperation(value = "公众号自动回复分账号数据统计同步任务", hidden = true)
     @GetMapping("/job/syncGzhDatastat")
     @JwtIgnore
     public CommonResponse<String> syncContentPlatformGzhDatastatJob(String dateStr) {
@@ -56,6 +56,30 @@ public class ContentPlatformDatastatController {
         return CommonResponse.success();
     }
 
+    @ApiOperation(value = "公众号自动回复总计数据统计同步任务", hidden = true)
+    @GetMapping("/job/syncGzhDatastatTotal")
+    @JwtIgnore
+    public CommonResponse<String> syncContentPlatformGzhDatastatTotalJob(String dateStr) {
+        job.syncContentPlatformGzhDatastatTotalJob(dateStr);
+        return CommonResponse.success();
+    }
+
+    @ApiOperation(value = "服务号总计数据统计同步任务", hidden = true)
+    @GetMapping("/job/syncFwhDatastatTotal")
+    @JwtIgnore
+    public CommonResponse<String> syncContentPlatformFwhDatastatTotalJob(String dateStr) {
+        job.syncContentPlatformFwhDatastatTotalJob(dateStr);
+        return CommonResponse.success();
+    }
+
+    @ApiOperation(value = "服务号分账号数据统计同步任务", hidden = true)
+    @GetMapping("/job/syncFwhDatastat")
+    @JwtIgnore
+    public CommonResponse<String> syncContentPlatformFwhDatastatJob(String dateStr) {
+        job.syncContentPlatformFwhDatastatJob(dateStr);
+        return CommonResponse.success();
+    }
+
     @ApiOperation(value = "企微数据统计同步任务", hidden = true)
     @GetMapping("/job/syncQwDatastat")
     @JwtIgnore

+ 30 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ContentPlatformFwhDataStatMapper.java

@@ -0,0 +1,30 @@
+package com.tzld.piaoquan.api.dao.mapper.contentplatform;
+
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformFwhDataStat;
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformFwhDataStatExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface ContentPlatformFwhDataStatMapper {
+    long countByExample(ContentPlatformFwhDataStatExample example);
+
+    int deleteByExample(ContentPlatformFwhDataStatExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(ContentPlatformFwhDataStat record);
+
+    int insertSelective(ContentPlatformFwhDataStat record);
+
+    List<ContentPlatformFwhDataStat> selectByExample(ContentPlatformFwhDataStatExample example);
+
+    ContentPlatformFwhDataStat selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") ContentPlatformFwhDataStat record, @Param("example") ContentPlatformFwhDataStatExample example);
+
+    int updateByExample(@Param("record") ContentPlatformFwhDataStat record, @Param("example") ContentPlatformFwhDataStatExample example);
+
+    int updateByPrimaryKeySelective(ContentPlatformFwhDataStat record);
+
+    int updateByPrimaryKey(ContentPlatformFwhDataStat record);
+}

+ 30 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ContentPlatformFwhDataStatTotalMapper.java

@@ -0,0 +1,30 @@
+package com.tzld.piaoquan.api.dao.mapper.contentplatform;
+
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformFwhDataStatTotal;
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformFwhDataStatTotalExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface ContentPlatformFwhDataStatTotalMapper {
+    long countByExample(ContentPlatformFwhDataStatTotalExample example);
+
+    int deleteByExample(ContentPlatformFwhDataStatTotalExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(ContentPlatformFwhDataStatTotal record);
+
+    int insertSelective(ContentPlatformFwhDataStatTotal record);
+
+    List<ContentPlatformFwhDataStatTotal> selectByExample(ContentPlatformFwhDataStatTotalExample example);
+
+    ContentPlatformFwhDataStatTotal selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") ContentPlatformFwhDataStatTotal record, @Param("example") ContentPlatformFwhDataStatTotalExample example);
+
+    int updateByExample(@Param("record") ContentPlatformFwhDataStatTotal record, @Param("example") ContentPlatformFwhDataStatTotalExample example);
+
+    int updateByPrimaryKeySelective(ContentPlatformFwhDataStatTotal record);
+
+    int updateByPrimaryKey(ContentPlatformFwhDataStatTotal record);
+}

+ 30 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ContentPlatformGzhDataStatTotalMapper.java

@@ -0,0 +1,30 @@
+package com.tzld.piaoquan.api.dao.mapper.contentplatform;
+
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhDataStatTotal;
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhDataStatTotalExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface ContentPlatformGzhDataStatTotalMapper {
+    long countByExample(ContentPlatformGzhDataStatTotalExample example);
+
+    int deleteByExample(ContentPlatformGzhDataStatTotalExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(ContentPlatformGzhDataStatTotal record);
+
+    int insertSelective(ContentPlatformGzhDataStatTotal record);
+
+    List<ContentPlatformGzhDataStatTotal> selectByExample(ContentPlatformGzhDataStatTotalExample example);
+
+    ContentPlatformGzhDataStatTotal selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") ContentPlatformGzhDataStatTotal record, @Param("example") ContentPlatformGzhDataStatTotalExample example);
+
+    int updateByExample(@Param("record") ContentPlatformGzhDataStatTotal record, @Param("example") ContentPlatformGzhDataStatTotalExample example);
+
+    int updateByPrimaryKeySelective(ContentPlatformGzhDataStatTotal record);
+
+    int updateByPrimaryKey(ContentPlatformGzhDataStatTotal record);
+}

+ 25 - 4
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ext/ContentPlatformDataStatMapperExt.java

@@ -2,10 +2,7 @@ package com.tzld.piaoquan.api.dao.mapper.contentplatform.ext;
 
 import com.tzld.piaoquan.api.model.param.contentplatform.GzhDatastatListParam;
 import com.tzld.piaoquan.api.model.param.contentplatform.QwDatastatListParam;
-import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhDataStat;
-import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformQwDataStat;
-import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformQwDataStatReplyTotal;
-import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformQwDataStatTotal;
+import com.tzld.piaoquan.api.model.po.contentplatform.*;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -26,6 +23,20 @@ public interface ContentPlatformDataStatMapperExt {
                                                              @Param("offset") int offset,
                                                              @Param("pageSize") Integer pageSize);
 
+    int getFwhAccountDatastatCount(@Param("param") GzhDatastatListParam param, @Param("createAccountId") Long createAccountId);
+
+    List<ContentPlatformGzhDataStat> getFwhAccountDatastatList(@Param("param") GzhDatastatListParam param,
+                                                               @Param("createAccountId") Long createAccountId,
+                                                               @Param("offset") int offset,
+                                                               @Param("pageSize") Integer pageSize);
+
+    Integer getFwhTotalDatastatCount(@Param("param") GzhDatastatListParam param, @Param("createAccountId") Long createAccountId);
+
+    List<ContentPlatformGzhDataStat> getFwhTotalDatastatList(@Param("param") GzhDatastatListParam param,
+                                                             @Param("createAccountId") Long createAccountId,
+                                                             @Param("offset") int offset,
+                                                             @Param("pageSize") Integer pageSize);
+
     Integer getQwRootSourceIdDatastatCount(@Param("param") QwDatastatListParam param, @Param("createAccountId") Long createAccountId);
 
     List<ContentPlatformQwDataStat> getQwRootSourceIdDatastatList(@Param("param") QwDatastatListParam param,
@@ -66,6 +77,12 @@ public interface ContentPlatformDataStatMapperExt {
 
     void batchInsertGzhDatastat(@Param("records") List<ContentPlatformGzhDataStat> saveList);
 
+    void batchInsertGzhDatastatTotal(@Param("records") List<ContentPlatformGzhDataStatTotal> saveList);
+
+    void batchInsertFwhDatastat(@Param("records") List<ContentPlatformFwhDataStat> saveList);
+
+    void batchInsertFwhDatastatTotal(@Param("records") List<ContentPlatformFwhDataStatTotal> saveList);
+
     void batchInsertQwDatastat(@Param("records") List<ContentPlatformQwDataStat> saveList);
 
     void batchInsertQwDatastatTotal(@Param("records") List<ContentPlatformQwDataStatTotal> saveList);
@@ -79,4 +96,8 @@ public interface ContentPlatformDataStatMapperExt {
     void deleteQwDatastatTotal(@Param("dt") String dt);
 
     void deleteQwDatastatReplyTotal(@Param("dt") String dt);
+
+    void deleteGzhDatastatTotal(@Param("dt") String dt);
+
+    void deleteFwhDatastatTotal(@Param("dt") String dt);
 }

+ 296 - 12
api-module/src/main/java/com/tzld/piaoquan/api/job/ContentPlatformDatastatJob.java

@@ -1,6 +1,7 @@
 package com.tzld.piaoquan.api.job;
 
 import com.aliyun.odps.data.Record;
+import com.tzld.piaoquan.api.common.enums.contentplatform.ContentPlatformGzhPlanTypeEnum;
 import com.tzld.piaoquan.api.component.AigcApiService;
 import com.tzld.piaoquan.api.dao.mapper.contentplatform.*;
 import com.tzld.piaoquan.api.dao.mapper.contentplatform.ext.ContentPlatformDataStatMapperExt;
@@ -30,13 +31,16 @@ public class ContentPlatformDatastatJob {
     private ContentPlatformGzhDataStatMapper gzhDataStatMapper;
 
     @Autowired
-    private ContentPlatformGzhAccountMapper gzhAccountMapper;
+    private ContentPlatformFwhDataStatMapper fwhDataStatMapper;
 
     @Autowired
-    private ContentPlatformQwDataStatMapper qwDataStatMapper;
+    private ContentPlatformAccountMapper accountMapper;
 
     @Autowired
-    private ContentPlatformQwDataStatTotalMapper qwDataStatTotalMapper;
+    private ContentPlatformGzhAccountMapper gzhAccountMapper;
+
+    @Autowired
+    private ContentPlatformQwDataStatMapper qwDataStatMapper;
 
     @Autowired
     private ContentPlatformQwPlanMapper qwPlanMapper;
@@ -77,7 +81,8 @@ public class ContentPlatformDatastatJob {
         List<WxAccountDatastatVO> wxAccountDatastatVOList = aigcApiService.getWxAccountDatastat(dateStr, accountExternalIds);
         Map<String, WxAccountDatastatVO> wxAccountDatastatMap = wxAccountDatastatVOList.stream()
                 .collect(Collectors.toMap(WxAccountDatastatVO::getAccountId, wxAccountDatastatVO -> wxAccountDatastatVO));
-        List<ContentPlatformGzhPlan> gzhPlanList = planService.getGzhPlanListByCooperateAccountIds(accountIds);
+        List<ContentPlatformGzhPlan> gzhPlanList = planService.getGzhPlanListByCooperateAccountIds(accountIds,
+                ContentPlatformGzhPlanTypeEnum.AUTO_REPLY.getVal());
         List<Long> planIds = gzhPlanList.stream().map(ContentPlatformGzhPlan::getId).collect(Collectors.toList());
         Map<Long, List<Long>> gzhPlanMap = gzhPlanList.stream()
                .collect(Collectors.groupingBy(ContentPlatformGzhPlan::getAccountId,
@@ -139,6 +144,287 @@ public class ContentPlatformDatastatJob {
         return ReturnT.SUCCESS;
     }
 
+    @XxlJob("syncContentPlatformGzhDatastatTotalJob")
+    public ReturnT<String> syncContentPlatformGzhDatastatTotalJob(String param) {
+        String dt = DateUtil.getBeforeDayDateString("yyyyMMdd");
+        if (StringUtils.hasText(param)) {
+            dt = param;
+        }
+        Long now = System.currentTimeMillis();
+        // 公众号自动回复数据统计
+        String sql = String.format("SELECT company_shortname, 首层访问人数, dt " +
+                "FROM loghubods.loghubods.gzh_autoreply_behavior_uv_total_agent WHERE dt=%s;", dt);
+        List<Record> dataList = OdpsUtil.getOdpsData(sql);
+        // 所有公众号
+        List<ContentPlatformAccount> accountList = getAllAccount();
+        Map<String, ContentPlatformAccount> accountMap = accountList.stream()
+              .collect(Collectors.toMap(ContentPlatformAccount::getChannel, account -> account));
+        List<ContentPlatformGzhAccount> gzhAccountList = getAllGzhAccount();
+        Map<Long, List<ContentPlatformGzhAccount>> gzhAccountMap = gzhAccountList.stream()
+                .collect(Collectors.groupingBy(ContentPlatformGzhAccount::getCreateAccountId));
+        List<Long> accountIds = gzhAccountList.stream().map(ContentPlatformGzhAccount::getId).collect(Collectors.toList());
+        List<String> accountExternalIds = gzhAccountList.stream().map(ContentPlatformGzhAccount::getExternalId).collect(Collectors.toList());
+        String dateStr = DateUtil.getBeforeDayDateString("yyyy-MM-dd");
+        List<WxAccountDatastatVO> wxAccountDatastatVOList = aigcApiService.getWxAccountDatastat(dateStr, accountExternalIds);
+        Map<String, WxAccountDatastatVO> wxAccountDatastatMap = wxAccountDatastatVOList.stream()
+                .collect(Collectors.toMap(WxAccountDatastatVO::getAccountId, wxAccountDatastatVO -> wxAccountDatastatVO));
+        List<ContentPlatformGzhPlan> gzhPlanList = planService.getGzhPlanListByCooperateAccountIds(accountIds,
+                ContentPlatformGzhPlanTypeEnum.AUTO_REPLY.getVal());
+        List<Long> planIds = gzhPlanList.stream().map(ContentPlatformGzhPlan::getId).collect(Collectors.toList());
+        Map<Long, List<Long>> gzhPlanMap = gzhPlanList.stream()
+               .collect(Collectors.groupingBy(ContentPlatformGzhPlan::getAccountId,
+                       Collectors.mapping(ContentPlatformGzhPlan::getId, Collectors.toList())));
+        List<ContentPlatformGzhPlanVideo> gzhPlanVideoList = planService.getGzhPlanVideoList(planIds);
+        Map<Long, List<ContentPlatformGzhPlanVideo>> gzhPlanVideoMap = gzhPlanVideoList.stream()
+              .collect(Collectors.groupingBy(ContentPlatformGzhPlanVideo::getPlanId));
+        List<Long> videoIds = gzhPlanVideoList.stream().map(ContentPlatformGzhPlanVideo::getVideoId).collect(Collectors.toList());
+        List<ContentPlatformVideo> contentPlatformVideoList = planService.getVideoContentListByVideoIds(videoIds);
+        Map<Long, ContentPlatformVideo> videoMap = contentPlatformVideoList.stream()
+              .collect(Collectors.toMap(ContentPlatformVideo::getVideoId, video -> video, (a, b) -> a));
+        if (CollectionUtils.isNotEmpty(dataList)) {
+            List<ContentPlatformGzhDataStatTotal> saveList = new ArrayList<>();
+            for (Record record : dataList) {
+                ContentPlatformGzhDataStatTotal item = new ContentPlatformGzhDataStatTotal();
+                String channel = record.getString(0);
+                Integer firstLevelCount = Integer.valueOf((String) record.get(1));
+                item.setDateStr(dt);
+                item.setChannel(channel);
+                item.setFirstLevelCount(firstLevelCount);
+                ContentPlatformAccount account = accountMap.get(channel);
+                if (Objects.isNull(account)) {
+                    continue;
+                }
+                List<ContentPlatformGzhAccount> gzhAccounts = gzhAccountMap.get(account.getId());
+                int fansIncreaseCount = 0;
+                Double score = 0.0;
+                int size = 0;
+                for (ContentPlatformGzhAccount gzhAccount : gzhAccounts) {
+                    WxAccountDatastatVO wxAccountDatastatVO = wxAccountDatastatMap.get(gzhAccount.getExternalId());
+                    if (Objects.nonNull(wxAccountDatastatVO)) {
+                        fansIncreaseCount += wxAccountDatastatVO.getFansIncreaseCount();
+                    }
+                    List<Long> planIdList = gzhPlanMap.get(gzhAccount.getId());
+                    if (CollectionUtils.isEmpty(planIdList)) {
+                        continue;
+                    }
+                    for (Long planId : planIdList) {
+                        List<ContentPlatformGzhPlanVideo> videoList = gzhPlanVideoMap.get(planId);
+                        if (CollectionUtils.isNotEmpty(videoList)) {
+                            List<Long> itemVideoIds = videoList.stream().map(ContentPlatformGzhPlanVideo::getVideoId).collect(Collectors.toList());
+                            for (Long videoId : itemVideoIds) {
+                                if (Objects.nonNull(videoMap.get(videoId))) {
+                                    score += videoMap.get(videoId).getScore();
+                                }
+                            }
+                            size += videoList.size();
+                        }
+                    }
+                }
+                item.setFansIncreaseCount(fansIncreaseCount);
+                if (size > 0) {
+                    BigDecimal num = BigDecimal.valueOf(score / size);
+                    BigDecimal rounded = num.setScale(2, RoundingMode.HALF_UP);
+                    item.setScore(rounded.doubleValue());
+                }
+                item.setCreateTimestamp(now);
+                saveList.add(item);
+            }
+            if (CollectionUtils.isNotEmpty(saveList)) {
+                dataStatMapperExt.deleteGzhDatastatTotal(dt);
+                dataStatMapperExt.batchInsertGzhDatastatTotal(saveList);
+            }
+        }
+        return ReturnT.SUCCESS;
+    }
+
+    @XxlJob("syncContentPlatformFwhDatastatJob")
+    public ReturnT<String> syncContentPlatformFwhDatastatJob(String param) {
+        String dt = DateUtil.getBeforeDayDateString("yyyyMMdd");
+        if (StringUtils.hasText(param)) {
+            dt = param;
+        }
+        long count = getFwhDatastatCount(dt);
+        if (count > 0) {
+            return ReturnT.SUCCESS;
+        }
+        Long now = System.currentTimeMillis();
+        // 公众号自动回复数据统计
+        String sql = String.format("SELECT ghid, 首层访问人数, dt " +
+                "FROM loghubods.loghubods.fwhhzdyy_data_per_ghid WHERE dt=%s;", dt);
+        List<Record> dataList = OdpsUtil.getOdpsData(sql);
+        // 所有公众号
+        List<ContentPlatformGzhAccount> accountList = getAllGzhAccount();
+        Map<String, ContentPlatformGzhAccount> accountMap = accountList.stream()
+                .collect(Collectors.toMap(ContentPlatformGzhAccount::getGhId, account -> account));
+        List<Long> accountIds = accountList.stream().map(ContentPlatformGzhAccount::getId).collect(Collectors.toList());
+        List<String> ghIds = accountList.stream().map(ContentPlatformGzhAccount::getGhId).collect(Collectors.toList());
+        List<String> accountExternalIds = accountList.stream().map(ContentPlatformGzhAccount::getExternalId).collect(Collectors.toList());
+        String dateStr = DateUtil.getBeforeDayDateString("yyyy-MM-dd");
+        List<WxAccountDatastatVO> wxAccountDatastatVOList = aigcApiService.getWxAccountDatastat(dateStr, accountExternalIds);
+        Map<String, WxAccountDatastatVO> wxAccountDatastatMap = wxAccountDatastatVOList.stream()
+                .collect(Collectors.toMap(WxAccountDatastatVO::getAccountId, wxAccountDatastatVO -> wxAccountDatastatVO));
+        List<ContentPlatformGzhPlan> gzhPlanList = planService.getGzhPlanListByCooperateAccountIds(accountIds,
+                ContentPlatformGzhPlanTypeEnum.FWH_PUSH.getVal());
+        List<Long> planIds = gzhPlanList.stream().map(ContentPlatformGzhPlan::getId).collect(Collectors.toList());
+        Map<Long, List<Long>> gzhPlanMap = gzhPlanList.stream()
+               .collect(Collectors.groupingBy(ContentPlatformGzhPlan::getAccountId,
+                       Collectors.mapping(ContentPlatformGzhPlan::getId, Collectors.toList())));
+        List<ContentPlatformGzhPlanVideo> gzhPlanVideoList = planService.getGzhPlanVideoList(planIds);
+        Map<Long, List<ContentPlatformGzhPlanVideo>> gzhPlanVideoMap = gzhPlanVideoList.stream()
+              .collect(Collectors.groupingBy(ContentPlatformGzhPlanVideo::getPlanId));
+        List<Long> videoIds = gzhPlanVideoList.stream().map(ContentPlatformGzhPlanVideo::getVideoId).collect(Collectors.toList());
+        List<ContentPlatformVideo> contentPlatformVideoList = planService.getVideoContentListByVideoIds(videoIds);
+        Map<Long, ContentPlatformVideo> videoMap = contentPlatformVideoList.stream()
+              .collect(Collectors.toMap(ContentPlatformVideo::getVideoId, video -> video, (a, b) -> a));
+        if (CollectionUtils.isNotEmpty(dataList)) {
+            List<ContentPlatformFwhDataStat> saveList = new ArrayList<>();
+            for (Record record : dataList) {
+                ContentPlatformFwhDataStat item = new ContentPlatformFwhDataStat();
+                String ghId = (String) record.get(0);
+                Integer firstLevelCount = Integer.valueOf((String) record.get(1));
+                item.setDateStr(dt);
+                if (!ghIds.contains(ghId)) {
+                    continue;
+                }
+                ContentPlatformGzhAccount gzhAccount = accountMap.get(ghId);
+                item.setAccountId(gzhAccount.getId());
+                item.setFirstLevelCount(firstLevelCount);
+                WxAccountDatastatVO wxAccountDatastatVO = wxAccountDatastatMap.get(gzhAccount.getExternalId());
+                if (Objects.nonNull(wxAccountDatastatVO)) {
+                    item.setFansIncreaseCount(wxAccountDatastatVO.getFansIncreaseCount());
+                }
+                List<Long> planIdList = gzhPlanMap.get(gzhAccount.getId());
+                if (CollectionUtils.isEmpty(planIdList)) {
+                    continue;
+                }
+                Double score = 0.0;
+                int size = 0;
+                for (Long planId : planIdList) {
+                    List<ContentPlatformGzhPlanVideo> videoList = gzhPlanVideoMap.get(planId);
+                    if (CollectionUtils.isNotEmpty(videoList)) {
+                        List<Long> itemVideoIds = videoList.stream().map(ContentPlatformGzhPlanVideo::getVideoId).collect(Collectors.toList());
+                        for (Long videoId : itemVideoIds) {
+                            if (Objects.nonNull(videoMap.get(videoId))) {
+                                score += videoMap.get(videoId).getScore();
+                            }
+                        }
+                        size += videoList.size();
+                    }
+                }
+                if (size > 0) {
+                    BigDecimal num = BigDecimal.valueOf(score / size);
+                    BigDecimal rounded = num.setScale(2, RoundingMode.HALF_UP);
+                    item.setScore(rounded.doubleValue());
+                }
+                item.setCreateTimestamp(now);
+                saveList.add(item);
+            }
+            if (CollectionUtils.isNotEmpty(saveList)) {
+                dataStatMapperExt.batchInsertFwhDatastat(saveList);
+            }
+        }
+        return ReturnT.SUCCESS;
+    }
+
+    @XxlJob("syncContentPlatformFwhDatastatTotalJob")
+    public ReturnT<String> syncContentPlatformFwhDatastatTotalJob(String param) {
+        String dt = DateUtil.getBeforeDayDateString("yyyyMMdd");
+        if (StringUtils.hasText(param)) {
+            dt = param;
+        }
+        Long now = System.currentTimeMillis();
+        // 公众号自动回复数据统计
+        String sql = String.format("SELECT channel, 首层访问人数, dt " +
+                "FROM loghubods.loghubods.fwhhzdyy_data_per_channel WHERE dt=%s;", dt);
+        List<Record> dataList = OdpsUtil.getOdpsData(sql);
+        // 所有公众号
+        List<ContentPlatformAccount> accountList = getAllAccount();
+        Map<String, ContentPlatformAccount> accountMap = accountList.stream()
+                .collect(Collectors.toMap(ContentPlatformAccount::getChannel, account -> account));
+        List<ContentPlatformGzhAccount> gzhAccountList = getAllGzhAccount();
+        Map<Long, List<ContentPlatformGzhAccount>> gzhAccountMap = gzhAccountList.stream()
+                .collect(Collectors.groupingBy(ContentPlatformGzhAccount::getCreateAccountId));
+        List<Long> accountIds = gzhAccountList.stream().map(ContentPlatformGzhAccount::getId).collect(Collectors.toList());
+        List<String> accountExternalIds = gzhAccountList.stream().map(ContentPlatformGzhAccount::getExternalId).collect(Collectors.toList());
+        String dateStr = DateUtil.getBeforeDayDateString("yyyy-MM-dd");
+        List<WxAccountDatastatVO> wxAccountDatastatVOList = aigcApiService.getWxAccountDatastat(dateStr, accountExternalIds);
+        Map<String, WxAccountDatastatVO> wxAccountDatastatMap = wxAccountDatastatVOList.stream()
+                .collect(Collectors.toMap(WxAccountDatastatVO::getAccountId, wxAccountDatastatVO -> wxAccountDatastatVO));
+        List<ContentPlatformGzhPlan> gzhPlanList = planService.getGzhPlanListByCooperateAccountIds(accountIds,
+                ContentPlatformGzhPlanTypeEnum.FWH_PUSH.getVal());
+        List<Long> planIds = gzhPlanList.stream().map(ContentPlatformGzhPlan::getId).collect(Collectors.toList());
+        Map<Long, List<Long>> gzhPlanMap = gzhPlanList.stream()
+                .collect(Collectors.groupingBy(ContentPlatformGzhPlan::getAccountId,
+                        Collectors.mapping(ContentPlatformGzhPlan::getId, Collectors.toList())));
+        List<ContentPlatformGzhPlanVideo> gzhPlanVideoList = planService.getGzhPlanVideoList(planIds);
+        Map<Long, List<ContentPlatformGzhPlanVideo>> gzhPlanVideoMap = gzhPlanVideoList.stream()
+                .collect(Collectors.groupingBy(ContentPlatformGzhPlanVideo::getPlanId));
+        List<Long> videoIds = gzhPlanVideoList.stream().map(ContentPlatformGzhPlanVideo::getVideoId).collect(Collectors.toList());
+        List<ContentPlatformVideo> contentPlatformVideoList = planService.getVideoContentListByVideoIds(videoIds);
+        Map<Long, ContentPlatformVideo> videoMap = contentPlatformVideoList.stream()
+                .collect(Collectors.toMap(ContentPlatformVideo::getVideoId, video -> video, (a, b) -> a));
+        if (CollectionUtils.isNotEmpty(dataList)) {
+            List<ContentPlatformFwhDataStatTotal> saveList = new ArrayList<>();
+            for (Record record : dataList) {
+                ContentPlatformFwhDataStatTotal item = new ContentPlatformFwhDataStatTotal();
+                String channel = record.getString(0);
+                Integer firstLevelCount = Integer.valueOf((String) record.get(1));
+                item.setDateStr(dt);
+                item.setChannel(channel);
+                item.setFirstLevelCount(firstLevelCount);
+                ContentPlatformAccount account = accountMap.get(channel);
+                if (Objects.isNull(account)) {
+                    continue;
+                }
+                List<ContentPlatformGzhAccount> gzhAccounts = gzhAccountMap.get(account.getId());
+                int fansIncreaseCount = 0;
+                Double score = 0.0;
+                int size = 0;
+                for (ContentPlatformGzhAccount gzhAccount : gzhAccounts) {
+                    WxAccountDatastatVO wxAccountDatastatVO = wxAccountDatastatMap.get(gzhAccount.getExternalId());
+                    if (Objects.nonNull(wxAccountDatastatVO)) {
+                        fansIncreaseCount += wxAccountDatastatVO.getFansIncreaseCount();
+                    }
+                    List<Long> planIdList = gzhPlanMap.get(gzhAccount.getId());
+                    if (CollectionUtils.isEmpty(planIdList)) {
+                        continue;
+                    }
+                    for (Long planId : planIdList) {
+                        List<ContentPlatformGzhPlanVideo> videoList = gzhPlanVideoMap.get(planId);
+                        if (CollectionUtils.isNotEmpty(videoList)) {
+                            List<Long> itemVideoIds = videoList.stream().map(ContentPlatformGzhPlanVideo::getVideoId).collect(Collectors.toList());
+                            for (Long videoId : itemVideoIds) {
+                                if (Objects.nonNull(videoMap.get(videoId))) {
+                                    score += videoMap.get(videoId).getScore();
+                                }
+                            }
+                            size += videoList.size();
+                        }
+                    }
+                }
+                item.setFansIncreaseCount(fansIncreaseCount);
+                if (size > 0) {
+                    BigDecimal num = BigDecimal.valueOf(score / size);
+                    BigDecimal rounded = num.setScale(2, RoundingMode.HALF_UP);
+                    item.setScore(rounded.doubleValue());
+                }
+                item.setCreateTimestamp(now);
+                saveList.add(item);
+            }
+            if (CollectionUtils.isNotEmpty(saveList)) {
+                dataStatMapperExt.deleteFwhDatastatTotal(dt);
+                dataStatMapperExt.batchInsertFwhDatastatTotal(saveList);
+            }
+        }
+        return ReturnT.SUCCESS;
+    }
+
+    private List<ContentPlatformAccount> getAllAccount() {
+        ContentPlatformAccountExample example = new ContentPlatformAccountExample();
+        example.createCriteria().andStatusEqualTo(1);
+        return accountMapper.selectByExample(example);
+    }
+
     private List<ContentPlatformGzhAccount> getAllGzhAccount() {
         ContentPlatformGzhAccountExample example = new ContentPlatformGzhAccountExample();
         example.createCriteria().andStatusEqualTo(1);
@@ -151,16 +437,16 @@ public class ContentPlatformDatastatJob {
         return gzhDataStatMapper.countByExample(example);
     }
 
-    private List<ContentPlatformQwDataStat> getQwDatastatCount(String dt) {
-        ContentPlatformQwDataStatExample example = new ContentPlatformQwDataStatExample();
+    private long getFwhDatastatCount(String dt) {
+        ContentPlatformFwhDataStatExample example = new ContentPlatformFwhDataStatExample();
         example.createCriteria().andDateStrEqualTo(dt);
-        return qwDataStatMapper.selectByExample(example);
+        return fwhDataStatMapper.countByExample(example);
     }
 
-    private long getQwDatastatTotalCount(String dt) {
-        ContentPlatformQwDataStatTotalExample example = new ContentPlatformQwDataStatTotalExample();
+    private List<ContentPlatformQwDataStat> getQwDatastatCount(String dt) {
+        ContentPlatformQwDataStatExample example = new ContentPlatformQwDataStatExample();
         example.createCriteria().andDateStrEqualTo(dt);
-        return qwDataStatTotalMapper.countByExample(example);
+        return qwDataStatMapper.selectByExample(example);
     }
 
     @XxlJob("syncContentPlatformQwDatastatJob")
@@ -261,7 +547,6 @@ public class ContentPlatformDatastatJob {
         return qwPlanMapper.selectByExample(example);
     }
 
-
     @XxlJob("syncContentPlatformQwDatastatTotalJob")
     public ReturnT<String> syncContentPlatformQwDatastatTotalJob(String param) {
         String dt = DateUtil.getBeforeDayDateString("yyyyMMdd");
@@ -338,7 +623,6 @@ public class ContentPlatformDatastatJob {
         return ReturnT.SUCCESS;
     }
 
-
     @XxlJob("syncContentPlatformQwDatastatReplyTotalJob")
     public ReturnT<String> syncContentPlatformQwDatastatReplyTotalJob(String param) {
         String dt = DateUtil.getBeforeDayDateString("yyyyMMdd");

+ 1 - 1
api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/GzhDatastatListParam.java

@@ -7,7 +7,7 @@ import lombok.Data;
 @Data
 public class GzhDatastatListParam extends PageParam {
 
-    @ApiModelProperty(value = "0-总计 1-分账号")
+    @ApiModelProperty(value = "0-自动回复总计 1-自动回复分账号 2-服务号总计 3-服务号分账号")
     private Integer type;
 
     @ApiModelProperty(value = "公众号id")

+ 90 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformFwhDataStat.java

@@ -0,0 +1,90 @@
+package com.tzld.piaoquan.api.model.po.contentplatform;
+
+public class ContentPlatformFwhDataStat {
+    private Long id;
+
+    private String dateStr;
+
+    private Long accountId;
+
+    private Integer fansIncreaseCount;
+
+    private Integer firstLevelCount;
+
+    private Double score;
+
+    private Long createTimestamp;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getDateStr() {
+        return dateStr;
+    }
+
+    public void setDateStr(String dateStr) {
+        this.dateStr = dateStr;
+    }
+
+    public Long getAccountId() {
+        return accountId;
+    }
+
+    public void setAccountId(Long accountId) {
+        this.accountId = accountId;
+    }
+
+    public Integer getFansIncreaseCount() {
+        return fansIncreaseCount;
+    }
+
+    public void setFansIncreaseCount(Integer fansIncreaseCount) {
+        this.fansIncreaseCount = fansIncreaseCount;
+    }
+
+    public Integer getFirstLevelCount() {
+        return firstLevelCount;
+    }
+
+    public void setFirstLevelCount(Integer firstLevelCount) {
+        this.firstLevelCount = firstLevelCount;
+    }
+
+    public Double getScore() {
+        return score;
+    }
+
+    public void setScore(Double score) {
+        this.score = score;
+    }
+
+    public Long getCreateTimestamp() {
+        return createTimestamp;
+    }
+
+    public void setCreateTimestamp(Long createTimestamp) {
+        this.createTimestamp = createTimestamp;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", dateStr=").append(dateStr);
+        sb.append(", accountId=").append(accountId);
+        sb.append(", fansIncreaseCount=").append(fansIncreaseCount);
+        sb.append(", firstLevelCount=").append(firstLevelCount);
+        sb.append(", score=").append(score);
+        sb.append(", createTimestamp=").append(createTimestamp);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 641 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformFwhDataStatExample.java

@@ -0,0 +1,641 @@
+package com.tzld.piaoquan.api.model.po.contentplatform;
+
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ContentPlatformFwhDataStatExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public ContentPlatformFwhDataStatExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    public Page getPage() {
+        return page;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrIsNull() {
+            addCriterion("date_str is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrIsNotNull() {
+            addCriterion("date_str is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrEqualTo(String value) {
+            addCriterion("date_str =", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotEqualTo(String value) {
+            addCriterion("date_str <>", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrGreaterThan(String value) {
+            addCriterion("date_str >", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrGreaterThanOrEqualTo(String value) {
+            addCriterion("date_str >=", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrLessThan(String value) {
+            addCriterion("date_str <", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrLessThanOrEqualTo(String value) {
+            addCriterion("date_str <=", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrLike(String value) {
+            addCriterion("date_str like", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotLike(String value) {
+            addCriterion("date_str not like", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrIn(List<String> values) {
+            addCriterion("date_str in", values, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotIn(List<String> values) {
+            addCriterion("date_str not in", values, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrBetween(String value1, String value2) {
+            addCriterion("date_str between", value1, value2, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotBetween(String value1, String value2) {
+            addCriterion("date_str not between", value1, value2, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdIsNull() {
+            addCriterion("account_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdIsNotNull() {
+            addCriterion("account_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdEqualTo(Long value) {
+            addCriterion("account_id =", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdNotEqualTo(Long value) {
+            addCriterion("account_id <>", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdGreaterThan(Long value) {
+            addCriterion("account_id >", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("account_id >=", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdLessThan(Long value) {
+            addCriterion("account_id <", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdLessThanOrEqualTo(Long value) {
+            addCriterion("account_id <=", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdIn(List<Long> values) {
+            addCriterion("account_id in", values, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdNotIn(List<Long> values) {
+            addCriterion("account_id not in", values, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdBetween(Long value1, Long value2) {
+            addCriterion("account_id between", value1, value2, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdNotBetween(Long value1, Long value2) {
+            addCriterion("account_id not between", value1, value2, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountIsNull() {
+            addCriterion("fans_increase_count is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountIsNotNull() {
+            addCriterion("fans_increase_count is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountEqualTo(Integer value) {
+            addCriterion("fans_increase_count =", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountNotEqualTo(Integer value) {
+            addCriterion("fans_increase_count <>", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountGreaterThan(Integer value) {
+            addCriterion("fans_increase_count >", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountGreaterThanOrEqualTo(Integer value) {
+            addCriterion("fans_increase_count >=", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountLessThan(Integer value) {
+            addCriterion("fans_increase_count <", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountLessThanOrEqualTo(Integer value) {
+            addCriterion("fans_increase_count <=", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountIn(List<Integer> values) {
+            addCriterion("fans_increase_count in", values, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountNotIn(List<Integer> values) {
+            addCriterion("fans_increase_count not in", values, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountBetween(Integer value1, Integer value2) {
+            addCriterion("fans_increase_count between", value1, value2, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountNotBetween(Integer value1, Integer value2) {
+            addCriterion("fans_increase_count not between", value1, value2, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountIsNull() {
+            addCriterion("first_level_count is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountIsNotNull() {
+            addCriterion("first_level_count is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountEqualTo(Integer value) {
+            addCriterion("first_level_count =", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountNotEqualTo(Integer value) {
+            addCriterion("first_level_count <>", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountGreaterThan(Integer value) {
+            addCriterion("first_level_count >", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountGreaterThanOrEqualTo(Integer value) {
+            addCriterion("first_level_count >=", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountLessThan(Integer value) {
+            addCriterion("first_level_count <", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountLessThanOrEqualTo(Integer value) {
+            addCriterion("first_level_count <=", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountIn(List<Integer> values) {
+            addCriterion("first_level_count in", values, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountNotIn(List<Integer> values) {
+            addCriterion("first_level_count not in", values, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountBetween(Integer value1, Integer value2) {
+            addCriterion("first_level_count between", value1, value2, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountNotBetween(Integer value1, Integer value2) {
+            addCriterion("first_level_count not between", value1, value2, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreIsNull() {
+            addCriterion("score is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreIsNotNull() {
+            addCriterion("score is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreEqualTo(Double value) {
+            addCriterion("score =", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreNotEqualTo(Double value) {
+            addCriterion("score <>", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreGreaterThan(Double value) {
+            addCriterion("score >", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreGreaterThanOrEqualTo(Double value) {
+            addCriterion("score >=", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreLessThan(Double value) {
+            addCriterion("score <", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreLessThanOrEqualTo(Double value) {
+            addCriterion("score <=", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreIn(List<Double> values) {
+            addCriterion("score in", values, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreNotIn(List<Double> values) {
+            addCriterion("score not in", values, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreBetween(Double value1, Double value2) {
+            addCriterion("score between", value1, value2, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreNotBetween(Double value1, Double value2) {
+            addCriterion("score not between", value1, value2, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIsNull() {
+            addCriterion("create_timestamp is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIsNotNull() {
+            addCriterion("create_timestamp is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampEqualTo(Long value) {
+            addCriterion("create_timestamp =", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotEqualTo(Long value) {
+            addCriterion("create_timestamp <>", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampGreaterThan(Long value) {
+            addCriterion("create_timestamp >", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampGreaterThanOrEqualTo(Long value) {
+            addCriterion("create_timestamp >=", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampLessThan(Long value) {
+            addCriterion("create_timestamp <", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampLessThanOrEqualTo(Long value) {
+            addCriterion("create_timestamp <=", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIn(List<Long> values) {
+            addCriterion("create_timestamp in", values, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotIn(List<Long> values) {
+            addCriterion("create_timestamp not in", values, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampBetween(Long value1, Long value2) {
+            addCriterion("create_timestamp between", value1, value2, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotBetween(Long value1, Long value2) {
+            addCriterion("create_timestamp not between", value1, value2, "createTimestamp");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 90 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformFwhDataStatTotal.java

@@ -0,0 +1,90 @@
+package com.tzld.piaoquan.api.model.po.contentplatform;
+
+public class ContentPlatformFwhDataStatTotal {
+    private Long id;
+
+    private String dateStr;
+
+    private String channel;
+
+    private Integer fansIncreaseCount;
+
+    private Integer firstLevelCount;
+
+    private Double score;
+
+    private Long createTimestamp;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getDateStr() {
+        return dateStr;
+    }
+
+    public void setDateStr(String dateStr) {
+        this.dateStr = dateStr;
+    }
+
+    public String getChannel() {
+        return channel;
+    }
+
+    public void setChannel(String channel) {
+        this.channel = channel;
+    }
+
+    public Integer getFansIncreaseCount() {
+        return fansIncreaseCount;
+    }
+
+    public void setFansIncreaseCount(Integer fansIncreaseCount) {
+        this.fansIncreaseCount = fansIncreaseCount;
+    }
+
+    public Integer getFirstLevelCount() {
+        return firstLevelCount;
+    }
+
+    public void setFirstLevelCount(Integer firstLevelCount) {
+        this.firstLevelCount = firstLevelCount;
+    }
+
+    public Double getScore() {
+        return score;
+    }
+
+    public void setScore(Double score) {
+        this.score = score;
+    }
+
+    public Long getCreateTimestamp() {
+        return createTimestamp;
+    }
+
+    public void setCreateTimestamp(Long createTimestamp) {
+        this.createTimestamp = createTimestamp;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", dateStr=").append(dateStr);
+        sb.append(", channel=").append(channel);
+        sb.append(", fansIncreaseCount=").append(fansIncreaseCount);
+        sb.append(", firstLevelCount=").append(firstLevelCount);
+        sb.append(", score=").append(score);
+        sb.append(", createTimestamp=").append(createTimestamp);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 651 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformFwhDataStatTotalExample.java

@@ -0,0 +1,651 @@
+package com.tzld.piaoquan.api.model.po.contentplatform;
+
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ContentPlatformFwhDataStatTotalExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public ContentPlatformFwhDataStatTotalExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    public Page getPage() {
+        return page;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrIsNull() {
+            addCriterion("date_str is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrIsNotNull() {
+            addCriterion("date_str is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrEqualTo(String value) {
+            addCriterion("date_str =", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotEqualTo(String value) {
+            addCriterion("date_str <>", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrGreaterThan(String value) {
+            addCriterion("date_str >", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrGreaterThanOrEqualTo(String value) {
+            addCriterion("date_str >=", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrLessThan(String value) {
+            addCriterion("date_str <", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrLessThanOrEqualTo(String value) {
+            addCriterion("date_str <=", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrLike(String value) {
+            addCriterion("date_str like", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotLike(String value) {
+            addCriterion("date_str not like", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrIn(List<String> values) {
+            addCriterion("date_str in", values, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotIn(List<String> values) {
+            addCriterion("date_str not in", values, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrBetween(String value1, String value2) {
+            addCriterion("date_str between", value1, value2, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotBetween(String value1, String value2) {
+            addCriterion("date_str not between", value1, value2, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIsNull() {
+            addCriterion("channel is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIsNotNull() {
+            addCriterion("channel is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelEqualTo(String value) {
+            addCriterion("channel =", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNotEqualTo(String value) {
+            addCriterion("channel <>", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelGreaterThan(String value) {
+            addCriterion("channel >", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelGreaterThanOrEqualTo(String value) {
+            addCriterion("channel >=", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelLessThan(String value) {
+            addCriterion("channel <", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelLessThanOrEqualTo(String value) {
+            addCriterion("channel <=", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelLike(String value) {
+            addCriterion("channel like", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNotLike(String value) {
+            addCriterion("channel not like", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIn(List<String> values) {
+            addCriterion("channel in", values, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNotIn(List<String> values) {
+            addCriterion("channel not in", values, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelBetween(String value1, String value2) {
+            addCriterion("channel between", value1, value2, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNotBetween(String value1, String value2) {
+            addCriterion("channel not between", value1, value2, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountIsNull() {
+            addCriterion("fans_increase_count is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountIsNotNull() {
+            addCriterion("fans_increase_count is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountEqualTo(Integer value) {
+            addCriterion("fans_increase_count =", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountNotEqualTo(Integer value) {
+            addCriterion("fans_increase_count <>", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountGreaterThan(Integer value) {
+            addCriterion("fans_increase_count >", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountGreaterThanOrEqualTo(Integer value) {
+            addCriterion("fans_increase_count >=", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountLessThan(Integer value) {
+            addCriterion("fans_increase_count <", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountLessThanOrEqualTo(Integer value) {
+            addCriterion("fans_increase_count <=", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountIn(List<Integer> values) {
+            addCriterion("fans_increase_count in", values, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountNotIn(List<Integer> values) {
+            addCriterion("fans_increase_count not in", values, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountBetween(Integer value1, Integer value2) {
+            addCriterion("fans_increase_count between", value1, value2, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountNotBetween(Integer value1, Integer value2) {
+            addCriterion("fans_increase_count not between", value1, value2, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountIsNull() {
+            addCriterion("first_level_count is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountIsNotNull() {
+            addCriterion("first_level_count is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountEqualTo(Integer value) {
+            addCriterion("first_level_count =", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountNotEqualTo(Integer value) {
+            addCriterion("first_level_count <>", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountGreaterThan(Integer value) {
+            addCriterion("first_level_count >", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountGreaterThanOrEqualTo(Integer value) {
+            addCriterion("first_level_count >=", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountLessThan(Integer value) {
+            addCriterion("first_level_count <", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountLessThanOrEqualTo(Integer value) {
+            addCriterion("first_level_count <=", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountIn(List<Integer> values) {
+            addCriterion("first_level_count in", values, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountNotIn(List<Integer> values) {
+            addCriterion("first_level_count not in", values, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountBetween(Integer value1, Integer value2) {
+            addCriterion("first_level_count between", value1, value2, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountNotBetween(Integer value1, Integer value2) {
+            addCriterion("first_level_count not between", value1, value2, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreIsNull() {
+            addCriterion("score is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreIsNotNull() {
+            addCriterion("score is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreEqualTo(Double value) {
+            addCriterion("score =", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreNotEqualTo(Double value) {
+            addCriterion("score <>", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreGreaterThan(Double value) {
+            addCriterion("score >", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreGreaterThanOrEqualTo(Double value) {
+            addCriterion("score >=", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreLessThan(Double value) {
+            addCriterion("score <", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreLessThanOrEqualTo(Double value) {
+            addCriterion("score <=", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreIn(List<Double> values) {
+            addCriterion("score in", values, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreNotIn(List<Double> values) {
+            addCriterion("score not in", values, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreBetween(Double value1, Double value2) {
+            addCriterion("score between", value1, value2, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreNotBetween(Double value1, Double value2) {
+            addCriterion("score not between", value1, value2, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIsNull() {
+            addCriterion("create_timestamp is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIsNotNull() {
+            addCriterion("create_timestamp is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampEqualTo(Long value) {
+            addCriterion("create_timestamp =", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotEqualTo(Long value) {
+            addCriterion("create_timestamp <>", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampGreaterThan(Long value) {
+            addCriterion("create_timestamp >", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampGreaterThanOrEqualTo(Long value) {
+            addCriterion("create_timestamp >=", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampLessThan(Long value) {
+            addCriterion("create_timestamp <", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampLessThanOrEqualTo(Long value) {
+            addCriterion("create_timestamp <=", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIn(List<Long> values) {
+            addCriterion("create_timestamp in", values, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotIn(List<Long> values) {
+            addCriterion("create_timestamp not in", values, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampBetween(Long value1, Long value2) {
+            addCriterion("create_timestamp between", value1, value2, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotBetween(Long value1, Long value2) {
+            addCriterion("create_timestamp not between", value1, value2, "createTimestamp");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 90 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformGzhDataStatTotal.java

@@ -0,0 +1,90 @@
+package com.tzld.piaoquan.api.model.po.contentplatform;
+
+public class ContentPlatformGzhDataStatTotal {
+    private Long id;
+
+    private String dateStr;
+
+    private String channel;
+
+    private Integer fansIncreaseCount;
+
+    private Integer firstLevelCount;
+
+    private Double score;
+
+    private Long createTimestamp;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getDateStr() {
+        return dateStr;
+    }
+
+    public void setDateStr(String dateStr) {
+        this.dateStr = dateStr;
+    }
+
+    public String getChannel() {
+        return channel;
+    }
+
+    public void setChannel(String channel) {
+        this.channel = channel;
+    }
+
+    public Integer getFansIncreaseCount() {
+        return fansIncreaseCount;
+    }
+
+    public void setFansIncreaseCount(Integer fansIncreaseCount) {
+        this.fansIncreaseCount = fansIncreaseCount;
+    }
+
+    public Integer getFirstLevelCount() {
+        return firstLevelCount;
+    }
+
+    public void setFirstLevelCount(Integer firstLevelCount) {
+        this.firstLevelCount = firstLevelCount;
+    }
+
+    public Double getScore() {
+        return score;
+    }
+
+    public void setScore(Double score) {
+        this.score = score;
+    }
+
+    public Long getCreateTimestamp() {
+        return createTimestamp;
+    }
+
+    public void setCreateTimestamp(Long createTimestamp) {
+        this.createTimestamp = createTimestamp;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", dateStr=").append(dateStr);
+        sb.append(", channel=").append(channel);
+        sb.append(", fansIncreaseCount=").append(fansIncreaseCount);
+        sb.append(", firstLevelCount=").append(firstLevelCount);
+        sb.append(", score=").append(score);
+        sb.append(", createTimestamp=").append(createTimestamp);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 651 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformGzhDataStatTotalExample.java

@@ -0,0 +1,651 @@
+package com.tzld.piaoquan.api.model.po.contentplatform;
+
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ContentPlatformGzhDataStatTotalExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public ContentPlatformGzhDataStatTotalExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    public Page getPage() {
+        return page;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrIsNull() {
+            addCriterion("date_str is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrIsNotNull() {
+            addCriterion("date_str is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrEqualTo(String value) {
+            addCriterion("date_str =", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotEqualTo(String value) {
+            addCriterion("date_str <>", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrGreaterThan(String value) {
+            addCriterion("date_str >", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrGreaterThanOrEqualTo(String value) {
+            addCriterion("date_str >=", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrLessThan(String value) {
+            addCriterion("date_str <", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrLessThanOrEqualTo(String value) {
+            addCriterion("date_str <=", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrLike(String value) {
+            addCriterion("date_str like", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotLike(String value) {
+            addCriterion("date_str not like", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrIn(List<String> values) {
+            addCriterion("date_str in", values, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotIn(List<String> values) {
+            addCriterion("date_str not in", values, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrBetween(String value1, String value2) {
+            addCriterion("date_str between", value1, value2, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotBetween(String value1, String value2) {
+            addCriterion("date_str not between", value1, value2, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIsNull() {
+            addCriterion("channel is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIsNotNull() {
+            addCriterion("channel is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelEqualTo(String value) {
+            addCriterion("channel =", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNotEqualTo(String value) {
+            addCriterion("channel <>", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelGreaterThan(String value) {
+            addCriterion("channel >", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelGreaterThanOrEqualTo(String value) {
+            addCriterion("channel >=", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelLessThan(String value) {
+            addCriterion("channel <", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelLessThanOrEqualTo(String value) {
+            addCriterion("channel <=", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelLike(String value) {
+            addCriterion("channel like", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNotLike(String value) {
+            addCriterion("channel not like", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIn(List<String> values) {
+            addCriterion("channel in", values, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNotIn(List<String> values) {
+            addCriterion("channel not in", values, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelBetween(String value1, String value2) {
+            addCriterion("channel between", value1, value2, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNotBetween(String value1, String value2) {
+            addCriterion("channel not between", value1, value2, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountIsNull() {
+            addCriterion("fans_increase_count is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountIsNotNull() {
+            addCriterion("fans_increase_count is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountEqualTo(Integer value) {
+            addCriterion("fans_increase_count =", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountNotEqualTo(Integer value) {
+            addCriterion("fans_increase_count <>", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountGreaterThan(Integer value) {
+            addCriterion("fans_increase_count >", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountGreaterThanOrEqualTo(Integer value) {
+            addCriterion("fans_increase_count >=", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountLessThan(Integer value) {
+            addCriterion("fans_increase_count <", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountLessThanOrEqualTo(Integer value) {
+            addCriterion("fans_increase_count <=", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountIn(List<Integer> values) {
+            addCriterion("fans_increase_count in", values, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountNotIn(List<Integer> values) {
+            addCriterion("fans_increase_count not in", values, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountBetween(Integer value1, Integer value2) {
+            addCriterion("fans_increase_count between", value1, value2, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountNotBetween(Integer value1, Integer value2) {
+            addCriterion("fans_increase_count not between", value1, value2, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountIsNull() {
+            addCriterion("first_level_count is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountIsNotNull() {
+            addCriterion("first_level_count is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountEqualTo(Integer value) {
+            addCriterion("first_level_count =", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountNotEqualTo(Integer value) {
+            addCriterion("first_level_count <>", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountGreaterThan(Integer value) {
+            addCriterion("first_level_count >", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountGreaterThanOrEqualTo(Integer value) {
+            addCriterion("first_level_count >=", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountLessThan(Integer value) {
+            addCriterion("first_level_count <", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountLessThanOrEqualTo(Integer value) {
+            addCriterion("first_level_count <=", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountIn(List<Integer> values) {
+            addCriterion("first_level_count in", values, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountNotIn(List<Integer> values) {
+            addCriterion("first_level_count not in", values, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountBetween(Integer value1, Integer value2) {
+            addCriterion("first_level_count between", value1, value2, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountNotBetween(Integer value1, Integer value2) {
+            addCriterion("first_level_count not between", value1, value2, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreIsNull() {
+            addCriterion("score is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreIsNotNull() {
+            addCriterion("score is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreEqualTo(Double value) {
+            addCriterion("score =", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreNotEqualTo(Double value) {
+            addCriterion("score <>", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreGreaterThan(Double value) {
+            addCriterion("score >", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreGreaterThanOrEqualTo(Double value) {
+            addCriterion("score >=", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreLessThan(Double value) {
+            addCriterion("score <", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreLessThanOrEqualTo(Double value) {
+            addCriterion("score <=", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreIn(List<Double> values) {
+            addCriterion("score in", values, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreNotIn(List<Double> values) {
+            addCriterion("score not in", values, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreBetween(Double value1, Double value2) {
+            addCriterion("score between", value1, value2, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreNotBetween(Double value1, Double value2) {
+            addCriterion("score not between", value1, value2, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIsNull() {
+            addCriterion("create_timestamp is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIsNotNull() {
+            addCriterion("create_timestamp is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampEqualTo(Long value) {
+            addCriterion("create_timestamp =", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotEqualTo(Long value) {
+            addCriterion("create_timestamp <>", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampGreaterThan(Long value) {
+            addCriterion("create_timestamp >", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampGreaterThanOrEqualTo(Long value) {
+            addCriterion("create_timestamp >=", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampLessThan(Long value) {
+            addCriterion("create_timestamp <", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampLessThanOrEqualTo(Long value) {
+            addCriterion("create_timestamp <=", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIn(List<Long> values) {
+            addCriterion("create_timestamp in", values, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotIn(List<Long> values) {
+            addCriterion("create_timestamp not in", values, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampBetween(Long value1, Long value2) {
+            addCriterion("create_timestamp between", value1, value2, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotBetween(Long value1, Long value2) {
+            addCriterion("create_timestamp not between", value1, value2, "createTimestamp");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 1 - 1
api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/ContentPlatformPlanService.java

@@ -46,7 +46,7 @@ public interface ContentPlatformPlanService {
 
     List<ContentPlatformGzhPlan> getGzhPlanListByCreateAccountId(Long createAccountId);
 
-    List<ContentPlatformGzhPlan> getGzhPlanListByCooperateAccountIds(List<Long> accountIds);
+    List<ContentPlatformGzhPlan> getGzhPlanListByCooperateAccountIds(List<Long> accountIds, Integer type);
 
     List<ContentPlatformGzhPlanVideo> getGzhPlanVideoListByCooperateAccountId(String ghId);
 

+ 37 - 1
api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformDatastatServiceImpl.java

@@ -43,6 +43,10 @@ public class ContentPlatformDatastatServiceImpl implements ContentPlatformDatast
                 return gzhTotalDatastatList(param);
             case 1:
                 return gzhAccountDatastatList(param);
+            case 2:
+                return fwhTotalDatastatList(param);
+            case 3:
+                return fwhAccountDatastatList(param);
             default:
                 return gzhAccountDatastatList(param);
         }
@@ -80,12 +84,44 @@ public class ContentPlatformDatastatServiceImpl implements ContentPlatformDatast
         return result;
     }
 
+    private Page<GzhDatastatItemVO> fwhTotalDatastatList(GzhDatastatListParam param) {
+        ContentPlatformAccount user = LoginUserContext.getUser();
+        Page<GzhDatastatItemVO> result = new Page<>(param.getPageNum(), param.getPageSize());
+        int offset = (param.getPageNum() - 1) * param.getPageSize();
+        int count = dataStatMapperExt.getFwhTotalDatastatCount(param, user.getId());
+        result.setTotalSize(count);
+        if (count == 0) {
+            return result;
+        }
+        List<ContentPlatformGzhDataStat> datastatList = dataStatMapperExt.getFwhTotalDatastatList(param,
+                user.getId(), offset, param.getPageSize());
+        List<GzhDatastatItemVO> list = buildGzhDatastatItemVOList(param.getType(), datastatList);
+        result.setObjs(list);
+        return result;
+    }
+
+    private Page<GzhDatastatItemVO> fwhAccountDatastatList(GzhDatastatListParam param) {
+        ContentPlatformAccount user = LoginUserContext.getUser();
+        Page<GzhDatastatItemVO> result = new Page<>(param.getPageNum(), param.getPageSize());
+        int offset = (param.getPageNum() - 1) * param.getPageSize();
+        int count = dataStatMapperExt.getFwhAccountDatastatCount(param, user.getId());
+        result.setTotalSize(count);
+        if (count == 0) {
+            return result;
+        }
+        List<ContentPlatformGzhDataStat> datastatList = dataStatMapperExt.getFwhAccountDatastatList(param,
+                user.getId(), offset, param.getPageSize());
+        List<GzhDatastatItemVO> list = buildGzhDatastatItemVOList(param.getType(), datastatList);
+        result.setObjs(list);
+        return result;
+    }
+
     private List<GzhDatastatItemVO> buildGzhDatastatItemVOList(Integer type, List<ContentPlatformGzhDataStat> datastatList) {
         if (CollectionUtils.isEmpty(datastatList)) {
             return null;
         }
         Map<Long, ContentPlatformGzhAccount> accountMap = new HashMap<>();
-        if (type != 0) {
+        if (Arrays.asList(1, 3).contains(type)) {
             List<Long> accountIds = datastatList.stream().map(ContentPlatformGzhDataStat::getAccountId).distinct().collect(Collectors.toList());
             List<ContentPlatformGzhAccount> accountList = cooperateAccountService.getAccountListByIds(accountIds);
             accountMap = accountList.stream().collect(Collectors.toMap(ContentPlatformGzhAccount::getId, a -> a));

+ 2 - 2
api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformPlanServiceImpl.java

@@ -437,9 +437,9 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
     }
 
     @Override
-    public List<ContentPlatformGzhPlan> getGzhPlanListByCooperateAccountIds(List<Long> accountIds) {
+    public List<ContentPlatformGzhPlan> getGzhPlanListByCooperateAccountIds(List<Long> accountIds, Integer type) {
         ContentPlatformGzhPlanExample example = new ContentPlatformGzhPlanExample();
-        example.createCriteria().andAccountIdIn(accountIds);
+        example.createCriteria().andAccountIdIn(accountIds).andTypeEqualTo(type);
         return gzhPlanMapper.selectByExample(example);
     }
 

+ 246 - 0
api-module/src/main/resources/mapper/contentplatform/ContentPlatformFwhDataStatMapper.xml

@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tzld.piaoquan.api.dao.mapper.contentplatform.ContentPlatformFwhDataStatMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformFwhDataStat">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="date_str" jdbcType="VARCHAR" property="dateStr" />
+    <result column="account_id" jdbcType="BIGINT" property="accountId" />
+    <result column="fans_increase_count" jdbcType="INTEGER" property="fansIncreaseCount" />
+    <result column="first_level_count" jdbcType="INTEGER" property="firstLevelCount" />
+    <result column="score" jdbcType="DOUBLE" property="score" />
+    <result column="create_timestamp" jdbcType="BIGINT" property="createTimestamp" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, date_str, account_id, fans_increase_count, first_level_count, score, create_timestamp
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformFwhDataStatExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from content_platform_fwh_datastat
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from content_platform_fwh_datastat
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from content_platform_fwh_datastat
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformFwhDataStatExample">
+    delete from content_platform_fwh_datastat
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformFwhDataStat">
+    insert into content_platform_fwh_datastat (id, date_str, account_id, 
+      fans_increase_count, first_level_count, score, 
+      create_timestamp)
+    values (#{id,jdbcType=BIGINT}, #{dateStr,jdbcType=VARCHAR}, #{accountId,jdbcType=BIGINT}, 
+      #{fansIncreaseCount,jdbcType=INTEGER}, #{firstLevelCount,jdbcType=INTEGER}, #{score,jdbcType=DOUBLE}, 
+      #{createTimestamp,jdbcType=BIGINT})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformFwhDataStat">
+    insert into content_platform_fwh_datastat
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="dateStr != null">
+        date_str,
+      </if>
+      <if test="accountId != null">
+        account_id,
+      </if>
+      <if test="fansIncreaseCount != null">
+        fans_increase_count,
+      </if>
+      <if test="firstLevelCount != null">
+        first_level_count,
+      </if>
+      <if test="score != null">
+        score,
+      </if>
+      <if test="createTimestamp != null">
+        create_timestamp,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="dateStr != null">
+        #{dateStr,jdbcType=VARCHAR},
+      </if>
+      <if test="accountId != null">
+        #{accountId,jdbcType=BIGINT},
+      </if>
+      <if test="fansIncreaseCount != null">
+        #{fansIncreaseCount,jdbcType=INTEGER},
+      </if>
+      <if test="firstLevelCount != null">
+        #{firstLevelCount,jdbcType=INTEGER},
+      </if>
+      <if test="score != null">
+        #{score,jdbcType=DOUBLE},
+      </if>
+      <if test="createTimestamp != null">
+        #{createTimestamp,jdbcType=BIGINT},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformFwhDataStatExample" resultType="java.lang.Long">
+    select count(*) from content_platform_fwh_datastat
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update content_platform_fwh_datastat
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.dateStr != null">
+        date_str = #{record.dateStr,jdbcType=VARCHAR},
+      </if>
+      <if test="record.accountId != null">
+        account_id = #{record.accountId,jdbcType=BIGINT},
+      </if>
+      <if test="record.fansIncreaseCount != null">
+        fans_increase_count = #{record.fansIncreaseCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.firstLevelCount != null">
+        first_level_count = #{record.firstLevelCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.score != null">
+        score = #{record.score,jdbcType=DOUBLE},
+      </if>
+      <if test="record.createTimestamp != null">
+        create_timestamp = #{record.createTimestamp,jdbcType=BIGINT},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update content_platform_fwh_datastat
+    set id = #{record.id,jdbcType=BIGINT},
+      date_str = #{record.dateStr,jdbcType=VARCHAR},
+      account_id = #{record.accountId,jdbcType=BIGINT},
+      fans_increase_count = #{record.fansIncreaseCount,jdbcType=INTEGER},
+      first_level_count = #{record.firstLevelCount,jdbcType=INTEGER},
+      score = #{record.score,jdbcType=DOUBLE},
+      create_timestamp = #{record.createTimestamp,jdbcType=BIGINT}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformFwhDataStat">
+    update content_platform_fwh_datastat
+    <set>
+      <if test="dateStr != null">
+        date_str = #{dateStr,jdbcType=VARCHAR},
+      </if>
+      <if test="accountId != null">
+        account_id = #{accountId,jdbcType=BIGINT},
+      </if>
+      <if test="fansIncreaseCount != null">
+        fans_increase_count = #{fansIncreaseCount,jdbcType=INTEGER},
+      </if>
+      <if test="firstLevelCount != null">
+        first_level_count = #{firstLevelCount,jdbcType=INTEGER},
+      </if>
+      <if test="score != null">
+        score = #{score,jdbcType=DOUBLE},
+      </if>
+      <if test="createTimestamp != null">
+        create_timestamp = #{createTimestamp,jdbcType=BIGINT},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformFwhDataStat">
+    update content_platform_fwh_datastat
+    set date_str = #{dateStr,jdbcType=VARCHAR},
+      account_id = #{accountId,jdbcType=BIGINT},
+      fans_increase_count = #{fansIncreaseCount,jdbcType=INTEGER},
+      first_level_count = #{firstLevelCount,jdbcType=INTEGER},
+      score = #{score,jdbcType=DOUBLE},
+      create_timestamp = #{createTimestamp,jdbcType=BIGINT}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 246 - 0
api-module/src/main/resources/mapper/contentplatform/ContentPlatformFwhDataStatTotalMapper.xml

@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tzld.piaoquan.api.dao.mapper.contentplatform.ContentPlatformFwhDataStatTotalMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformFwhDataStatTotal">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="date_str" jdbcType="VARCHAR" property="dateStr" />
+    <result column="channel" jdbcType="VARCHAR" property="channel" />
+    <result column="fans_increase_count" jdbcType="INTEGER" property="fansIncreaseCount" />
+    <result column="first_level_count" jdbcType="INTEGER" property="firstLevelCount" />
+    <result column="score" jdbcType="DOUBLE" property="score" />
+    <result column="create_timestamp" jdbcType="BIGINT" property="createTimestamp" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, date_str, channel, fans_increase_count, first_level_count, score, create_timestamp
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformFwhDataStatTotalExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from content_platform_fwh_datastat_total
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from content_platform_fwh_datastat_total
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from content_platform_fwh_datastat_total
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformFwhDataStatTotalExample">
+    delete from content_platform_fwh_datastat_total
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformFwhDataStatTotal">
+    insert into content_platform_fwh_datastat_total (id, date_str, channel, 
+      fans_increase_count, first_level_count, score, 
+      create_timestamp)
+    values (#{id,jdbcType=BIGINT}, #{dateStr,jdbcType=VARCHAR}, #{channel,jdbcType=VARCHAR}, 
+      #{fansIncreaseCount,jdbcType=INTEGER}, #{firstLevelCount,jdbcType=INTEGER}, #{score,jdbcType=DOUBLE}, 
+      #{createTimestamp,jdbcType=BIGINT})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformFwhDataStatTotal">
+    insert into content_platform_fwh_datastat_total
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="dateStr != null">
+        date_str,
+      </if>
+      <if test="channel != null">
+        channel,
+      </if>
+      <if test="fansIncreaseCount != null">
+        fans_increase_count,
+      </if>
+      <if test="firstLevelCount != null">
+        first_level_count,
+      </if>
+      <if test="score != null">
+        score,
+      </if>
+      <if test="createTimestamp != null">
+        create_timestamp,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="dateStr != null">
+        #{dateStr,jdbcType=VARCHAR},
+      </if>
+      <if test="channel != null">
+        #{channel,jdbcType=VARCHAR},
+      </if>
+      <if test="fansIncreaseCount != null">
+        #{fansIncreaseCount,jdbcType=INTEGER},
+      </if>
+      <if test="firstLevelCount != null">
+        #{firstLevelCount,jdbcType=INTEGER},
+      </if>
+      <if test="score != null">
+        #{score,jdbcType=DOUBLE},
+      </if>
+      <if test="createTimestamp != null">
+        #{createTimestamp,jdbcType=BIGINT},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformFwhDataStatTotalExample" resultType="java.lang.Long">
+    select count(*) from content_platform_fwh_datastat_total
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update content_platform_fwh_datastat_total
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.dateStr != null">
+        date_str = #{record.dateStr,jdbcType=VARCHAR},
+      </if>
+      <if test="record.channel != null">
+        channel = #{record.channel,jdbcType=VARCHAR},
+      </if>
+      <if test="record.fansIncreaseCount != null">
+        fans_increase_count = #{record.fansIncreaseCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.firstLevelCount != null">
+        first_level_count = #{record.firstLevelCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.score != null">
+        score = #{record.score,jdbcType=DOUBLE},
+      </if>
+      <if test="record.createTimestamp != null">
+        create_timestamp = #{record.createTimestamp,jdbcType=BIGINT},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update content_platform_fwh_datastat_total
+    set id = #{record.id,jdbcType=BIGINT},
+      date_str = #{record.dateStr,jdbcType=VARCHAR},
+      channel = #{record.channel,jdbcType=VARCHAR},
+      fans_increase_count = #{record.fansIncreaseCount,jdbcType=INTEGER},
+      first_level_count = #{record.firstLevelCount,jdbcType=INTEGER},
+      score = #{record.score,jdbcType=DOUBLE},
+      create_timestamp = #{record.createTimestamp,jdbcType=BIGINT}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformFwhDataStatTotal">
+    update content_platform_fwh_datastat_total
+    <set>
+      <if test="dateStr != null">
+        date_str = #{dateStr,jdbcType=VARCHAR},
+      </if>
+      <if test="channel != null">
+        channel = #{channel,jdbcType=VARCHAR},
+      </if>
+      <if test="fansIncreaseCount != null">
+        fans_increase_count = #{fansIncreaseCount,jdbcType=INTEGER},
+      </if>
+      <if test="firstLevelCount != null">
+        first_level_count = #{firstLevelCount,jdbcType=INTEGER},
+      </if>
+      <if test="score != null">
+        score = #{score,jdbcType=DOUBLE},
+      </if>
+      <if test="createTimestamp != null">
+        create_timestamp = #{createTimestamp,jdbcType=BIGINT},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformFwhDataStatTotal">
+    update content_platform_fwh_datastat_total
+    set date_str = #{dateStr,jdbcType=VARCHAR},
+      channel = #{channel,jdbcType=VARCHAR},
+      fans_increase_count = #{fansIncreaseCount,jdbcType=INTEGER},
+      first_level_count = #{firstLevelCount,jdbcType=INTEGER},
+      score = #{score,jdbcType=DOUBLE},
+      create_timestamp = #{createTimestamp,jdbcType=BIGINT}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 246 - 0
api-module/src/main/resources/mapper/contentplatform/ContentPlatformGzhDataStatTotalMapper.xml

@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tzld.piaoquan.api.dao.mapper.contentplatform.ContentPlatformGzhDataStatTotalMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhDataStatTotal">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="date_str" jdbcType="VARCHAR" property="dateStr" />
+    <result column="channel" jdbcType="VARCHAR" property="channel" />
+    <result column="fans_increase_count" jdbcType="INTEGER" property="fansIncreaseCount" />
+    <result column="first_level_count" jdbcType="INTEGER" property="firstLevelCount" />
+    <result column="score" jdbcType="DOUBLE" property="score" />
+    <result column="create_timestamp" jdbcType="BIGINT" property="createTimestamp" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, date_str, channel, fans_increase_count, first_level_count, score, create_timestamp
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhDataStatTotalExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from content_platform_gzh_datastat_total
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from content_platform_gzh_datastat_total
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from content_platform_gzh_datastat_total
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhDataStatTotalExample">
+    delete from content_platform_gzh_datastat_total
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhDataStatTotal">
+    insert into content_platform_gzh_datastat_total (id, date_str, channel, 
+      fans_increase_count, first_level_count, score, 
+      create_timestamp)
+    values (#{id,jdbcType=BIGINT}, #{dateStr,jdbcType=VARCHAR}, #{channel,jdbcType=VARCHAR}, 
+      #{fansIncreaseCount,jdbcType=INTEGER}, #{firstLevelCount,jdbcType=INTEGER}, #{score,jdbcType=DOUBLE}, 
+      #{createTimestamp,jdbcType=BIGINT})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhDataStatTotal">
+    insert into content_platform_gzh_datastat_total
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="dateStr != null">
+        date_str,
+      </if>
+      <if test="channel != null">
+        channel,
+      </if>
+      <if test="fansIncreaseCount != null">
+        fans_increase_count,
+      </if>
+      <if test="firstLevelCount != null">
+        first_level_count,
+      </if>
+      <if test="score != null">
+        score,
+      </if>
+      <if test="createTimestamp != null">
+        create_timestamp,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="dateStr != null">
+        #{dateStr,jdbcType=VARCHAR},
+      </if>
+      <if test="channel != null">
+        #{channel,jdbcType=VARCHAR},
+      </if>
+      <if test="fansIncreaseCount != null">
+        #{fansIncreaseCount,jdbcType=INTEGER},
+      </if>
+      <if test="firstLevelCount != null">
+        #{firstLevelCount,jdbcType=INTEGER},
+      </if>
+      <if test="score != null">
+        #{score,jdbcType=DOUBLE},
+      </if>
+      <if test="createTimestamp != null">
+        #{createTimestamp,jdbcType=BIGINT},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhDataStatTotalExample" resultType="java.lang.Long">
+    select count(*) from content_platform_gzh_datastat_total
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update content_platform_gzh_datastat_total
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.dateStr != null">
+        date_str = #{record.dateStr,jdbcType=VARCHAR},
+      </if>
+      <if test="record.channel != null">
+        channel = #{record.channel,jdbcType=VARCHAR},
+      </if>
+      <if test="record.fansIncreaseCount != null">
+        fans_increase_count = #{record.fansIncreaseCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.firstLevelCount != null">
+        first_level_count = #{record.firstLevelCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.score != null">
+        score = #{record.score,jdbcType=DOUBLE},
+      </if>
+      <if test="record.createTimestamp != null">
+        create_timestamp = #{record.createTimestamp,jdbcType=BIGINT},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update content_platform_gzh_datastat_total
+    set id = #{record.id,jdbcType=BIGINT},
+      date_str = #{record.dateStr,jdbcType=VARCHAR},
+      channel = #{record.channel,jdbcType=VARCHAR},
+      fans_increase_count = #{record.fansIncreaseCount,jdbcType=INTEGER},
+      first_level_count = #{record.firstLevelCount,jdbcType=INTEGER},
+      score = #{record.score,jdbcType=DOUBLE},
+      create_timestamp = #{record.createTimestamp,jdbcType=BIGINT}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhDataStatTotal">
+    update content_platform_gzh_datastat_total
+    <set>
+      <if test="dateStr != null">
+        date_str = #{dateStr,jdbcType=VARCHAR},
+      </if>
+      <if test="channel != null">
+        channel = #{channel,jdbcType=VARCHAR},
+      </if>
+      <if test="fansIncreaseCount != null">
+        fans_increase_count = #{fansIncreaseCount,jdbcType=INTEGER},
+      </if>
+      <if test="firstLevelCount != null">
+        first_level_count = #{firstLevelCount,jdbcType=INTEGER},
+      </if>
+      <if test="score != null">
+        score = #{score,jdbcType=DOUBLE},
+      </if>
+      <if test="createTimestamp != null">
+        create_timestamp = #{createTimestamp,jdbcType=BIGINT},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhDataStatTotal">
+    update content_platform_gzh_datastat_total
+    set date_str = #{dateStr,jdbcType=VARCHAR},
+      channel = #{channel,jdbcType=VARCHAR},
+      fans_increase_count = #{fansIncreaseCount,jdbcType=INTEGER},
+      first_level_count = #{firstLevelCount,jdbcType=INTEGER},
+      score = #{score,jdbcType=DOUBLE},
+      create_timestamp = #{createTimestamp,jdbcType=BIGINT}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 88 - 15
api-module/src/main/resources/mapper/contentplatform/ext/ContentPlatformDataStatMapperExt.xml

@@ -27,31 +27,65 @@
 
     <select id="getGzhTotalDatastatCount" resultType="java.lang.Integer">
         select count(1)
-        from (select cpgd.date_str
-        from content_platform_gzh_datastat cpgd
-         join content_platform_gzh_account cpgza on cpgd.account_id = cpgza.id
-        where cpgza.create_account_id = #{createAccountId}
-        group by cpgd.date_str) t
+        from content_platform_gzh_datastat_total cpgdt
+        join content_platform_account cpa on cpgdt.channel = cpa.channel
+        where cpa.id = #{createAccountId}
     </select>
 
     <select id="getGzhTotalDatastatList"
             resultType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhDataStat">
-        select date_str,
-               sum(fans_increase_count) as fans_increase_count,
-               sum(first_level_count)   as first_level_count,
-               avg(score)               as score
-        from content_platform_gzh_datastat cpgd
-         join content_platform_gzh_account cpgza on cpgd.account_id = cpgza.id
+        select date_str, fans_increase_count, first_level_count, score
+        from content_platform_gzh_datastat_total cpgdt
+         join content_platform_account cpa on cpgdt.channel = cpa.channel
+        where cpa.id = #{createAccountId}
+        order by cpgdt.date_str desc
+        limit #{offset}, #{pageSize}
+    </select>
+
+<select id="getFwhAccountDatastatCount" resultType="java.lang.Integer">
+        select count(1)
+        from content_platform_fwh_datastat cpgd
+        join content_platform_gzh_account cpgza on cpgd.account_id = cpgza.id
         where cpgza.create_account_id = #{createAccountId}
-        group by cpgd.date_str
-        order by cpgd.date_str desc
+        <if test="param.accountId!= null and param.accountId!= ''">
+            and cpgza.account_id = #{param.accountId}
+        </if>
+    </select>
+
+    <select id="getFwhAccountDatastatList"
+            resultType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhDataStat">
+        select cpfd.*
+        from content_platform_fwh_datastat cpfd
+        join content_platform_gzh_account cpgza on cpfd.account_id = cpgza.id
+        where cpgza.create_account_id = #{createAccountId}
+        <if test="param.accountId!= null and param.accountId!= ''">
+            and cpgza.account_id = #{param.accountId}
+        </if>
+        order by cpfd.date_str desc
+        limit #{offset}, #{pageSize}
+    </select>
+
+    <select id="getFwhTotalDatastatCount" resultType="java.lang.Integer">
+        select count(1)
+        from content_platform_fwh_datastat_total cpfdt
+         join content_platform_account cpa on cpfdt.channel = cpa.channel
+        where cpa.id = #{createAccountId}
+    </select>
+
+    <select id="getFwhTotalDatastatList"
+            resultType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhDataStat">
+        select date_str, fans_increase_count, first_level_count, score
+        from content_platform_fwh_datastat_total cpfdt
+         join content_platform_account cpa on cpfdt.channel = cpa.channel
+        where cpa.id = #{createAccountId}
+        order by cpfdt.date_str desc
         limit #{offset}, #{pageSize}
     </select>
 
     <select id="getQwRootSourceIdDatastatCount" resultType="java.lang.Integer">
         select count(1)
         from content_platform_qw_datastat cpqd
-                 join content_platform_qw_plan cpqp on cpqp.root_source_id = cpqd.root_source_id
+         join content_platform_qw_plan cpqp on cpqp.root_source_id = cpqd.root_source_id
         where cpqp.create_account_id = #{createAccountId}
     </select>
 
@@ -59,7 +93,7 @@
             resultType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformQwDataStat">
         select cpqd.*
         from content_platform_qw_datastat cpqd
-                 join content_platform_qw_plan cpqp on cpqp.root_source_id = cpqd.root_source_id
+         join content_platform_qw_plan cpqp on cpqp.root_source_id = cpqd.root_source_id
         where cpqp.create_account_id = #{createAccountId}
         order by cpqd.date_str desc
         limit #{offset}, #{pageSize}
@@ -149,6 +183,36 @@
         </foreach>
     </insert>
 
+    <insert id="batchInsertGzhDatastatTotal">
+        insert into content_platform_gzh_datastat_total (date_str, channel, fans_increase_count, first_level_count, score,
+        create_timestamp)
+        values
+        <foreach collection="records" item="item" separator=",">
+            (#{item.dateStr}, #{item.channel}, #{item.fansIncreaseCount}, #{item.firstLevelCount}, #{item.score},
+            #{item.createTimestamp})
+        </foreach>
+    </insert>
+
+    <insert id="batchInsertFwhDatastat">
+        insert into content_platform_fwh_datastat (date_str, account_id, fans_increase_count, first_level_count, score,
+        create_timestamp)
+        values
+        <foreach collection="records" item="item" separator=",">
+            (#{item.dateStr}, #{item.accountId}, #{item.fansIncreaseCount}, #{item.firstLevelCount}, #{item.score},
+            #{item.createTimestamp})
+        </foreach>
+    </insert>
+
+    <insert id="batchInsertFwhDatastatTotal">
+        insert into content_platform_fwh_datastat_total (date_str, channel, fans_increase_count, first_level_count, score,
+        create_timestamp)
+        values
+        <foreach collection="records" item="item" separator=",">
+            (#{item.dateStr}, #{item.channel}, #{item.fansIncreaseCount}, #{item.firstLevelCount}, #{item.score},
+            #{item.createTimestamp})
+        </foreach>
+    </insert>
+
     <insert id="batchInsertQwDatastat">
         insert into content_platform_qw_datastat (date_str, root_source_id, first_level_count, score, create_timestamp)
         values
@@ -200,4 +264,13 @@
     <delete id="deleteQwDatastatReplyTotal">
         delete from content_platform_qw_datastat_reply_total where date_str = #{dt}
     </delete>
+
+    <delete id="deleteGzhDatastatTotal">
+        delete from content_platform_gzh_datastat_total where date_str = #{dt}
+    </delete>
+
+    <delete id="deleteFwhDatastatTotal">
+        delete from content_platform_fwh_datastat_total where date_str = #{dt}
+    </delete>
+
 </mapper>

+ 3 - 0
api-module/src/main/resources/mybatis-api-contentPlatform-generator-config.xml

@@ -53,6 +53,9 @@
         <table tableName="content_platform_account" domainObjectName="ContentPlatformAccount" alias=""/>
         <table tableName="content_platform_gzh_account" domainObjectName="ContentPlatformGzhAccount" alias=""/>
         <table tableName="content_platform_gzh_datastat" domainObjectName="ContentPlatformGzhDataStat" alias=""/>
+        <table tableName="content_platform_gzh_datastat_total" domainObjectName="ContentPlatformGzhDataStatTotal" alias=""/>
+        <table tableName="content_platform_fwh_datastat" domainObjectName="ContentPlatformFwhDataStat" alias=""/>
+        <table tableName="content_platform_fwh_datastat_total" domainObjectName="ContentPlatformFwhDataStatTotal" alias=""/>
         <table tableName="content_platform_gzh_plan" domainObjectName="ContentPlatformGzhPlan" alias=""/>
         <table tableName="content_platform_gzh_plan_video" domainObjectName="ContentPlatformGzhPlanVideo" alias=""/>
         <table tableName="content_platform_gzh_plan_change_log" domainObjectName="ContentPlatformGzhPlanChangeLog" alias=""/>