Compare commits

..

No commits in common. "main" and "feature-trtc" have entirely different histories.

651 changed files with 5212 additions and 23113 deletions

22
.gitignore vendored
View File

@ -41,15 +41,15 @@ buildNumber.properties
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
*.iml
!maven_private/**/*.jar
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
*.iml
!maven_private/**/*.jar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
@ -96,6 +96,4 @@ target/
devops-monitor-id_rsa.key
/claude/
.local-run/
.env
.local-run/

View File

@ -108,20 +108,6 @@ spring:
predicates:
- Path=/play-server-notice/**
- id: console-go-service
uri: http://10.2.1.16:2900
order: -20
predicates:
- Path=/console/go/**
filters:
- StripPrefix=2
- id: service-console
uri: http://10.2.1.16:2700
order: -10
predicates:
- Path=/console,/console/**
- id: service-other
uri: ${LIKEI_GATEWAY_ROUTE_OTHER_URI}
predicates:
@ -132,11 +118,6 @@ gateway:
- /account/create
- /account/login/**/*
- /account/login
- /console/go
- /console/go/**
- /console/account/login/**/*
- /console/account/login
- /console/**
- /account/forget-pwd-reset
- /user/user-profile/open-search
- /party3rd/tencent/cloud/im/callback
@ -175,7 +156,6 @@ gateway:
- /product/apple/config
- /game/sud/**
- /web/pay/**
- /order/web/pay/**
- /external/oss/upload
- /telegram/webhook
- /account/create/getRegion
@ -194,33 +174,8 @@ gateway:
- /go/resident-activity/room-turnover-reward/**
- /resident-activity/room-turnover-reward/**
- /go/resident-activity/register-reward/**
- /resident-activity/register-reward/**
- /go/resident-activity/specified-gift-weekly-rank/**
- /resident-activity/specified-gift-weekly-rank/**
- /go/resident-activity/week-star/**
- /getUserInfo
- /go/getUserInfo
- /updateBalance
- /go/updateBalance
- /game/hotgame/**
- /go/game/hotgame/**
- /resident-activity/week-star/**
- /resident-activity/sign-in-reward/**
- /resident-activity/vip/**
- /resident-activity/recharge-reward/**
- /resident-activity/task-center/**
- /resident-activity/voice-room-red-packet/**
- /resident-activity/voice-room-rocket/**
- /resident-activity/wheel/**
- /resident-activity/smash-golden-egg/**
- /operate/hotgame-game/**
- /operate/baishun-game/**
- /operate/lingxian-game/**
- /app-system/home-popups/**
- /app-system/error-logs/**
- /region/config/im-groups/**
- /payment/binance/**
- /props/store/**
# leaderboard
- /activity/leaderboard/gifts-send
- /activity/leaderboard/gifts-received

View File

@ -49,18 +49,6 @@ red-circle:
factory-config:
cache-ttl-seconds: ${LIKEI_PAY_FACTORY_CONFIG_CACHE_TTL_SECONDS:300}
# V5Pay 功能默认开启;商户账号、密钥与所有外部地址只能由运行环境注入,仓库不提供伪造可用值。
v5-pay:
enabled: ${LIKEI_V5PAY_ENABLED:true}
merchant-no: ${LIKEI_V5PAY_MERCHANT_NO:}
app-key: ${LIKEI_V5PAY_APP_KEY:}
secret-key: ${LIKEI_V5PAY_SECRET_KEY:}
gateway-base-url: ${LIKEI_V5PAY_GATEWAY_BASE_URL:}
notify-url: ${LIKEI_V5PAY_NOTIFY_URL:}
return-url: ${LIKEI_V5PAY_RETURN_URL:}
# 共享商户必须隔离各系统 orderNo仅在供应商侧约定变化时覆盖。
order-prefix: ${LIKEI_V5PAY_ORDER_PREFIX:YUMI}
airwallex:
client-id: ${LIKEI_AIRWALLEX_CLIENT_ID}
api-key: ${LIKEI_AIRWALLEX_API_KEY}

View File

@ -128,13 +128,6 @@ task:
topic: ${TASK_CENTER_EVENT_MQ_TOPIC:RC_DEFAULT_APP_ORDINARY}
tag: ${TASK_CENTER_EVENT_MQ_TAG:task_center_event}
cp:
relation-broadcast:
mq:
enabled: ${CP_RELATION_BROADCAST_MQ_ENABLED:true}
topic: ${CP_RELATION_BROADCAST_MQ_TOPIC:RC_DEFAULT_APP_ORDINARY}
tag: ${CP_RELATION_BROADCAST_MQ_TAG:cp_relation_broadcast}
voice-room:
region-broadcast:
go:

View File

@ -39,11 +39,10 @@ public class LoginAccessValidationService {
"香港", "澳门", "澳門", "台湾", "台灣", "Hong Kong", "Macau", "Macao", "Taiwan"
);
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(
"香港", "澳门", "澳門", "台湾", "台灣", "新加坡",
"Hong Kong", "Macau", "Macao", "Taiwan", "Singapore"
"澳门", "澳門", "Macau", "Macao", "新加坡", "Singapore"
);
private static final List<IpGeoProvider> IP_GEO_PROVIDERS = List.of(
new IpGeoProvider("ip.sb", "https://api.ip.sb/geoip/%s"),

View File

@ -224,19 +224,10 @@ public class EndpointRestController {
*/
@PostMapping("/account/login/channel")
public TokenCredentialCO login(@RequestBody @Validated UserChannelCredentialCmd cmd, HttpServletRequest request) {
try {
TokenCredentialCO tokenCredentialCO = processToken.createUserCredential(ResponseAssert.requiredSuccess(
appUserAccountClient.channelCredential(cmd)));
return submitLoginAccessValidation(tokenCredentialCO, cmd.requireReqSysOrigin(), cmd.getReqZoneId(), request);
} catch (ResponseException ex) {
if (isChannelCredentialDecodeError(ex)) {
log.warn("channel login credential decode error, return USER_NOT_REGISTERED. authType={}",
cmd.getAuthType());
throw new ResponseException(UserErrorCode.USER_NOT_REGISTERED);
}
throw ex;
}
}
TokenCredentialCO tokenCredentialCO = processToken.createUserCredential(ResponseAssert.requiredSuccess(
appUserAccountClient.channelCredential(cmd)));
return submitLoginAccessValidation(tokenCredentialCO, cmd.requireReqSysOrigin(), cmd.getReqZoneId(), request);
}
/**
* 账号登录.
@ -296,13 +287,6 @@ public class EndpointRestController {
|| Objects.equals(ex.getErrorCode(), UserErrorCode.SOURCE_REGISTERED.getCode());
}
private boolean isChannelCredentialDecodeError(ResponseException ex) {
return Objects.equals(ex.getErrorCode(), ResponseErrorCode.NOT_ACCEPTABLE.getCode())
&& Objects.equals(ex.getErrorCodeName(), "ERROR_INNER_DECODER")
&& Objects.toString(ex.getExtValues(), "")
.contains("/app-user/account/channel/credential");
}
private TokenCredentialCO createTokenCredential(
UserAccountDTO account,
String reqSysOrigin,

View File

@ -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));
}
}

View File

@ -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;
}
}

View File

@ -70,22 +70,22 @@ public class LoginAccessValidationServiceTest {
}
@Test
public void blockHongKongRegion() {
public void allowHongKongRegion() {
JSONObject data = JSON.parseObject("""
{"country_id":"CN","country":"中国","region":"香港"}
""");
assertFalse(LoginAccessValidationService.isMainlandChina(data));
assertTrue(LoginAccessValidationService.isBlockedIpRegion(data));
assertFalse(LoginAccessValidationService.isBlockedIpRegion(data));
}
@Test
public void blockHongKongCountryCode() {
public void allowHongKongCountryCode() {
JSONObject data = JSON.parseObject("""
{"country_id":"HK","country":"Hong Kong","region":"Kwai Tsing District"}
""");
assertTrue(LoginAccessValidationService.isBlockedIpRegion(data));
assertFalse(LoginAccessValidationService.isBlockedIpRegion(data));
}
@Test
@ -107,21 +107,21 @@ public class LoginAccessValidationServiceTest {
}
@Test
public void blockTaiwanRegion() {
public void allowTaiwanRegion() {
JSONObject data = JSON.parseObject("""
{"country_id":"CN","country":"中国","region":"台湾"}
""");
assertFalse(LoginAccessValidationService.isMainlandChina(data));
assertTrue(LoginAccessValidationService.isBlockedIpRegion(data));
assertFalse(LoginAccessValidationService.isBlockedIpRegion(data));
}
@Test
public void blockTaiwanCountryCode() {
public void allowTaiwanCountryCode() {
JSONObject data = JSON.parseObject("""
{"country_id":"TW","country":"Taiwan","region":""}
""");
assertTrue(LoginAccessValidationService.isBlockedIpRegion(data));
assertFalse(LoginAccessValidationService.isBlockedIpRegion(data));
}
}

View File

@ -62,10 +62,8 @@ ROOM_THEME_NOT_PASS.body=\u3010Room Custom Theme\u3011 The review failed.
BADGE_ACTIVATION.title=Badge activation
BADGE_ACTIVATION.body=You have received a new achievement badge, go check it out~
# cp\u5173\u7CFB\u89E3\u9664
CP_DISMISS.title=CP Dismiss
CP_DISMISS.body=${nickname} Dissolved the CP relationship with you
CP_BLESS.title=Cp bless
CP_BLESS.body=${nickname} has sent you CP blessing gifts
CP_DISMISS.title=CP Dismiss
CP_DISMISS.body=${nickname} Dissolved the CP relationship with you
# \u63A5\u6536\u8D35\u65CFvip
ACCEPT_NOBLE_VIP.title=Receiving nobles
ACCEPT_NOBLE_VIP.body=${nickname} gives you ${days} days of noble status~

View File

@ -80,11 +80,9 @@ AGREE_BD_LEADER_INVITE_AGENT.body=${userProfile} menerima undangan BD Anda
# BD leader\u53D1\u9001\u6210\u4E3ABD\u9080\u8BF7
BD_LEADER_SEND_INVITE_BD.title=Undangan BD
BD_LEADER_SEND_INVITE_BD.body=${userProfile}mengundang Anda untuk menjadi BD
# CP祝福通知
CP_DISMISS.title=CP Dismiss
CP_DISMISS.body=${nickname} Dissolved the CP relationship with you
CP_BLESS.title=Cp memberkati
CP_BLESS.body=${nickname} Saya memberi Anda hadiah berkah ruang CP
# CP祝福通知
CP_BLESS.title=Cp memberkati
CP_BLESS.body=${nickname} Saya memberi Anda hadiah berkah ruang CP
# 告白通知
USER_CONFESSION.title=Pengakuan pengguna
USER_CONFESSION.body=${nickname} mengaku padamu di dinding pengakuan
USER_CONFESSION.body=${nickname} mengaku padamu di dinding pengakuan

View File

@ -58,10 +58,8 @@ ROOM_THEME_NOT_PASS.body=[Oda \u00F6zel temas\u0131] incelemede ba\u015Far\u0131
BADGE_ACTIVATION.title=Rozet aktivasyonu
BADGE_ACTIVATION.body=Yeni bir ba\u015Far\u0131 rozeti ald\u0131n\u0131z, gidip bir g\u00F6z at\u0131n ~
# cp\u5173\u7CFB\u89E3\u9664
CP_DISMISS.title=CP s\u00FCr\u00FCm\u00FC
CP_DISMISS.body= ${nickname} sizinle CP ili\u015Fkisini bozdu
CP_BLESS.title=Cp bless
CP_BLESS.body=${nickname} has sent you CP blessing gifts
CP_DISMISS.title=CP s\u00FCr\u00FCm\u00FC
CP_DISMISS.body= ${nickname} sizinle CP ili\u015Fkisini bozdu
# \u63A5\u6536\u8D35\u65CFvip
ACCEPT_NOBLE_VIP.title=Soylular al\u0131r
ACCEPT_NOBLE_VIP.body =${nickname} size ${days} g\u00FCnl\u00FCk asil stat\u00FCs\u00FC verir ~
@ -119,4 +117,4 @@ AGREE_BD_LEADER_INVITE_AGENT.title=Daveti kabul etmek
AGREE_BD_LEADER_INVITE_AGENT.body=${userProfile}, BD davetinizi kabul etti
# BD leader\u53D1\u9001\u6210\u4E3ABD\u9080\u8BF7
BD_LEADER_SEND_INVITE_BD.title=BD Davetiyesi
BD_LEADER_SEND_INVITE_BD.body=${userProfile} sizi BD olmaya davet ediyor
BD_LEADER_SEND_INVITE_BD.body=${userProfile} sizi BD olmaya davet ediyor

View File

@ -61,10 +61,8 @@ ROOM_THEME_NOT_PASS.body=\u3010\u623F\u9593\u81EA\u5B9A\u7FA9\u4E3B\u984C\u3011\
BADGE_ACTIVATION.title=\u5FBD\u7AE0\u6FC0\u6D3B
BADGE_ACTIVATION.body=\u60A8\u5DF2\u7372\u5F97\u65B0\u7684\u6210\u5C31\u5FBD\u7AE0\uFF0C\u5FEB\u53BB\u770B\u770B\u5427~
# cp\u5173\u7CFB\u89E3\u9664
CP_DISMISS.title=CP \u89E3\u9664
CP_DISMISS.body= ${nickname} \u8207\u60A8\u89E3\u9664\u4E86 CP \u95DC\u4FC2
CP_BLESS.title=Cp \u795D\u798F
CP_BLESS.body=${nickname} \u7D66\u4F60\u5011\u9001\u4E86cp\u7A7A\u9593\u795D\u798F\u79AE\u7269
CP_DISMISS.title=CP \u89E3\u9664
CP_DISMISS.body= ${nickname} \u8207\u60A8\u89E3\u9664\u4E86 CP \u95DC\u4FC2
# \u63A5\u6536\u8D35\u65CFvip
ACCEPT_NOBLE_VIP.title=\u8CB4\u65CF\u63A5\u6536
ACCEPT_NOBLE_VIP.body =${nickname} \u8D08\u9001\u60A8 ${days} \u5929\u7684\u8CB4\u65CF\u8EAB\u4EFD~
@ -136,4 +134,4 @@ AGREE_BD_LEADER_INVITE_AGENT.title=\u63A5\u53D7\u9080\u8BF7
AGREE_BD_LEADER_INVITE_AGENT.body=${userProfile} \u63A5\u53D7BD\u9080\u8BF7
# BD leader\u53D1\u9001\u6210\u4E3ABD\u9080\u8BF7
BD_LEADER_SEND_INVITE_BD.title=BD\u9080\u8BF7
BD_LEADER_SEND_INVITE_BD.body=${userProfile} \u9080\u8BF7\u6210\u4E3ABD
BD_LEADER_SEND_INVITE_BD.body=${userProfile} \u9080\u8BF7\u6210\u4E3ABD

View File

@ -13,7 +13,7 @@ public final class RtcVersionSupport {
}
public static RtcProviderEnum defaultProvider(String version) {
return compareVersion(version, TRTC_MIN_VERSION) < 0
return compareVersion(version, TRTC_MIN_VERSION) <= 0
? RtcProviderEnum.AGORA
: RtcProviderEnum.TRTC;
}

View File

@ -39,7 +39,7 @@ public enum ConsoleAccountStatusEnum {
/**
* 账号解封.
*/
UNTIE_ACOOUNT("UNTIE_ACOOUNT", "账号解封"),
UNTIE_ACOOUNT("UNTIE_DEVICE", "账号解封"),
/**
* 设备+账户解封.

View File

@ -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"));
}
}

View File

@ -46,14 +46,9 @@ public class GiveGiftConfig implements Serializable {
*/
private String type;
/**
* 礼物tab.
*/
private String giftTab;
/**
* CP礼物关系类型CP/BROTHER/SISTERS.
*/
private String cpRelationType;
}
/**
* 礼物tab.
*/
private String giftTab;
}

