|
|
@@ -106,6 +106,26 @@ public class TrackingController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @GetMapping("/tencent/v5/impression")
|
|
|
+ public Object tencentImpressionV5(HttpServletRequest request) throws Exception {
|
|
|
+ impressionSemaphore.acquire();
|
|
|
+ try {
|
|
|
+ return doImpression(request, "v5", 40);
|
|
|
+ } finally {
|
|
|
+ impressionSemaphore.release();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/tencent/v6/impression")
|
|
|
+ public Object tencentImpressionV6(HttpServletRequest request) throws Exception {
|
|
|
+ impressionSemaphore.acquire();
|
|
|
+ try {
|
|
|
+ return doImpression(request, "v6", 30);
|
|
|
+ } finally {
|
|
|
+ impressionSemaphore.release();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
private Object doImpression(HttpServletRequest request, String trackingVersion, int deductionRate) throws Exception {
|
|
|
Map<String, String> params = flatQueryParams(request);
|
|
|
@@ -201,6 +221,30 @@ public class TrackingController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @GetMapping("/tencent/v5/click")
|
|
|
+ public Object tencentClickV5(HttpServletRequest request, HttpServletResponse response)
|
|
|
+ throws Exception {
|
|
|
+ clickSemaphore.acquire();
|
|
|
+ try {
|
|
|
+ return doClick(request, response, "v5", 40);
|
|
|
+ } finally {
|
|
|
+ clickSemaphore.release();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @GetMapping("/tencent/v6/click")
|
|
|
+ public Object tencentClickV6(HttpServletRequest request, HttpServletResponse response)
|
|
|
+ throws Exception {
|
|
|
+ clickSemaphore.acquire();
|
|
|
+ try {
|
|
|
+ return doClick(request, response, "v6", 30);
|
|
|
+ } finally {
|
|
|
+ clickSemaphore.release();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private Object doClick(HttpServletRequest request, HttpServletResponse response,
|
|
|
String trackingVersion, int deductionRate)
|
|
|
throws Exception {
|