diff --git a/.gitignore b/.gitignore index 3b992178..62d634ee 100644 --- a/.gitignore +++ b/.gitignore @@ -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,4 +96,6 @@ target/ devops-monitor-id_rsa.key /claude/ -.local-run/ +.local-run/ + +.env \ No newline at end of file diff --git a/rc-service/rc-service-other/other-adapter/src/main/java/com/red/circle/other/adapter/app/user/user/UserAuthTypeRestController.java b/rc-service/rc-service-other/other-adapter/src/main/java/com/red/circle/other/adapter/app/user/user/UserAuthTypeRestController.java index dffad4cc..65841cd8 100644 --- a/rc-service/rc-service-other/other-adapter/src/main/java/com/red/circle/other/adapter/app/user/user/UserAuthTypeRestController.java +++ b/rc-service/rc-service-other/other-adapter/src/main/java/com/red/circle/other/adapter/app/user/user/UserAuthTypeRestController.java @@ -100,7 +100,8 @@ public class UserAuthTypeRestController extends BaseController { */ @GetMapping("/delete/account-auth/{userId}") public void deleteUserAccountLogin(@PathVariable("userId") Long userId) { - userAuthTypeService.deleteUserAccountLogin(userId); + // 临时关闭 App 侧按 userId 删除账号密码登录信息,避免普通用户指定他人 userId 触发删除。 + return; } } diff --git a/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/service/user/device/impl/RegisterDeviceClientServiceImpl.java b/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/service/user/device/impl/RegisterDeviceClientServiceImpl.java index 7a03819b..9e645b31 100644 --- a/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/service/user/device/impl/RegisterDeviceClientServiceImpl.java +++ b/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/service/user/device/impl/RegisterDeviceClientServiceImpl.java @@ -275,13 +275,21 @@ public class RegisterDeviceClientServiceImpl implements RegisterDeviceClientServ if (Objects.equals(otherUserId, userId)) { continue; } - + // 判断是否为主播:检查用户是否为团队成员 TeamMember teamMember = teamMemberService.getByMemberId(otherUserId); - if (teamMember != null) { - return true; + if (teamMember == null) { + continue; } + + // 同设备账号已被封禁的,不再占用该设备的主播/代理名额 + UserProfile otherProfile = userProfileGateway.getByUserId(otherUserId); + if (otherProfile != null && otherProfile.checkAccountArchive()) { + continue; + } + + return true; } return false; diff --git a/rc-service/rc-service-wallet/wallet-inner-endpoint/src/main/java/com/red/circle/wallet/inner/service/wallet/impl/WalletGoldClientServiceImpl.java b/rc-service/rc-service-wallet/wallet-inner-endpoint/src/main/java/com/red/circle/wallet/inner/service/wallet/impl/WalletGoldClientServiceImpl.java index bf0334d9..d0c420aa 100644 --- a/rc-service/rc-service-wallet/wallet-inner-endpoint/src/main/java/com/red/circle/wallet/inner/service/wallet/impl/WalletGoldClientServiceImpl.java +++ b/rc-service/rc-service-wallet/wallet-inner-endpoint/src/main/java/com/red/circle/wallet/inner/service/wallet/impl/WalletGoldClientServiceImpl.java @@ -1,8 +1,7 @@ package com.red.circle.wallet.inner.service.wallet.impl; -import com.google.common.collect.Lists; -import com.red.circle.common.business.core.enums.OpUserType; -import com.red.circle.common.business.core.enums.SysOriginPlatformEnum; +import com.google.common.collect.Lists; +import com.red.circle.common.business.core.enums.SysOriginPlatformEnum; import com.red.circle.component.tencent.cls.request.ClsLogSearchQry; import com.red.circle.component.tencent.cls.response.ClsLogSearchResult; import com.red.circle.component.tencent.cls.response.ClsLogSearchResultInfo; @@ -77,11 +76,11 @@ public class WalletGoldClientServiceImpl implements WalletGoldClientService { return walletGoldGateway.getBalance(userId); } - @Override - public WalletReceiptResDTO changeBalance(GoldReceiptCmd cmd) { - return walletInnerConvertor.toWalletReceiptResDTO( - walletGoldGateway.changeBalance(toGoldReceipt(cmd))); - } + @Override + public WalletReceiptResDTO changeBalance(GoldReceiptCmd cmd) { + return walletInnerConvertor.toWalletReceiptResDTO( + walletGoldGateway.changeBalance(toGoldReceipt(cmd))); + } private WalletReceipt toGoldReceipt(GoldReceiptCmd cmd) { WalletReceipt receipt = walletInnerConvertor.toGoldReceipt(cmd); @@ -111,27 +110,23 @@ public class WalletGoldClientServiceImpl implements WalletGoldClientService { return StringPool.UNKNOWN; } - @Override - public WalletReceiptResDTO changeBalanceTest(TestWalletReceiptCmd cmd) { - return walletInnerConvertor.toWalletReceiptResDTO(walletGoldGateway.changeBalance( - new WalletReceipt() - .setReqTraceId(cmd.getReqTraceId()) - .setReceiptType(cmd.getReceiptType()) - .setUserId(cmd.getUserId()) - .setSysOrigin(cmd.getSysOrigin()) - .setEventType(cmd.getEventType()) - .setEventDesc(cmd.getEventDesc()) - .setEventId(cmd.getEventId()) - .setRemark(cmd.getRemark()) - .setOpUserType(OpUserType.APP) - .setAmount(PennyAmount.ofDollar(cmd.getAmount())) - .setCloseDelayAsset(cmd.getCloseDelayAsset()) - .setCreateTime(DateUtils.now()) - )); - } - - @Override - public void refundBack(RefundBackReceiptCmd cmd) { + @Override + public WalletReceiptResDTO changeBalanceTest(TestWalletReceiptCmd cmd) { + // 临时止血:测试加币接口允许 raw eventType/eventId 入参,线上先直接拒绝写余额。 + log.warn("temporary block test gold balance change endpoint, userId={}, eventId={}, type={}", + cmd.getUserId(), cmd.getEventId(), cmd.getReceiptType()); + return temporaryBlockedReceipt(cmd.getUserId()); + } + + private WalletReceiptResDTO temporaryBlockedReceipt(Long userId) { + WalletReceiptResDTO res = new WalletReceiptResDTO(); + res.setBalance(walletGoldGateway.getBalance(userId)); + res.setOpAmount(PennyAmount.ofPenny(0L)); + return res; + } + + @Override + public void refundBack(RefundBackReceiptCmd cmd) { walletGoldGateway.refundBack(walletInnerConvertor.toRefundBackReceipt(cmd)); }