package cn.com.capcloud.core.system.user;


import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface UserRepository extends JpaRepository<User, Long> {

  boolean existsByUserLoginName(String username);
  @Query(value="select u from User u where  u.userLoginName like:userName and u.status='0'")
  User findByUserLoginName(@Param("userName")String userName);

  void deleteByUserLoginName(String username);

}
