|
@@ -33,10 +33,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.Objects;
|
|
|
-import java.util.Optional;
|
|
|
+import java.util.*;
|
|
|
import java.util.concurrent.CompletableFuture;
|
|
|
import java.util.concurrent.LinkedBlockingQueue;
|
|
|
import java.util.concurrent.ThreadPoolExecutor;
|
|
@@ -223,4 +220,27 @@ public class GameTencentMiniGameCallbackServiceImpl extends ServiceImpl<GameTenc
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Map<String, Object> getCallBackByOpenId(Long gameId, String wechatOpenid) {
|
|
|
+ //查询监测链接
|
|
|
+ GameTencentMiniGameCallback tencentMiniGameCallback = super.getOne(
|
|
|
+ new LambdaQueryWrapper<GameTencentMiniGameCallback>()
|
|
|
+ .eq(GameTencentMiniGameCallback::getGameId, gameId)
|
|
|
+ .eq(GameTencentMiniGameCallback::getWechatOpenid, wechatOpenid)
|
|
|
+ .orderByDesc(GameTencentMiniGameCallback::getClickTime)
|
|
|
+ .last("limit 1"));
|
|
|
+ //没有匹配上
|
|
|
+ if (tencentMiniGameCallback == null) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ Map<String, Object> map = new HashMap<>(5);
|
|
|
+ map.put("id", tencentMiniGameCallback.getId());
|
|
|
+ map.put("gameId", tencentMiniGameCallback.getGameId());
|
|
|
+ map.put("accountId", tencentMiniGameCallback.getAccountId());
|
|
|
+ map.put("agentKey", tencentMiniGameCallback.getAgentKey());
|
|
|
+ map.put("adgroupId", tencentMiniGameCallback.getAdgroupId());
|
|
|
+ map.put("impressionId", tencentMiniGameCallback.getImpressionId());
|
|
|
+ return map;
|
|
|
+ }
|
|
|
}
|