首页>代码>spring boot+mybatis+layui构建的用户增删改查实例,支持分页查询,模糊查询>/SpringBootMybatisDemo/src/main/java/com/example/SpringBootMybatisDemo/mapper/UserMapper.java
package com.example.SpringBootMybatisDemo.mapper;
import com.example.SpringBootMybatisDemo.entity.User;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* 创建人:thj
* 创建时间: 2018/6/26 9:28
* 用途:
*/
//@Repository
public interface UserMapper {
// @Select("SELECT * FROM USER WHERE id = #{id}")
User getUserById(Integer id);
// @Select("SELECT * FROM USER")
public List<User> getUserList(String name,int page, int limit);
// @Insert("insert into USER(name, age) values(#{username}, #{age})")
public int add(User user);
// @Update("UPDATE USER SET name = #{user.name} , age = #{user.age} WHERE id = #{id}")
public int update(User user);
// @Delete("DELETE FROM USER WHERE id = #{id} ")
public int delete(Integer id);
int getUserCount();
}
最近下载更多
dane168 LV10
2月23日
zhengguangshun LV4
2024年8月26日
可乐要加冰1 LV8
2024年6月20日
ma406805131 LV19
2024年5月11日
汤汤汤要学编程 LV11
2023年6月27日
iceboard LV2
2023年5月31日
zhaoming200677 LV13
2022年12月3日
呵呵哈哈哈 LV10
2022年9月3日
lucuey LV1
2022年7月8日
cab123123 LV8
2022年4月25日

最近浏览