|
@@ -95,6 +95,7 @@ public class HonorTrackingController {
|
|
|
log.info("[荣耀][曝光][入参] traceId={} ip={} params={}", traceId, clientIp(request), params);
|
|
log.info("[荣耀][曝光][入参] traceId={} ip={} params={}", traceId, clientIp(request), params);
|
|
|
|
|
|
|
|
HonorPlacement.Resolved resolved = placement.resolve(params);
|
|
HonorPlacement.Resolved resolved = placement.resolve(params);
|
|
|
|
|
+ applyResolvedPlacement(params, resolved);
|
|
|
BaiduRtaDecision rtaDecision = evaluateRta(traceId, resolved, params, request);
|
|
BaiduRtaDecision rtaDecision = evaluateRta(traceId, resolved, params, request);
|
|
|
Map<String, String> rtaParams = enrichMediaParams(params, rtaDecision);
|
|
Map<String, String> rtaParams = enrichMediaParams(params, rtaDecision);
|
|
|
if (!rtaDecision.allowsBid()) {
|
|
if (!rtaDecision.allowsBid()) {
|
|
@@ -145,6 +146,7 @@ public class HonorTrackingController {
|
|
|
BaiduRtaDecision rtaDecision = null;
|
|
BaiduRtaDecision rtaDecision = null;
|
|
|
if (record == null) {
|
|
if (record == null) {
|
|
|
HonorPlacement.Resolved resolved = placement.resolve(params);
|
|
HonorPlacement.Resolved resolved = placement.resolve(params);
|
|
|
|
|
+ applyResolvedPlacement(params, resolved);
|
|
|
rtaDecision = evaluateRta(traceId, resolved, params, request);
|
|
rtaDecision = evaluateRta(traceId, resolved, params, request);
|
|
|
Map<String, String> rtaParams = enrichMediaParams(params, rtaDecision);
|
|
Map<String, String> rtaParams = enrichMediaParams(params, rtaDecision);
|
|
|
if (!rtaDecision.allowsBid()) {
|
|
if (!rtaDecision.allowsBid()) {
|
|
@@ -194,10 +196,7 @@ public class HonorTrackingController {
|
|
|
|
|
|
|
|
private Map<String, Object> buildBidRequest(HttpServletRequest request, String traceId, Map<String, String> params) {
|
|
private Map<String, Object> buildBidRequest(HttpServletRequest request, String traceId, Map<String, String> params) {
|
|
|
HonorPlacement.Resolved resolved = placement.resolve(params);
|
|
HonorPlacement.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());
|
|
|
|
|
|
|
+ applyResolvedPlacement(params, resolved);
|
|
|
|
|
|
|
|
Map<String, Object> imp = new LinkedHashMap<>();
|
|
Map<String, Object> imp = new LinkedHashMap<>();
|
|
|
imp.put("id", "1");
|
|
imp.put("id", "1");
|
|
@@ -265,6 +264,13 @@ public class HonorTrackingController {
|
|
|
return bidReq;
|
|
return bidReq;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private static void applyResolvedPlacement(Map<String, String> params, HonorPlacement.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());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private HonorBidRecord bidRecordFromResponse(NormalizedBidResponse response, String traceId, String eventType, Map<String, String> params) {
|
|
private HonorBidRecord bidRecordFromResponse(NormalizedBidResponse response, String traceId, String eventType, Map<String, String> params) {
|
|
|
HonorBidRecord record = new HonorBidRecord();
|
|
HonorBidRecord record = new HonorBidRecord();
|
|
|
record.setQk(response.getQk());
|
|
record.setQk(response.getQk());
|