|
@@ -22,12 +22,12 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import com.cloudcross.ssp.base.utils.freemarker.FreemarkerTemplateProcessor;
|
|
|
import com.cloudcross.ssp.base.web.SimpleController;
|
|
|
import com.cloudcross.ssp.common.utils.Pager;
|
|
|
-import com.cloudcross.ssp.operator.model.Account;
|
|
|
-import com.cloudcross.ssp.operator.model.DeliverAnalysis;
|
|
|
-import com.cloudcross.ssp.operator.model.RptZoneHour;
|
|
|
-import com.cloudcross.ssp.operator.service.IAdReportService;
|
|
|
-import com.cloudcross.ssp.operator.service.IRptZoneHourService;
|
|
|
-import com.cloudcross.ssp.operator.service.IZoneService;
|
|
|
+import com.cloudcross.ssp.model.Account;
|
|
|
+import com.cloudcross.ssp.model.DeliverAnalysis;
|
|
|
+import com.cloudcross.ssp.model.RptZoneHour;
|
|
|
+import com.cloudcross.ssp.service.IAdReportService;
|
|
|
+import com.cloudcross.ssp.service.IRptZoneHourService;
|
|
|
+import com.cloudcross.ssp.service.IZoneService;
|
|
|
|
|
|
/**
|
|
|
* 统计报表页面。
|
|
@@ -58,7 +58,7 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
* "2015-09-06 to 2015-09-13",广告位id是全部 首先通过登录账号得到该媒体的id
|
|
|
* 注:往前端传递的广告曝光率和点击率已经乘过100了,前端只要加个“%”就可以
|
|
|
*/
|
|
|
- com.cloudcross.ssp.back.model.Account account = getLoginUser();
|
|
|
+ Account account = getLoginUser();
|
|
|
paramMap.put("operatorId", account.getOperatorId());
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
String startDate = null;
|
|
@@ -105,18 +105,19 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
paramMap.put("startDate", startDate);
|
|
|
paramMap.put("endDate", endDate);
|
|
|
|
|
|
- int totalRow = adReportService
|
|
|
- .findCountForDeliverEffectAnalysis(paramMap);
|
|
|
+// int totalRow = adReportService
|
|
|
+// .findCountForDeliverEffectAnalysis(paramMap);
|
|
|
+ int totalRow = adReportService.findCountForDeliverEffectAnalysisOperator(paramMap);
|
|
|
Pager pager = new Pager();
|
|
|
pager.setPage(page);
|
|
|
pager.setTotalRow(totalRow);
|
|
|
List<DeliverAnalysis> reportList = adReportService
|
|
|
- .findDeliverEffectAnalysis(paramMap, pager);
|
|
|
+ .findDeliverEffectAnalysisOperator(paramMap, pager);
|
|
|
|
|
|
DeliverAnalysis sumReport = null;
|
|
|
|
|
|
// 根据广告位id和时间查询总的pv,uv,广告曝光数等等
|
|
|
- sumReport = adReportService.findSum(paramMap);
|
|
|
+ sumReport = adReportService.findSumOperator(paramMap);
|
|
|
|
|
|
// 如果没有符合条件的数据则全部置0
|
|
|
if (null == sumReport) {
|
|
@@ -210,7 +211,7 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
*/
|
|
|
@RequestMapping("/listChartData")
|
|
|
public @ResponseBody List<DeliverAnalysis> listChartData(@RequestParam HashMap<String, Object> paramMap) {
|
|
|
- com.cloudcross.ssp.back.model.Account account = getLoginUser();
|
|
|
+ Account account = getLoginUser();
|
|
|
paramMap.put("operatorId", account.getOperatorId());
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
String startDate = null;
|
|
@@ -259,7 +260,7 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
|
|
|
|
|
|
List<DeliverAnalysis> reportList = adReportService
|
|
|
- .findDeliverEffectAnalysis(paramMap);
|
|
|
+ .findDeliverEffectAnalysisOperator(paramMap);
|
|
|
|
|
|
|
|
|
return reportList;
|
|
@@ -270,7 +271,7 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
public String size(Model model,
|
|
|
@RequestParam HashMap<String, Object> paramMap,
|
|
|
@RequestParam(defaultValue = "1") int page) {
|
|
|
- com.cloudcross.ssp.back.model.Account account = getLoginUser();
|
|
|
+ Account account = getLoginUser();
|
|
|
paramMap.put("operatorId", account.getOperatorId());
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
String startDate = null;
|
|
@@ -295,13 +296,13 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
paramMap.put("startDate", startDate);
|
|
|
paramMap.put("endDate", endDate);
|
|
|
|
|
|
- int totalRow = adReportService.countBySize(paramMap);
|
|
|
+ int totalRow = adReportService.countBySizeOperator(paramMap);
|
|
|
System.out.println("bbbreport" + totalRow);
|
|
|
Pager pager = new Pager();
|
|
|
pager.setPage(page);
|
|
|
pager.setTotalRow(totalRow);
|
|
|
|
|
|
- List<DeliverAnalysis> reportList = adReportService.findBySize(paramMap,
|
|
|
+ List<DeliverAnalysis> reportList = adReportService.findBySizeOperator(paramMap,
|
|
|
pager);
|
|
|
|
|
|
System.out.println("bbbreport" + reportList);
|
|
@@ -321,7 +322,7 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
public String position(Model model,
|
|
|
@RequestParam HashMap<String, Object> paramMap,
|
|
|
@RequestParam(defaultValue = "1") int page) {
|
|
|
- com.cloudcross.ssp.back.model.Account account = getLoginUser();
|
|
|
+ Account account = getLoginUser();
|
|
|
paramMap.put("operatorId", account.getOperatorId());
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
String startDate = null;
|
|
@@ -344,11 +345,11 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
}
|
|
|
paramMap.put("startDate", startDate);
|
|
|
paramMap.put("endDate", endDate);
|
|
|
- int totalRow = adReportService.countBySystem(paramMap);
|
|
|
+ int totalRow = adReportService.countBySystemOperator(paramMap);
|
|
|
Pager pager = new Pager();
|
|
|
pager.setPage(page);
|
|
|
pager.setTotalRow(totalRow);
|
|
|
- List<DeliverAnalysis> reportList = adReportService.findByPosition(
|
|
|
+ List<DeliverAnalysis> reportList = adReportService.findByPositionOperator(
|
|
|
paramMap);
|
|
|
|
|
|
model.addAllAttributes(paramMap);
|
|
@@ -368,7 +369,7 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
@RequestParam HashMap<String, Object> paramMap,
|
|
|
@RequestParam(defaultValue = "1") int page) {
|
|
|
|
|
|
- com.cloudcross.ssp.back.model.Account account = getLoginUser();
|
|
|
+ Account account = getLoginUser();
|
|
|
paramMap.put("operatorId", account.getOperatorId());
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
String startDate = null;
|
|
@@ -392,13 +393,13 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
}
|
|
|
paramMap.put("startDate", startDate);
|
|
|
paramMap.put("endDate", endDate);
|
|
|
- int totalRow = adReportService.countBySystem(paramMap);
|
|
|
+ int totalRow = adReportService.countBySystemOperator(paramMap);
|
|
|
System.out.println("bbbreport" + totalRow);
|
|
|
Pager pager = new Pager();
|
|
|
pager.setPage(page);
|
|
|
pager.setTotalRow(totalRow);
|
|
|
|
|
|
- List<DeliverAnalysis> reportList = adReportService.findBySystem(
|
|
|
+ List<DeliverAnalysis> reportList = adReportService.findBySystemOperator(
|
|
|
paramMap, pager);
|
|
|
|
|
|
System.out.println("bbbreport" + reportList);
|
|
@@ -424,7 +425,7 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
* 前端要传递一个时间段默认的时间段是昨天,传递过来的参数为dateRangePicker,格式为
|
|
|
* "2015-09-06 to 2015-09-13" 注:往前端传递的广告曝光率和点击率已经乘过100了,前端只要加个“%”就可以
|
|
|
*/
|
|
|
- com.cloudcross.ssp.back.model.Account account = getLoginUser();
|
|
|
+ Account account = getLoginUser();
|
|
|
paramMap.put("operatorId", account.getOperatorId());
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
String startDate = null;
|
|
@@ -449,12 +450,12 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
|
|
|
paramMap.put("startDate", startDate);
|
|
|
paramMap.put("endDate", endDate);
|
|
|
- int totalRow = adReportService.countByApmac(paramMap);
|
|
|
+ int totalRow = adReportService.countByApmacOperator(paramMap);
|
|
|
Pager pager = new Pager();
|
|
|
pager.setPage(page);
|
|
|
pager.setTotalRow(totalRow);
|
|
|
List<DeliverAnalysis> reportList = adReportService
|
|
|
- .findByApmac(paramMap, pager);
|
|
|
+ .findByApmacOperator(paramMap, pager);
|
|
|
model.addAllAttributes(paramMap);
|
|
|
model.addAttribute("reportList", reportList);
|
|
|
model.addAttribute("pager", pager);
|
|
@@ -477,7 +478,7 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
* 前端要传递一个时间段默认的时间段是昨天,传递过来的参数为dateRangePicker,格式为
|
|
|
* "2015-09-06 to 2015-09-13" 注:往前端传递的广告曝光率和点击率已经乘过100了,前端只要加个“%”就可以
|
|
|
*/
|
|
|
- com.cloudcross.ssp.back.model.Account account = getLoginUser();
|
|
|
+ Account account = getLoginUser();
|
|
|
paramMap.put("operatorId", account.getOperatorId());
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
String startDate = null;
|
|
@@ -502,12 +503,12 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
|
|
|
paramMap.put("startDate", startDate);
|
|
|
paramMap.put("endDate", endDate);
|
|
|
- int totalRow = adReportService.countBySystem(paramMap);
|
|
|
+ int totalRow = adReportService.countBySystemOperator(paramMap);
|
|
|
Pager pager = new Pager();
|
|
|
pager.setPage(page);
|
|
|
pager.setTotalRow(totalRow);
|
|
|
List<DeliverAnalysis> reportList = adReportService
|
|
|
- .findByDevice(paramMap);
|
|
|
+ .findByDeviceOperator(paramMap);
|
|
|
|
|
|
model.addAllAttributes(paramMap);
|
|
|
model.addAttribute("reportList", reportList);
|
|
@@ -524,7 +525,7 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
@RequestParam HashMap<String, Object> paramMap,
|
|
|
@RequestParam(defaultValue = "1") int page) {
|
|
|
|
|
|
- com.cloudcross.ssp.back.model.Account account = getLoginUser();
|
|
|
+ Account account = getLoginUser();
|
|
|
paramMap.put("operatorId", account.getOperatorId());
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
String startDate = null;
|
|
@@ -548,12 +549,12 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
}
|
|
|
paramMap.put("startDate", startDate);
|
|
|
paramMap.put("endDate", endDate);
|
|
|
- int totalRow = adReportService.countByAllAreal(paramMap);
|
|
|
+ int totalRow = adReportService.countByAllArealOperator(paramMap);
|
|
|
Pager pager = new Pager();
|
|
|
pager.setPage(page);
|
|
|
pager.setTotalRow(totalRow);
|
|
|
|
|
|
- List<DeliverAnalysis> reportList = adReportService.findByAllAreal(
|
|
|
+ List<DeliverAnalysis> reportList = adReportService.findByAllArealOperator(
|
|
|
paramMap, pager);
|
|
|
|
|
|
model.addAllAttributes(paramMap);
|
|
@@ -568,7 +569,7 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
public @ResponseBody List<DeliverAnalysis> arealCtiy(Model model,
|
|
|
@RequestParam HashMap<String, Object> paramMap) {
|
|
|
|
|
|
- com.cloudcross.ssp.back.model.Account account = getLoginUser();
|
|
|
+ Account account = getLoginUser();
|
|
|
paramMap.put("operatorId", account.getOperatorId());
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
String startDate = null;
|
|
@@ -593,7 +594,7 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
paramMap.put("startDate", startDate);
|
|
|
paramMap.put("endDate", endDate);
|
|
|
|
|
|
- List<DeliverAnalysis> reportList = adReportService.findByArealCity(paramMap);
|
|
|
+ List<DeliverAnalysis> reportList = adReportService.findByArealCityOperator(paramMap);
|
|
|
|
|
|
return reportList;
|
|
|
}
|
|
@@ -608,7 +609,7 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
* 前端要传递一个时间段默认的时间段是昨天,传递过来的参数为dateRangePicker,格式为
|
|
|
* "2015-09-06 to 2015-09-13" 注:往前端传递的广告曝光率和点击率已经乘过100了,前端只要加个“%”就可以
|
|
|
*/
|
|
|
- com.cloudcross.ssp.back.model.Account account = getLoginUser();
|
|
|
+ Account account = getLoginUser();
|
|
|
paramMap.put("operatorId", account.getOperatorId());
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
String startDate = null;
|
|
@@ -633,12 +634,12 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
|
|
|
paramMap.put("startDate", startDate);
|
|
|
paramMap.put("endDate", endDate);
|
|
|
- int totalRow = adReportService.countByPlace(paramMap);
|
|
|
+ int totalRow = adReportService.countByPlaceOperator(paramMap);
|
|
|
Pager pager = new Pager();
|
|
|
pager.setPage(page);
|
|
|
pager.setTotalRow(totalRow);
|
|
|
|
|
|
- List<DeliverAnalysis> reportList = adReportService.findByPlace(
|
|
|
+ List<DeliverAnalysis> reportList = adReportService.findByPlaceOperator(
|
|
|
paramMap, pager);
|
|
|
|
|
|
model.addAllAttributes(paramMap);
|
|
@@ -695,14 +696,14 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
- 24 * 60 * 60 * 1000));
|
|
|
}
|
|
|
|
|
|
- com.cloudcross.ssp.back.model.Account account = getLoginUser();
|
|
|
+ Account account = getLoginUser();
|
|
|
paramMap.put("operatorId", account.getOperatorId());
|
|
|
paramMap.put("startDate", startDate);
|
|
|
paramMap.put("endDate", endDate);
|
|
|
paramMap.put("zoneId", zoneId);
|
|
|
|
|
|
List<DeliverAnalysis> reportList = adReportService
|
|
|
- .findDeliverEffectAnalysis(paramMap);
|
|
|
+ .findDeliverEffectAnalysisOperator(paramMap);
|
|
|
|
|
|
System.out.println("chenyou");
|
|
|
for(DeliverAnalysis d : reportList) {
|
|
@@ -768,7 +769,7 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
* 前端要传递一个时间段默认的时间段是昨天,传递过来的参数为dateRangePicker,格式为
|
|
|
* "2015-09-06 to 2015-09-13" 注:往前端传递的广告曝光率和点击率已经乘过100了,前端只要加个“%”就可以
|
|
|
*/
|
|
|
- com.cloudcross.ssp.back.model.Account account = getLoginUser();
|
|
|
+ Account account = getLoginUser();
|
|
|
paramMap.put("operatorId", account.getOperatorId());
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
String startDate = null;
|
|
@@ -800,19 +801,19 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
* 判断一下是哪个报表
|
|
|
*/
|
|
|
if (paramMap.containsKey("size")) {
|
|
|
- reportList = adReportService.findBySize(paramMap);
|
|
|
+ reportList = adReportService.findBySizeOperator(paramMap);
|
|
|
}
|
|
|
|
|
|
if (paramMap.containsKey("position")) {
|
|
|
- reportList = adReportService.findByPosition(paramMap);
|
|
|
+ reportList = adReportService.findByPositionOperator(paramMap);
|
|
|
}
|
|
|
|
|
|
if (paramMap.containsKey("system")) {
|
|
|
- reportList = adReportService.findBySystem(paramMap);
|
|
|
+ reportList = adReportService.findBySystemOperator(paramMap);
|
|
|
}
|
|
|
|
|
|
if (paramMap.containsKey("device")) {
|
|
|
- reportList = adReportService.findByDevice(paramMap);
|
|
|
+ reportList = adReportService.findByDeviceOperator(paramMap);
|
|
|
}
|
|
|
|
|
|
if (paramMap.containsKey("location")) {
|
|
@@ -824,7 +825,7 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
* 首先找到所有的省的总的pv,uv,流量占比等等信息,然后对找到的集合进行循环,找到每一个省下面的市的pv,uv,流量占比等等信息
|
|
|
*/
|
|
|
List<DeliverAnalysis> cnList = adReportService
|
|
|
- .findAllArea(paramMap);
|
|
|
+ .findAllAreaOperator(paramMap);
|
|
|
|
|
|
for (int i = 0; i < cnList.size(); i++) {
|
|
|
cnList.get(i).setCnMark(1);
|
|
@@ -832,7 +833,7 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
|
|
|
paramMap.put("cn", cnList.get(i).getCn());
|
|
|
List<DeliverAnalysis> cityList = adReportService
|
|
|
- .findByAreal(paramMap);
|
|
|
+ .findByArealOperator(paramMap);
|
|
|
|
|
|
for (int j = 0; j < cityList.size(); j++) {
|
|
|
reportList.add(cityList.get(j));
|
|
@@ -842,11 +843,11 @@ public class AdvertiserReportController extends SimpleController {
|
|
|
}
|
|
|
|
|
|
if (paramMap.containsKey("place")) {
|
|
|
- reportList = adReportService.findByPlace(paramMap);
|
|
|
+ reportList = adReportService.findByPlaceOperator(paramMap);
|
|
|
}
|
|
|
|
|
|
if (paramMap.containsKey("apmac")) {
|
|
|
- reportList = adReportService.findByApmac(paramMap);
|
|
|
+ reportList = adReportService.findByApmacOperator(paramMap);
|
|
|
}
|
|
|
|
|
|
paramMap.put("dataList", reportList);
|