| | |
| | | import com.vincent.rsf.server.system.service.RoleMenuService; |
| | | import com.vincent.rsf.server.system.service.UserRoleService; |
| | | import com.vincent.rsf.server.system.service.UserService; |
| | | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; |
| | | import org.springframework.security.crypto.password.PasswordEncoder; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import jakarta.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Service("userService") |
| | |
| | | @Resource |
| | | private RoleMenuService roleMenuService; |
| | | @Resource |
| | | private BCryptPasswordEncoder bCryptPasswordEncoder; |
| | | private PasswordEncoder passwordEncoder; |
| | | |
| | | @Override |
| | | public PageResult<User> pageRel(PageParam<User, BaseParam> pageParam) { |
| | |
| | | |
| | | @Override |
| | | public boolean comparePassword(String dbPassword, String inputPassword) { |
| | | return bCryptPasswordEncoder.matches(inputPassword, dbPassword); |
| | | return passwordEncoder.matches(inputPassword, dbPassword); |
| | | } |
| | | |
| | | @Override |
| | | public String encodePassword(String password) { |
| | | return password == null ? null : bCryptPasswordEncoder.encode(password); |
| | | return password == null ? null : passwordEncoder.encode(password); |
| | | } |
| | | |
| | | @Override |