|
|
@@ -147,6 +147,7 @@ public class VivoTrackingController {
|
|
|
log.info("[Vivo][曝光][入参] traceId={} ip={} params={}", traceId, clientIp(request), params);
|
|
|
|
|
|
VivoPlacement.Resolved resolved = placement.resolve(params);
|
|
|
+ applyResolvedPlacement(params, resolved);
|
|
|
BaiduRtaDecision rtaDecision = evaluateRta(traceId, resolved, params, request);
|
|
|
Map<String, String> rtaParams = enrichMediaParams(params, rtaDecision);
|
|
|
if (!rtaDecision.allowsBid()) {
|
|
|
@@ -195,6 +196,7 @@ public class VivoTrackingController {
|
|
|
BaiduRtaDecision rtaDecision = null;
|
|
|
if (record == null) {
|
|
|
VivoPlacement.Resolved resolved = placement.resolve(params);
|
|
|
+ applyResolvedPlacement(params, resolved);
|
|
|
rtaDecision = evaluateRta(traceId, resolved, params, request);
|
|
|
Map<String, String> rtaParams = enrichMediaParams(params, rtaDecision);
|
|
|
if (!rtaDecision.allowsBid()) {
|
|
|
@@ -290,13 +292,7 @@ public class VivoTrackingController {
|
|
|
|
|
|
private Map<String, Object> buildBidRequest(HttpServletRequest request, String traceId, Map<String, String> params) {
|
|
|
VivoPlacement.Resolved resolved = placement.resolve(params);
|
|
|
- params.put("baidu_app_id", resolved.appId());
|
|
|
- params.put("baidu_tag_id", resolved.tagId());
|
|
|
- params.put("tagId", resolved.tagId());
|
|
|
- if (resolved.platform() != null && !resolved.platform().isBlank()) {
|
|
|
- params.put("baidu_platform", resolved.platform());
|
|
|
- params.put("platform", resolved.platform());
|
|
|
- }
|
|
|
+ applyResolvedPlacement(params, resolved);
|
|
|
|
|
|
Map<String, Object> imp = new LinkedHashMap<>();
|
|
|
imp.put("id", "1");
|
|
|
@@ -333,6 +329,14 @@ public class VivoTrackingController {
|
|
|
return bidReq;
|
|
|
}
|
|
|
|
|
|
+ private static void applyResolvedPlacement(Map<String, String> params, VivoPlacement.Resolved resolved) {
|
|
|
+ params.put("baidu_app_id", resolved.appId());
|
|
|
+ params.put("baidu_tag_id", resolved.tagId());
|
|
|
+ params.put("tagId", resolved.tagId());
|
|
|
+ putIfNotBlank(params, "baidu_platform", resolved.platform());
|
|
|
+ putIfNotBlank(params, "platform", resolved.platform());
|
|
|
+ }
|
|
|
+
|
|
|
private VivoBidRecord bidRecordFromResponse(NormalizedBidResponse response,
|
|
|
String traceId,
|
|
|
String eventType,
|