package com.huimv.video.repo;

import com.huimv.video.domain.MobileUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface MobileUserRepository extends JpaRepository<MobileUser, Integer>, JpaSpecificationExecutor<MobileUser> {
	
	@Query(nativeQuery = true ,value = "select * from mobile_user where account like %?1% limit ?2 , ?3")
    List<MobileUser> findAll(String name, Integer startPage, Integer pageSize);

    MobileUser findByAccountAndPassword(String account, String password);
}
