Commit 8d64e01e authored by fangxinjiang's avatar fangxinjiang

B端&LDAP登录调整

parent 814d2604
......@@ -40,6 +40,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
......@@ -109,8 +110,8 @@ public class UserController {
public UserInfo infoAPI(@RequestParam(required = true, name = "username") String username,
@RequestParam(required = false, name = "password") String password) {
SysUser user = userService.getOne(Wrappers.<SysUser>query().lambda().eq(SysUser::getUsername, username));
if (Common.isNotNull(user)){
userService.ldapLogin(username,password,user);
if (Common.isNotNull(user)) {
userService.ldapLogin(username, password, user);
}
return userService.getUserInfo(user);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment