|
@@ -80,11 +80,13 @@ public class PangolinCrawlerServiceImpl implements PangolinCrawlerService {
|
|
pangolinReportBillMonth.setYear(Integer.parseInt(date.split("-")[0]));
|
|
pangolinReportBillMonth.setYear(Integer.parseInt(date.split("-")[0]));
|
|
pangolinReportBillMonth.setMonth(Integer.parseInt(date.split("-")[1]));
|
|
pangolinReportBillMonth.setMonth(Integer.parseInt(date.split("-")[1]));
|
|
pangolinReportBillMonth.setDate(date);
|
|
pangolinReportBillMonth.setDate(date);
|
|
|
|
+ pangolinReportBillMonth.setAccountName(bindAccountLogin.getAccountName());
|
|
QueryWrapper<PangolinReportBillMonth> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<PangolinReportBillMonth> queryWrapper = new QueryWrapper<>();
|
|
queryWrapper.eq("os", pangolinReportBillMonth.getOs());
|
|
queryWrapper.eq("os", pangolinReportBillMonth.getOs());
|
|
queryWrapper.eq("app_id", pangolinReportBillMonth.getAppId());
|
|
queryWrapper.eq("app_id", pangolinReportBillMonth.getAppId());
|
|
queryWrapper.eq("month", pangolinReportBillMonth.getMonth());
|
|
queryWrapper.eq("month", pangolinReportBillMonth.getMonth());
|
|
queryWrapper.eq("year", pangolinReportBillMonth.getYear());
|
|
queryWrapper.eq("year", pangolinReportBillMonth.getYear());
|
|
|
|
+ queryWrapper.eq("account_name", pangolinReportBillMonth.getAccountName());
|
|
if (pangolinReportBillMonthService.getOne(queryWrapper) == null) {
|
|
if (pangolinReportBillMonthService.getOne(queryWrapper) == null) {
|
|
pangolinReportBillMonthService.save(pangolinReportBillMonth);
|
|
pangolinReportBillMonthService.save(pangolinReportBillMonth);
|
|
} else {
|
|
} else {
|
|
@@ -135,17 +137,17 @@ public class PangolinCrawlerServiceImpl implements PangolinCrawlerService {
|
|
app.setName(name);
|
|
app.setName(name);
|
|
pangolinAppService.saveOrUpdateApp(app);
|
|
pangolinAppService.saveOrUpdateApp(app);
|
|
}
|
|
}
|
|
- Iterator<JsonNode> channelIterator = resultNode.get("data").get("ChannelNameList").elements();
|
|
|
|
- while (channelIterator.hasNext()) {
|
|
|
|
- JsonNode channelNode = channelIterator.next();
|
|
|
|
- Long id = channelNode.get("Id").asLong();
|
|
|
|
- String name = channelNode.get("Name").asText();
|
|
|
|
- PangolinChannel channel = new PangolinChannel();
|
|
|
|
- channel.setAccountName(bindAccountLogin.getAccountName());
|
|
|
|
- channel.setId(id);
|
|
|
|
- channel.setName(name);
|
|
|
|
- pangolinChannelService.saveOrUpdate(channel);
|
|
|
|
- }
|
|
|
|
|
|
+// Iterator<JsonNode> channelIterator = resultNode.get("data").get("ChannelNameList").elements();
|
|
|
|
+// while (channelIterator.hasNext()) {
|
|
|
|
+// JsonNode channelNode = channelIterator.next();
|
|
|
|
+// Long id = channelNode.get("Id").asLong();
|
|
|
|
+// String name = channelNode.get("Name").asText();
|
|
|
|
+// PangolinChannel channel = new PangolinChannel();
|
|
|
|
+// channel.setAccountName(bindAccountLogin.getAccountName());
|
|
|
|
+// channel.setId(id);
|
|
|
|
+// channel.setName(name);
|
|
|
|
+// pangolinChannelService.saveOrUpdate(channel);
|
|
|
|
+// }
|
|
}
|
|
}
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
@@ -208,9 +210,12 @@ public class PangolinCrawlerServiceImpl implements PangolinCrawlerService {
|
|
pangolinReportChannelDaily.setOprateSystem(os);
|
|
pangolinReportChannelDaily.setOprateSystem(os);
|
|
pangolinReportChannelDaily.setRetentionRatio(retentionRatio);
|
|
pangolinReportChannelDaily.setRetentionRatio(retentionRatio);
|
|
pangolinReportChannelDaily.setTotalPrice(totalPrice);
|
|
pangolinReportChannelDaily.setTotalPrice(totalPrice);
|
|
|
|
+ pangolinReportChannelDaily.setAccountName(bindAccountLogin.getAccountName());
|
|
QueryWrapper<PangolinReportChannelDaily> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<PangolinReportChannelDaily> queryWrapper = new QueryWrapper<>();
|
|
queryWrapper.eq("date", pangolinReportChannelDaily.getDate());
|
|
queryWrapper.eq("date", pangolinReportChannelDaily.getDate());
|
|
|
|
+ queryWrapper.eq("app_name", pangolinReportChannelDaily.getAppName());
|
|
queryWrapper.eq("channel_name", pangolinReportChannelDaily.getChannelName());
|
|
queryWrapper.eq("channel_name", pangolinReportChannelDaily.getChannelName());
|
|
|
|
+ queryWrapper.eq("account_name", bindAccountLogin.getAccountName());
|
|
if (pangolinReportChannelDailyService.getOne(queryWrapper) == null) {
|
|
if (pangolinReportChannelDailyService.getOne(queryWrapper) == null) {
|
|
pangolinReportChannelDailyService.save(pangolinReportChannelDaily);
|
|
pangolinReportChannelDailyService.save(pangolinReportChannelDaily);
|
|
} else {
|
|
} else {
|
|
@@ -269,6 +274,7 @@ public class PangolinCrawlerServiceImpl implements PangolinCrawlerService {
|
|
for (int i = 0; i < size; i++) {
|
|
for (int i = 0; i < size; i++) {
|
|
BigDecimal clickNum = clickNode.get(i).decimalValue();
|
|
BigDecimal clickNum = clickNode.get(i).decimalValue();
|
|
PangolinReportAppHour pangolinReportAppHour = new PangolinReportAppHour();
|
|
PangolinReportAppHour pangolinReportAppHour = new PangolinReportAppHour();
|
|
|
|
+ pangolinReportAppHour.setAccountName(bindAccountLogin.getAccountName());
|
|
pangolinReportAppHour.setAppId(appId);
|
|
pangolinReportAppHour.setAppId(appId);
|
|
pangolinReportAppHour.setDate(DateUtils.parseDate(date, "yyyy-MM-dd"));
|
|
pangolinReportAppHour.setDate(DateUtils.parseDate(date, "yyyy-MM-dd"));
|
|
pangolinReportAppHour.setNum(clickNum);
|
|
pangolinReportAppHour.setNum(clickNum);
|
|
@@ -279,6 +285,7 @@ public class PangolinCrawlerServiceImpl implements PangolinCrawlerService {
|
|
queryWrapper.eq("app_id", pangolinReportAppHour.getAppId());
|
|
queryWrapper.eq("app_id", pangolinReportAppHour.getAppId());
|
|
queryWrapper.eq("type", pangolinReportAppHour.getType());
|
|
queryWrapper.eq("type", pangolinReportAppHour.getType());
|
|
queryWrapper.eq("hour", pangolinReportAppHour.getHour());
|
|
queryWrapper.eq("hour", pangolinReportAppHour.getHour());
|
|
|
|
+ queryWrapper.eq("account_name", pangolinReportAppHour.getAccountName());
|
|
if (pangolinReportAppHourService.getOne(queryWrapper) == null) {
|
|
if (pangolinReportAppHourService.getOne(queryWrapper) == null) {
|
|
pangolinReportAppHourService.save(pangolinReportAppHour);
|
|
pangolinReportAppHourService.save(pangolinReportAppHour);
|
|
} else {
|
|
} else {
|
|
@@ -294,6 +301,7 @@ public class PangolinCrawlerServiceImpl implements PangolinCrawlerService {
|
|
for (int i = 0; i < size; i++) {
|
|
for (int i = 0; i < size; i++) {
|
|
BigDecimal activeNum = activeNode.get(i).decimalValue();
|
|
BigDecimal activeNum = activeNode.get(i).decimalValue();
|
|
PangolinReportAppHour pangolinReportAppHour = new PangolinReportAppHour();
|
|
PangolinReportAppHour pangolinReportAppHour = new PangolinReportAppHour();
|
|
|
|
+ pangolinReportAppHour.setAccountName(bindAccountLogin.getAccountName());
|
|
pangolinReportAppHour.setAppId(appId);
|
|
pangolinReportAppHour.setAppId(appId);
|
|
pangolinReportAppHour.setDate(DateUtils.parseDate(date, "yyyy-MM-dd"));
|
|
pangolinReportAppHour.setDate(DateUtils.parseDate(date, "yyyy-MM-dd"));
|
|
pangolinReportAppHour.setNum(activeNum);
|
|
pangolinReportAppHour.setNum(activeNum);
|
|
@@ -304,6 +312,7 @@ public class PangolinCrawlerServiceImpl implements PangolinCrawlerService {
|
|
queryWrapper.eq("app_id", pangolinReportAppHour.getAppId());
|
|
queryWrapper.eq("app_id", pangolinReportAppHour.getAppId());
|
|
queryWrapper.eq("type", pangolinReportAppHour.getType());
|
|
queryWrapper.eq("type", pangolinReportAppHour.getType());
|
|
queryWrapper.eq("hour", pangolinReportAppHour.getHour());
|
|
queryWrapper.eq("hour", pangolinReportAppHour.getHour());
|
|
|
|
+ queryWrapper.eq("account_name", pangolinReportAppHour.getAccountName());
|
|
if (pangolinReportAppHourService.getOne(queryWrapper) == null) {
|
|
if (pangolinReportAppHourService.getOne(queryWrapper) == null) {
|
|
pangolinReportAppHourService.save(pangolinReportAppHour);
|
|
pangolinReportAppHourService.save(pangolinReportAppHour);
|
|
} else {
|
|
} else {
|
|
@@ -319,6 +328,7 @@ public class PangolinCrawlerServiceImpl implements PangolinCrawlerService {
|
|
for (int i = 0; i < size; i++) {
|
|
for (int i = 0; i < size; i++) {
|
|
BigDecimal clickNum = rateNode.get(i).decimalValue();
|
|
BigDecimal clickNum = rateNode.get(i).decimalValue();
|
|
PangolinReportAppHour pangolinReportAppHour = new PangolinReportAppHour();
|
|
PangolinReportAppHour pangolinReportAppHour = new PangolinReportAppHour();
|
|
|
|
+ pangolinReportAppHour.setAccountName(bindAccountLogin.getAccountName());
|
|
pangolinReportAppHour.setAppId(appId);
|
|
pangolinReportAppHour.setAppId(appId);
|
|
pangolinReportAppHour.setDate(DateUtils.parseDate(date, "yyyy-MM-dd"));
|
|
pangolinReportAppHour.setDate(DateUtils.parseDate(date, "yyyy-MM-dd"));
|
|
pangolinReportAppHour.setNum(clickNum);
|
|
pangolinReportAppHour.setNum(clickNum);
|
|
@@ -329,6 +339,7 @@ public class PangolinCrawlerServiceImpl implements PangolinCrawlerService {
|
|
queryWrapper.eq("app_id", pangolinReportAppHour.getAppId());
|
|
queryWrapper.eq("app_id", pangolinReportAppHour.getAppId());
|
|
queryWrapper.eq("type", pangolinReportAppHour.getType());
|
|
queryWrapper.eq("type", pangolinReportAppHour.getType());
|
|
queryWrapper.eq("hour", pangolinReportAppHour.getHour());
|
|
queryWrapper.eq("hour", pangolinReportAppHour.getHour());
|
|
|
|
+ queryWrapper.eq("account_name", pangolinReportAppHour.getAccountName());
|
|
if (pangolinReportAppHourService.getOne(queryWrapper) == null) {
|
|
if (pangolinReportAppHourService.getOne(queryWrapper) == null) {
|
|
pangolinReportAppHourService.save(pangolinReportAppHour);
|
|
pangolinReportAppHourService.save(pangolinReportAppHour);
|
|
} else {
|
|
} else {
|