소스 검색

Merge remote-tracking branch 'origin/test' into test

syh 5 년 전
부모
커밋
b4275eebc1

+ 4 - 4
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/controller/KuaishouReportDailyAgentSumController.java

@@ -273,7 +273,7 @@ public class KuaishouReportDailyAgentSumController {
 			 return result;
 		 }
 
-		 List<KuaishouReportDailyAgent> kuaishouReportDailyAgentList = kuaishouReportDailyAgentSumService.companyReportAccountDetailList(date, advertiserName);
+		 List<KuaishouReportDailyAgent> kuaishouReportDailyAgentList = kuaishouReportDailyAgentSumService.companyReportAccountDetailList(date, advertiserName, null);
 		 result.setResult(kuaishouReportDailyAgentList);
 		 result.setSuccess(true);
 		 result.setMessage("success");
@@ -283,7 +283,7 @@ public class KuaishouReportDailyAgentSumController {
 
 	 @AutoLog(value = "公司报表按天导出Excel")
 	 @ApiOperation(value="公司报表按天导出Excel", notes="公司报表按天导出Excel")
-	 @GetMapping(value = "/companyReportExportExcel")
+	 @PostMapping(value = "/companyReportExportExcel")
 	 public void companyReportExportExcel( @RequestBody ParamsDTO dto,
 										   //@RequestParam("startDate")String startDate,
 										   //@RequestParam("endDate")String endDate,
@@ -334,7 +334,7 @@ public class KuaishouReportDailyAgentSumController {
 
 	 @AutoLog(value = "公司日报明细表按天导出Excel")
 	 @ApiOperation(value="公司日报明细表按天导出Excel", notes="公司报表按天导出Excel")
-	 @GetMapping(value = "/companyReportAccountDetailListExportExcel")
+	 @PostMapping(value = "/companyReportAccountDetailListExportExcel")
 	 public void companyReportAccountDetailListExportExcel( @RequestBody ParamsDTO dto,
 										   //@RequestParam("date")String date,
 										   HttpServletRequest request,
@@ -344,7 +344,7 @@ public class KuaishouReportDailyAgentSumController {
 		 result.setMessage("success");
 
 		 //公司报表按天明细
-		 List<KuaishouReportDailyAgent> kuaishouReportDailyAgentList = kuaishouReportDailyAgentSumService.companyReportAccountDetailList(dto.getDate(), null);
+		 List<KuaishouReportDailyAgent> kuaishouReportDailyAgentList = kuaishouReportDailyAgentSumService.companyReportAccountDetailList(dto.getDate(), dto.getAdvertiserName(), dto.getIsExportNullData());
 
 		 //导出excel
 		 List<List<Object>> group = new ArrayList<>();

+ 5 - 5
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/entity/KuaishouReportDailyAgentSum.java

@@ -38,7 +38,7 @@ public class KuaishouReportDailyAgentSum {
 	/**有消费计划数*/
 	@Excel(name = "有消费计划数", width = 15)
     @ApiModelProperty(value = "有消费计划数")
-	private Integer costCampaignCount;
+	private Long costCampaignCount;
 	/**总余额*/
 	@Excel(name = "总余额", width = 15)
     @ApiModelProperty(value = "总余额")
@@ -70,19 +70,19 @@ public class KuaishouReportDailyAgentSum {
 	/**封面曝光数*/
 	@Excel(name = "封面曝光数", width = 15)
     @ApiModelProperty(value = "封面曝光数")
-	private Integer fengmianShowCount;
+	private Long fengmianShowCount;
 	/**封面点击数*/
 	@Excel(name = "封面点击数", width = 15)
     @ApiModelProperty(value = "封面点击数")
-	private Integer fengmianClickCount;
+	private Long fengmianClickCount;
 	/**素材曝光数*/
 	@Excel(name = "素材曝光数", width = 15)
     @ApiModelProperty(value = "素材曝光数")
-	private Integer sucaiShowCount;
+	private Long sucaiShowCount;
 	/**行为数*/
 	@Excel(name = "行为数", width = 15)
     @ApiModelProperty(value = "行为数")
-	private Integer convertCount;
+	private Long convertCount;
 	/**封面点击率*/
 	@Excel(name = "封面点击率", width = 15)
     @ApiModelProperty(value = "封面点击率")

+ 1 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/entity/ParamsDTO.java

@@ -11,4 +11,5 @@ public class ParamsDTO implements Serializable {
     private String endDate;
     private String date;
     private String advertiserName;  //广告主名称
+    private Integer isExportNullData; //是否导出为0数据
 }

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/KuaishouReportDailyAgentSumMapper.java

@@ -19,7 +19,7 @@ public interface KuaishouReportDailyAgentSumMapper extends BaseMapper<KuaishouRe
     KuaishouReportDailyAgentSum companyReportSum(@Param("startDate")String startDate, @Param("endDate")String endDate);
 
     //根据某天的时间获取公司报表明细
-    List<KuaishouReportDailyAgent> companyReportAccountDetailList(@Param("date")String date, @Param("advertiserName")String advertiserName);
+    List<KuaishouReportDailyAgent> companyReportAccountDetailList(@Param("date")String date, @Param("advertiserName")String advertiserName, @Param("isExportNullData")Integer isExportNullData);
 
     //根据时间段获取公司报表明细
     List<KuaishouReportDailyAgent> companyReportAccountDetailListByDateRange(@Param("startDate")String startDate, @Param("endDate")String endDate);

+ 6 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouReportDailyAgentSumMapper.xml

@@ -86,6 +86,12 @@
         <if test="advertiserName != null and advertiserName != ''">
             and advertiser_name like concat('%',#{advertiserName},'%')
         </if>
+        <if test="isExportNullData == 0 or isExportNullData == '0'">  <!-- 判断是否导出公司明细中各字段总合为0的数据  1-导出 0-不导出 -->
+            and
+            (cost_campaign_count + balance + cost + xianjin_cost + fandian_cost + kuangfan_cost + jili_cost +
+            xinyong_cost + fengmian_show_count + fengmian_click_count + sucai_show_count + convert_count +
+            fengmian_click_rate + convert_click_rate) != 0
+        </if>
     </select>
 
     <!-- 根据传入开始时间和结束获取公司报表账户的列表 -->

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/IKuaishouReportDailyAgentSumService.java

@@ -16,7 +16,7 @@ public interface IKuaishouReportDailyAgentSumService extends IService<KuaishouRe
     List<KuaishouReportDailyAgentSum> companyReport(String startDate, String endDate);
     KuaishouReportDailyAgentSum companyReportSum(String startDate, String endDate);
 
-    List<KuaishouReportDailyAgent> companyReportAccountDetailList(String date, String advertiserName);
+    List<KuaishouReportDailyAgent> companyReportAccountDetailList(String date, String advertiserName, Integer isExportNullData);
 
     List<KuaishouReportDailyAgent> companyReportAccountDetailListByDateRange(String startDate, String endDate);
 }

+ 5 - 5
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaishouReportDailyAgentServiceImpl.java

@@ -202,17 +202,17 @@ public class KuaishouReportDailyAgentServiceImpl extends ServiceImpl<KuaishouRep
                             KuaishouReportDailyAgentSum kuaishouReportDailyAgentSum = new KuaishouReportDailyAgentSum();
                             kuaishouReportDailyAgentSum.setBalance(dataNode.get("totalBalanceDouble").decimalValue());
                             kuaishouReportDailyAgentSum.setConvertClickRate(dataNode.get("actionbarClickRatio").decimalValue());
-                            kuaishouReportDailyAgentSum.setConvertCount(dataNode.get("actionbarClick").asInt());
+                            kuaishouReportDailyAgentSum.setConvertCount(dataNode.get("actionbarClick").asLong());
                             kuaishouReportDailyAgentSum.setCost(dataNode.get("totalChargedInYuan").decimalValue());
-                            kuaishouReportDailyAgentSum.setCostCampaignCount(dataNode.get("chargedCampaignCount").asInt());
+                            kuaishouReportDailyAgentSum.setCostCampaignCount(dataNode.get("chargedCampaignCount").asLong());
                             kuaishouReportDailyAgentSum.setDate(sdf.parse(currentDate));
-                            kuaishouReportDailyAgentSum.setFengmianClickCount(dataNode.get("adPhotoClick").asInt());
+                            kuaishouReportDailyAgentSum.setFengmianClickCount(dataNode.get("adPhotoClick").asLong());
                             kuaishouReportDailyAgentSum.setFengmianClickRate(dataNode.get("clickRatio").decimalValue());
-                            kuaishouReportDailyAgentSum.setFengmianShowCount(dataNode.get("impression").asInt());
+                            kuaishouReportDailyAgentSum.setFengmianShowCount(dataNode.get("impression").asLong());
                             kuaishouReportDailyAgentSum.setFandianCost(dataNode.get("rebateRealChargedInYuan").decimalValue());
                             kuaishouReportDailyAgentSum.setJiliCost(dataNode.get("directRebateRealChargedInYuan").decimalValue());
                             kuaishouReportDailyAgentSum.setKuangfanCost(dataNode.get("contractRebateRealChargedInYuan").decimalValue());
-                            kuaishouReportDailyAgentSum.setSucaiShowCount(dataNode.get("click").asInt());
+                            kuaishouReportDailyAgentSum.setSucaiShowCount(dataNode.get("click").asLong());
                             kuaishouReportDailyAgentSum.setXianjinCost(dataNode.get("realChargedInYuan").decimalValue());
                             kuaishouReportDailyAgentSum.setXinyongCost(dataNode.get("creditRealChargedInYuan").decimalValue());
                             QueryWrapper<KuaishouReportDailyAgentSum> queryWrapper = new QueryWrapper<>();

+ 2 - 2
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaishouReportDailyAgentSumServiceImpl.java

@@ -35,8 +35,8 @@ public class KuaishouReportDailyAgentSumServiceImpl extends ServiceImpl<Kuaishou
 
     //公司报表详情
     @Override
-    public List<KuaishouReportDailyAgent> companyReportAccountDetailList(String date, String advertiserName){
-        return kuaishouReportDailyAgentSumMapper.companyReportAccountDetailList(date, advertiserName);
+    public List<KuaishouReportDailyAgent> companyReportAccountDetailList(String date, String advertiserName, Integer isExportNullData){
+        return kuaishouReportDailyAgentSumMapper.companyReportAccountDetailList(date, advertiserName, isExportNullData);
     }
 
     //公司报表详情