|
|
@ -26,6 +26,7 @@ import org.dromara.common.satoken.utils.LoginHelper; |
|
|
import org.junit.jupiter.api.AfterEach; |
|
|
import org.junit.jupiter.api.AfterEach; |
|
|
import org.junit.jupiter.api.BeforeEach; |
|
|
import org.junit.jupiter.api.BeforeEach; |
|
|
import org.springframework.mock.web.MockHttpServletRequest; |
|
|
import org.springframework.mock.web.MockHttpServletRequest; |
|
|
|
|
|
import org.springframework.test.context.ActiveProfiles; |
|
|
import org.springframework.web.context.request.RequestContextHolder; |
|
|
import org.springframework.web.context.request.RequestContextHolder; |
|
|
import org.springframework.web.context.request.ServletRequestAttributes; |
|
|
import org.springframework.web.context.request.ServletRequestAttributes; |
|
|
|
|
|
|
|
|
@ -37,6 +38,7 @@ import org.springframework.web.context.request.ServletRequestAttributes; |
|
|
*/ |
|
|
*/ |
|
|
@SpringBootTest(classes = ZdxtAdminApplication.class) |
|
|
@SpringBootTest(classes = ZdxtAdminApplication.class) |
|
|
@AutoConfigureMockMvc |
|
|
@AutoConfigureMockMvc |
|
|
|
|
|
@ActiveProfiles({"dev", "dev-cust-zrb"}) |
|
|
@DisplayName("批量重置企业用户密码") |
|
|
@DisplayName("批量重置企业用户密码") |
|
|
public class ResetUserPasswordTest { |
|
|
public class ResetUserPasswordTest { |
|
|
|
|
|
|
|
|
@ -159,12 +161,18 @@ public class ResetUserPasswordTest { |
|
|
@DisplayName("批量重置 sys_user 指定用户密码为 szsf@zfjd") |
|
|
@DisplayName("批量重置 sys_user 指定用户密码为 szsf@zfjd") |
|
|
@Test |
|
|
@Test |
|
|
public void resetSysUserPassword() { |
|
|
public void resetSysUserPassword() { |
|
|
// 1. 指定需要重置密码的用户ID列表
|
|
|
// 1. 执法端的测试用户
|
|
|
List<Long> userIds = Arrays.asList( |
|
|
List<Long> userIds = Arrays.asList( |
|
|
// TODO: 在此填入需要重置的用户ID
|
|
|
// TODO: 在此填入需要重置的用户ID
|
|
|
7897L, 17608416858L,17608416876L, 17608416904L,17608416912L, 17608416926L,17608416927L, 17608416945L |
|
|
7897L, 17608416858L,17608416876L, 17608416904L,17608416912L, 17608416926L,17608416927L, 17608416945L |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
// 监督端的报表测试用户
|
|
|
|
|
|
userIds = Arrays.asList( |
|
|
|
|
|
// TODO: 在此填入需要重置的用户ID
|
|
|
|
|
|
17608417340L, 17608417451L,17608417716L, 17608614169L,17608614499L |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
// 2. 根据ID列表查询系统用户
|
|
|
// 2. 根据ID列表查询系统用户
|
|
|
List<SysUser> userList = sysUserMapper.selectList( |
|
|
List<SysUser> userList = sysUserMapper.selectList( |
|
|
new LambdaQueryWrapper<SysUser>() |
|
|
new LambdaQueryWrapper<SysUser>() |
|
|
|