|
|
@@ -34,6 +34,7 @@ import com.cyksj.web.util.StpUserUtil;
|
|
|
import com.ejlchina.searcher.BeanSearcher;
|
|
|
import com.ejlchina.searcher.SearchResult;
|
|
|
import com.ejlchina.searcher.param.Operator;
|
|
|
+import com.ejlchina.searcher.util.MapBuilder;
|
|
|
import com.ejlchina.searcher.util.MapUtils;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
@@ -396,6 +397,20 @@ public class ClaudeCodeController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取中继服务器信息
|
|
|
+ */
|
|
|
+ @GetMapping("/relays/info")
|
|
|
+ public Result<List<RelayServer>> getRelaysInfo(@RequestParam(required = false) String domain) {
|
|
|
+ long userId = StpUserUtil.getLoginIdAsLong();
|
|
|
+ MapBuilder builder = MapUtils.builder();
|
|
|
+ if (StrUtil.isNotBlank(domain)) {
|
|
|
+ builder.field(RelayServer::getHost, domain).op(Operator.Contain);
|
|
|
+ }
|
|
|
+ List<RelayServer> relayServers = beanSearcher.searchAll(RelayServer.class, builder.field(RelayServer::getStatus, 1).onlySelect(RelayServer::getHost, RelayServer::getLatencyMs).build());
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult(relayServers);
|
|
|
+ }
|
|
|
+
|
|
|
public void setClaudeCodeSkuCouponInfo(String dsCode, Long userId, List<GoodsDonSkuView> goodsDonSkuViews) {
|
|
|
//渠道推广
|
|
|
Coupon coupon = null;
|