View File

@ -56,13 +56,9 @@ public class BuySuccessEvent implements Serializable {
*/
String payPlatform;
/**
* 本次充值请求的App版本.
*/
String appVersion;
/**
* 来源.
*/
/**
* 来源.
*/
String origin;
/**

View File

@ -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;
}

View File

@ -17,18 +17,13 @@ public interface QueueNameConstant {
*/
String LOGIN_REGISTER = "LOGIN_REGISTER";
/**
* 购买成功
*/
String BUY_SUCCESS = "BUY_SUCCESS";
/**
* 通用充值成功
*/
String RECHARGE_SUCCESS = "RECHARGE_SUCCESS";
/**
* 视频语音房间会话
/**
* 购买成功
*/
String BUY_SUCCESS = "BUY_SUCCESS";
/**
* 视频语音房间会话
*/
String LIVE_VOICE_SESSION = "LIVE_VOICE_SESSION";

View File

@ -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";
}

View File

@ -43,7 +43,6 @@ import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
import java.util.Optional;
import java.util.zip.GZIPInputStream;
@ -59,7 +58,6 @@ import java.util.zip.GZIPInputStream;
public class ApiLoggingFilter implements GlobalFilter, Ordered {
private static final int MAX_RESPONSE_BODY_LOG_LENGTH = 500;
private static final String REDACTED_V5PAY_BODY = "[REDACTED_V5PAY_CALLBACK]";
private final LoggingUploadService loggingUploadService;
private final List<HttpMessageReader<?>> messageReaders = HandlerStrategies.withDefaults()
@ -74,15 +72,9 @@ public class ApiLoggingFilter implements GlobalFilter, Ordered {
return chain.filter(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())
GatewayLogging logging = ApiLoggingUtils.createGatewayLogging(exchange);
return checkBodyType(exchange.getRequest())
? writeBodyLog(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) {
HttpStatusCode statusCode = response.getStatusCode();
return statusCode == null || statusCode.is2xxSuccessful();

View File

@ -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());
}
}

