|
|
@@ -175,6 +175,9 @@ public class HonorTrackingController {
|
|
|
bidResponse.getBid().getShowUrls(), bidResponse.getBid().getPrice());
|
|
|
recordTracking(record.getQk(), tagId, "impression", impressionTracking);
|
|
|
}
|
|
|
+ } else {
|
|
|
+ mergeClickParams(record, params);
|
|
|
+ hotStore.recordBid(record);
|
|
|
}
|
|
|
|
|
|
List<TrackingResult> tracking = adxClient.reportClick(
|
|
|
@@ -450,6 +453,35 @@ public class HonorTrackingController {
|
|
|
if (act2001Rate != null) {
|
|
|
params.put(HonorBidRecord.ACT_2001_DEDUCTION_RATE_KEY, String.valueOf(parseDeductionRate(act2001Rate)));
|
|
|
}
|
|
|
+ removeDeductionAliases(params);
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void removeDeductionAliases(Map<String, String> params) {
|
|
|
+ params.remove("deductionRate");
|
|
|
+ params.remove("rate");
|
|
|
+ params.remove("act2001DeductionRate");
|
|
|
+ params.remove("deductionRate2001");
|
|
|
+ params.remove("deduction_rate_2001");
|
|
|
+ }
|
|
|
+
|
|
|
+ private void mergeClickParams(HonorBidRecord record, Map<String, String> params) {
|
|
|
+ if (record == null || params == null || params.isEmpty()) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Map<String, String> merged = new LinkedHashMap<>();
|
|
|
+ if (record.getMediaParams() != null) {
|
|
|
+ merged.putAll(record.getMediaParams());
|
|
|
+ }
|
|
|
+ merged.putAll(params);
|
|
|
+ removeDeductionAliases(merged);
|
|
|
+ record.setMediaParams(merged);
|
|
|
+ if ((record.getAccountId() == null || record.getAccountId().isBlank())
|
|
|
+ && params.get("advertiserId") != null && !params.get("advertiserId").isBlank()) {
|
|
|
+ record.setAccountId(params.get("advertiserId"));
|
|
|
+ }
|
|
|
+ if (params.get("creativeId") != null && !params.get("creativeId").isBlank()) {
|
|
|
+ record.setAdId(params.get("creativeId"));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private static int parseDeductionRate(String value) {
|