UserDao.java 832 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package com.xtframe.sec.user.dao;
  2. import java.util.List;
  3. import org.springframework.data.jpa.repository.Query;
  4. import com.xtframe.sec.common.SecRepository;
  5. import com.xtframe.sec.user.entity.UserEntity;
  6. /**
  7. * 数据处理接口
  8. *
  9. */
  10. public interface UserDao extends SecRepository<UserEntity, String> {
  11. /**
  12. * 根据用户名查询用户
  13. *
  14. * @param uname
  15. * @return
  16. */
  17. @Query("SELECT m from UserEntity m where m.uname =?1 and m.recordStatus<>9")
  18. public UserEntity findByUname(String uname);
  19. @Query(value = "SELECT id,name,uname,password from GK_BASIC_JSJY_USER m where m.uname =?1 and m.password=?2",nativeQuery = true)
  20. public List<Object> findByUname(String uname,String password);
  21. /**
  22. * 根据用户唯一标识查询
  23. *
  24. * @param id
  25. * @return
  26. */
  27. public UserEntity findById(String id);
  28. }