Compare commits
No commits in common. "main" and "feature-trtc" have entirely different histories.
main
...
feature-tr
2
.gitignore
vendored
2
.gitignore
vendored
@ -97,5 +97,3 @@ devops-monitor-id_rsa.key
|
|||||||
/claude/
|
/claude/
|
||||||
|
|
||||||
.local-run/
|
.local-run/
|
||||||
|
|
||||||
.env
|
|
||||||
@ -108,20 +108,6 @@ spring:
|
|||||||
predicates:
|
predicates:
|
||||||
- Path=/play-server-notice/**
|
- 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
|
- id: service-other
|
||||||
uri: ${LIKEI_GATEWAY_ROUTE_OTHER_URI}
|
uri: ${LIKEI_GATEWAY_ROUTE_OTHER_URI}
|
||||||
predicates:
|
predicates:
|
||||||
@ -132,11 +118,6 @@ gateway:
|
|||||||
- /account/create
|
- /account/create
|
||||||
- /account/login/**/*
|
- /account/login/**/*
|
||||||
- /account/login
|
- /account/login
|
||||||
- /console/go
|
|
||||||
- /console/go/**
|
|
||||||
- /console/account/login/**/*
|
|
||||||
- /console/account/login
|
|
||||||
- /console/**
|
|
||||||
- /account/forget-pwd-reset
|
- /account/forget-pwd-reset
|
||||||
- /user/user-profile/open-search
|
- /user/user-profile/open-search
|
||||||
- /party3rd/tencent/cloud/im/callback
|
- /party3rd/tencent/cloud/im/callback
|
||||||
@ -175,7 +156,6 @@ gateway:
|
|||||||
- /product/apple/config
|
- /product/apple/config
|
||||||
- /game/sud/**
|
- /game/sud/**
|
||||||
- /web/pay/**
|
- /web/pay/**
|
||||||
- /order/web/pay/**
|
|
||||||
- /external/oss/upload
|
- /external/oss/upload
|
||||||
- /telegram/webhook
|
- /telegram/webhook
|
||||||
- /account/create/getRegion
|
- /account/create/getRegion
|
||||||
@ -194,33 +174,8 @@ gateway:
|
|||||||
- /go/resident-activity/room-turnover-reward/**
|
- /go/resident-activity/room-turnover-reward/**
|
||||||
- /resident-activity/room-turnover-reward/**
|
- /resident-activity/room-turnover-reward/**
|
||||||
- /go/resident-activity/register-reward/**
|
- /go/resident-activity/register-reward/**
|
||||||
- /resident-activity/register-reward/**
|
|
||||||
- /go/resident-activity/specified-gift-weekly-rank/**
|
- /go/resident-activity/specified-gift-weekly-rank/**
|
||||||
- /resident-activity/specified-gift-weekly-rank/**
|
|
||||||
- /go/resident-activity/week-star/**
|
- /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
|
# leaderboard
|
||||||
- /activity/leaderboard/gifts-send
|
- /activity/leaderboard/gifts-send
|
||||||
- /activity/leaderboard/gifts-received
|
- /activity/leaderboard/gifts-received
|
||||||
|
|||||||
@ -49,18 +49,6 @@ red-circle:
|
|||||||
factory-config:
|
factory-config:
|
||||||
cache-ttl-seconds: ${LIKEI_PAY_FACTORY_CONFIG_CACHE_TTL_SECONDS:300}
|
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:
|
airwallex:
|
||||||
client-id: ${LIKEI_AIRWALLEX_CLIENT_ID}
|
client-id: ${LIKEI_AIRWALLEX_CLIENT_ID}
|
||||||
api-key: ${LIKEI_AIRWALLEX_API_KEY}
|
api-key: ${LIKEI_AIRWALLEX_API_KEY}
|
||||||
|
|||||||
@ -128,13 +128,6 @@ task:
|
|||||||
topic: ${TASK_CENTER_EVENT_MQ_TOPIC:RC_DEFAULT_APP_ORDINARY}
|
topic: ${TASK_CENTER_EVENT_MQ_TOPIC:RC_DEFAULT_APP_ORDINARY}
|
||||||
tag: ${TASK_CENTER_EVENT_MQ_TAG:task_center_event}
|
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:
|
voice-room:
|
||||||
region-broadcast:
|
region-broadcast:
|
||||||
go:
|
go:
|
||||||
|
|||||||
@ -39,11 +39,10 @@ public class LoginAccessValidationService {
|
|||||||
"香港", "澳门", "澳門", "台湾", "台灣", "Hong Kong", "Macau", "Macao", "Taiwan"
|
"香港", "澳门", "澳門", "台湾", "台灣", "Hong Kong", "Macau", "Macao", "Taiwan"
|
||||||
);
|
);
|
||||||
private static final List<String> BLOCKED_COUNTRY_CODES = List.of(
|
private static final List<String> BLOCKED_COUNTRY_CODES = List.of(
|
||||||
"HK", "MO", "TW", "SG"
|
"MO", "SG"
|
||||||
);
|
);
|
||||||
private static final List<String> BLOCKED_COUNTRY_NAMES = List.of(
|
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(
|
private static final List<IpGeoProvider> IP_GEO_PROVIDERS = List.of(
|
||||||
new IpGeoProvider("ip.sb", "https://api.ip.sb/geoip/%s"),
|
new IpGeoProvider("ip.sb", "https://api.ip.sb/geoip/%s"),
|
||||||
|
|||||||
@ -224,18 +224,9 @@ public class EndpointRestController {
|
|||||||
*/
|
*/
|
||||||
@PostMapping("/account/login/channel")
|
@PostMapping("/account/login/channel")
|
||||||
public TokenCredentialCO login(@RequestBody @Validated UserChannelCredentialCmd cmd, HttpServletRequest request) {
|
public TokenCredentialCO login(@RequestBody @Validated UserChannelCredentialCmd cmd, HttpServletRequest request) {
|
||||||
try {
|
TokenCredentialCO tokenCredentialCO = processToken.createUserCredential(ResponseAssert.requiredSuccess(
|
||||||
TokenCredentialCO tokenCredentialCO = processToken.createUserCredential(ResponseAssert.requiredSuccess(
|
appUserAccountClient.channelCredential(cmd)));
|
||||||
appUserAccountClient.channelCredential(cmd)));
|
return submitLoginAccessValidation(tokenCredentialCO, cmd.requireReqSysOrigin(), cmd.getReqZoneId(), request);
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -296,13 +287,6 @@ public class EndpointRestController {
|
|||||||
|| Objects.equals(ex.getErrorCode(), UserErrorCode.SOURCE_REGISTERED.getCode());
|
|| 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(
|
private TokenCredentialCO createTokenCredential(
|
||||||
UserAccountDTO account,
|
UserAccountDTO account,
|
||||||
String reqSysOrigin,
|
String reqSysOrigin,
|
||||||
|
|||||||
@ -1,150 +0,0 @@
|
|||||||
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));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,117 +0,0 @@
|
|||||||
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
|
@Test
|
||||||
public void blockHongKongRegion() {
|
public void allowHongKongRegion() {
|
||||||
JSONObject data = JSON.parseObject("""
|
JSONObject data = JSON.parseObject("""
|
||||||
{"country_id":"CN","country":"中国","region":"香港"}
|
{"country_id":"CN","country":"中国","region":"香港"}
|
||||||
""");
|
""");
|
||||||
|
|
||||||
assertFalse(LoginAccessValidationService.isMainlandChina(data));
|
assertFalse(LoginAccessValidationService.isMainlandChina(data));
|
||||||
assertTrue(LoginAccessValidationService.isBlockedIpRegion(data));
|
assertFalse(LoginAccessValidationService.isBlockedIpRegion(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void blockHongKongCountryCode() {
|
public void allowHongKongCountryCode() {
|
||||||
JSONObject data = JSON.parseObject("""
|
JSONObject data = JSON.parseObject("""
|
||||||
{"country_id":"HK","country":"Hong Kong","region":"Kwai Tsing District"}
|
{"country_id":"HK","country":"Hong Kong","region":"Kwai Tsing District"}
|
||||||
""");
|
""");
|
||||||
|
|
||||||
assertTrue(LoginAccessValidationService.isBlockedIpRegion(data));
|
assertFalse(LoginAccessValidationService.isBlockedIpRegion(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -107,21 +107,21 @@ public class LoginAccessValidationServiceTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void blockTaiwanRegion() {
|
public void allowTaiwanRegion() {
|
||||||
JSONObject data = JSON.parseObject("""
|
JSONObject data = JSON.parseObject("""
|
||||||
{"country_id":"CN","country":"中国","region":"台湾"}
|
{"country_id":"CN","country":"中国","region":"台湾"}
|
||||||
""");
|
""");
|
||||||
|
|
||||||
assertFalse(LoginAccessValidationService.isMainlandChina(data));
|
assertFalse(LoginAccessValidationService.isMainlandChina(data));
|
||||||
assertTrue(LoginAccessValidationService.isBlockedIpRegion(data));
|
assertFalse(LoginAccessValidationService.isBlockedIpRegion(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void blockTaiwanCountryCode() {
|
public void allowTaiwanCountryCode() {
|
||||||
JSONObject data = JSON.parseObject("""
|
JSONObject data = JSON.parseObject("""
|
||||||
{"country_id":"TW","country":"Taiwan","region":""}
|
{"country_id":"TW","country":"Taiwan","region":""}
|
||||||
""");
|
""");
|
||||||
|
|
||||||
assertTrue(LoginAccessValidationService.isBlockedIpRegion(data));
|
assertFalse(LoginAccessValidationService.isBlockedIpRegion(data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,8 +64,6 @@ BADGE_ACTIVATION.body=You have received a new achievement badge, go check it out
|
|||||||
# cp\u5173\u7CFB\u89E3\u9664
|
# cp\u5173\u7CFB\u89E3\u9664
|
||||||
CP_DISMISS.title=CP Dismiss
|
CP_DISMISS.title=CP Dismiss
|
||||||
CP_DISMISS.body=${nickname} Dissolved the CP relationship with you
|
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
|
# \u63A5\u6536\u8D35\u65CFvip
|
||||||
ACCEPT_NOBLE_VIP.title=Receiving nobles
|
ACCEPT_NOBLE_VIP.title=Receiving nobles
|
||||||
ACCEPT_NOBLE_VIP.body=${nickname} gives you ${days} days of noble status~
|
ACCEPT_NOBLE_VIP.body=${nickname} gives you ${days} days of noble status~
|
||||||
|
|||||||
@ -81,8 +81,6 @@ AGREE_BD_LEADER_INVITE_AGENT.body=${userProfile} menerima undangan BD Anda
|
|||||||
BD_LEADER_SEND_INVITE_BD.title=Undangan BD
|
BD_LEADER_SEND_INVITE_BD.title=Undangan BD
|
||||||
BD_LEADER_SEND_INVITE_BD.body=${userProfile}mengundang Anda untuk menjadi BD
|
BD_LEADER_SEND_INVITE_BD.body=${userProfile}mengundang Anda untuk menjadi BD
|
||||||
# CP祝福通知
|
# CP祝福通知
|
||||||
CP_DISMISS.title=CP Dismiss
|
|
||||||
CP_DISMISS.body=${nickname} Dissolved the CP relationship with you
|
|
||||||
CP_BLESS.title=Cp memberkati
|
CP_BLESS.title=Cp memberkati
|
||||||
CP_BLESS.body=${nickname} Saya memberi Anda hadiah berkah ruang CP
|
CP_BLESS.body=${nickname} Saya memberi Anda hadiah berkah ruang CP
|
||||||
# 告白通知
|
# 告白通知
|
||||||
|
|||||||
@ -60,8 +60,6 @@ BADGE_ACTIVATION.body=Yeni bir ba\u015Far\u0131 rozeti ald\u0131n\u0131z, gidip
|
|||||||
# cp\u5173\u7CFB\u89E3\u9664
|
# cp\u5173\u7CFB\u89E3\u9664
|
||||||
CP_DISMISS.title=CP s\u00FCr\u00FCm\u00FC
|
CP_DISMISS.title=CP s\u00FCr\u00FCm\u00FC
|
||||||
CP_DISMISS.body= ${nickname} sizinle CP ili\u015Fkisini bozdu
|
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
|
# \u63A5\u6536\u8D35\u65CFvip
|
||||||
ACCEPT_NOBLE_VIP.title=Soylular al\u0131r
|
ACCEPT_NOBLE_VIP.title=Soylular al\u0131r
|
||||||
ACCEPT_NOBLE_VIP.body =${nickname} size ${days} g\u00FCnl\u00FCk asil stat\u00FCs\u00FC verir ~
|
ACCEPT_NOBLE_VIP.body =${nickname} size ${days} g\u00FCnl\u00FCk asil stat\u00FCs\u00FC verir ~
|
||||||
|
|||||||
@ -63,8 +63,6 @@ BADGE_ACTIVATION.body=\u60A8\u5DF2\u7372\u5F97\u65B0\u7684\u6210\u5C31\u5FBD\u7A
|
|||||||
# cp\u5173\u7CFB\u89E3\u9664
|
# cp\u5173\u7CFB\u89E3\u9664
|
||||||
CP_DISMISS.title=CP \u89E3\u9664
|
CP_DISMISS.title=CP \u89E3\u9664
|
||||||
CP_DISMISS.body= ${nickname} \u8207\u60A8\u89E3\u9664\u4E86 CP \u95DC\u4FC2
|
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
|
# \u63A5\u6536\u8D35\u65CFvip
|
||||||
ACCEPT_NOBLE_VIP.title=\u8CB4\u65CF\u63A5\u6536
|
ACCEPT_NOBLE_VIP.title=\u8CB4\u65CF\u63A5\u6536
|
||||||
ACCEPT_NOBLE_VIP.body =${nickname} \u8D08\u9001\u60A8 ${days} \u5929\u7684\u8CB4\u65CF\u8EAB\u4EFD~
|
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) {
|
public static RtcProviderEnum defaultProvider(String version) {
|
||||||
return compareVersion(version, TRTC_MIN_VERSION) < 0
|
return compareVersion(version, TRTC_MIN_VERSION) <= 0
|
||||||
? RtcProviderEnum.AGORA
|
? RtcProviderEnum.AGORA
|
||||||
: RtcProviderEnum.TRTC;
|
: RtcProviderEnum.TRTC;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,7 +39,7 @@ public enum ConsoleAccountStatusEnum {
|
|||||||
/**
|
/**
|
||||||
* 账号解封.
|
* 账号解封.
|
||||||
*/
|
*/
|
||||||
UNTIE_ACOOUNT("UNTIE_ACOOUNT", "账号解封"),
|
UNTIE_ACOOUNT("UNTIE_DEVICE", "账号解封"),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备+账户解封.
|
* 设备+账户解封.
|
||||||
|
|||||||
@ -1,14 +0,0 @@
|
|||||||
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,9 +51,4 @@ public class GiveGiftConfig implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String giftTab;
|
private String giftTab;
|
||||||
|
|
||||||
/**
|
|
||||||
* CP礼物关系类型:CP/BROTHER/SISTERS.
|
|
||||||
*/
|
|
||||||
private String cpRelationType;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -56,10 +56,6 @@ public class BuySuccessEvent implements Serializable {
|
|||||||
*/
|
*/
|
||||||
String payPlatform;
|
String payPlatform;
|
||||||
|
|
||||||
/**
|
|
||||||
* 本次充值请求的App版本.
|
|
||||||
*/
|
|
||||||
String appVersion;
|
|
||||||
/**
|
/**
|
||||||
* 来源.
|
* 来源.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,39 +0,0 @@
|
|||||||
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,11 +22,6 @@ public interface QueueNameConstant {
|
|||||||
*/
|
*/
|
||||||
String BUY_SUCCESS = "BUY_SUCCESS";
|
String BUY_SUCCESS = "BUY_SUCCESS";
|
||||||
|
|
||||||
/**
|
|
||||||
* 通用充值成功。
|
|
||||||
*/
|
|
||||||
String RECHARGE_SUCCESS = "RECHARGE_SUCCESS";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 视频语音房间会话
|
* 视频语音房间会话
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,12 +0,0 @@
|
|||||||
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,7 +43,6 @@ import java.io.ByteArrayOutputStream;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.zip.GZIPInputStream;
|
import java.util.zip.GZIPInputStream;
|
||||||
@ -59,7 +58,6 @@ import java.util.zip.GZIPInputStream;
|
|||||||
public class ApiLoggingFilter implements GlobalFilter, Ordered {
|
public class ApiLoggingFilter implements GlobalFilter, Ordered {
|
||||||
|
|
||||||
private static final int MAX_RESPONSE_BODY_LOG_LENGTH = 500;
|
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 LoggingUploadService loggingUploadService;
|
||||||
private final List<HttpMessageReader<?>> messageReaders = HandlerStrategies.withDefaults()
|
private final List<HttpMessageReader<?>> messageReaders = HandlerStrategies.withDefaults()
|
||||||
@ -76,12 +74,6 @@ public class ApiLoggingFilter implements GlobalFilter, Ordered {
|
|||||||
|
|
||||||
GatewayLogging logging = ApiLoggingUtils.createGatewayLogging(exchange);
|
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())
|
return checkBodyType(exchange.getRequest())
|
||||||
? writeBodyLog(exchange, chain, logging)
|
? writeBodyLog(exchange, chain, logging)
|
||||||
: writeBasicLog(exchange, chain, logging);
|
: writeBasicLog(exchange, chain, logging);
|
||||||
@ -194,30 +186,6 @@ 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) {
|
private boolean isSuccessResponse(ServerHttpResponse response) {
|
||||||
HttpStatusCode statusCode = response.getStatusCode();
|
HttpStatusCode statusCode = response.getStatusCode();
|
||||||
return statusCode == null || statusCode.is2xxSuccessful();
|
return statusCode == null || statusCode.is2xxSuccessful();
|
||||||
|
|||||||
@ -1,53 +0,0 @@
|
|||||||
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());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,117 +0,0 @@
|
|||||||
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
|
* @author pengliang on 2023/8/16
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "authClient", name = "rc-auth", url = "${feign.auth.url:}", path = AuthClientApi.API_PREFIX)
|
@FeignClient(name = "authClient", url = "${feign.auth.url}" + AuthClientApi.API_PREFIX)
|
||||||
public interface AuthClient extends AuthClientApi {
|
public interface AuthClient extends AuthClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/10/15
|
* @author pengliang on 2023/10/15
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "miniMaxClient", name = "rc-service-external", url = "${feign.external.url:}", path = MiniMaxClientApi.API_PREFIX)
|
@FeignClient(name = "miniMaxClient", url = "${feign.external.url}" +
|
||||||
|
MiniMaxClientApi.API_PREFIX)
|
||||||
public interface MiniMaxClient extends MiniMaxClientApi {
|
public interface MiniMaxClient extends MiniMaxClientApi {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/10/15
|
* @author pengliang on 2023/10/15
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "qianFanClient", name = "rc-service-external", url = "${feign.external.url:}", path = QianFanClientApi.API_PREFIX)
|
@FeignClient(name = "qianFanClient", url = "${feign.external.url}" +
|
||||||
|
QianFanClientApi.API_PREFIX)
|
||||||
public interface QianFanClient extends QianFanClientApi {
|
public interface QianFanClient extends QianFanClientApi {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/10/15
|
* @author pengliang on 2023/10/15
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "ttsClient", name = "rc-service-external", url = "${feign.external.url:}", path = OssServiceClientApi.API_PREFIX)
|
@FeignClient(name = "ttsClient", url = "${feign.external.url}" +
|
||||||
|
OssServiceClientApi.API_PREFIX)
|
||||||
public interface TtsClient extends TtsClientApi {
|
public interface TtsClient extends TtsClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/10/15
|
* @author pengliang on 2023/10/15
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "barrageGameClient", name = "rc-service-external", url = "${feign.external.url:}", path = BarrageGameClientApi.API_PREFIX)
|
@FeignClient(name = "barrageGameClient", url = "${feign.external.url}" +
|
||||||
|
BarrageGameClientApi.API_PREFIX)
|
||||||
public interface BarrageGameClient extends BarrageGameClientApi {
|
public interface BarrageGameClient extends BarrageGameClientApi {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/10/17
|
* @author pengliang on 2023/10/17
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "binanceClient", name = "rc-service-external", url = "${feign.external.url:}", path = CensorImageClientApi.API_PREFIX)
|
@FeignClient(name = "binanceClient", url = "${feign.external.url}" +
|
||||||
|
CensorImageClientApi.API_PREFIX)
|
||||||
public interface BinanceClient extends BinanceClientApi {
|
public interface BinanceClient extends BinanceClientApi {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/10/17
|
* @author pengliang on 2023/10/17
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "censorImageClient", name = "rc-service-external", url = "${feign.external.url:}", path = CensorImageClientApi.API_PREFIX)
|
@FeignClient(name = "censorImageClient", url = "${feign.external.url}" +
|
||||||
|
CensorImageClientApi.API_PREFIX)
|
||||||
public interface CensorImageClient extends CensorImageClientApi {
|
public interface CensorImageClient extends CensorImageClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
/**
|
/**
|
||||||
* @author zongpubin on 2023/11/8
|
* @author zongpubin on 2023/11/8
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "googleTransactionClient", name = "rc-service-external", url = "${feign.external.url:}", path = GoogleTransactionClientApi.API_PREFIX)
|
@FeignClient(name = "googleTransactionClient", url = "${feign.external.url}" +
|
||||||
|
GoogleTransactionClientApi.API_PREFIX)
|
||||||
public interface GoogleTransactionClient extends GoogleTransactionClientApi {
|
public interface GoogleTransactionClient extends GoogleTransactionClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/7/12
|
* @author pengliang on 2023/7/12
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "agoraClient", name = "rc-service-external", url = "${feign.external.url:}", path = AgoraClientApi.API_PREFIX)
|
@FeignClient(name = "agoraClient", url = "${feign.external.url}" +
|
||||||
|
AgoraClientApi.API_PREFIX)
|
||||||
public interface AgoraClient extends AgoraClientApi {
|
public interface AgoraClient extends AgoraClientApi {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/7/12
|
* @author pengliang on 2023/7/12
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "imAccountClient", name = "rc-service-external", url = "${feign.external.url:}", path = ImAccountClientApi.API_PREFIX)
|
@FeignClient(name = "imAccountClient", url = "${feign.external.url}" +
|
||||||
|
ImAccountClientApi.API_PREFIX)
|
||||||
public interface ImAccountClient extends ImAccountClientApi {
|
public interface ImAccountClient extends ImAccountClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/10/7
|
* @author pengliang on 2023/10/7
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "imGroupAvClient", name = "rc-service-external", url = "${feign.external.url:}", path = ImAccountClientApi.API_PREFIX)
|
@FeignClient(name = "imGroupAvClient", url = "${feign.external.url}" +
|
||||||
|
ImAccountClientApi.API_PREFIX)
|
||||||
public interface ImGroupAvClient extends ImGroupAvClientApi {
|
public interface ImGroupAvClient extends ImGroupAvClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/8/16
|
* @author pengliang on 2023/8/16
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "imGroupClient", name = "rc-service-external", url = "${feign.external.url:}", path = ImGroupClientApi.API_PREFIX)
|
@FeignClient(name = "imGroupClient", url = "${feign.external.url}" +
|
||||||
|
ImGroupClientApi.API_PREFIX)
|
||||||
public interface ImGroupClient extends ImGroupClientApi {
|
public interface ImGroupClient extends ImGroupClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
/**
|
/**
|
||||||
* @author pengliang on 2023/12/28
|
* @author pengliang on 2023/12/28
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "imGroupMemberClient", name = "rc-service-external", url = "${feign.external.url:}", path = ImGroupMemberClientApi.API_PREFIX)
|
@FeignClient(name = "imGroupMemberClient", url = "${feign.external.url}" +
|
||||||
|
ImGroupMemberClientApi.API_PREFIX)
|
||||||
public interface ImGroupMemberClient extends ImGroupMemberClientApi {
|
public interface ImGroupMemberClient extends ImGroupMemberClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/7/12
|
* @author pengliang on 2023/7/12
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "imMessageClient", name = "rc-service-external", url = "${feign.external.url:}", path = ImMessageClientApi.API_PREFIX)
|
@FeignClient(name = "imMessageClient", url = "${feign.external.url}" +
|
||||||
|
ImMessageClientApi.API_PREFIX)
|
||||||
public interface ImMessageClient extends ImMessageClientApi {
|
public interface ImMessageClient extends ImMessageClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/11/16
|
* @author pengliang on 2023/11/16
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "imOperationClient", name = "rc-service-external", url = "${feign.external.url:}", path = ImOperationClientApi.API_PREFIX)
|
@FeignClient(name = "imOperationClient", url = "${feign.external.url}" +
|
||||||
|
ImOperationClientApi.API_PREFIX)
|
||||||
public interface ImOperationClient extends ImOperationClientApi {
|
public interface ImOperationClient extends ImOperationClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/8/15
|
* @author pengliang on 2023/8/15
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "newsletterClient", name = "rc-service-external", url = "${feign.external.url:}", path = NewsletterClientApi.API_PREFIX)
|
@FeignClient(name = "newsletterClient", url = "${feign.external.url}" +
|
||||||
|
NewsletterClientApi.API_PREFIX)
|
||||||
public interface NewsletterClient extends NewsletterClientApi {
|
public interface NewsletterClient extends NewsletterClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/7/12
|
* @author pengliang on 2023/7/12
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "officialNoticeClient", name = "rc-service-external", url = "${feign.external.url:}", path = OfficialNoticeClientApi.API_PREFIX)
|
@FeignClient(name = "officialNoticeClient", url = "${feign.external.url}" +
|
||||||
|
OfficialNoticeClientApi.API_PREFIX)
|
||||||
public interface OfficialNoticeClient extends OfficialNoticeClientApi {
|
public interface OfficialNoticeClient extends OfficialNoticeClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/8/14
|
* @author pengliang on 2023/8/14
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "smsClient", name = "rc-service-external", url = "${feign.external.url:}", path = SmsClientApi.API_PREFIX)
|
@FeignClient(name = "smsClient", url = "${feign.external.url}" + SmsClientApi.API_PREFIX)
|
||||||
public interface SmsClient extends SmsClientApi {
|
public interface SmsClient extends SmsClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/10/17
|
* @author pengliang on 2023/10/17
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "trtcClient", name = "rc-service-external", url = "${feign.external.url:}", path = TrtcClientApi.API_PREFIX)
|
@FeignClient(name = "trtcClient", url = "${feign.external.url}" + TrtcClientApi.API_PREFIX)
|
||||||
public interface TrtcClient extends TrtcClientApi {
|
public interface TrtcClient extends TrtcClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,11 +1,7 @@
|
|||||||
package com.red.circle.external.inner.endpoint.message.api;
|
package com.red.circle.external.inner.endpoint.message.api;
|
||||||
|
|
||||||
import com.red.circle.framework.dto.ResultResponse;
|
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.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -33,10 +29,4 @@ public interface ImMessageClientApi {
|
|||||||
@RequestParam("toAccount") Long toAccount,
|
@RequestParam("toAccount") Long toAccount,
|
||||||
@RequestParam("text") String text);
|
@RequestParam("text") String text);
|
||||||
|
|
||||||
/**
|
|
||||||
* 发送 C2C 自定义消息.
|
|
||||||
*/
|
|
||||||
@PostMapping("/sendCustomMessage")
|
|
||||||
ResultResponse<Void> sendCustomMessage(@RequestBody @Valid CustomC2cMsgBodyCmd cmd);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/10/15
|
* @author pengliang on 2023/10/15
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "ossServiceClient", name = "rc-service-external", url = "${feign.external.url:}", path = OssServiceClientApi.API_PREFIX)
|
@FeignClient(name = "ossServiceClient", url = "${feign.external.url}" +
|
||||||
|
OssServiceClientApi.API_PREFIX)
|
||||||
public interface OssServiceClient extends OssServiceClientApi {
|
public interface OssServiceClient extends OssServiceClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
/**
|
/**
|
||||||
* @author lisizhe on 2023/11/8
|
* @author lisizhe on 2023/11/8
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "pushSendClient", name = "rc-service-external", url = "${feign.external.url:}", path = GoogleFirebasePushClientApi.API_PREFIX)
|
@FeignClient(name = "pushSendClient", url = "${feign.external.url}" +
|
||||||
|
GoogleFirebasePushClientApi.API_PREFIX)
|
||||||
public interface GoogleFirebasePushClient extends GoogleFirebasePushClientApi {
|
public interface GoogleFirebasePushClient extends GoogleFirebasePushClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
/**
|
/**
|
||||||
* @author longli on 2024/3/25
|
* @author longli on 2024/3/25
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "ImClient", name = "rc-service-external", url = "${feign.external.url:}", path = ImClientApi.API_PREFIX)
|
@FeignClient(name = "ImClient", url = "${feign.external.url}" + ImClientApi.API_PREFIX)
|
||||||
public interface ImClient extends ImClientApi {
|
public interface ImClient extends ImClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,91 +0,0 @@
|
|||||||
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
|
* @author pengliang on 2023/12/13
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "liveMicClient", name = "rc-service-live", url = "${feign.live.url:}", path = LiveMicClientApi.API_PREFIX)
|
@FeignClient(name = "liveMicClient", url = "${feign.live.url}" + LiveMicClientApi.API_PREFIX)
|
||||||
public interface LiveMicClient extends LiveMicClientApi {
|
public interface LiveMicClient extends LiveMicClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/12/26
|
* @author pengliang on 2023/12/26
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "liveRoomUserClient", name = "rc-service-live", url = "${feign.live.url:}", path = LiveRoomUserClientApi.API_PREFIX)
|
@FeignClient(name = "liveRoomUserClient", url = "${feign.live.url}" +
|
||||||
|
LiveRoomUserClientApi.API_PREFIX)
|
||||||
public interface LiveRoomUserClient extends LiveRoomUserClientApi {
|
public interface LiveRoomUserClient extends LiveRoomUserClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/11/3
|
* @author pengliang on 2023/11/3
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "inAppPurchaseDetailsClient", name = "rc-service-order", url = "${feign.order.url:}", path = InAppPurchaseDetailsClientApi.API_PREFIX)
|
@FeignClient(name = "inAppPurchaseDetailsClient", url = "${feign.order.url}" +
|
||||||
|
InAppPurchaseDetailsClientApi.API_PREFIX)
|
||||||
public interface InAppPurchaseDetailsClient extends InAppPurchaseDetailsClientApi {
|
public interface InAppPurchaseDetailsClient extends InAppPurchaseDetailsClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2024/1/23
|
* @author pengliang on 2024/1/23
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "monthlyRechargeUserClient", name = "rc-service-order", url = "${feign.order.url:}", path = MonthlyRechargeUserClientApi.API_PREFIX)
|
@FeignClient(name = "monthlyRechargeUserClient", url = "${feign.order.url}" +
|
||||||
|
MonthlyRechargeUserClientApi.API_PREFIX)
|
||||||
public interface MonthlyRechargeUserClient extends MonthlyRechargeUserClientApi {
|
public interface MonthlyRechargeUserClient extends MonthlyRechargeUserClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/11/3
|
* @author pengliang on 2023/11/3
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "orderAbnormalLogClient", name = "rc-service-order", url = "${feign.order.url:}", path = OrderAbnormalLogClientApi.API_PREFIX)
|
@FeignClient(name = "orderAbnormalLogClient", url = "${feign.order.url}" +
|
||||||
|
OrderAbnormalLogClientApi.API_PREFIX)
|
||||||
public interface OrderAbnormalLogClient extends OrderAbnormalLogClientApi {
|
public interface OrderAbnormalLogClient extends OrderAbnormalLogClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/11/3
|
* @author pengliang on 2023/11/3
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "orderOtherRechargeClient", name = "rc-service-order", url = "${feign.order.url:}", path = OrderOtherRechargeClientClientApi.API_PREFIX)
|
@FeignClient(name = "orderOtherRechargeClient", url = "${feign.order.url}" +
|
||||||
|
OrderOtherRechargeClientClientApi.API_PREFIX)
|
||||||
public interface OrderOtherRechargeClientClient extends OrderOtherRechargeClientClientApi {
|
public interface OrderOtherRechargeClientClient extends OrderOtherRechargeClientClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/11/3
|
* @author pengliang on 2023/11/3
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "orderPurchaseFriendshipRecordClient", name = "rc-service-order", url = "${feign.order.url:}", path = OrderPurchaseFriendshipRecordClientApi.API_PREFIX)
|
@FeignClient(name = "orderPurchaseFriendshipRecordClient", url = "${feign.order.url}" +
|
||||||
|
OrderPurchaseFriendshipRecordClientApi.API_PREFIX)
|
||||||
public interface OrderPurchaseFriendshipRecordClient extends
|
public interface OrderPurchaseFriendshipRecordClient extends
|
||||||
OrderPurchaseFriendshipRecordClientApi {
|
OrderPurchaseFriendshipRecordClientApi {
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/11/3
|
* @author pengliang on 2023/11/3
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "orderPurchaseHistoryClient", name = "rc-service-order", url = "${feign.order.url:}", path = OrderPurchaseHistoryClientApi.API_PREFIX)
|
@FeignClient(name = "orderPurchaseHistoryClient", url = "${feign.order.url}" +
|
||||||
|
OrderPurchaseHistoryClientApi.API_PREFIX)
|
||||||
public interface OrderPurchaseHistoryClient extends OrderPurchaseHistoryClientApi {
|
public interface OrderPurchaseHistoryClient extends OrderPurchaseHistoryClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author lisizhe on 2023/11/3
|
* @author lisizhe on 2023/11/3
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "payApplicationClient", name = "rc-service-order", url = "${feign.order.url:}", path = PayApplicationClientApi.API_PREFIX)
|
@FeignClient(name = "payApplicationClient", url = "${feign.order.url}" +
|
||||||
|
PayApplicationClientApi.API_PREFIX)
|
||||||
public interface PayApplicationClient extends PayApplicationClientApi {
|
public interface PayApplicationClient extends PayApplicationClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author lisizhe on 2023/11/3
|
* @author lisizhe on 2023/11/3
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "payChannelClient", name = "rc-service-order", url = "${feign.order.url:}", path = PayChannelClientApi.API_PREFIX)
|
@FeignClient(name = "payChannelClient", url = "${feign.order.url}" +
|
||||||
|
PayChannelClientApi.API_PREFIX)
|
||||||
public interface PayChannelClient extends PayChannelClientApi {
|
public interface PayChannelClient extends PayChannelClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author lisizhe on 2023/11/3
|
* @author lisizhe on 2023/11/3
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "payCountryClient", name = "rc-service-order", url = "${feign.order.url:}", path = PayCountryClientApi.API_PREFIX)
|
@FeignClient(name = "payCountryClient", url = "${feign.order.url}" +
|
||||||
|
PayCountryClientApi.API_PREFIX)
|
||||||
public interface PayCountryClient extends PayCountryClientApi {
|
public interface PayCountryClient extends PayCountryClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author lisizhe on 2023/11/3
|
* @author lisizhe on 2023/11/3
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "payFactoryClient", name = "rc-service-order", url = "${feign.order.url:}", path = PayFactoryClientApi.API_PREFIX)
|
@FeignClient(name = "payFactoryClient", url = "${feign.order.url}" +
|
||||||
|
PayFactoryClientApi.API_PREFIX)
|
||||||
public interface PayFactoryClient extends PayFactoryClientApi {
|
public interface PayFactoryClient extends PayFactoryClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/9/13
|
* @author pengliang on 2023/9/13
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "productClient", name = "rc-service-order", url = "${feign.order.url:}", path = ProductClientApi.API_PREFIX)
|
@FeignClient(name = "productClient", url = "${feign.order.url}" + ProductClientApi.API_PREFIX)
|
||||||
public interface ProductClient extends ProductClientApi {
|
public interface ProductClient extends ProductClientApi {
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/12/23
|
* @author pengliang on 2023/12/23
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "roomRefundAnchorTrackRecordClient", name = "rc-service-order", url = "${feign.order.url:}", path = RoomRefundAnchorTrackRecordClientApi.API_PREFIX)
|
@FeignClient(name = "roomRefundAnchorTrackRecordClient", url = "${feign.order.url}" +
|
||||||
|
RoomRefundAnchorTrackRecordClientApi.API_PREFIX)
|
||||||
public interface RoomRefundAnchorTrackRecordClient extends RoomRefundAnchorTrackRecordClientApi {
|
public interface RoomRefundAnchorTrackRecordClient extends RoomRefundAnchorTrackRecordClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author zongpubin on 2023/11/1
|
* @author zongpubin on 2023/11/1
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "sysProductConfigClient", name = "rc-service-order", url = "${feign.order.url:}", path = SysProductConfigClientApi.API_PREFIX)
|
@FeignClient(name = "sysProductConfigClient", url = "${feign.order.url}" +
|
||||||
|
SysProductConfigClientApi.API_PREFIX)
|
||||||
public interface SysProductConfigClient extends SysProductConfigClientApi {
|
public interface SysProductConfigClient extends SysProductConfigClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2024/1/23
|
* @author pengliang on 2024/1/23
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "userTotalRechargeClient", name = "rc-service-order", url = "${feign.order.url:}", path = TotalRechargeClientApi.API_PREFIX)
|
@FeignClient(name = "userTotalRechargeClient", url = "${feign.order.url}" +
|
||||||
|
TotalRechargeClientApi.API_PREFIX)
|
||||||
public interface TotalRechargeClient extends TotalRechargeClientApi {
|
public interface TotalRechargeClient extends TotalRechargeClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2024/1/23
|
* @author pengliang on 2024/1/23
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "totalRechargeUserClient", name = "rc-service-order", url = "${feign.order.url:}", path = TotalRechargeUserClientApi.API_PREFIX)
|
@FeignClient(name = "totalRechargeUserClient", url = "${feign.order.url}" +
|
||||||
|
TotalRechargeUserClientApi.API_PREFIX)
|
||||||
public interface TotalRechargeUserClient extends TotalRechargeUserClientApi {
|
public interface TotalRechargeUserClient extends TotalRechargeUserClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/12/27
|
* @author pengliang on 2023/12/27
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "userFreightRechargeRecordClient", name = "rc-service-order", url = "${feign.order.url:}", path = UserFreightRechargeRecordClientApi.API_PREFIX)
|
@FeignClient(name = "userFreightRechargeRecordClient", url = "${feign.order.url}" +
|
||||||
|
UserFreightRechargeRecordClientApi.API_PREFIX)
|
||||||
public interface UserFreightRechargeRecordClient extends UserFreightRechargeRecordClientApi {
|
public interface UserFreightRechargeRecordClient extends UserFreightRechargeRecordClientApi {
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2024/1/23
|
* @author pengliang on 2024/1/23
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "userMonthlyRechargeClient", name = "rc-service-order", url = "${feign.order.url:}", path = UserMonthlyRechargeClientApi.API_PREFIX)
|
@FeignClient(name = "userMonthlyRechargeClient", url = "${feign.order.url}" +
|
||||||
|
UserMonthlyRechargeClientApi.API_PREFIX)
|
||||||
public interface UserMonthlyRechargeClient extends UserMonthlyRechargeClientApi {
|
public interface UserMonthlyRechargeClient extends UserMonthlyRechargeClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/9/13
|
* @author pengliang on 2023/9/13
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "userRechargeCountClient", name = "rc-service-order", url = "${feign.order.url:}", path = UserRechargeCountClientApi.API_PREFIX)
|
@FeignClient(name = "userRechargeCountClient", url = "${feign.order.url}" +
|
||||||
|
UserRechargeCountClientApi.API_PREFIX)
|
||||||
public interface UserRechargeCountClient extends UserRechargeCountClientApi {
|
public interface UserRechargeCountClient extends UserRechargeCountClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,9 +6,7 @@ import com.red.circle.framework.dto.ResultResponse;
|
|||||||
import com.red.circle.order.inner.model.cmd.SysPayCountryAddCmd;
|
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.SysPayCountryChannelCmd;
|
||||||
import com.red.circle.order.inner.model.cmd.SysPayCountryChannelDetailsCmd;
|
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.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.PayCountryDTO;
|
||||||
import com.red.circle.order.inner.model.dto.SysPayCountryChannelDTO;
|
import com.red.circle.order.inner.model.dto.SysPayCountryChannelDTO;
|
||||||
import com.red.circle.order.inner.model.dto.SysPayCountryChannelDetailsDTO;
|
import com.red.circle.order.inner.model.dto.SysPayCountryChannelDetailsDTO;
|
||||||
@ -90,10 +88,6 @@ public interface PayCountryClientApi {
|
|||||||
@GetMapping("/shelf")
|
@GetMapping("/shelf")
|
||||||
ResultResponse<Void> shelf(@RequestParam("id") Long id, @RequestParam("shelf") Boolean shelf);
|
ResultResponse<Void> shelf(@RequestParam("id") Long id, @RequestParam("shelf") Boolean shelf);
|
||||||
|
|
||||||
@PostMapping("/syncCurrencyRates")
|
|
||||||
ResultResponse<PayCountryCurrencyRateSyncDTO> syncCurrencyRates(
|
|
||||||
@RequestBody SysPayCountryCurrencyRateSyncCmd cmd);
|
|
||||||
|
|
||||||
@GetMapping("/listPayCountryByRegionId")
|
@GetMapping("/listPayCountryByRegionId")
|
||||||
ResultResponse<List<PayCountryDTO>> listPayCountryByRegionId(
|
ResultResponse<List<PayCountryDTO>> listPayCountryByRegionId(
|
||||||
@RequestParam("regionId") String regionId);
|
@RequestParam("regionId") String regionId);
|
||||||
|
|||||||
@ -7,7 +7,6 @@ import jakarta.validation.constraints.NotBlank;
|
|||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
@ -47,12 +46,6 @@ public class SysPayApplicationCommodityCmd extends CommonCommand {
|
|||||||
@JsonSerialize(using = ToStringSerializer.class)
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long payCountryId;
|
private Long payCountryId;
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量创建时的国家列表;表结构仍是一条商品对应一个国家,所以只在新增时拆成多条记录.
|
|
||||||
*/
|
|
||||||
@JsonSerialize(contentUsing = ToStringSerializer.class)
|
|
||||||
private List<Long> payCountryIds;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 区域ID.
|
* 区域ID.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,33 +0,0 @@
|
|||||||
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,9 +102,4 @@ public class InAppPurchaseDetailsQryCmd extends Command {
|
|||||||
* 条数.
|
* 条数.
|
||||||
*/
|
*/
|
||||||
private Integer limit;
|
private Integer limit;
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否导出全部筛选结果;导出时不使用 lastId 和 limit 分页.
|
|
||||||
*/
|
|
||||||
private Boolean exportAll;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,47 +0,0 @@
|
|||||||
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,11 +24,6 @@ public enum MonthlyRechargeType {
|
|||||||
*/
|
*/
|
||||||
MIFA_PAY,
|
MIFA_PAY,
|
||||||
|
|
||||||
/**
|
|
||||||
* V5Pay.
|
|
||||||
*/
|
|
||||||
V5_PAY,
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Airwallex.
|
* Airwallex.
|
||||||
*/
|
*/
|
||||||
@ -98,7 +93,7 @@ public enum MonthlyRechargeType {
|
|||||||
* 个人充值.
|
* 个人充值.
|
||||||
*/
|
*/
|
||||||
public static List<MonthlyRechargeType> getPersonalRecharge() {
|
public static List<MonthlyRechargeType> getPersonalRecharge() {
|
||||||
return List.of(HUAWEI, GOOGLE, APPLE, PAYER_MAX, MIFA_PAY, V5_PAY, AIRWALLEX, PAYNICORN,
|
return List.of(HUAWEI, GOOGLE, APPLE, PAYER_MAX, MIFA_PAY, AIRWALLEX, PAYNICORN,
|
||||||
STRIPE, PAY_PAL, CLIPSPAY, SHIPPING_AGENT, SALARY_EXCHANGE);
|
STRIPE, PAY_PAL, CLIPSPAY, SHIPPING_AGENT, SALARY_EXCHANGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
/**
|
/**
|
||||||
* @author longli on @date 2024/3/14
|
* @author longli on @date 2024/3/14
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "activityAgentAnchorCountClient", name = "rc-service-other", url = "${feign.other.url:}", path = ActivityAgentAnchorCountClientApi.API_PREFIX)
|
@FeignClient(name = "activityAgentAnchorCountClient", url = "${feign.other.url}" +
|
||||||
|
ActivityAgentAnchorCountClientApi.API_PREFIX)
|
||||||
public interface ActivityAgentAnchorCountClient extends ActivityAgentAnchorCountClientApi {
|
public interface ActivityAgentAnchorCountClient extends ActivityAgentAnchorCountClientApi {
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/10/8
|
* @author pengliang on 2023/10/8
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "activityGlobalizationDescriptionClient", name = "rc-service-other", url = "${feign.other.url:}", path = ActivityGlobalizationDescriptionClientApi.API_PREFIX)
|
@FeignClient(name = "activityGlobalizationDescriptionClient", url = "${feign.other.url}" +
|
||||||
|
ActivityGlobalizationDescriptionClientApi.API_PREFIX)
|
||||||
public interface ActivityGlobalizationDescriptionClient extends
|
public interface ActivityGlobalizationDescriptionClient extends
|
||||||
ActivityGlobalizationDescriptionClientApi {
|
ActivityGlobalizationDescriptionClientApi {
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/10/9
|
* @author pengliang on 2023/10/9
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "activityHallFameClient", name = "rc-service-other", url = "${feign.other.url:}", path = ActivityHallFameClientApi.API_PREFIX)
|
@FeignClient(name = "activityHallFameClient", url = "${feign.other.url}" +
|
||||||
|
ActivityHallFameClientApi.API_PREFIX)
|
||||||
public interface ActivityHallFameClient extends ActivityHallFameClientApi {
|
public interface ActivityHallFameClient extends ActivityHallFameClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
* 活动图片配置
|
* 活动图片配置
|
||||||
* @author zongpubin on 2024/1/29
|
* @author zongpubin on 2024/1/29
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "activityPictureConfigClient", name = "rc-service-other", url = "${feign.other.url:}", path = ActivityPictureConfigClientApi.API_PREFIX)
|
@FeignClient(name = "activityPictureConfigClient", url = "${feign.other.url}" +
|
||||||
|
ActivityPictureConfigClientApi.API_PREFIX)
|
||||||
public interface ActivityPictureConfigClient extends ActivityPictureConfigClientApi {
|
public interface ActivityPictureConfigClient extends ActivityPictureConfigClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
/**
|
/**
|
||||||
* @author zongpubin on 2023/8/15
|
* @author zongpubin on 2023/8/15
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "agentActivityCountClient", name = "rc-service-other", url = "${feign.other.url:}", path = AgentActivityCountClientApi.API_PREFIX)
|
@FeignClient(name = "agentActivityCountClient", url = "${feign.other.url}" +
|
||||||
|
AgentActivityCountClientApi.API_PREFIX)
|
||||||
public interface AgentActivityCountClient extends AgentActivityCountClientApi {
|
public interface AgentActivityCountClient extends AgentActivityCountClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/8/16
|
* @author pengliang on 2023/8/16
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "appRankCountClient", name = "rc-service-other", url = "${feign.other.url:}", path = AppRankCountClientApi.API_PREFIX)
|
@FeignClient(name = "appRankCountClient", url = "${feign.other.url}" +
|
||||||
|
AppRankCountClientApi.API_PREFIX)
|
||||||
public interface AppRankCountClient extends AppRankCountClientApi {
|
public interface AppRankCountClient extends AppRankCountClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/8/18
|
* @author pengliang on 2023/8/18
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "cumulativeRechargeClient", name = "rc-service-other", url = "${feign.other.url:}", path = CumulativeRechargeClientApi.API_PREFIX)
|
@FeignClient(name = "cumulativeRechargeClient", url = "${feign.other.url}" +
|
||||||
|
CumulativeRechargeClientApi.API_PREFIX)
|
||||||
public interface CumulativeRechargeClient extends CumulativeRechargeClientApi {
|
public interface CumulativeRechargeClient extends CumulativeRechargeClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
/**
|
/**
|
||||||
* @author pengliang on 2023/5/26
|
* @author pengliang on 2023/5/26
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "inviteActivityCountClient", name = "rc-service-other", url = "${feign.other.url:}", path = InviteActivityCountClientApi.API_PREFIX)
|
@FeignClient(name = "inviteActivityCountClient", url = "${feign.other.url}" +
|
||||||
|
InviteActivityCountClientApi.API_PREFIX)
|
||||||
public interface InviteActivityCountClient extends InviteActivityCountClientApi {
|
public interface InviteActivityCountClient extends InviteActivityCountClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
* @author system
|
* @author system
|
||||||
* @since 2025-10-18
|
* @since 2025-10-18
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "lotteryActivityClient", name = "rc-service-other", url = "${feign.other.url:}", path = LotteryActivityClientApi.API_PREFIX)
|
@FeignClient(name = "lotteryActivityClient", url = "${feign.other.url}" +
|
||||||
|
LotteryActivityClientApi.API_PREFIX)
|
||||||
public interface LotteryActivityClient extends LotteryActivityClientApi {
|
public interface LotteryActivityClient extends LotteryActivityClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
* @author system
|
* @author system
|
||||||
* @since 2025-10-18
|
* @since 2025-10-18
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "lotteryActivityManageClient", name = "rc-service-other", url = "${feign.other.url:}", path = LotteryActivityManageClientApi.API_PREFIX)
|
@FeignClient(name = "lotteryActivityManageClient", url = "${feign.other.url}" +
|
||||||
|
LotteryActivityManageClientApi.API_PREFIX)
|
||||||
public interface LotteryActivityManageClient extends LotteryActivityManageClientApi {
|
public interface LotteryActivityManageClient extends LotteryActivityManageClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
* @author system
|
* @author system
|
||||||
* @since 2025-10-18
|
* @since 2025-10-18
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "lotteryActivityQueryClient", name = "rc-service-other", url = "${feign.other.url:}", path = LotteryActivityQueryClientApi.API_PREFIX)
|
@FeignClient(name = "lotteryActivityQueryClient", url = "${feign.other.url}" +
|
||||||
|
LotteryActivityQueryClientApi.API_PREFIX)
|
||||||
public interface LotteryActivityQueryClient extends LotteryActivityQueryClientApi {
|
public interface LotteryActivityQueryClient extends LotteryActivityQueryClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
* @author system
|
* @author system
|
||||||
* @since 2025-10-18
|
* @since 2025-10-18
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "lotteryPrizeClient", name = "rc-service-other", url = "${feign.other.url:}", path = LotteryPrizeClientApi.API_PREFIX)
|
@FeignClient(name = "lotteryPrizeClient", url = "${feign.other.url}" +
|
||||||
|
LotteryPrizeClientApi.API_PREFIX)
|
||||||
public interface LotteryPrizeClient extends LotteryPrizeClientApi {
|
public interface LotteryPrizeClient extends LotteryPrizeClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
* @author system
|
* @author system
|
||||||
* @since 2025-10-18
|
* @since 2025-10-18
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "lotteryPrizeManageClient", name = "rc-service-other", url = "${feign.other.url:}", path = LotteryPrizeManageClientApi.API_PREFIX)
|
@FeignClient(name = "lotteryPrizeManageClient", url = "${feign.other.url}" +
|
||||||
|
LotteryPrizeManageClientApi.API_PREFIX)
|
||||||
public interface LotteryPrizeManageClient extends LotteryPrizeManageClientApi {
|
public interface LotteryPrizeManageClient extends LotteryPrizeManageClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
* @author system
|
* @author system
|
||||||
* @since 2025-10-18
|
* @since 2025-10-18
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "lotteryRecordClient", name = "rc-service-other", url = "${feign.other.url:}", path = LotteryRecordClientApi.API_PREFIX)
|
@FeignClient(name = "lotteryRecordClient", url = "${feign.other.url}" +
|
||||||
|
LotteryRecordClientApi.API_PREFIX)
|
||||||
public interface LotteryRecordClient extends LotteryRecordClientApi {
|
public interface LotteryRecordClient extends LotteryRecordClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
* @author system
|
* @author system
|
||||||
* @since 2025-10-18
|
* @since 2025-10-18
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "lotteryRecordManageClient", name = "rc-service-other", url = "${feign.other.url:}", path = LotteryRecordManageClientApi.API_PREFIX)
|
@FeignClient(name = "lotteryRecordManageClient", url = "${feign.other.url}" +
|
||||||
|
LotteryRecordManageClientApi.API_PREFIX)
|
||||||
public interface LotteryRecordManageClient extends LotteryRecordManageClientApi {
|
public interface LotteryRecordManageClient extends LotteryRecordManageClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
* @author system
|
* @author system
|
||||||
* @since 2025-10-18
|
* @since 2025-10-18
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "lotteryTicketClient", name = "rc-service-other", url = "${feign.other.url:}", path = LotteryTicketClientApi.API_PREFIX)
|
@FeignClient(name = "lotteryTicketClient", url = "${feign.other.url}" +
|
||||||
|
LotteryTicketClientApi.API_PREFIX)
|
||||||
public interface LotteryTicketClient extends LotteryTicketClientApi {
|
public interface LotteryTicketClient extends LotteryTicketClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
* @author system
|
* @author system
|
||||||
* @since 2025-10-18
|
* @since 2025-10-18
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "lotteryTicketManageClient", name = "rc-service-other", url = "${feign.other.url:}", path = LotteryTicketManageClientApi.API_PREFIX)
|
@FeignClient(name = "lotteryTicketManageClient", url = "${feign.other.url}" +
|
||||||
|
LotteryTicketManageClientApi.API_PREFIX)
|
||||||
public interface LotteryTicketManageClient extends LotteryTicketManageClientApi {
|
public interface LotteryTicketManageClient extends LotteryTicketManageClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
* @author system
|
* @author system
|
||||||
* @since 2025-10-18
|
* @since 2025-10-18
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "lotteryUserCountClient", name = "rc-service-other", url = "${feign.other.url:}", path = LotteryUserCountClientApi.API_PREFIX)
|
@FeignClient(name = "lotteryUserCountClient", url = "${feign.other.url}" +
|
||||||
|
LotteryUserCountClientApi.API_PREFIX)
|
||||||
public interface LotteryUserCountClient extends LotteryUserCountClientApi {
|
public interface LotteryUserCountClient extends LotteryUserCountClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/6/5
|
* @author pengliang on 2023/6/5
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "propsActivityCnfClient", name = "rc-service-other", url = "${feign.other.url:}", path = PropsActivityClientApi.API_PREFIX)
|
@FeignClient(name = "propsActivityCnfClient", url = "${feign.other.url}" +
|
||||||
|
PropsActivityClientApi.API_PREFIX)
|
||||||
public interface PropsActivityClient extends PropsActivityClientApi {
|
public interface PropsActivityClient extends PropsActivityClientApi {
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/11/2
|
* @author pengliang on 2023/11/2
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "roomContributionActivityCountClient", name = "rc-service-other", url = "${feign.other.url:}", path = RoomContributionActivityCountClientApi.API_PREFIX)
|
@FeignClient(name = "roomContributionActivityCountClient", url = "${feign.other.url}" +
|
||||||
|
RoomContributionActivityCountClientApi.API_PREFIX)
|
||||||
public interface RoomContributionActivityCountClient extends
|
public interface RoomContributionActivityCountClient extends
|
||||||
RoomContributionActivityCountClientApi {
|
RoomContributionActivityCountClientApi {
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/11/23
|
* @author pengliang on 2023/11/23
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "roomContributionCountClient", name = "rc-service-other", url = "${feign.other.url:}", path = RoomContributionCountClientApi.API_PREFIX)
|
@FeignClient(name = "roomContributionCountClient", url = "${feign.other.url}" +
|
||||||
|
RoomContributionCountClientApi.API_PREFIX)
|
||||||
public interface RoomContributionCountClient extends RoomContributionCountClientApi {
|
public interface RoomContributionCountClient extends RoomContributionCountClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author lixiaofei on 2024/7/8
|
* @author lixiaofei on 2024/7/8
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "temporaryActivityCountClient", name = "rc-service-other", url = "${feign.other.url:}", path = TemporaryActivityCountClientApi.API_PREFIX)
|
@FeignClient(name = "temporaryActivityCountClient", url = "${feign.other.url}" +
|
||||||
|
TemporaryActivityCountClientApi.API_PREFIX)
|
||||||
public interface TemporaryActivityCountClient extends TemporaryActivityCountClientApi {
|
public interface TemporaryActivityCountClient extends TemporaryActivityCountClientApi {
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
/**
|
/**
|
||||||
* 用户活动充值服务
|
* 用户活动充值服务
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "userActivityRechargeClient", name = "rc-service-other", url = "${feign.other.url:}", path = UserActivityRechargeClientApi.API_PREFIX)
|
@FeignClient(name = "userActivityRechargeClient", url = "${feign.other.url}" +
|
||||||
|
UserActivityRechargeClientApi.API_PREFIX)
|
||||||
public interface UserActivityRechargeClient extends UserActivityRechargeClientApi {
|
public interface UserActivityRechargeClient extends UserActivityRechargeClientApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,13 +1,17 @@
|
|||||||
package com.red.circle.other.inner.endpoint.activity.api;
|
package com.red.circle.other.inner.endpoint.activity.api;
|
||||||
|
|
||||||
import com.red.circle.common.business.core.enums.SysOriginPlatformEnum;
|
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.framework.dto.ResultResponse;
|
||||||
import com.red.circle.other.inner.enums.activity.PropsActivityTypeEnum;
|
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.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.ActivityPropsGroup;
|
||||||
import com.red.circle.other.inner.model.dto.activity.props.ActivityPropsRule;
|
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.ActivityPropsRuleDTO;
|
||||||
import com.red.circle.other.inner.model.dto.activity.props.ActivityResource;
|
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.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -174,4 +178,39 @@ public interface PropsActivityClientApi {
|
|||||||
@PostMapping("/mapRuleConfigByIds")
|
@PostMapping("/mapRuleConfigByIds")
|
||||||
ResultResponse<Map<Long, ActivityPropsRuleDTO>> mapRuleConfigByIds(
|
ResultResponse<Map<Long, ActivityPropsRuleDTO>> mapRuleConfigByIds(
|
||||||
@RequestBody Collection<Long> ids);
|
@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,6 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/11/16
|
* @author pengliang on 2023/11/16
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "aiQianFanChatClient", name = "rc-service-other", url = "${feign.other.url:}", path = AiQianFanChatClientApi.API_PREFIX)
|
@FeignClient(name = "aiQianFanChatClient", url = "${feign.other.url}" +
|
||||||
|
AiQianFanChatClientApi.API_PREFIX)
|
||||||
public interface AiQianFanChatClient extends AiQianFanChatClientApi {
|
public interface AiQianFanChatClient extends AiQianFanChatClientApi {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
|
|||||||
*
|
*
|
||||||
* @author pengliang on 2023/5/25
|
* @author pengliang on 2023/5/25
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "approvalUserSettingDataClient", name = "rc-service-other", url = "${feign.other.url:}", path = ApprovalUserSettingDataClientApi.API_PREFIX)
|
@FeignClient(name = "approvalUserSettingDataClient", url = "${feign.other.url}" +
|
||||||
|
ApprovalUserSettingDataClientApi.API_PREFIX)
|
||||||
public interface ApprovalUserSettingDataClient extends ApprovalUserSettingDataClientApi {
|
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