mirror of
https://github.com/dairuoqi/Springboot-rock-admin.git
synced 2026-10-27 22:55:09 +00:00
Init
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package com.rock.geological.web.dao;
|
||||
|
||||
|
||||
import com.rock.geological.web.pojo.User;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
public interface UserDao extends CrudRepository<User, Integer> {
|
||||
|
||||
/*根据用户名称查询用户*/
|
||||
@Query(value = "select * from user where username= ?1", nativeQuery = true)
|
||||
User findUserByName(String userName);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user