View File

@ -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;
}
}

View File

@ -8,7 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,6 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,6 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,6 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -9,6 +9,7 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -6,7 +6,8 @@ import org.springframework.cloud.openfeign.FeignClient;
/**
* @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 {
}

View File

@ -8,6 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -6,7 +6,8 @@ import org.springframework.cloud.openfeign.FeignClient;
/**
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -1,12 +1,8 @@
package com.red.circle.external.inner.endpoint.message.api;
import com.red.circle.framework.dto.ResultResponse;
import com.red.circle.external.inner.model.cmd.message.CustomC2cMsgBodyCmd;
import jakarta.validation.Valid;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import com.red.circle.framework.dto.ResultResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
* im 消息服务.
@ -28,15 +24,9 @@ public interface ImMessageClientApi {
/**
* 发送文本消息.
*/
@GetMapping("/sendMessageText/long")
ResultResponse<Void> sendMessageText(@RequestParam("fromAccount") Long fromAccount,
@RequestParam("toAccount") Long toAccount,
@RequestParam("text") String text);
/**
* 发送 C2C 自定义消息.
*/
@PostMapping("/sendCustomMessage")
ResultResponse<Void> sendCustomMessage(@RequestBody @Valid CustomC2cMsgBodyCmd cmd);
}
@GetMapping("/sendMessageText/long")
ResultResponse<Void> sendMessageText(@RequestParam("fromAccount") Long fromAccount,
@RequestParam("toAccount") Long toAccount,
@RequestParam("text") String text);
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -6,7 +6,8 @@ import org.springframework.cloud.openfeign.FeignClient;
/**
* @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 {
}

View File

@ -8,7 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
/**
* @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 {
}

View File

@ -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;
}
}
}

View File

@ -6,7 +6,7 @@ import org.springframework.cloud.openfeign.FeignClient;
/**
* @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 {
}

View File

@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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
OrderPurchaseFriendshipRecordClientApi {

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -3,13 +3,11 @@ package com.red.circle.order.inner.endpoint.api;
import com.red.circle.framework.dto.PageResult;
import com.red.circle.framework.dto.ResultResponse;
import com.red.circle.order.inner.model.cmd.SysPayCountryAddCmd;
import com.red.circle.order.inner.model.cmd.SysPayCountryChannelCmd;
import com.red.circle.order.inner.model.cmd.SysPayCountryChannelDetailsCmd;
import com.red.circle.order.inner.model.cmd.SysPayCountryCurrencyRateSyncCmd;
import com.red.circle.order.inner.model.cmd.SysPayCountryQryCmd;
import com.red.circle.order.inner.model.dto.PayCountryCurrencyRateSyncDTO;
import com.red.circle.order.inner.model.dto.PayCountryDTO;
import com.red.circle.order.inner.model.cmd.SysPayCountryAddCmd;
import com.red.circle.order.inner.model.cmd.SysPayCountryChannelCmd;
import com.red.circle.order.inner.model.cmd.SysPayCountryChannelDetailsCmd;
import com.red.circle.order.inner.model.cmd.SysPayCountryQryCmd;
import com.red.circle.order.inner.model.dto.PayCountryDTO;
import com.red.circle.order.inner.model.dto.SysPayCountryChannelDTO;
import com.red.circle.order.inner.model.dto.SysPayCountryChannelDetailsDTO;
import java.math.BigDecimal;
@ -87,14 +85,10 @@ public interface PayCountryClientApi {
@GetMapping("/updateSort")
ResultResponse<Void> updateSort(@RequestParam("id") Long id, @RequestParam("sort") Integer sort);
@GetMapping("/shelf")
ResultResponse<Void> shelf(@RequestParam("id") Long id, @RequestParam("shelf") Boolean shelf);
@PostMapping("/syncCurrencyRates")
ResultResponse<PayCountryCurrencyRateSyncDTO> syncCurrencyRates(
@RequestBody SysPayCountryCurrencyRateSyncCmd cmd);
@GetMapping("/listPayCountryByRegionId")
ResultResponse<List<PayCountryDTO>> listPayCountryByRegionId(
@RequestParam("regionId") String regionId);
}
@GetMapping("/shelf")
ResultResponse<Void> shelf(@RequestParam("id") Long id, @RequestParam("shelf") Boolean shelf);
@GetMapping("/listPayCountryByRegionId")
ResultResponse<List<PayCountryDTO>> listPayCountryByRegionId(
@RequestParam("regionId") String regionId);
}

View File

@ -3,14 +3,13 @@ package com.red.circle.order.inner.model.cmd;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.red.circle.framework.core.dto.CommonCommand;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.io.Serial;
import java.math.BigDecimal;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.io.Serial;
import java.math.BigDecimal;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
@ -44,17 +43,11 @@ public class SysPayApplicationCommodityCmd extends CommonCommand {
/**
* 开通支付国家.
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long payCountryId;
/**
* 批量创建时的国家列表表结构仍是一条商品对应一个国家所以只在新增时拆成多条记录.
*/
@JsonSerialize(contentUsing = ToStringSerializer.class)
private List<Long> payCountryIds;
/**
* 区域ID.
@JsonSerialize(using = ToStringSerializer.class)
private Long payCountryId;
/**
* 区域ID.
*/
private String regionId;

