From 326648ce7d2bd0de183f6a1320d7fb02d16b262d Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Tue, 11 Nov 2025 16:58:11 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E6=89=B9=E9=87=8F=E5=B0=81=E7=A6=81test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/test/java/UserDataViolationTest.java | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 rc-service/rc-service-other/other-start/src/test/java/UserDataViolationTest.java diff --git a/rc-service/rc-service-other/other-start/src/test/java/UserDataViolationTest.java b/rc-service/rc-service-other/other-start/src/test/java/UserDataViolationTest.java new file mode 100644 index 00000000..21693d56 --- /dev/null +++ b/rc-service/rc-service-other/other-start/src/test/java/UserDataViolationTest.java @@ -0,0 +1,33 @@ +import com.red.circle.OtherServiceApplication; +import com.red.circle.common.business.enums.ConsoleAccountStatusEnum; +import com.red.circle.other.app.service.user.user.AppUserDataViolationService; +import com.red.circle.other.inner.model.cmd.user.ApprovalAccountCmd; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@SpringBootTest(classes = OtherServiceApplication.class) +@RunWith(SpringRunner.class) +public class UserDataViolationTest { + + @Autowired + private AppUserDataViolationService userDataViolationService; + + /** + * 批量用户封禁 + */ + @Test + public void updateUserDataViolation() { + + Long userId = 1954059793963393025L; + ApprovalAccountCmd cmd = new ApprovalAccountCmd(); + cmd.setAccountStatusEnum(ConsoleAccountStatusEnum.ARCHIVE_DEVICE); + cmd.setDescription("Multi-device fingerprint blocking"); + cmd.setBeApprovalUserId(userId); + cmd.setReqUserId(userId); + userDataViolationService.updateAccountStatus(cmd); + } + +}