|
@@ -543,15 +543,20 @@ public class KuaishouBatchCampaignPreviewServiceImpl extends ServiceImpl<Kuaisho
|
|
|
groupPreview.setUnitNameFormat(groupJson.getString("unitName"));
|
|
|
groupPreview.setPutStatus(Check.isNull(campaignJson.getInteger("unitStatus")) || campaignJson.getInteger("unitStatus") == 2 ? 2 : null);
|
|
|
groupPreview.setBidType(groupJson.getInteger("bidType"));
|
|
|
+ int bid = -1;
|
|
|
if (!Check.isNull(groupJson.getInteger("bidMin")) && !Check.isNull(groupJson.getInteger("bidMax"))) {
|
|
|
- int bid = getRandom(groupJson.getInteger("bidMax"), groupJson.getInteger("bidMin"));
|
|
|
+ bid = getRandom(groupJson.getInteger("bidMax"), groupJson.getInteger("bidMin"));
|
|
|
if (bid > 0) {
|
|
|
groupJson.put("bid", bid);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (groupJson.getInteger("bidType") == 10) {
|
|
|
- groupPreview.setCpaBid(groupJson.getInteger("cpaBid"));
|
|
|
+ if (bid > 0) {
|
|
|
+ groupPreview.setCpaBid(bid);
|
|
|
+ } else {
|
|
|
+ groupPreview.setCpaBid(groupJson.getInteger("cpaBid"));
|
|
|
+ }
|
|
|
} else {
|
|
|
groupPreview.setBid(groupJson.getInteger("bid"));
|
|
|
}
|