package com.xtframe.sec.user.dao; import java.util.List; import org.springframework.data.jpa.repository.Query; import com.xtframe.sec.common.SecRepository; import com.xtframe.sec.user.entity.UserEntity; /** * 数据处理接口 * */ public interface UserDao extends SecRepository { /** * 根据用户名查询用户 * * @param uname * @return */ @Query("SELECT m from UserEntity m where m.uname =?1 and m.recordStatus<>9") public UserEntity findByUname(String uname); @Query(value = "SELECT id,name,uname,password from GK_BASIC_JSJY_USER m where m.uname =?1 and m.password=?2",nativeQuery = true) public List findByUname(String uname,String password); /** * 根据用户唯一标识查询 * * @param id * @return */ public UserEntity findById(String id); }