View File

@ -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;
}

View File

@ -98,13 +98,8 @@ public class InAppPurchaseDetailsQryCmd extends Command {
*/
private String lastId;
/**
* 条数.
*/
private Integer limit;
/**
* 是否导出全部筛选结果导出时不使用 lastId limit 分页.
*/
private Boolean exportAll;
}
/**
* 条数.
*/
private Integer limit;
}

View File

@ -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;
}

View File

@ -22,12 +22,7 @@ public enum MonthlyRechargeType {
/**
* MifaPay
*/
MIFA_PAY,
/**
* V5Pay.
*/
V5_PAY,
MIFA_PAY,
/**
* Airwallex.
@ -98,7 +93,7 @@ public enum MonthlyRechargeType {
* 个人充值.
*/
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);
}

View File

@ -6,7 +6,8 @@ import org.springframework.cloud.openfeign.FeignClient;
/**
* @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 {

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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
ActivityGlobalizationDescriptionClientApi {

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -7,7 +7,8 @@ import org.springframework.cloud.openfeign.FeignClient;
* 活动图片配置
* @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 {
}

View File

@ -6,7 +6,8 @@ import org.springframework.cloud.openfeign.FeignClient;
/**
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -6,7 +6,8 @@ import org.springframework.cloud.openfeign.FeignClient;
/**
* @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 {
}

View File

@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
* @author system
* @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 {
}

View File

@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
* @author system
* @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 {
}

View File

@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
* @author system
* @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 {
}

View File

@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
* @author system
* @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 {
}

View File

@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
* @author system
* @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 {
}

View File

@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
* @author system
* @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 {
}

View File

@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
* @author system
* @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 {
}

View File

@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
* @author system
* @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 {
}

View File

@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
* @author system
* @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 {
}

View File

@ -9,7 +9,8 @@ import org.springframework.cloud.openfeign.FeignClient;
* @author system
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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
RoomContributionActivityCountClientApi {

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {

View File

@ -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 {
}

View File

@ -1,13 +1,17 @@
package com.red.circle.other.inner.endpoint.activity.api;
import com.red.circle.common.business.core.enums.SysOriginPlatformEnum;
import com.red.circle.framework.dto.PageResult;
import com.red.circle.framework.dto.ResultResponse;
import com.red.circle.other.inner.enums.activity.PropsActivityTypeEnum;
import com.red.circle.other.inner.model.cmd.activity.SendActivityRewardCmd;
import com.red.circle.other.inner.model.cmd.material.PropsActivityRuleConfigParamCmd;
import com.red.circle.other.inner.model.cmd.material.PropsActivityRuleConfigQryCmd;
import com.red.circle.other.inner.model.dto.activity.props.ActivityPropsGroup;
import com.red.circle.other.inner.model.dto.activity.props.ActivityPropsRule;
import com.red.circle.other.inner.model.dto.activity.props.ActivityPropsRuleDTO;
import com.red.circle.other.inner.model.dto.activity.props.ActivityResource;
import com.red.circle.other.inner.model.dto.material.PropsActivityRuleConfigDTO;
import java.util.Collection;
import java.util.List;
import java.util.Map;
@ -174,4 +178,39 @@ public interface PropsActivityClientApi {
@PostMapping("/mapRuleConfigByIds")
ResultResponse<Map<Long, ActivityPropsRuleDTO>> mapRuleConfigByIds(
@RequestBody Collection<Long> ids);
/**
* 分页-查询活动道具规则配置.
*/
@PostMapping("/pagePropsActivityRuleConfig")
ResultResponse<PageResult<PropsActivityRuleConfigDTO>> pagePropsActivityRuleConfig(
@RequestBody @Validated PropsActivityRuleConfigQryCmd query);
/**
* 删除-查询活动道具规则配置.
*/
@PostMapping("/propsActivityRuleConfigDeleteById")
ResultResponse<Void> propsActivityRuleConfigDeleteById(@RequestParam("id") Long id);
/**
* 查询活动道具规则配置.
*/
@PostMapping("/getPropsActivityRuleConfig")
ResultResponse<PropsActivityRuleConfigDTO> getPropsActivityRuleConfig(
@RequestBody @Validated PropsActivityRuleConfigParamCmd param);
/**
* 修改-查询活动道具规则配置.
*/
@PostMapping("/updatePropsActivityRuleConfigById")
ResultResponse<Void> updatePropsActivityRuleConfigById(
@RequestBody @Validated PropsActivityRuleConfigParamCmd param);
/**
* 保存-查询活动道具规则配置.
*/
@PostMapping("/savePropsActivityRuleConfig")
ResultResponse<Void> savePropsActivityRuleConfig(
@RequestBody @Validated PropsActivityRuleConfigParamCmd param);
}

View File

@ -8,6 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

View File

@ -8,7 +8,8 @@ import org.springframework.cloud.openfeign.FeignClient;
*
* @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 {
}

Some files were not shown because too many files have changed in this diff Show More