|
@@ -65,7 +65,7 @@ public class KuaishouAudienceReportDailyServiceImpl extends ServiceImpl<Kuaishou
|
|
|
private String urlPath = PropertiesUtils.getConfig("kuaishou_api_url");
|
|
|
|
|
|
/**
|
|
|
- * 报表分页查询
|
|
|
+ * 报表分页分页查询
|
|
|
*
|
|
|
* @param type province: 省级地域分布, city: 地级地域分布,gender: 性别分布,ageSegment: 年龄分布clientId: 系统分布 businessInterestTags: 商业兴趣分布
|
|
|
* @return org.jeecg.common.api.vo.Result<java.lang.Object>
|
|
@@ -80,7 +80,7 @@ public class KuaishouAudienceReportDailyServiceImpl extends ServiceImpl<Kuaishou
|
|
|
if (null == pageSize || pageSize == 0) {
|
|
|
pageSize = 10;
|
|
|
}
|
|
|
- List<KuaishouAudienceReportDaily> list = null;
|
|
|
+ List<JSONObject> list = null;
|
|
|
PageHelper.startPage(pageNo, pageSize);
|
|
|
if ("province".equals(type)) {
|
|
|
list = provinceMapper.queryPageLists(audienceReport);
|
|
@@ -97,11 +97,51 @@ public class KuaishouAudienceReportDailyServiceImpl extends ServiceImpl<Kuaishou
|
|
|
} else {
|
|
|
return Result.error("请选择人群报表类型");
|
|
|
}
|
|
|
- PageInfo<KuaishouAudienceReportDaily> pageInfo = new PageInfo<>(list);
|
|
|
+ if (Check.isNull(list)) {
|
|
|
+ return Result.error("只能获取到两天前的数据,请正确选择时间");
|
|
|
+ }
|
|
|
+ PageInfo<JSONObject> pageInfo = new PageInfo<>(list);
|
|
|
return Result.ok(pageInfo);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 首页报表数据
|
|
|
+ *
|
|
|
+ * @param type province: 省级地域分布, city: 地级地域分布,gender: 性别分布,ageSegment: 年龄分布clientId: 系统分布 businessInterestTags: 商业兴趣分布
|
|
|
+ * @return org.jeecg.common.api.vo.Result<java.lang.Object>
|
|
|
+ * @throws
|
|
|
+ * @author ZHAOXA
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public Result<Object> queryAllReportForm(KuaishouAudienceReportDaily audienceReport) {
|
|
|
+ JSONObject data = new JSONObject();
|
|
|
+ List<JSONObject> provinces = provinceMapper.queryAllReportForm(audienceReport);
|
|
|
+ if (!Check.isNull(provinces)) {
|
|
|
+ data.put("province", provinces);
|
|
|
+ }
|
|
|
+ List<JSONObject> genders = genderMapper.queryAllReportForm(audienceReport);
|
|
|
+ if (!Check.isNull(genders)) {
|
|
|
+ data.put("gender", genders);
|
|
|
+ }
|
|
|
+ List<JSONObject> ages = ageMapper.queryAllReportForm(audienceReport);
|
|
|
+ if (!Check.isNull(ages)) {
|
|
|
+ data.put("ageSegment", ages);
|
|
|
+ }
|
|
|
+ List<JSONObject> clients = clientMapper.queryAllReportForm(audienceReport);
|
|
|
+ if (!Check.isNull(clients)) {
|
|
|
+ data.put("client", clients);
|
|
|
+ }
|
|
|
+ List<JSONObject> bussiness = bussinessMapper.queryAllReportForm(audienceReport);
|
|
|
+ if (!Check.isNull(bussiness)) {
|
|
|
+ data.put("businessInterestTags", bussiness);
|
|
|
+ }
|
|
|
+ if (data.size() == 0) {
|
|
|
+ return Result.error("只能获取到两天前的数据,请正确选择时间");
|
|
|
+ }
|
|
|
+ return Result.ok(data);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 人群分析报表入库
|
|
|
*
|
|
|
* @param type province: 省级地域分布, city: 地级地域分布,gender: 性别分布,ageSegment: 年龄分布clientId: 系统分布 businessInterestTags: 商业兴趣分布
|