You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
691 B
24 lines
691 B
package com.pjb.springbootjjwt.service;
|
|
|
|
import com.pjb.springbootjjwt.entity.User;
|
|
import com.pjb.springbootjjwt.mapper.UserMapper;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@Service("UserService")
|
|
public class UserService {
|
|
@Autowired
|
|
UserMapper userMapper;
|
|
public User findByUsername(String username){
|
|
return userMapper.findByUsername(username);
|
|
}
|
|
public User findByUsernameAndId(User user){
|
|
return userMapper.findByUsernameAndId(user.getUsername(),user.getApp_secret());
|
|
}
|
|
public User findUserById(String userId) {
|
|
return userMapper.findUserById(userId);
|
|
}
|
|
|
|
}
|