|
@@ -187,7 +187,8 @@ public class KuaiShouRealTimeController {
|
|
unitInfo.setUnitName(vo.getString("unit_name"));
|
|
unitInfo.setUnitName(vo.getString("unit_name"));
|
|
|
|
|
|
//出价
|
|
//出价
|
|
- unitInfo.setBid(Double.valueOf(vo.getLong("bid")));
|
|
|
|
|
|
+ unitInfo.setBid(vo.getLong("bid"));
|
|
|
|
+ unitInfo.setCpaBid(vo.getLong("cpa_bid"));
|
|
unitInfo.setBidType(vo.getInteger("bid_type"));
|
|
unitInfo.setBidType(vo.getInteger("bid_type"));
|
|
//优化目标
|
|
//优化目标
|
|
conver = vo.getInteger("ocpx_action_type");
|
|
conver = vo.getInteger("ocpx_action_type");
|
|
@@ -198,6 +199,9 @@ public class KuaiShouRealTimeController {
|
|
unitInfo.setUnitId(vo.getLong("unit_id"));
|
|
unitInfo.setUnitId(vo.getLong("unit_id"));
|
|
unitInfo.setUnitName(vo.getString("unit_name"));
|
|
unitInfo.setUnitName(vo.getString("unit_name"));
|
|
|
|
|
|
|
|
+ //投放状态 1:投放中;2:暂停 3:删除
|
|
|
|
+ unitInfo.setPutStatus(vo.getInteger("put_status"));
|
|
|
|
+
|
|
//激活成本 = 花费 / 激活数
|
|
//激活成本 = 花费 / 激活数
|
|
String activationCost = "0";
|
|
String activationCost = "0";
|
|
|
|
|
|
@@ -250,33 +254,42 @@ public class KuaiShouRealTimeController {
|
|
//操作建议
|
|
//操作建议
|
|
//消耗
|
|
//消耗
|
|
Double charge = unitInfo.getCharge().doubleValue();
|
|
Double charge = unitInfo.getCharge().doubleValue();
|
|
- //出价
|
|
|
|
- Double bid = unitInfo.getBid();
|
|
|
|
|
|
+ //出价 单位:厘
|
|
|
|
+ long bid = new Long("1000");
|
|
|
|
+ //2:CPC
|
|
|
|
+ if (unitInfo.getBidType() == 2){
|
|
|
|
+ bid = unitInfo.getBid();
|
|
|
|
+ //10:OCPM
|
|
|
|
+ }else if(unitInfo.getBidType() == 10){
|
|
|
|
+ bid = unitInfo.getCpaBid();
|
|
|
|
+ }
|
|
|
|
+ Double price = new Double(bid/1000).doubleValue();
|
|
|
|
+
|
|
//转化数量
|
|
//转化数量
|
|
Integer converNum = unitInfo.getConverNum();
|
|
Integer converNum = unitInfo.getConverNum();
|
|
//转化成本
|
|
//转化成本
|
|
Double converCost = unitInfo.getConverCost();
|
|
Double converCost = unitInfo.getConverCost();
|
|
|
|
|
|
//1. 转化成本大于出价×120%,消耗大于500元:
|
|
//1. 转化成本大于出价×120%,消耗大于500元:
|
|
- if ((converCost > bid * 1.2) && (charge > 500)) {
|
|
|
|
|
|
+ if ((converCost > price * 1.2) && (charge > 500)) {
|
|
unitInfo.setOperationAgree("高成本 | 有消耗");
|
|
unitInfo.setOperationAgree("高成本 | 有消耗");
|
|
unitInfo.setOperationAgreeContent("建议限制预算");
|
|
unitInfo.setOperationAgreeContent("建议限制预算");
|
|
unitInfo.setOperationAgreeInfo("当前广告组转化成本偏高且消耗大于500,建议限制预算;");
|
|
unitInfo.setOperationAgreeInfo("当前广告组转化成本偏高且消耗大于500,建议限制预算;");
|
|
}
|
|
}
|
|
//2. 转化成本大于出价×120%,转化数大于10小于等于50:
|
|
//2. 转化成本大于出价×120%,转化数大于10小于等于50:
|
|
- if (converCost > bid * 1.2 && LinkUtils.isInTheInterval(String.valueOf(converNum), "(10,50)")) {
|
|
|
|
|
|
+ if (converCost > price * 1.2 && LinkUtils.isInTheInterval(String.valueOf(converNum), "(10,50)")) {
|
|
unitInfo.setOperationAgree("高成本 | 有转化");
|
|
unitInfo.setOperationAgree("高成本 | 有转化");
|
|
unitInfo.setOperationAgreeContent("建议限制预算");
|
|
unitInfo.setOperationAgreeContent("建议限制预算");
|
|
unitInfo.setOperationAgreeInfo("当前广告组成本大于出价×120%且转化数介于10-50之间;");
|
|
unitInfo.setOperationAgreeInfo("当前广告组成本大于出价×120%且转化数介于10-50之间;");
|
|
}
|
|
}
|
|
//3. 转化成本大于出价×120%,转化数大于50
|
|
//3. 转化成本大于出价×120%,转化数大于50
|
|
- if (converCost > bid * 1.2 && LinkUtils.isInTheInterval(String.valueOf(converNum), "(50,∞)")) {
|
|
|
|
|
|
+ if (converCost > price * 1.2 && LinkUtils.isInTheInterval(String.valueOf(converNum), "(50,∞)")) {
|
|
unitInfo.setOperationAgree("高成本 | 有转化");
|
|
unitInfo.setOperationAgree("高成本 | 有转化");
|
|
unitInfo.setOperationAgreeContent("建议降低出价;");
|
|
unitInfo.setOperationAgreeContent("建议降低出价;");
|
|
unitInfo.setOperationAgreeInfo("当前转化成本大于出价×120%,转化数大于50,建议降低出价;");
|
|
unitInfo.setOperationAgreeInfo("当前转化成本大于出价×120%,转化数大于50,建议降低出价;");
|
|
}
|
|
}
|
|
//4. 转化成本小于等于出价×120%,转化数大于10小于等于50
|
|
//4. 转化成本小于等于出价×120%,转化数大于10小于等于50
|
|
- if (converCost <= bid * 1.2 && LinkUtils.isInTheInterval(String.valueOf(converNum), "(10,50]")) {
|
|
|
|
|
|
+ if (converCost <= price * 1.2 && LinkUtils.isInTheInterval(String.valueOf(converNum), "(10,50]")) {
|
|
unitInfo.setOperationAgree("成本合理 | 有转化");
|
|
unitInfo.setOperationAgree("成本合理 | 有转化");
|
|
unitInfo.setOperationAgreeContent("建议复制推广组或放开预算");
|
|
unitInfo.setOperationAgreeContent("建议复制推广组或放开预算");
|
|
unitInfo.setOperationAgreeInfo("当前转化成本小于等于出价×120%,转化数大于10小于等于50,建议复制推广组或放开预算;");
|
|
unitInfo.setOperationAgreeInfo("当前转化成本小于等于出价×120%,转化数大于10小于等于50,建议复制推广组或放开预算;");
|