|
@@ -22,6 +22,7 @@ import org.springframework.context.annotation.Primary;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.text.DecimalFormat;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
@@ -262,9 +263,9 @@ public class BytedanceAdvertiserHourlyReportServiceImpl extends ServiceImpl<Byte
|
|
|
double convetRate = 0;
|
|
|
if (reportCostVo.getClick() != 0){
|
|
|
//平均点击单价 = 花费 / 点击数
|
|
|
- avgClick = reportCostVo.getCost() / reportCostVo.getClick();
|
|
|
- //点击率 = 展示 / 点击数
|
|
|
- clickRate = reportCostVo.getShowNum() / reportCostVo.getClick();
|
|
|
+ avgClick = reportCostVo.getCost() / reportCostVo.getClick().doubleValue();
|
|
|
+ //点击率 = 点击数 / 展示数
|
|
|
+ clickRate = reportCostVo.getClick().doubleValue() / reportCostVo.getShowNum().doubleValue();
|
|
|
//转化率 = 转化数 / 点击数 * 100
|
|
|
convetRate = Double.valueOf(reportCostVo.getConvertNum()) / Double.valueOf(reportCostVo.getClick()) * 100;
|
|
|
}
|