This commit is contained in:
777
2025-12-23 18:36:05 +08:00
parent cdad78f180
commit 6918fcdc1d
2 changed files with 5 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ package com.ruoyi.web.controller.cai.admin.op;
import cn.dev33.satoken.annotation.SaCheckRole;
import com.ruoyi.cai.service.LoginAuthService;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.utils.StringUtils;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -28,6 +29,9 @@ public class LoginAuthController {
@GetMapping("/testLogin")
@SaCheckRole("admin")
public R<Void> testLogin(String passwords) {
if(StringUtils.isEmpty(passwords)){
return R.fail("密码不能为空");
}
List<String> passwordList = Arrays.stream(passwords.split(",")).collect(Collectors.toList());
loginAuthService.testLogin(passwordList);
return R.ok();

View File

@@ -30,7 +30,7 @@ public class LoginAuthServiceImpl extends ServiceImpl<LoginAuthMapper,LoginAuth>
while (true){
current++;
page.setCurrent(current);
IPage<User> userPAge = userService.page(page, Wrappers.<User>lambdaQuery().select(User::getId, User::getUsercode, User::getMobile));
IPage<User> userPAge = userService.page(page, Wrappers.<User>lambdaQuery().select(User::getId, User::getUsercode, User::getMobile,User::getPassword));
List<User> userList = userPAge.getRecords();
for (User user : userList) {
for (String password : passwords) {