Compare commits
122 Commits
feature-tr
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e956250483 | ||
|
|
691ef81b12 | ||
|
|
0177ca0dce | ||
|
|
8922491cbe | ||
|
|
ac18a90da4 | ||
|
|
0732b6b484 | ||
|
|
79bb91237b | ||
|
|
13a573083e | ||
|
|
48d2090458 | ||
|
|
146db166fc | ||
|
|
431f73469e | ||
|
|
0a29464a82 | ||
|
|
7ead4fcc85 | ||
|
|
c73d224e19 | ||
|
|
d7c3fbf721 | ||
|
|
97738f5b5e | ||
|
|
9de0155d7e | ||
|
|
18b49c9db4 | ||
|
|
986f7507e7 | ||
|
|
9957dc2a27 | ||
|
|
c39dac772a | ||
|
|
1826aa10ab | ||
|
|
21bab83eea | ||
|
|
720c7cec50 | ||
|
|
de95193bda | ||
|
|
2736b25fbe | ||
|
|
c56c9db06f | ||
|
|
c7016d5ae4 | ||
|
|
c8e9c8c257 | ||
|
|
7f7649d6bd | ||
|
|
85f3ffbc10 | ||
|
|
3c920ee208 | ||
|
|
e3be12cd8b | ||
|
|
973f76a438 | ||
|
|
7541ba77a6 | ||
|
|
8feecc423c | ||
|
|
0464935619 | ||
|
|
d799d68946 | ||
|
|
c2bd1554f9 | ||
|
|
6573219751 | ||
|
|
c2e28b5cb3 | ||
|
|
0260498bd3 | ||
|
|
f837d75d42 | ||
|
|
7e70b3809c | ||
|
|
e5eeebf84a | ||
|
|
d53728e874 | ||
|
|
1520362d9f | ||
|
|
6405052215 | ||
|
|
74fd42330e | ||
|
|
4112160656 | ||
|
|
98d80c6732 | ||
|
|
b98d91a2fb | ||
|
|
b9361ac3ff | ||
|
|
aab443ce34 | ||
|
|
32543b958c | ||
|
|
5359be337d | ||
|
|
fa6b9be148 | ||
|
|
7299b1c088 | ||
|
|
3588d0aeee | ||
|
|
0bf810261f | ||
|
|
35458a674e | ||
|
|
dfb71f55a8 | ||
|
|
c99542ebe9 | ||
|
|
3168637944 | ||
|
|
dca9f12cb5 | ||
|
|
a0461ce68c | ||
|
|
40a8f90e01 | ||
|
|
f540fc91bc | ||
|
|
505bdf6345 | ||
|
|
8f573739a2 | ||
|
|
9e37b347a3 | ||
|
|
e897d635ea | ||
|
|
8e37a3d333 | ||
|
|
3f59e5b653 | ||
|
|
c02050274b | ||
|
|
8460125d79 | ||
|
|
d0d48d71ac | ||
|
|
3cef4fc322 | ||
|
|
a48fddb613 | ||
|
|
7bc8b44450 | ||
|
|
a8424ad5e3 | ||
|
|
1343fa4631 | ||
|
|
4627d2c254 | ||
|
|
2ec48cab6b | ||
|
|
baaf171151 | ||
|
|
a0cc63d784 | ||
|
|
663affb734 | ||
|
|
f6995c519a | ||
|
|
35ceb5d80f | ||
|
|
ad73326eae | ||
|
|
a9320d58ec | ||
|
|
e3942ff651 | ||
|
|
527a0b916d | ||
|
|
a51c252b36 | ||
|
|
1e94443ee5 | ||
|
|
32a1094edc | ||
|
|
d9d690e53d | ||
|
|
b76e6e3a93 | ||
|
|
f26bbbc310 | ||
|
|
916ce628be | ||
|
|
2a7be2ca92 | ||
|
|
d49341204c | ||
|
|
9a66e58a93 | ||
|
|
7d1909858e | ||
|
|
b057119fd3 | ||
|
|
9deeef5004 | ||
|
|
d9ff507e5f | ||
|
|
94b9063dd6 | ||
|
|
b5b20b43a8 | ||
|
|
c0a6021982 | ||
|
|
6642ead223 | ||
|
|
3fc5d4a4ff | ||
|
|
d17f75e42d | ||
|
|
cd904de915 | ||
|
|
ac9b431367 | ||
|
|
310a6c8050 | ||
|
|
f94fb80701 | ||
|
|
a1979f2be7 | ||
|
|
3692e61b1c | ||
|
|
ec7e1b6983 | ||
|
|
0fecd235b5 | ||
|
|
112bf13c95 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -97,3 +97,5 @@ devops-monitor-id_rsa.key
|
||||
/claude/
|
||||
|
||||
.local-run/
|
||||
|
||||
.env
|
||||
@ -108,6 +108,20 @@ spring:
|
||||
predicates:
|
||||
- Path=/play-server-notice/**
|
||||
|
||||
- id: console-go-service
|
||||
uri: http://10.2.1.16:2900
|
||||
order: -20
|
||||
predicates:
|
||||
- Path=/console/go/**
|
||||
filters:
|
||||
- StripPrefix=2
|
||||
|
||||
- id: service-console
|
||||
uri: http://10.2.1.16:2700
|
||||
order: -10
|
||||
predicates:
|
||||
- Path=/console,/console/**
|
||||
|
||||
- id: service-other
|
||||
uri: ${LIKEI_GATEWAY_ROUTE_OTHER_URI}
|
||||
predicates:
|
||||
@ -118,6 +132,11 @@ gateway:
|
||||
- /account/create
|
||||
- /account/login/**/*
|
||||
- /account/login
|
||||
- /console/go
|
||||
- /console/go/**
|
||||
- /console/account/login/**/*
|
||||
- /console/account/login
|
||||
- /console/**
|
||||
- /account/forget-pwd-reset
|
||||
- /user/user-profile/open-search
|
||||
- /party3rd/tencent/cloud/im/callback
|
||||
@ -156,6 +175,7 @@ gateway:
|
||||
- /product/apple/config
|
||||
- /game/sud/**
|
||||
- /web/pay/**
|
||||
- /order/web/pay/**
|
||||
- /external/oss/upload
|
||||
- /telegram/webhook
|
||||
- /account/create/getRegion
|
||||
@ -174,8 +194,33 @@ gateway:
|
||||
- /go/resident-activity/room-turnover-reward/**
|
||||
- /resident-activity/room-turnover-reward/**
|
||||
- /go/resident-activity/register-reward/**
|
||||
- /resident-activity/register-reward/**
|
||||
- /go/resident-activity/specified-gift-weekly-rank/**
|
||||
- /resident-activity/specified-gift-weekly-rank/**
|
||||
- /go/resident-activity/week-star/**
|
||||
- /getUserInfo
|
||||
- /go/getUserInfo
|
||||
- /updateBalance
|
||||
- /go/updateBalance
|
||||
- /game/hotgame/**
|
||||
- /go/game/hotgame/**
|
||||
- /resident-activity/week-star/**
|
||||
- /resident-activity/sign-in-reward/**
|
||||
- /resident-activity/vip/**
|
||||
- /resident-activity/recharge-reward/**
|
||||
- /resident-activity/task-center/**
|
||||
- /resident-activity/voice-room-red-packet/**
|
||||
- /resident-activity/voice-room-rocket/**
|
||||
- /resident-activity/wheel/**
|
||||
- /resident-activity/smash-golden-egg/**
|
||||
- /operate/hotgame-game/**
|
||||
- /operate/baishun-game/**
|
||||
- /operate/lingxian-game/**
|
||||
- /app-system/home-popups/**
|
||||
- /app-system/error-logs/**
|
||||
- /region/config/im-groups/**
|
||||
- /payment/binance/**
|
||||
- /props/store/**
|
||||
# leaderboard
|
||||
- /activity/leaderboard/gifts-send
|
||||
- /activity/leaderboard/gifts-received
|
||||
|
||||
@ -49,6 +49,18 @@ red-circle:
|
||||
factory-config:
|
||||
cache-ttl-seconds: ${LIKEI_PAY_FACTORY_CONFIG_CACHE_TTL_SECONDS:300}
|
||||
|
||||
# V5Pay 功能默认开启;商户账号、密钥与所有外部地址只能由运行环境注入,仓库不提供伪造可用值。
|
||||
v5-pay:
|
||||
enabled: ${LIKEI_V5PAY_ENABLED:true}
|
||||
merchant-no: ${LIKEI_V5PAY_MERCHANT_NO:}
|
||||
app-key: ${LIKEI_V5PAY_APP_KEY:}
|
||||
secret-key: ${LIKEI_V5PAY_SECRET_KEY:}
|
||||
gateway-base-url: ${LIKEI_V5PAY_GATEWAY_BASE_URL:}
|
||||
notify-url: ${LIKEI_V5PAY_NOTIFY_URL:}
|
||||
return-url: ${LIKEI_V5PAY_RETURN_URL:}
|
||||
# 共享商户必须隔离各系统 orderNo;仅在供应商侧约定变化时覆盖。
|
||||
order-prefix: ${LIKEI_V5PAY_ORDER_PREFIX:YUMI}
|
||||
|
||||
airwallex:
|
||||
client-id: ${LIKEI_AIRWALLEX_CLIENT_ID}
|
||||
api-key: ${LIKEI_AIRWALLEX_API_KEY}
|
||||
|
||||
@ -128,6 +128,13 @@ task:
|
||||
topic: ${TASK_CENTER_EVENT_MQ_TOPIC:RC_DEFAULT_APP_ORDINARY}
|
||||
tag: ${TASK_CENTER_EVENT_MQ_TAG:task_center_event}
|
||||
|
||||
cp:
|
||||
relation-broadcast:
|
||||
mq:
|
||||
enabled: ${CP_RELATION_BROADCAST_MQ_ENABLED:true}
|
||||
topic: ${CP_RELATION_BROADCAST_MQ_TOPIC:RC_DEFAULT_APP_ORDINARY}
|
||||
tag: ${CP_RELATION_BROADCAST_MQ_TAG:cp_relation_broadcast}
|
||||
|
||||
voice-room:
|
||||
region-broadcast:
|
||||
go:
|
||||
|
||||
@ -39,10 +39,11 @@ public class LoginAccessValidationService {
|
||||
"香港", "澳门", "澳門", "台湾", "台灣", "Hong Kong", "Macau", "Macao", "Taiwan"
|
||||
);
|
||||
private static final List<String> BLOCKED_COUNTRY_CODES = List.of(
|
||||
"MO", "SG"
|
||||
"HK", "MO", "TW", "SG"
|
||||
);
|
||||
private static final List<String> BLOCKED_COUNTRY_NAMES = List.of(
|
||||
"澳门", "澳門", "Macau", "Macao", "新加坡", "Singapore"
|
||||
"香港", "澳门", "澳門", "台湾", "台灣", "新加坡",
|
||||
"Hong Kong", "Macau", "Macao", "Taiwan", "Singapore"
|
||||
);
|
||||
private static final List<IpGeoProvider> IP_GEO_PROVIDERS = List.of(
|
||||
new IpGeoProvider("ip.sb", "https://api.ip.sb/geoip/%s"),
|
||||
|
||||
@ -224,9 +224,18 @@ public class EndpointRestController {
|
||||
*/
|
||||
@PostMapping("/account/login/channel")
|
||||
public TokenCredentialCO login(@RequestBody @Validated UserChannelCredentialCmd cmd, HttpServletRequest request) {
|
||||
TokenCredentialCO tokenCredentialCO = processToken.createUserCredential(ResponseAssert.requiredSuccess(
|
||||
appUserAccountClient.channelCredential(cmd)));
|
||||
return submitLoginAccessValidation(tokenCredentialCO, cmd.requireReqSysOrigin(), cmd.getReqZoneId(), request);
|
||||
try {
|
||||
TokenCredentialCO tokenCredentialCO = processToken.createUserCredential(ResponseAssert.requiredSuccess(
|
||||
appUserAccountClient.channelCredential(cmd)));
|
||||
return submitLoginAccessValidation(tokenCredentialCO, cmd.requireReqSysOrigin(), cmd.getReqZoneId(), request);
|
||||
} catch (ResponseException ex) {
|
||||
if (isChannelCredentialDecodeError(ex)) {
|
||||
log.warn("channel login credential decode error, return USER_NOT_REGISTERED. authType={}",
|
||||
cmd.getAuthType());
|
||||
throw new ResponseException(UserErrorCode.USER_NOT_REGISTERED);
|
||||
}
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -287,6 +296,13 @@ public class EndpointRestController {
|
||||
|| Objects.equals(ex.getErrorCode(), UserErrorCode.SOURCE_REGISTERED.getCode());
|
||||
}
|
||||
|
||||
private boolean isChannelCredentialDecodeError(ResponseException ex) {
|
||||
return Objects.equals(ex.getErrorCode(), ResponseErrorCode.NOT_ACCEPTABLE.getCode())
|
||||
&& Objects.equals(ex.getErrorCodeName(), "ERROR_INNER_DECODER")
|
||||
&& Objects.toString(ex.getExtValues(), "")
|
||||
.contains("/app-user/account/channel/credential");
|
||||
}
|
||||
|
||||
private TokenCredentialCO createTokenCredential(
|
||||
UserAccountDTO account,
|
||||
String reqSysOrigin,
|
||||
|
||||
@ -0,0 +1,150 @@
|
||||
package com.red.circle.framework.feign.decoder;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.red.circle.framework.core.exception.ResponseException;
|
||||
import com.red.circle.framework.core.request.ResponseHeaderConstant;
|
||||
import com.red.circle.framework.core.response.ResponseErrorCode;
|
||||
import com.red.circle.framework.core.spring.ApplicationContextUtils;
|
||||
import com.red.circle.framework.dto.ResultResponse;
|
||||
import com.red.circle.tool.core.http.HttpConstant;
|
||||
import com.red.circle.tool.core.json.JacksonUtils;
|
||||
import com.red.circle.tool.core.text.StringUtils;
|
||||
import feign.Request;
|
||||
import feign.Response;
|
||||
import feign.codec.ErrorDecoder;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class FeignErrorDecoder implements ErrorDecoder {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(FeignErrorDecoder.class);
|
||||
|
||||
private static final List<Integer> PROCESS_RESULT_RESPONSE = List.of(
|
||||
ResponseErrorCode.NOT_ACCEPTABLE.getCode(),
|
||||
ResponseErrorCode.REQUEST_PARAMETER_ERROR.getCode()
|
||||
);
|
||||
|
||||
@Override
|
||||
public Exception decode(String methodKey, Response response) {
|
||||
if (PROCESS_RESULT_RESPONSE.stream()
|
||||
.anyMatch(code -> Objects.equals(response.status(), code))) {
|
||||
ResponseException exception = parseResponseException(methodKey, response);
|
||||
if (Objects.nonNull(exception)) {
|
||||
return exception;
|
||||
}
|
||||
return createResponseException(methodKey, response);
|
||||
}
|
||||
|
||||
if (HttpConstant.is4xx(response.status())) {
|
||||
return createResponseException(methodKey, response);
|
||||
}
|
||||
|
||||
if (ResponseHeaderConstant.existsHeaderValue(response.headers(), "RC-No-Retry", "true")) {
|
||||
ResponseException exception = parseResponseException(methodKey, response);
|
||||
if (Objects.nonNull(exception)) {
|
||||
return exception;
|
||||
}
|
||||
return createResponseException(methodKey, response);
|
||||
}
|
||||
|
||||
return createResponseException(methodKey, response);
|
||||
}
|
||||
|
||||
private static String reqMapping(Response response) {
|
||||
Request request = response.request();
|
||||
if (Objects.isNull(request)) {
|
||||
return "";
|
||||
}
|
||||
return request.httpMethod() + " " + request.url();
|
||||
}
|
||||
|
||||
private ResponseException createResponseException(String methodKey, Response response) {
|
||||
String errorCodeName = Objects.equals(response.status(), 429)
|
||||
? "REQ_LIMIT_INNER_DECODER"
|
||||
: "ERROR_INNER_DECODER";
|
||||
Map<String, Object> extValues = new HashMap<>();
|
||||
extValues.put("innerRequest", reqMapping(response));
|
||||
extValues.put("innerMethodKey", methodKey);
|
||||
return new ResponseException(response.status(), errorCodeName, getErrorMsg(response), extValues);
|
||||
}
|
||||
|
||||
private String getErrorMsg(Response response) {
|
||||
return StringUtils.isBlankOrElse(response.reason(), "Inner service error");
|
||||
}
|
||||
|
||||
private ResponseException parseResponseException(String methodKey, Response response) {
|
||||
ResultResponse<Void> responseBody = parseResponse(response);
|
||||
if (Objects.nonNull(responseBody)) {
|
||||
Map<String, Object> extValues = Optional.ofNullable(responseBody.getExtValues())
|
||||
.orElseGet(HashMap::new);
|
||||
|
||||
extValues.put("innerError",
|
||||
"[" + methodKey + "]" + StringUtils.isBlankOrElse(response.reason(), ""));
|
||||
|
||||
return new ResponseException(
|
||||
responseBody.getErrorCode(),
|
||||
responseBody.getErrorCodeName(),
|
||||
responseBody.getErrorMsg(),
|
||||
extValues
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private ResultResponse<Void> parseResponse(Response response) {
|
||||
if (Objects.isNull(response.body())) {
|
||||
log.warn("Feign error response body is null, status={}, reason={}, request={}",
|
||||
response.status(), response.reason(), reqMapping(response));
|
||||
return null;
|
||||
}
|
||||
|
||||
try (InputStream inputStream = response.body().asInputStream()) {
|
||||
byte[] bodyBytes = inputStream.readAllBytes();
|
||||
if (bodyBytes.length == 0) {
|
||||
log.warn("Feign error response body is empty, status={}, reason={}, request={}",
|
||||
response.status(), response.reason(), reqMapping(response));
|
||||
return null;
|
||||
}
|
||||
boolean gzipEncoded = isGzipEncoded(response);
|
||||
ResultResponse<Void> responseBody = parseResponseBytes(response, bodyBytes, gzipEncoded);
|
||||
if (Objects.nonNull(responseBody)) {
|
||||
return responseBody;
|
||||
}
|
||||
return parseResponseBytes(response, bodyBytes, !gzipEncoded);
|
||||
} catch (IOException | RuntimeException ex) {
|
||||
log.warn("Read feign error response body failed, status={}, reason={}, request={}",
|
||||
response.status(), response.reason(), reqMapping(response), ex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private ResultResponse<Void> parseResponseBytes(
|
||||
Response response,
|
||||
byte[] bodyBytes,
|
||||
boolean compression) {
|
||||
try (ByteArrayInputStream inputStream = new ByteArrayInputStream(bodyBytes)) {
|
||||
return JacksonUtils.readValue(inputStream, new TypeReference<>() {
|
||||
}, compression);
|
||||
} catch (IOException | RuntimeException ex) {
|
||||
log.warn("Parse feign error response body failed, status={}, reason={}, request={}, compression={}",
|
||||
response.status(), response.reason(), reqMapping(response), compression, ex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isGzipEncoded(Response response) {
|
||||
return response.headers().entrySet().stream()
|
||||
.filter(entry -> Objects.nonNull(entry.getKey()))
|
||||
.filter(entry -> "Content-Encoding".equalsIgnoreCase(entry.getKey()))
|
||||
.flatMap(entry -> entry.getValue().stream())
|
||||
.anyMatch(value -> "gzip".equalsIgnoreCase(value));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,117 @@
|
||||
package com.red.circle.framework.web.feign;
|
||||
|
||||
import com.red.circle.framework.core.request.RequestHeaderConstant;
|
||||
import com.red.circle.framework.core.request.ServiceTraceId;
|
||||
import feign.RequestInterceptor;
|
||||
import feign.RequestTemplate;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
/**
|
||||
* Forward only business headers to Feign requests.
|
||||
*/
|
||||
@Component
|
||||
@Order(Ordered.LOWEST_PRECEDENCE)
|
||||
public class FeignRequestInterceptor implements RequestInterceptor {
|
||||
|
||||
private static final String INNER_SERVICE = "FEIGN";
|
||||
|
||||
private static final List<String> FORWARD_HEADERS = List.of(
|
||||
RequestHeaderConstant.AUTHORIZATION,
|
||||
RequestHeaderConstant.REQ_SYS_ORIGIN,
|
||||
RequestHeaderConstant.REQ_CLIENT,
|
||||
RequestHeaderConstant.REQ_ZONE,
|
||||
RequestHeaderConstant.REQ_IMEI,
|
||||
RequestHeaderConstant.REQ_APP_INTEL,
|
||||
RequestHeaderConstant.REQ_VERSION,
|
||||
RequestHeaderConstant.REQ_LANG,
|
||||
RequestHeaderConstant.REQ_INNER_INTERNAL,
|
||||
RequestHeaderConstant.REQ_INNER_TRACE_ID
|
||||
);
|
||||
|
||||
private static final Set<String> BLOCKED_HEADERS = Set.of(
|
||||
"host",
|
||||
"content-length",
|
||||
"transfer-encoding",
|
||||
"connection",
|
||||
"keep-alive",
|
||||
"upgrade",
|
||||
"proxy-authorization",
|
||||
"proxy-authenticate",
|
||||
"te",
|
||||
"trailer"
|
||||
);
|
||||
|
||||
@Override
|
||||
public void apply(RequestTemplate requestTemplate) {
|
||||
removeBlockedHeaders(requestTemplate);
|
||||
|
||||
if (RequestContextHolder.getRequestAttributes() instanceof ServletRequestAttributes attrs) {
|
||||
forwardHeaders(requestTemplate, attrs.getRequest());
|
||||
}
|
||||
|
||||
if (!hasHeader(requestTemplate, RequestHeaderConstant.REQ_INNER_SERVICE)) {
|
||||
requestTemplate.header(RequestHeaderConstant.REQ_INNER_SERVICE, INNER_SERVICE);
|
||||
}
|
||||
if (!hasHeader(requestTemplate, RequestHeaderConstant.REQ_INNER_TRACE_ID)) {
|
||||
requestTemplate.header(
|
||||
RequestHeaderConstant.REQ_INNER_TRACE_ID,
|
||||
ServiceTraceId.genTraceId(ServiceTraceId.Origin.INNER_REQ));
|
||||
}
|
||||
|
||||
removeBlockedHeaders(requestTemplate);
|
||||
}
|
||||
|
||||
private void forwardHeaders(RequestTemplate requestTemplate, HttpServletRequest request) {
|
||||
for (String header : FORWARD_HEADERS) {
|
||||
String value = request.getHeader(header);
|
||||
if (hasHeader(requestTemplate, header) || !isUsableHeaderValue(value)) {
|
||||
continue;
|
||||
}
|
||||
requestTemplate.header(header, value);
|
||||
}
|
||||
}
|
||||
|
||||
private void removeBlockedHeaders(RequestTemplate requestTemplate) {
|
||||
List<String> names = new ArrayList<>(requestTemplate.headers().keySet());
|
||||
for (String name : names) {
|
||||
if (isBlockedHeader(name)) {
|
||||
requestTemplate.removeHeader(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean hasHeader(RequestTemplate requestTemplate, String header) {
|
||||
return requestTemplate.headers().keySet().stream()
|
||||
.anyMatch(name -> name.equalsIgnoreCase(header));
|
||||
}
|
||||
|
||||
private boolean isBlockedHeader(String header) {
|
||||
if (header == null) {
|
||||
return true;
|
||||
}
|
||||
String normalized = header.toLowerCase(Locale.ROOT);
|
||||
return BLOCKED_HEADERS.contains(normalized) || normalized.startsWith("proxy-");
|
||||
}
|
||||
|
||||
private boolean isUsableHeaderValue(String value) {
|
||||
if (value == null || value.isBlank()) {
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < value.length(); i++) {
|
||||
char c = value.charAt(i);
|
||||
if (c < 32 || c == 127) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -70,22 +70,22 @@ public class LoginAccessValidationServiceTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void allowHongKongRegion() {
|
||||
public void blockHongKongRegion() {
|
||||
JSONObject data = JSON.parseObject("""
|
||||
{"country_id":"CN","country":"中国","region":"香港"}
|
||||
""");
|
||||
|
||||
assertFalse(LoginAccessValidationService.isMainlandChina(data));
|
||||
assertFalse(LoginAccessValidationService.isBlockedIpRegion(data));
|
||||
assertTrue(LoginAccessValidationService.isBlockedIpRegion(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void allowHongKongCountryCode() {
|
||||
public void blockHongKongCountryCode() {
|
||||
JSONObject data = JSON.parseObject("""
|
||||
{"country_id":"HK","country":"Hong Kong","region":"Kwai Tsing District"}
|
||||
""");
|
||||
|
||||
assertFalse(LoginAccessValidationService.isBlockedIpRegion(data));
|
||||
assertTrue(LoginAccessValidationService.isBlockedIpRegion(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -107,21 +107,21 @@ public class LoginAccessValidationServiceTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void allowTaiwanRegion() {
|
||||
public void blockTaiwanRegion() {
|
||||
JSONObject data = JSON.parseObject("""
|
||||
{"country_id":"CN","country":"中国","region":"台湾"}
|
||||
""");
|
||||
|
||||
assertFalse(LoginAccessValidationService.isMainlandChina(data));
|
||||
assertFalse(LoginAccessValidationService.isBlockedIpRegion(data));
|
||||
assertTrue(LoginAccessValidationService.isBlockedIpRegion(data));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void allowTaiwanCountryCode() {
|
||||
public void blockTaiwanCountryCode() {
|
||||
JSONObject data = JSON.parseObject("""
|
||||
{"country_id":"TW","country":"Taiwan","region":""}
|
||||
""");
|
||||
|
||||
assertFalse(LoginAccessValidationService.isBlockedIpRegion(data));
|
||||
assertTrue(LoginAccessValidationService.isBlockedIpRegion(data));
|
||||
}
|
||||
}
|
||||
|
||||
@ -64,6 +64,8 @@ BADGE_ACTIVATION.body=You have received a new achievement badge, go check it out
|
||||
# cp\u5173\u7CFB\u89E3\u9664
|
||||
CP_DISMISS.title=CP Dismiss
|
||||
CP_DISMISS.body=${nickname} Dissolved the CP relationship with you
|
||||
CP_BLESS.title=Cp bless
|
||||
CP_BLESS.body=${nickname} has sent you CP blessing gifts
|
||||
# \u63A5\u6536\u8D35\u65CFvip
|
||||
ACCEPT_NOBLE_VIP.title=Receiving nobles
|
||||
ACCEPT_NOBLE_VIP.body=${nickname} gives you ${days} days of noble status~
|
||||
|
||||
@ -81,6 +81,8 @@ AGREE_BD_LEADER_INVITE_AGENT.body=${userProfile} menerima undangan BD Anda
|
||||
BD_LEADER_SEND_INVITE_BD.title=Undangan BD
|
||||
BD_LEADER_SEND_INVITE_BD.body=${userProfile}mengundang Anda untuk menjadi BD
|
||||
# CP祝福通知
|
||||
CP_DISMISS.title=CP Dismiss
|
||||
CP_DISMISS.body=${nickname} Dissolved the CP relationship with you
|
||||
CP_BLESS.title=Cp memberkati
|
||||
CP_BLESS.body=${nickname} Saya memberi Anda hadiah berkah ruang CP
|
||||
# 告白通知
|
||||
|
||||
@ -60,6 +60,8 @@ BADGE_ACTIVATION.body=Yeni bir ba\u015Far\u0131 rozeti ald\u0131n\u0131z, gidip
|
||||
# cp\u5173\u7CFB\u89E3\u9664
|
||||
CP_DISMISS.title=CP s\u00FCr\u00FCm\u00FC
|
||||
CP_DISMISS.body= ${nickname} sizinle CP ili\u015Fkisini bozdu
|
||||
CP_BLESS.title=Cp bless
|
||||
CP_BLESS.body=${nickname} has sent you CP blessing gifts
|
||||
# \u63A5\u6536\u8D35\u65CFvip
|
||||
ACCEPT_NOBLE_VIP.title=Soylular al\u0131r
|
||||
ACCEPT_NOBLE_VIP.body =${nickname} size ${days} g\u00FCnl\u00FCk asil stat\u00FCs\u00FC verir ~
|
||||
|
||||
@ -63,6 +63,8 @@ BADGE_ACTIVATION.body=\u60A8\u5DF2\u7372\u5F97\u65B0\u7684\u6210\u5C31\u5FBD\u7A
|
||||
# cp\u5173\u7CFB\u89E3\u9664
|
||||
CP_DISMISS.title=CP \u89E3\u9664
|
||||
CP_DISMISS.body= ${nickname} \u8207\u60A8\u89E3\u9664\u4E86 CP \u95DC\u4FC2
|
||||
CP_BLESS.title=Cp \u795D\u798F
|
||||
CP_BLESS.body=${nickname} \u7D66\u4F60\u5011\u9001\u4E86cp\u7A7A\u9593\u795D\u798F\u79AE\u7269
|
||||
# \u63A5\u6536\u8D35\u65CFvip
|
||||
ACCEPT_NOBLE_VIP.title=\u8CB4\u65CF\u63A5\u6536
|
||||
ACCEPT_NOBLE_VIP.body =${nickname} \u8D08\u9001\u60A8 ${days} \u5929\u7684\u8CB4\u65CF\u8EAB\u4EFD~
|
||||
|
||||
@ -13,7 +13,7 @@ public final class RtcVersionSupport {
|
||||
}
|
||||
|
||||
public static RtcProviderEnum defaultProvider(String version) {
|
||||
return compareVersion(version, TRTC_MIN_VERSION) <= 0
|
||||
return compareVersion(version, TRTC_MIN_VERSION) < 0
|
||||
? RtcProviderEnum.AGORA
|
||||
: RtcProviderEnum.TRTC;
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ public enum ConsoleAccountStatusEnum {
|
||||
/**
|
||||
* 账号解封.
|
||||
*/
|
||||
UNTIE_ACOOUNT("UNTIE_DEVICE", "账号解封"),
|
||||
UNTIE_ACOOUNT("UNTIE_ACOOUNT", "账号解封"),
|
||||
|
||||
/**
|
||||
* 设备+账户解封.
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
package com.red.circle.common.business.dto.rtc;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class RtcVersionSupportTest {
|
||||
|
||||
@Test
|
||||
public void defaultProviderUsesTrtcFromMinVersion() {
|
||||
Assert.assertEquals(RtcProviderEnum.AGORA, RtcVersionSupport.defaultProvider("1.3.9"));
|
||||
Assert.assertEquals(RtcProviderEnum.TRTC, RtcVersionSupport.defaultProvider("1.4.0"));
|
||||
Assert.assertEquals(RtcProviderEnum.TRTC, RtcVersionSupport.defaultProvider("1.4.1"));
|
||||
}
|
||||
}
|
||||
@ -51,4 +51,9 @@ public class GiveGiftConfig implements Serializable {
|
||||
*/
|
||||
private String giftTab;
|
||||
|
||||
/**
|
||||
* CP礼物关系类型:CP/BROTHER/SISTERS.
|
||||
*/
|
||||
private String cpRelationType;
|
||||
|
||||
}
|
||||
|
||||
@ -56,6 +56,10 @@ public class BuySuccessEvent implements Serializable {
|
||||
*/
|
||||
String payPlatform;
|
||||
|
||||
/**
|
||||
* 本次充值请求的App版本.
|
||||
*/
|
||||
String appVersion;
|
||||
/**
|
||||
* 来源.
|
||||
*/
|
||||
|
||||
@ -0,0 +1,39 @@
|
||||
package com.red.circle.mq.business.model.event.pay;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 通用充值成功事件。
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class RechargeSuccessEvent implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String eventId;
|
||||
private String sysOrigin;
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long userId;
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long amountCents;
|
||||
|
||||
private String amountUsd;
|
||||
private String currency;
|
||||
private String payPlatform;
|
||||
private String paymentMethod;
|
||||
private String googleProductId;
|
||||
private String productId;
|
||||
private String appVersion;
|
||||
private String sourceOrderId;
|
||||
private String orderId;
|
||||
private String occurredAt;
|
||||
private Map<String, Object> payload;
|
||||
}
|
||||
@ -22,6 +22,11 @@ public interface QueueNameConstant {
|
||||
*/
|
||||
String BUY_SUCCESS = "BUY_SUCCESS";
|
||||
|
||||
/**
|
||||
* 通用充值成功。
|
||||
*/
|
||||
String RECHARGE_SUCCESS = "RECHARGE_SUCCESS";
|
||||
|
||||
/**
|
||||
* 视频语音房间会话
|
||||
*/
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
package com.red.circle.mq.rocket.business.streams;
|
||||
|
||||
import com.red.circle.mq.rocket.business.constant.QueueNameConstant;
|
||||
|
||||
/**
|
||||
* 通用充值成功事件。
|
||||
*/
|
||||
public interface RechargeSuccessSink {
|
||||
|
||||
String INPUT = QueueNameConstant.RECHARGE_SUCCESS;
|
||||
String TAG = "recharge_success_v1";
|
||||
}
|
||||
@ -43,6 +43,7 @@ import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
@ -58,6 +59,7 @@ import java.util.zip.GZIPInputStream;
|
||||
public class ApiLoggingFilter implements GlobalFilter, Ordered {
|
||||
|
||||
private static final int MAX_RESPONSE_BODY_LOG_LENGTH = 500;
|
||||
private static final String REDACTED_V5PAY_BODY = "[REDACTED_V5PAY_CALLBACK]";
|
||||
|
||||
private final LoggingUploadService loggingUploadService;
|
||||
private final List<HttpMessageReader<?>> messageReaders = HandlerStrategies.withDefaults()
|
||||
@ -74,6 +76,12 @@ public class ApiLoggingFilter implements GlobalFilter, Ordered {
|
||||
|
||||
GatewayLogging logging = ApiLoggingUtils.createGatewayLogging(exchange);
|
||||
|
||||
if (isV5PayCallbackPath(request.getURI().getPath())) {
|
||||
// V5Pay 的 MD5 覆盖原始字段文本;通用 bodyToMono -> JSON 重写会把 14400.00 变成
|
||||
// 14400.0 并破坏验签,同时还会把 sign/appKey 写入日志。该回调必须完全不消费、不重写 body。
|
||||
return writeSensitiveRawBodyLog(exchange, chain, logging);
|
||||
}
|
||||
|
||||
return checkBodyType(exchange.getRequest())
|
||||
? writeBodyLog(exchange, chain, logging)
|
||||
: writeBasicLog(exchange, chain, logging);
|
||||
@ -186,6 +194,30 @@ public class ApiLoggingFilter implements GlobalFilter, Ordered {
|
||||
};
|
||||
}
|
||||
|
||||
static boolean isV5PayCallbackPath(String path) {
|
||||
if (StringUtils.isBlank(path)) {
|
||||
return false;
|
||||
}
|
||||
String normalized = path.toLowerCase(Locale.ROOT);
|
||||
return normalized.endsWith("/play-server-notice/v5pay/receive_payment")
|
||||
|| normalized.endsWith("/play-server-notice/v5_pay/receive_payment");
|
||||
}
|
||||
|
||||
private Mono<Void> writeSensitiveRawBodyLog(ServerWebExchange exchange,
|
||||
GatewayFilterChain chain,
|
||||
GatewayLogging logging) {
|
||||
// 明确写固定脱敏标记,避免后续日志上传误以为 body 尚未采集并再次尝试读取敏感回调体。
|
||||
logging.getRequest().setBody(REDACTED_V5PAY_BODY);
|
||||
ServerHttpResponseDecorator decoratedResponse = responseLog(exchange, logging);
|
||||
ServerHttpRequest request = exchange.getRequest().mutate().headers(this::setRequestTraceId)
|
||||
.build();
|
||||
return chain.filter(exchange.mutate().request(request).response(decoratedResponse).build())
|
||||
.then(Mono.fromRunnable(() -> {
|
||||
ApiLoggingUtils.resetGatewayLogging(exchange, logging);
|
||||
logging.uploadLog(loggingUploadService);
|
||||
}));
|
||||
}
|
||||
|
||||
private boolean isSuccessResponse(ServerHttpResponse response) {
|
||||
HttpStatusCode statusCode = response.getStatusCode();
|
||||
return statusCode == null || statusCode.is2xxSuccessful();
|
||||
|
||||
@ -0,0 +1,53 @@
|
||||
package com.red.circle.gateway.filter;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import com.red.circle.gateway.logging.LoggingUploadService;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.core.io.buffer.DataBufferUtils;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.mock.http.server.reactive.MockServerHttpRequest;
|
||||
import org.springframework.mock.web.server.MockServerWebExchange;
|
||||
|
||||
public class ApiLoggingFilterTest {
|
||||
|
||||
@Test
|
||||
public void recognizesBothV5PayCallbackRoutesOnly() {
|
||||
assertTrue(ApiLoggingFilter.isV5PayCallbackPath(
|
||||
"/play-server-notice/v5pay/receive_payment"));
|
||||
assertTrue(ApiLoggingFilter.isV5PayCallbackPath(
|
||||
"/order/play-server-notice/v5_pay/receive_payment"));
|
||||
assertFalse(ApiLoggingFilter.isV5PayCallbackPath(
|
||||
"/play-server-notice/mifa_pay/receive_payment"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void v5PayJsonBodyPassesThroughWithoutNumericReserialization() {
|
||||
byte[] raw = ("{\"orderNo\":\"YUMI42\",\"amount\":14400.00,"
|
||||
+ "\"appKey\":\"sensitive\",\"sign\":\"signature\"}")
|
||||
.getBytes(StandardCharsets.UTF_8);
|
||||
MockServerWebExchange exchange = MockServerWebExchange.from(
|
||||
MockServerHttpRequest.post("/play-server-notice/v5pay/receive_payment")
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.body(new String(raw, StandardCharsets.UTF_8)));
|
||||
AtomicReference<byte[]> forwarded = new AtomicReference<>();
|
||||
ApiLoggingFilter filter = new ApiLoggingFilter(new LoggingUploadService(null));
|
||||
|
||||
filter.filter(exchange, forwardedExchange -> DataBufferUtils
|
||||
.join(forwardedExchange.getRequest().getBody())
|
||||
.doOnNext(buffer -> {
|
||||
byte[] bytes = new byte[buffer.readableByteCount()];
|
||||
buffer.read(bytes);
|
||||
DataBufferUtils.release(buffer);
|
||||
forwarded.set(bytes);
|
||||
})
|
||||
.then())
|
||||
.block();
|
||||
|
||||
assertArrayEquals(raw, forwarded.get());
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,117 @@
|
||||
package com.red.circle.framework.web.feign;
|
||||
|
||||
import com.red.circle.framework.core.request.RequestHeaderConstant;
|
||||
import com.red.circle.framework.core.request.ServiceTraceId;
|
||||
import feign.RequestInterceptor;
|
||||
import feign.RequestTemplate;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
/**
|
||||
* Forward only business headers to Feign requests.
|
||||
*/
|
||||
@Component
|
||||
@Order(Ordered.LOWEST_PRECEDENCE)
|
||||
public class FeignRequestInterceptor implements RequestInterceptor {
|
||||
|
||||
private static final String INNER_SERVICE = "FEIGN";
|
||||
|
||||
private static final List<String> FORWARD_HEADERS = List.of(
|
||||
RequestHeaderConstant.AUTHORIZATION,
|
||||
RequestHeaderConstant.REQ_SYS_ORIGIN,
|
||||
RequestHeaderConstant.REQ_CLIENT,
|
||||
RequestHeaderConstant.REQ_ZONE,
|
||||
RequestHeaderConstant.REQ_IMEI,
|
||||
RequestHeaderConstant.REQ_APP_INTEL,
|
||||
RequestHeaderConstant.REQ_VERSION,
|
||||
RequestHeaderConstant.REQ_LANG,
|
||||
RequestHeaderConstant.REQ_INNER_INTERNAL,
|
||||
RequestHeaderConstant.REQ_INNER_TRACE_ID
|
||||
);
|
||||
|
||||
private static final Set<String> BLOCKED_HEADERS = Set.of(
|
||||
"host",
|
||||
"content-length",
|
||||
"transfer-encoding",
|
||||
"connection",
|
||||
"keep-alive",
|
||||
"upgrade",
|
||||
"proxy-authorization",
|
||||
"proxy-authenticate",
|
||||
"te",
|
||||
"trailer"
|
||||
);
|
||||
|
||||
@Override
|
||||
public void apply(RequestTemplate requestTemplate) {
|
||||
removeBlockedHeaders(requestTemplate);
|
||||
|
||||
if (RequestContextHolder.getRequestAttributes() instanceof ServletRequestAttributes attrs) {
|
||||
forwardHeaders(requestTemplate, attrs.getRequest());
|
||||
}
|
||||
|
||||
if (!hasHeader(requestTemplate, RequestHeaderConstant.REQ_INNER_SERVICE)) {
|
||||
requestTemplate.header(RequestHeaderConstant.REQ_INNER_SERVICE, INNER_SERVICE);
|
||||
}
|
||||
if (!hasHeader(requestTemplate, RequestHeaderConstant.REQ_INNER_TRACE_ID)) {
|
||||
requestTemplate.header(
|
||||
RequestHeaderConstant.REQ_INNER_TRACE_ID,
|
||||
ServiceTraceId.genTraceId(ServiceTraceId.Origin.INNER_REQ));
|
||||
}
|
||||
|
||||
removeBlockedHeaders(requestTemplate);
|
||||
}
|
||||
|
||||
private void forwardHeaders(RequestTemplate requestTemplate, HttpServletRequest request) {
|
||||
for (String header : FORWARD_HEADERS) {
|
||||
String value = request.getHeader(header);
|
||||
if (hasHeader(requestTemplate, header) || !isUsableHeaderValue(value)) {
|
||||
continue;
|
||||
}
|
||||
requestTemplate.header(header, value);
|
||||
}
|
||||
}
|
||||
|
||||
private void removeBlockedHeaders(RequestTemplate requestTemplate) {
|
||||
List<String> names = new ArrayList<>(requestTemplate.headers().keySet());
|
||||
for (String name : names) {
|
||||
if (isBlockedHeader(name)) {
|
||||
requestTemplate.removeHeader(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean hasHeader(RequestTemplate requestTemplate, String header) {
|
||||
return requestTemplate.headers().keySet().stream()
|
||||
.anyMatch(name -> name.equalsIgnoreCase(header));
|
||||
}
|
||||
|
||||
private boolean isBlockedHeader(String header) {
|
||||
if (header == null) {
|
||||
return true;
|
||||
}
|
||||
String normalized = header.toLowerCase(Locale.ROOT);
|
||||
return BLOCKED_HEADERS.contains(normalized) || normalized.startsWith("proxy-");
|
||||
}
|
||||
|
||||
private boolean isUsableHeaderValue(String value) {
|
||||
if (value == null || value.isBlank()) {
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < value.length(); i++) {
|
||||
char c = value.charAt(i);
|
||||
if (c < 32 || c == 127) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -8,7 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/8/16
|
||||
*/
|
||||
@FeignClient(name = "authClient", url = "${feign.auth.url}" + AuthClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "authClient", name = "rc-auth", url = "${feign.auth.url:}", path = AuthClientApi.API_PREFIX)
|
||||
public interface AuthClient extends AuthClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,7 +8,6 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/10/15
|
||||
*/
|
||||
@FeignClient(name = "miniMaxClient", url = "${feign.external.url}" +
|
||||
MiniMaxClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "miniMaxClient", name = "rc-service-external", url = "${feign.external.url:}", path = MiniMaxClientApi.API_PREFIX)
|
||||
public interface MiniMaxClient extends MiniMaxClientApi {
|
||||
}
|
||||
|
||||
@ -8,7 +8,6 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/10/15
|
||||
*/
|
||||
@FeignClient(name = "qianFanClient", url = "${feign.external.url}" +
|
||||
QianFanClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "qianFanClient", name = "rc-service-external", url = "${feign.external.url:}", path = QianFanClientApi.API_PREFIX)
|
||||
public interface QianFanClient extends QianFanClientApi {
|
||||
}
|
||||
|
||||
@ -9,8 +9,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/10/15
|
||||
*/
|
||||
@FeignClient(name = "ttsClient", url = "${feign.external.url}" +
|
||||
OssServiceClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "ttsClient", name = "rc-service-external", url = "${feign.external.url:}", path = OssServiceClientApi.API_PREFIX)
|
||||
public interface TtsClient extends TtsClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,7 +8,6 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/10/15
|
||||
*/
|
||||
@FeignClient(name = "barrageGameClient", url = "${feign.external.url}" +
|
||||
BarrageGameClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "barrageGameClient", name = "rc-service-external", url = "${feign.external.url:}", path = BarrageGameClientApi.API_PREFIX)
|
||||
public interface BarrageGameClient extends BarrageGameClientApi {
|
||||
}
|
||||
|
||||
@ -9,7 +9,6 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/10/17
|
||||
*/
|
||||
@FeignClient(name = "binanceClient", url = "${feign.external.url}" +
|
||||
CensorImageClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "binanceClient", name = "rc-service-external", url = "${feign.external.url:}", path = CensorImageClientApi.API_PREFIX)
|
||||
public interface BinanceClient extends BinanceClientApi {
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/10/17
|
||||
*/
|
||||
@FeignClient(name = "censorImageClient", url = "${feign.external.url}" +
|
||||
CensorImageClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "censorImageClient", name = "rc-service-external", url = "${feign.external.url:}", path = CensorImageClientApi.API_PREFIX)
|
||||
public interface CensorImageClient extends CensorImageClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -6,8 +6,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
/**
|
||||
* @author zongpubin on 2023/11/8
|
||||
*/
|
||||
@FeignClient(name = "googleTransactionClient", url = "${feign.external.url}" +
|
||||
GoogleTransactionClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "googleTransactionClient", name = "rc-service-external", url = "${feign.external.url:}", path = GoogleTransactionClientApi.API_PREFIX)
|
||||
public interface GoogleTransactionClient extends GoogleTransactionClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,7 +8,6 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/7/12
|
||||
*/
|
||||
@FeignClient(name = "agoraClient", url = "${feign.external.url}" +
|
||||
AgoraClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "agoraClient", name = "rc-service-external", url = "${feign.external.url:}", path = AgoraClientApi.API_PREFIX)
|
||||
public interface AgoraClient extends AgoraClientApi {
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/7/12
|
||||
*/
|
||||
@FeignClient(name = "imAccountClient", url = "${feign.external.url}" +
|
||||
ImAccountClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "imAccountClient", name = "rc-service-external", url = "${feign.external.url:}", path = ImAccountClientApi.API_PREFIX)
|
||||
public interface ImAccountClient extends ImAccountClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -9,8 +9,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/10/7
|
||||
*/
|
||||
@FeignClient(name = "imGroupAvClient", url = "${feign.external.url}" +
|
||||
ImAccountClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "imGroupAvClient", name = "rc-service-external", url = "${feign.external.url:}", path = ImAccountClientApi.API_PREFIX)
|
||||
public interface ImGroupAvClient extends ImGroupAvClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/8/16
|
||||
*/
|
||||
@FeignClient(name = "imGroupClient", url = "${feign.external.url}" +
|
||||
ImGroupClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "imGroupClient", name = "rc-service-external", url = "${feign.external.url:}", path = ImGroupClientApi.API_PREFIX)
|
||||
public interface ImGroupClient extends ImGroupClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -6,8 +6,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
/**
|
||||
* @author pengliang on 2023/12/28
|
||||
*/
|
||||
@FeignClient(name = "imGroupMemberClient", url = "${feign.external.url}" +
|
||||
ImGroupMemberClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "imGroupMemberClient", name = "rc-service-external", url = "${feign.external.url:}", path = ImGroupMemberClientApi.API_PREFIX)
|
||||
public interface ImGroupMemberClient extends ImGroupMemberClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/7/12
|
||||
*/
|
||||
@FeignClient(name = "imMessageClient", url = "${feign.external.url}" +
|
||||
ImMessageClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "imMessageClient", name = "rc-service-external", url = "${feign.external.url:}", path = ImMessageClientApi.API_PREFIX)
|
||||
public interface ImMessageClient extends ImMessageClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/11/16
|
||||
*/
|
||||
@FeignClient(name = "imOperationClient", url = "${feign.external.url}" +
|
||||
ImOperationClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "imOperationClient", name = "rc-service-external", url = "${feign.external.url:}", path = ImOperationClientApi.API_PREFIX)
|
||||
public interface ImOperationClient extends ImOperationClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/8/15
|
||||
*/
|
||||
@FeignClient(name = "newsletterClient", url = "${feign.external.url}" +
|
||||
NewsletterClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "newsletterClient", name = "rc-service-external", url = "${feign.external.url:}", path = NewsletterClientApi.API_PREFIX)
|
||||
public interface NewsletterClient extends NewsletterClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/7/12
|
||||
*/
|
||||
@FeignClient(name = "officialNoticeClient", url = "${feign.external.url}" +
|
||||
OfficialNoticeClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "officialNoticeClient", name = "rc-service-external", url = "${feign.external.url:}", path = OfficialNoticeClientApi.API_PREFIX)
|
||||
public interface OfficialNoticeClient extends OfficialNoticeClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/8/14
|
||||
*/
|
||||
@FeignClient(name = "smsClient", url = "${feign.external.url}" + SmsClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "smsClient", name = "rc-service-external", url = "${feign.external.url:}", path = SmsClientApi.API_PREFIX)
|
||||
public interface SmsClient extends SmsClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/10/17
|
||||
*/
|
||||
@FeignClient(name = "trtcClient", url = "${feign.external.url}" + TrtcClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "trtcClient", name = "rc-service-external", url = "${feign.external.url:}", path = TrtcClientApi.API_PREFIX)
|
||||
public interface TrtcClient extends TrtcClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
package com.red.circle.external.inner.endpoint.message.api;
|
||||
|
||||
import com.red.circle.framework.dto.ResultResponse;
|
||||
import com.red.circle.external.inner.model.cmd.message.CustomC2cMsgBodyCmd;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
@ -29,4 +33,10 @@ public interface ImMessageClientApi {
|
||||
@RequestParam("toAccount") Long toAccount,
|
||||
@RequestParam("text") String text);
|
||||
|
||||
/**
|
||||
* 发送 C2C 自定义消息.
|
||||
*/
|
||||
@PostMapping("/sendCustomMessage")
|
||||
ResultResponse<Void> sendCustomMessage(@RequestBody @Valid CustomC2cMsgBodyCmd cmd);
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/10/15
|
||||
*/
|
||||
@FeignClient(name = "ossServiceClient", url = "${feign.external.url}" +
|
||||
OssServiceClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "ossServiceClient", name = "rc-service-external", url = "${feign.external.url:}", path = OssServiceClientApi.API_PREFIX)
|
||||
public interface OssServiceClient extends OssServiceClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -6,8 +6,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
/**
|
||||
* @author lisizhe on 2023/11/8
|
||||
*/
|
||||
@FeignClient(name = "pushSendClient", url = "${feign.external.url}" +
|
||||
GoogleFirebasePushClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "pushSendClient", name = "rc-service-external", url = "${feign.external.url:}", path = GoogleFirebasePushClientApi.API_PREFIX)
|
||||
public interface GoogleFirebasePushClient extends GoogleFirebasePushClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
/**
|
||||
* @author longli on 2024/3/25
|
||||
*/
|
||||
@FeignClient(name = "ImClient", url = "${feign.external.url}" + ImClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "ImClient", name = "rc-service-external", url = "${feign.external.url:}", path = ImClientApi.API_PREFIX)
|
||||
public interface ImClient extends ImClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,91 @@
|
||||
package com.red.circle.external.inner.model.cmd.message;
|
||||
|
||||
import com.red.circle.framework.dto.Command;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.io.Serial;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* C2C custom IM message.
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CustomC2cMsgBodyCmd extends Command {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotBlank(message = "fromAccount required.")
|
||||
private String fromAccount;
|
||||
|
||||
@NotBlank(message = "toAccount required.")
|
||||
private String toAccount;
|
||||
|
||||
@NotBlank(message = "desc required.")
|
||||
private String desc;
|
||||
|
||||
@NotNull(message = "data required.")
|
||||
private Object data;
|
||||
|
||||
private Integer syncOtherMachine;
|
||||
|
||||
public static CustomC2cMsgBodyBuilder builder() {
|
||||
return new CustomC2cMsgBodyBuilder();
|
||||
}
|
||||
|
||||
public static class CustomC2cMsgBodyBuilder {
|
||||
|
||||
private String fromAccount;
|
||||
private String toAccount;
|
||||
private String desc;
|
||||
private Object data;
|
||||
private Integer syncOtherMachine;
|
||||
|
||||
public CustomC2cMsgBodyBuilder fromAccount(String fromAccount) {
|
||||
this.fromAccount = fromAccount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustomC2cMsgBodyBuilder fromAccount(Long fromAccount) {
|
||||
this.fromAccount = String.valueOf(fromAccount);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustomC2cMsgBodyBuilder toAccount(String toAccount) {
|
||||
this.toAccount = toAccount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustomC2cMsgBodyBuilder toAccount(Long toAccount) {
|
||||
this.toAccount = String.valueOf(toAccount);
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustomC2cMsgBodyBuilder desc(String desc) {
|
||||
this.desc = desc;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustomC2cMsgBodyBuilder data(Object data) {
|
||||
this.data = data;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustomC2cMsgBodyBuilder syncOtherMachine(Integer syncOtherMachine) {
|
||||
this.syncOtherMachine = syncOtherMachine;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CustomC2cMsgBodyCmd build() {
|
||||
CustomC2cMsgBodyCmd cmd = new CustomC2cMsgBodyCmd();
|
||||
cmd.setFromAccount(this.fromAccount);
|
||||
cmd.setToAccount(this.toAccount);
|
||||
cmd.setDesc(this.desc);
|
||||
cmd.setData(this.data);
|
||||
cmd.setSyncOtherMachine(this.syncOtherMachine);
|
||||
return cmd;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6,7 +6,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
/**
|
||||
* @author pengliang on 2023/12/13
|
||||
*/
|
||||
@FeignClient(name = "liveMicClient", url = "${feign.live.url}" + LiveMicClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "liveMicClient", name = "rc-service-live", url = "${feign.live.url:}", path = LiveMicClientApi.API_PREFIX)
|
||||
public interface LiveMicClient extends LiveMicClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -9,8 +9,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/12/26
|
||||
*/
|
||||
@FeignClient(name = "liveRoomUserClient", url = "${feign.live.url}" +
|
||||
LiveRoomUserClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "liveRoomUserClient", name = "rc-service-live", url = "${feign.live.url:}", path = LiveRoomUserClientApi.API_PREFIX)
|
||||
public interface LiveRoomUserClient extends LiveRoomUserClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/11/3
|
||||
*/
|
||||
@FeignClient(name = "inAppPurchaseDetailsClient", url = "${feign.order.url}" +
|
||||
InAppPurchaseDetailsClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "inAppPurchaseDetailsClient", name = "rc-service-order", url = "${feign.order.url:}", path = InAppPurchaseDetailsClientApi.API_PREFIX)
|
||||
public interface InAppPurchaseDetailsClient extends InAppPurchaseDetailsClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2024/1/23
|
||||
*/
|
||||
@FeignClient(name = "monthlyRechargeUserClient", url = "${feign.order.url}" +
|
||||
MonthlyRechargeUserClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "monthlyRechargeUserClient", name = "rc-service-order", url = "${feign.order.url:}", path = MonthlyRechargeUserClientApi.API_PREFIX)
|
||||
public interface MonthlyRechargeUserClient extends MonthlyRechargeUserClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/11/3
|
||||
*/
|
||||
@FeignClient(name = "orderAbnormalLogClient", url = "${feign.order.url}" +
|
||||
OrderAbnormalLogClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "orderAbnormalLogClient", name = "rc-service-order", url = "${feign.order.url:}", path = OrderAbnormalLogClientApi.API_PREFIX)
|
||||
public interface OrderAbnormalLogClient extends OrderAbnormalLogClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/11/3
|
||||
*/
|
||||
@FeignClient(name = "orderOtherRechargeClient", url = "${feign.order.url}" +
|
||||
OrderOtherRechargeClientClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "orderOtherRechargeClient", name = "rc-service-order", url = "${feign.order.url:}", path = OrderOtherRechargeClientClientApi.API_PREFIX)
|
||||
public interface OrderOtherRechargeClientClient extends OrderOtherRechargeClientClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/11/3
|
||||
*/
|
||||
@FeignClient(name = "orderPurchaseFriendshipRecordClient", url = "${feign.order.url}" +
|
||||
OrderPurchaseFriendshipRecordClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "orderPurchaseFriendshipRecordClient", name = "rc-service-order", url = "${feign.order.url:}", path = OrderPurchaseFriendshipRecordClientApi.API_PREFIX)
|
||||
public interface OrderPurchaseFriendshipRecordClient extends
|
||||
OrderPurchaseFriendshipRecordClientApi {
|
||||
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/11/3
|
||||
*/
|
||||
@FeignClient(name = "orderPurchaseHistoryClient", url = "${feign.order.url}" +
|
||||
OrderPurchaseHistoryClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "orderPurchaseHistoryClient", name = "rc-service-order", url = "${feign.order.url:}", path = OrderPurchaseHistoryClientApi.API_PREFIX)
|
||||
public interface OrderPurchaseHistoryClient extends OrderPurchaseHistoryClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author lisizhe on 2023/11/3
|
||||
*/
|
||||
@FeignClient(name = "payApplicationClient", url = "${feign.order.url}" +
|
||||
PayApplicationClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "payApplicationClient", name = "rc-service-order", url = "${feign.order.url:}", path = PayApplicationClientApi.API_PREFIX)
|
||||
public interface PayApplicationClient extends PayApplicationClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author lisizhe on 2023/11/3
|
||||
*/
|
||||
@FeignClient(name = "payChannelClient", url = "${feign.order.url}" +
|
||||
PayChannelClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "payChannelClient", name = "rc-service-order", url = "${feign.order.url:}", path = PayChannelClientApi.API_PREFIX)
|
||||
public interface PayChannelClient extends PayChannelClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author lisizhe on 2023/11/3
|
||||
*/
|
||||
@FeignClient(name = "payCountryClient", url = "${feign.order.url}" +
|
||||
PayCountryClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "payCountryClient", name = "rc-service-order", url = "${feign.order.url:}", path = PayCountryClientApi.API_PREFIX)
|
||||
public interface PayCountryClient extends PayCountryClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author lisizhe on 2023/11/3
|
||||
*/
|
||||
@FeignClient(name = "payFactoryClient", url = "${feign.order.url}" +
|
||||
PayFactoryClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "payFactoryClient", name = "rc-service-order", url = "${feign.order.url:}", path = PayFactoryClientApi.API_PREFIX)
|
||||
public interface PayFactoryClient extends PayFactoryClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/9/13
|
||||
*/
|
||||
@FeignClient(name = "productClient", url = "${feign.order.url}" + ProductClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "productClient", name = "rc-service-order", url = "${feign.order.url:}", path = ProductClientApi.API_PREFIX)
|
||||
public interface ProductClient extends ProductClientApi {
|
||||
|
||||
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/12/23
|
||||
*/
|
||||
@FeignClient(name = "roomRefundAnchorTrackRecordClient", url = "${feign.order.url}" +
|
||||
RoomRefundAnchorTrackRecordClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "roomRefundAnchorTrackRecordClient", name = "rc-service-order", url = "${feign.order.url:}", path = RoomRefundAnchorTrackRecordClientApi.API_PREFIX)
|
||||
public interface RoomRefundAnchorTrackRecordClient extends RoomRefundAnchorTrackRecordClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author zongpubin on 2023/11/1
|
||||
*/
|
||||
@FeignClient(name = "sysProductConfigClient", url = "${feign.order.url}" +
|
||||
SysProductConfigClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "sysProductConfigClient", name = "rc-service-order", url = "${feign.order.url:}", path = SysProductConfigClientApi.API_PREFIX)
|
||||
public interface SysProductConfigClient extends SysProductConfigClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2024/1/23
|
||||
*/
|
||||
@FeignClient(name = "userTotalRechargeClient", url = "${feign.order.url}" +
|
||||
TotalRechargeClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "userTotalRechargeClient", name = "rc-service-order", url = "${feign.order.url:}", path = TotalRechargeClientApi.API_PREFIX)
|
||||
public interface TotalRechargeClient extends TotalRechargeClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2024/1/23
|
||||
*/
|
||||
@FeignClient(name = "totalRechargeUserClient", url = "${feign.order.url}" +
|
||||
TotalRechargeUserClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "totalRechargeUserClient", name = "rc-service-order", url = "${feign.order.url:}", path = TotalRechargeUserClientApi.API_PREFIX)
|
||||
public interface TotalRechargeUserClient extends TotalRechargeUserClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/12/27
|
||||
*/
|
||||
@FeignClient(name = "userFreightRechargeRecordClient", url = "${feign.order.url}" +
|
||||
UserFreightRechargeRecordClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "userFreightRechargeRecordClient", name = "rc-service-order", url = "${feign.order.url:}", path = UserFreightRechargeRecordClientApi.API_PREFIX)
|
||||
public interface UserFreightRechargeRecordClient extends UserFreightRechargeRecordClientApi {
|
||||
|
||||
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2024/1/23
|
||||
*/
|
||||
@FeignClient(name = "userMonthlyRechargeClient", url = "${feign.order.url}" +
|
||||
UserMonthlyRechargeClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "userMonthlyRechargeClient", name = "rc-service-order", url = "${feign.order.url:}", path = UserMonthlyRechargeClientApi.API_PREFIX)
|
||||
public interface UserMonthlyRechargeClient extends UserMonthlyRechargeClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/9/13
|
||||
*/
|
||||
@FeignClient(name = "userRechargeCountClient", url = "${feign.order.url}" +
|
||||
UserRechargeCountClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "userRechargeCountClient", name = "rc-service-order", url = "${feign.order.url:}", path = UserRechargeCountClientApi.API_PREFIX)
|
||||
public interface UserRechargeCountClient extends UserRechargeCountClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -6,7 +6,9 @@ import com.red.circle.framework.dto.ResultResponse;
|
||||
import com.red.circle.order.inner.model.cmd.SysPayCountryAddCmd;
|
||||
import com.red.circle.order.inner.model.cmd.SysPayCountryChannelCmd;
|
||||
import com.red.circle.order.inner.model.cmd.SysPayCountryChannelDetailsCmd;
|
||||
import com.red.circle.order.inner.model.cmd.SysPayCountryCurrencyRateSyncCmd;
|
||||
import com.red.circle.order.inner.model.cmd.SysPayCountryQryCmd;
|
||||
import com.red.circle.order.inner.model.dto.PayCountryCurrencyRateSyncDTO;
|
||||
import com.red.circle.order.inner.model.dto.PayCountryDTO;
|
||||
import com.red.circle.order.inner.model.dto.SysPayCountryChannelDTO;
|
||||
import com.red.circle.order.inner.model.dto.SysPayCountryChannelDetailsDTO;
|
||||
@ -88,6 +90,10 @@ public interface PayCountryClientApi {
|
||||
@GetMapping("/shelf")
|
||||
ResultResponse<Void> shelf(@RequestParam("id") Long id, @RequestParam("shelf") Boolean shelf);
|
||||
|
||||
@PostMapping("/syncCurrencyRates")
|
||||
ResultResponse<PayCountryCurrencyRateSyncDTO> syncCurrencyRates(
|
||||
@RequestBody SysPayCountryCurrencyRateSyncCmd cmd);
|
||||
|
||||
@GetMapping("/listPayCountryByRegionId")
|
||||
ResultResponse<List<PayCountryDTO>> listPayCountryByRegionId(
|
||||
@RequestParam("regionId") String regionId);
|
||||
|
||||
@ -7,6 +7,7 @@ import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
@ -46,6 +47,12 @@ public class SysPayApplicationCommodityCmd extends CommonCommand {
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long payCountryId;
|
||||
|
||||
/**
|
||||
* 批量创建时的国家列表;表结构仍是一条商品对应一个国家,所以只在新增时拆成多条记录.
|
||||
*/
|
||||
@JsonSerialize(contentUsing = ToStringSerializer.class)
|
||||
private List<Long> payCountryIds;
|
||||
|
||||
/**
|
||||
* 区域ID.
|
||||
*/
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
package com.red.circle.order.inner.model.cmd;
|
||||
|
||||
import com.red.circle.framework.core.dto.CommonCommand;
|
||||
import jakarta.validation.constraints.DecimalMax;
|
||||
import jakarta.validation.constraints.DecimalMin;
|
||||
import jakarta.validation.constraints.Digits;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 支付国家货币汇率同步命令.
|
||||
*
|
||||
* @author system
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
public class SysPayCountryCurrencyRateSyncCmd extends CommonCommand {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 上浮比例,5 表示在实时汇率基础上增加 5%.
|
||||
*/
|
||||
@NotNull
|
||||
@DecimalMin("0")
|
||||
@DecimalMax("100")
|
||||
@Digits(integer = 3, fraction = 4)
|
||||
private BigDecimal markupPercent;
|
||||
}
|
||||
@ -102,4 +102,9 @@ public class InAppPurchaseDetailsQryCmd extends Command {
|
||||
* 条数.
|
||||
*/
|
||||
private Integer limit;
|
||||
|
||||
/**
|
||||
* 是否导出全部筛选结果;导出时不使用 lastId 和 limit 分页.
|
||||
*/
|
||||
private Boolean exportAll;
|
||||
}
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
package com.red.circle.order.inner.model.dto;
|
||||
|
||||
import com.red.circle.framework.dto.DTO;
|
||||
import java.io.Serial;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 支付国家货币汇率同步结果.
|
||||
*
|
||||
* @author system
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
public class PayCountryCurrencyRateSyncDTO extends DTO {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 参与同步的支付国家数量.
|
||||
*/
|
||||
private Integer totalCount;
|
||||
|
||||
/**
|
||||
* 已更新的支付国家数量.
|
||||
*/
|
||||
private Integer updatedCount;
|
||||
|
||||
/**
|
||||
* 跳过的支付国家数量.
|
||||
*/
|
||||
private Integer skippedCount;
|
||||
|
||||
/**
|
||||
* 汇率来源.
|
||||
*/
|
||||
private String sourceName;
|
||||
|
||||
/**
|
||||
* 被跳过的国家说明.
|
||||
*/
|
||||
private List<String> skippedCountries;
|
||||
}
|
||||
@ -24,6 +24,11 @@ public enum MonthlyRechargeType {
|
||||
*/
|
||||
MIFA_PAY,
|
||||
|
||||
/**
|
||||
* V5Pay.
|
||||
*/
|
||||
V5_PAY,
|
||||
|
||||
/**
|
||||
* Airwallex.
|
||||
*/
|
||||
@ -93,7 +98,7 @@ public enum MonthlyRechargeType {
|
||||
* 个人充值.
|
||||
*/
|
||||
public static List<MonthlyRechargeType> getPersonalRecharge() {
|
||||
return List.of(HUAWEI, GOOGLE, APPLE, PAYER_MAX, MIFA_PAY, AIRWALLEX, PAYNICORN,
|
||||
return List.of(HUAWEI, GOOGLE, APPLE, PAYER_MAX, MIFA_PAY, V5_PAY, AIRWALLEX, PAYNICORN,
|
||||
STRIPE, PAY_PAL, CLIPSPAY, SHIPPING_AGENT, SALARY_EXCHANGE);
|
||||
}
|
||||
|
||||
|
||||
@ -6,8 +6,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
/**
|
||||
* @author longli on @date 2024/3/14
|
||||
*/
|
||||
@FeignClient(name = "activityAgentAnchorCountClient", url = "${feign.other.url}" +
|
||||
ActivityAgentAnchorCountClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "activityAgentAnchorCountClient", name = "rc-service-other", url = "${feign.other.url:}", path = ActivityAgentAnchorCountClientApi.API_PREFIX)
|
||||
public interface ActivityAgentAnchorCountClient extends ActivityAgentAnchorCountClientApi {
|
||||
|
||||
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/10/8
|
||||
*/
|
||||
@FeignClient(name = "activityGlobalizationDescriptionClient", url = "${feign.other.url}" +
|
||||
ActivityGlobalizationDescriptionClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "activityGlobalizationDescriptionClient", name = "rc-service-other", url = "${feign.other.url:}", path = ActivityGlobalizationDescriptionClientApi.API_PREFIX)
|
||||
public interface ActivityGlobalizationDescriptionClient extends
|
||||
ActivityGlobalizationDescriptionClientApi {
|
||||
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/10/9
|
||||
*/
|
||||
@FeignClient(name = "activityHallFameClient", url = "${feign.other.url}" +
|
||||
ActivityHallFameClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "activityHallFameClient", name = "rc-service-other", url = "${feign.other.url:}", path = ActivityHallFameClientApi.API_PREFIX)
|
||||
public interface ActivityHallFameClient extends ActivityHallFameClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -7,8 +7,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
* 活动图片配置
|
||||
* @author zongpubin on 2024/1/29
|
||||
*/
|
||||
@FeignClient(name = "activityPictureConfigClient", url = "${feign.other.url}" +
|
||||
ActivityPictureConfigClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "activityPictureConfigClient", name = "rc-service-other", url = "${feign.other.url:}", path = ActivityPictureConfigClientApi.API_PREFIX)
|
||||
public interface ActivityPictureConfigClient extends ActivityPictureConfigClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -6,8 +6,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
/**
|
||||
* @author zongpubin on 2023/8/15
|
||||
*/
|
||||
@FeignClient(name = "agentActivityCountClient", url = "${feign.other.url}" +
|
||||
AgentActivityCountClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "agentActivityCountClient", name = "rc-service-other", url = "${feign.other.url:}", path = AgentActivityCountClientApi.API_PREFIX)
|
||||
public interface AgentActivityCountClient extends AgentActivityCountClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/8/16
|
||||
*/
|
||||
@FeignClient(name = "appRankCountClient", url = "${feign.other.url}" +
|
||||
AppRankCountClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "appRankCountClient", name = "rc-service-other", url = "${feign.other.url:}", path = AppRankCountClientApi.API_PREFIX)
|
||||
public interface AppRankCountClient extends AppRankCountClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/8/18
|
||||
*/
|
||||
@FeignClient(name = "cumulativeRechargeClient", url = "${feign.other.url}" +
|
||||
CumulativeRechargeClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "cumulativeRechargeClient", name = "rc-service-other", url = "${feign.other.url:}", path = CumulativeRechargeClientApi.API_PREFIX)
|
||||
public interface CumulativeRechargeClient extends CumulativeRechargeClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -6,8 +6,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
/**
|
||||
* @author pengliang on 2023/5/26
|
||||
*/
|
||||
@FeignClient(name = "inviteActivityCountClient", url = "${feign.other.url}" +
|
||||
InviteActivityCountClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "inviteActivityCountClient", name = "rc-service-other", url = "${feign.other.url:}", path = InviteActivityCountClientApi.API_PREFIX)
|
||||
public interface InviteActivityCountClient extends InviteActivityCountClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -9,8 +9,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
* @author system
|
||||
* @since 2025-10-18
|
||||
*/
|
||||
@FeignClient(name = "lotteryActivityClient", url = "${feign.other.url}" +
|
||||
LotteryActivityClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "lotteryActivityClient", name = "rc-service-other", url = "${feign.other.url:}", path = LotteryActivityClientApi.API_PREFIX)
|
||||
public interface LotteryActivityClient extends LotteryActivityClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -9,8 +9,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
* @author system
|
||||
* @since 2025-10-18
|
||||
*/
|
||||
@FeignClient(name = "lotteryActivityManageClient", url = "${feign.other.url}" +
|
||||
LotteryActivityManageClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "lotteryActivityManageClient", name = "rc-service-other", url = "${feign.other.url:}", path = LotteryActivityManageClientApi.API_PREFIX)
|
||||
public interface LotteryActivityManageClient extends LotteryActivityManageClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -9,8 +9,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
* @author system
|
||||
* @since 2025-10-18
|
||||
*/
|
||||
@FeignClient(name = "lotteryActivityQueryClient", url = "${feign.other.url}" +
|
||||
LotteryActivityQueryClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "lotteryActivityQueryClient", name = "rc-service-other", url = "${feign.other.url:}", path = LotteryActivityQueryClientApi.API_PREFIX)
|
||||
public interface LotteryActivityQueryClient extends LotteryActivityQueryClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -9,8 +9,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
* @author system
|
||||
* @since 2025-10-18
|
||||
*/
|
||||
@FeignClient(name = "lotteryPrizeClient", url = "${feign.other.url}" +
|
||||
LotteryPrizeClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "lotteryPrizeClient", name = "rc-service-other", url = "${feign.other.url:}", path = LotteryPrizeClientApi.API_PREFIX)
|
||||
public interface LotteryPrizeClient extends LotteryPrizeClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -9,8 +9,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
* @author system
|
||||
* @since 2025-10-18
|
||||
*/
|
||||
@FeignClient(name = "lotteryPrizeManageClient", url = "${feign.other.url}" +
|
||||
LotteryPrizeManageClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "lotteryPrizeManageClient", name = "rc-service-other", url = "${feign.other.url:}", path = LotteryPrizeManageClientApi.API_PREFIX)
|
||||
public interface LotteryPrizeManageClient extends LotteryPrizeManageClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -9,8 +9,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
* @author system
|
||||
* @since 2025-10-18
|
||||
*/
|
||||
@FeignClient(name = "lotteryRecordClient", url = "${feign.other.url}" +
|
||||
LotteryRecordClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "lotteryRecordClient", name = "rc-service-other", url = "${feign.other.url:}", path = LotteryRecordClientApi.API_PREFIX)
|
||||
public interface LotteryRecordClient extends LotteryRecordClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -9,8 +9,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
* @author system
|
||||
* @since 2025-10-18
|
||||
*/
|
||||
@FeignClient(name = "lotteryRecordManageClient", url = "${feign.other.url}" +
|
||||
LotteryRecordManageClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "lotteryRecordManageClient", name = "rc-service-other", url = "${feign.other.url:}", path = LotteryRecordManageClientApi.API_PREFIX)
|
||||
public interface LotteryRecordManageClient extends LotteryRecordManageClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -9,8 +9,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
* @author system
|
||||
* @since 2025-10-18
|
||||
*/
|
||||
@FeignClient(name = "lotteryTicketClient", url = "${feign.other.url}" +
|
||||
LotteryTicketClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "lotteryTicketClient", name = "rc-service-other", url = "${feign.other.url:}", path = LotteryTicketClientApi.API_PREFIX)
|
||||
public interface LotteryTicketClient extends LotteryTicketClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -9,8 +9,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
* @author system
|
||||
* @since 2025-10-18
|
||||
*/
|
||||
@FeignClient(name = "lotteryTicketManageClient", url = "${feign.other.url}" +
|
||||
LotteryTicketManageClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "lotteryTicketManageClient", name = "rc-service-other", url = "${feign.other.url:}", path = LotteryTicketManageClientApi.API_PREFIX)
|
||||
public interface LotteryTicketManageClient extends LotteryTicketManageClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -9,8 +9,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
* @author system
|
||||
* @since 2025-10-18
|
||||
*/
|
||||
@FeignClient(name = "lotteryUserCountClient", url = "${feign.other.url}" +
|
||||
LotteryUserCountClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "lotteryUserCountClient", name = "rc-service-other", url = "${feign.other.url:}", path = LotteryUserCountClientApi.API_PREFIX)
|
||||
public interface LotteryUserCountClient extends LotteryUserCountClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/6/5
|
||||
*/
|
||||
@FeignClient(name = "propsActivityCnfClient", url = "${feign.other.url}" +
|
||||
PropsActivityClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "propsActivityCnfClient", name = "rc-service-other", url = "${feign.other.url:}", path = PropsActivityClientApi.API_PREFIX)
|
||||
public interface PropsActivityClient extends PropsActivityClientApi {
|
||||
|
||||
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/11/2
|
||||
*/
|
||||
@FeignClient(name = "roomContributionActivityCountClient", url = "${feign.other.url}" +
|
||||
RoomContributionActivityCountClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "roomContributionActivityCountClient", name = "rc-service-other", url = "${feign.other.url:}", path = RoomContributionActivityCountClientApi.API_PREFIX)
|
||||
public interface RoomContributionActivityCountClient extends
|
||||
RoomContributionActivityCountClientApi {
|
||||
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/11/23
|
||||
*/
|
||||
@FeignClient(name = "roomContributionCountClient", url = "${feign.other.url}" +
|
||||
RoomContributionCountClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "roomContributionCountClient", name = "rc-service-other", url = "${feign.other.url:}", path = RoomContributionCountClientApi.API_PREFIX)
|
||||
public interface RoomContributionCountClient extends RoomContributionCountClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author lixiaofei on 2024/7/8
|
||||
*/
|
||||
@FeignClient(name = "temporaryActivityCountClient", url = "${feign.other.url}" +
|
||||
TemporaryActivityCountClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "temporaryActivityCountClient", name = "rc-service-other", url = "${feign.other.url:}", path = TemporaryActivityCountClientApi.API_PREFIX)
|
||||
public interface TemporaryActivityCountClient extends TemporaryActivityCountClientApi {
|
||||
|
||||
|
||||
|
||||
@ -6,8 +6,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
/**
|
||||
* 用户活动充值服务
|
||||
*/
|
||||
@FeignClient(name = "userActivityRechargeClient", url = "${feign.other.url}" +
|
||||
UserActivityRechargeClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "userActivityRechargeClient", name = "rc-service-other", url = "${feign.other.url:}", path = UserActivityRechargeClientApi.API_PREFIX)
|
||||
public interface UserActivityRechargeClient extends UserActivityRechargeClientApi {
|
||||
|
||||
}
|
||||
|
||||
@ -1,17 +1,13 @@
|
||||
package com.red.circle.other.inner.endpoint.activity.api;
|
||||
|
||||
import com.red.circle.common.business.core.enums.SysOriginPlatformEnum;
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.framework.dto.ResultResponse;
|
||||
import com.red.circle.other.inner.enums.activity.PropsActivityTypeEnum;
|
||||
import com.red.circle.other.inner.model.cmd.activity.SendActivityRewardCmd;
|
||||
import com.red.circle.other.inner.model.cmd.material.PropsActivityRuleConfigParamCmd;
|
||||
import com.red.circle.other.inner.model.cmd.material.PropsActivityRuleConfigQryCmd;
|
||||
import com.red.circle.other.inner.model.dto.activity.props.ActivityPropsGroup;
|
||||
import com.red.circle.other.inner.model.dto.activity.props.ActivityPropsRule;
|
||||
import com.red.circle.other.inner.model.dto.activity.props.ActivityPropsRuleDTO;
|
||||
import com.red.circle.other.inner.model.dto.activity.props.ActivityResource;
|
||||
import com.red.circle.other.inner.model.dto.material.PropsActivityRuleConfigDTO;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -178,39 +174,4 @@ public interface PropsActivityClientApi {
|
||||
@PostMapping("/mapRuleConfigByIds")
|
||||
ResultResponse<Map<Long, ActivityPropsRuleDTO>> mapRuleConfigByIds(
|
||||
@RequestBody Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 分页-查询活动道具规则配置.
|
||||
*/
|
||||
@PostMapping("/pagePropsActivityRuleConfig")
|
||||
ResultResponse<PageResult<PropsActivityRuleConfigDTO>> pagePropsActivityRuleConfig(
|
||||
@RequestBody @Validated PropsActivityRuleConfigQryCmd query);
|
||||
|
||||
|
||||
/**
|
||||
* 删除-查询活动道具规则配置.
|
||||
*/
|
||||
@PostMapping("/propsActivityRuleConfigDeleteById")
|
||||
ResultResponse<Void> propsActivityRuleConfigDeleteById(@RequestParam("id") Long id);
|
||||
|
||||
/**
|
||||
* 查询活动道具规则配置.
|
||||
*/
|
||||
@PostMapping("/getPropsActivityRuleConfig")
|
||||
ResultResponse<PropsActivityRuleConfigDTO> getPropsActivityRuleConfig(
|
||||
@RequestBody @Validated PropsActivityRuleConfigParamCmd param);
|
||||
|
||||
/**
|
||||
* 修改-查询活动道具规则配置.
|
||||
*/
|
||||
@PostMapping("/updatePropsActivityRuleConfigById")
|
||||
ResultResponse<Void> updatePropsActivityRuleConfigById(
|
||||
@RequestBody @Validated PropsActivityRuleConfigParamCmd param);
|
||||
|
||||
/**
|
||||
* 保存-查询活动道具规则配置.
|
||||
*/
|
||||
@PostMapping("/savePropsActivityRuleConfig")
|
||||
ResultResponse<Void> savePropsActivityRuleConfig(
|
||||
@RequestBody @Validated PropsActivityRuleConfigParamCmd param);
|
||||
}
|
||||
|
||||
@ -8,7 +8,6 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/11/16
|
||||
*/
|
||||
@FeignClient(name = "aiQianFanChatClient", url = "${feign.other.url}" +
|
||||
AiQianFanChatClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "aiQianFanChatClient", name = "rc-service-other", url = "${feign.other.url:}", path = AiQianFanChatClientApi.API_PREFIX)
|
||||
public interface AiQianFanChatClient extends AiQianFanChatClientApi {
|
||||
}
|
||||
|
||||
@ -8,8 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
*
|
||||
* @author pengliang on 2023/5/25
|
||||
*/
|
||||
@FeignClient(name = "approvalUserSettingDataClient", url = "${feign.other.url}" +
|
||||
ApprovalUserSettingDataClientApi.API_PREFIX)
|
||||
@FeignClient(contextId = "approvalUserSettingDataClient", name = "rc-service-other", url = "${feign.other.url:}", path = ApprovalUserSettingDataClientApi.API_PREFIX)
|
||||
public interface ApprovalUserSettingDataClient extends ApprovalUserSettingDataClientApi {
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user