|
@@ -1238,7 +1238,8 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
|
private void addGroup(Long advertiserId, JSONArray details) {
|
|
|
JSONObject json = warningOperationService.getBidTypeAndMaxBid(advertiserId);
|
|
|
Long maxBid = json.getLong("maxBid");// 最高出价
|
|
|
- Integer bidType = json.getInteger("bidType"); // 出价方式
|
|
|
+ String bidTypeStr = json.getString("bidType"); // 出价方式
|
|
|
+ JSONArray bidTypeArr = JSONArray.parseArray(bidTypeStr);
|
|
|
String ocpxActionTypeStr = json.getString("ocpxActionType"); // 优化目标
|
|
|
JSONArray bidArr = JSONArray.parseArray(ocpxActionTypeStr);
|
|
|
if (!Check.isNull(details)) {
|
|
@@ -1255,18 +1256,25 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
|
String unit_name = detail.getString("unit_name");
|
|
|
Integer status = detail.getInteger("status");
|
|
|
Integer put_status = detail.getInteger("put_status");
|
|
|
-
|
|
|
if (put_status == 1) { // 组状态为 投放中的
|
|
|
if (status != 15) { // 广告组状态为非暂停
|
|
|
- Boolean trueOrFalse = false;
|
|
|
+ Boolean ocpxTrueOrFalse = false;
|
|
|
for (int j = 0; j < bidArr.size(); j++) {
|
|
|
Integer ocpxActionType = (Integer) bidArr.get(j);
|
|
|
if (ocpxActionType.equals(ocpx_action_type)) {
|
|
|
- trueOrFalse = true;
|
|
|
+ ocpxTrueOrFalse = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Boolean bidTypeTrueOrFalse = false;
|
|
|
+ for (int j = 0; j < bidTypeArr.size(); j++) {
|
|
|
+ Integer bidType = (Integer) bidTypeArr.get(j);
|
|
|
+ if (bidType.equals(bid_type)) {
|
|
|
+ bidTypeTrueOrFalse = true;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- if ((!bidType.equals(bid_type)) || !trueOrFalse) { // 出价方式设置非法
|
|
|
+ if (!bidTypeTrueOrFalse || !ocpxTrueOrFalse) { // 出价方式设置非法
|
|
|
if (day_budget > 500 * 1000 || day_budget == 0) { // 预算大于500 或者不限制预算 需要发送通知 并且进行暂停操作
|
|
|
executorBidTypeService.submit(new Runnable() {
|
|
|
@Override
|