package cn.exrick.xboot.core.service; import cn.exrick.xboot.core.base.XbootBaseService; import cn.exrick.xboot.core.common.vo.SearchVo; import cn.exrick.xboot.core.entity.User; import org.springframework.cache.annotation.CacheConfig; import org.springframework.cache.annotation.Cacheable; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import java.util.List; /** * 用户接口 * @author Exrickx */ //@CacheConfig(cacheNames = "user") public interface UserService extends XbootBaseService { /** * 通过用户名获取用户 * @param username * @return */ //@Cacheable(key = "#username") User findByUsername(String username); /** * 查询所有用户信息 * @return */ List findAll(); /** * 通过手机获取用户 * @param mobile * @return */ User findByMobile(String mobile); /** * 通过邮件和状态获取用户 * @param email * @return */ User findByEmail(String email); /** * 多条件分页获取用户 * @param user * @param searchVo * @param pageable * @return */ Page findByCondition(User user, SearchVo searchVo, Pageable pageable); /** * 通过部门id获取 * @param departmentId * @return */ List findByDepartmentId(String departmentId); /** * 通过用户名模糊搜索 * @param username * @param status * @return */ List findByUsernameLikeAndStatus(String username, Integer status); /** * 更新部门名称 * @param departmentId * @param departmentTitle */ void updateDepartmentTitle(String departmentId, String departmentTitle); int countByType(int type); List findByType2(int type); }