Explorar o código

添加默认值

yumeng %!s(int64=5) %!d(string=hai) anos
pai
achega
b0e5da25a5

+ 28 - 0
module-report/src/main/java/cn/com/ctop/bytedance/service/impl/AccountReportServiceImpl.java

@@ -264,6 +264,8 @@ public class AccountReportServiceImpl implements IAccountReportService {
                             } else {
                                 chainRatioJson.put("costProportion", 0); // 消耗环比
                             }
+                        } else {
+                            chainRatioJson.put("costProportion", 0); // 消耗环比
                         }
 
                         Long photoShow = nowAccountSummary.getLong("photoShow");// 今日封面展示
@@ -275,6 +277,8 @@ public class AccountReportServiceImpl implements IAccountReportService {
                             } else {
                                 chainRatioJson.put("showProportion", 0); // 展示环比
                             }
+                        } else {
+                            chainRatioJson.put("showProportion", 0); // 展示环比
                         }
 
                         Long photoClick = nowAccountSummary.getLong("photoClick");// 封面点击
@@ -286,6 +290,8 @@ public class AccountReportServiceImpl implements IAccountReportService {
                             } else {
                                 chainRatioJson.put("photoClickProportion", 0); // 点击环比
                             }
+                        } else {
+                            chainRatioJson.put("photoClickProportion", 0); // 点击环比
                         }
 
                         Long nowAClick = nowAccountSummary.getLong("aclick"); // 爆光
@@ -297,6 +303,8 @@ public class AccountReportServiceImpl implements IAccountReportService {
                             } else {
                                 chainRatioJson.put("aClickProportion", 0); //爆光环比
                             }
+                        } else {
+                            chainRatioJson.put("aClickProportion", 0); //爆光环比
                         }
 
                         BigDecimal nowPhotoClickRatio = nowAccountSummary.getBigDecimal("photoClickRatio"); // 封面点击率
@@ -308,6 +316,8 @@ public class AccountReportServiceImpl implements IAccountReportService {
                             } else {
                                 chainRatioJson.put("photoClickRatioProportion", 0); // 封面点击率环比
                             }
+                        } else {
+                            chainRatioJson.put("photoClickRatioProportion", 0); // 封面点击率环比
                         }
 
                         BigDecimal nowCvr = nowAccountSummary.getBigDecimal("cvr"); // cvr
@@ -319,6 +329,8 @@ public class AccountReportServiceImpl implements IAccountReportService {
                             } else {
                                 chainRatioJson.put("cvrProportion", 0); // cvr环比
                             }
+                        } else {
+                            chainRatioJson.put("cvrProportion", 0); // cvr环比
                         }
 
                         BigDecimal nowCpm = nowAccountSummary.getBigDecimal("cpm"); // cpm
@@ -330,6 +342,8 @@ public class AccountReportServiceImpl implements IAccountReportService {
                             } else {
                                 chainRatioJson.put("cpmProportion", 0); // cpm环比
                             }
+                        } else {
+                            chainRatioJson.put("cpmProportion", 0); // cpm环比
                         }
 
                         Long nowBClick = nowAccountSummary.getLong("bClick"); // 行为数
@@ -341,6 +355,8 @@ public class AccountReportServiceImpl implements IAccountReportService {
                             } else {
                                 chainRatioJson.put("bClickProportion", 0); //行为数环比
                             }
+                        } else {
+                            chainRatioJson.put("bClickProportion", 0); //行为数环比
                         }
 
                         Long nowFormCount = nowAccountSummary.getLong("formCount"); // 表单提交数
@@ -353,6 +369,8 @@ public class AccountReportServiceImpl implements IAccountReportService {
                             } else {
                                 chainRatioJson.put("formCountProportion", 0); //表单提交数环比
                             }
+                        } else {
+                            chainRatioJson.put("formCountProportion", 0); //表单提交数环比
                         }
 
 
@@ -365,6 +383,8 @@ public class AccountReportServiceImpl implements IAccountReportService {
                             } else {
                                 chainRatioJson.put("activationCountProportion", 0); //表单提交数环比
                             }
+                        } else {
+                            chainRatioJson.put("activationCountProportion", 0); //表单提交数环比
                         }
 
                         BigDecimal nowFormPrice = nowAccountSummary.getBigDecimal("formPrice"); // 表单提交单价
@@ -376,6 +396,8 @@ public class AccountReportServiceImpl implements IAccountReportService {
                             } else {
                                 chainRatioJson.put("beforeFormPriceProportion", 0); // 折前消耗单价
                             }
+                        } else {
+                            chainRatioJson.put("beforeFormPriceProportion", 0); // 折前消耗单价
                         }
 
 
@@ -388,6 +410,8 @@ public class AccountReportServiceImpl implements IAccountReportService {
                             } else {
                                 chainRatioJson.put("afterFormPriceProportion", 0); // 折后提交单价
                             }
+                        } else {
+                            chainRatioJson.put("afterFormPriceProportion", 0); // 折后提交单价
                         }
 
 
@@ -400,6 +424,8 @@ public class AccountReportServiceImpl implements IAccountReportService {
                             } else {
                                 chainRatioJson.put("beforeActivationPriceProportion", 0); // 折前激活单价
                             }
+                        } else {
+                            chainRatioJson.put("beforeActivationPriceProportion", 0); // 折前激活单价
                         }
 
 
@@ -412,6 +438,8 @@ public class AccountReportServiceImpl implements IAccountReportService {
                             } else {
                                 chainRatioJson.put("afterActivationPriceProportion", 0); // 折后激活单价
                             }
+                        } else {
+                            chainRatioJson.put("afterActivationPriceProportion", 0); // 折后激活单价
                         }