首页>代码>Spring Boot+mybatis+freemarker简单的AJAX用户登录注册实例>/demo/src/main/java/com/sf/boot/dao/UserMapper.java
package com.sf.boot.dao; import com.sf.boot.entity.userTest; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import java.util.List; /** * Created by mj on 2017/7/17. */ @Mapper public interface UserMapper { @Select("select * from springboot") List<userTest> query(); @Select("select count(*) from springboot where user=#{user} and password=#{password}") int usernameAndpassword(@Param("user")String user,@Param("password")String password); @Insert("insert into springboot (userid,user,password) values(#{userid},#{user},#{password})") int register(@Param("userid")String userid,@Param("user")String user,@Param("password")String password); /** * 下面没啥用 整合的时候 测试使用的 */ /* * @Select("SELECT * FROM user WHERE name = #{name}") User findByName(@Param("name") String name); @Insert("INSERT INTO user(name, age) VALUES(#{name}, #{age})") int insert(@Param("name") String name, @Param("age") Integer age); @Update("UPDATE user SET age=#{age} WHERE name=#{name}") void update(User user); @Delete("DELETE FROM user WHERE id =#{id}") void delete(Long id); */ }
最近下载更多
qwm374149 LV1
昨天
女王不该在山炮村养花 LV8
2023年4月16日
12345664 LV1
2022年11月9日
liuxiao2 LV16
2022年9月23日
刘亦菲9527 LV15
2022年5月24日
_NaNa_ LV3
2021年12月14日
9843637 LV9
2021年12月13日
k5484241 LV1
2021年8月19日
edward924828 LV1
2021年7月13日
dananguo LV1
2021年6月6日
最近浏览更多
qwm374149 LV1
昨天
saviorasd LV1
昨天
lvhongquan LV11
2023年12月31日
哪里的完整版 LV7
2023年12月15日
漫步的海星 LV4
2023年9月21日
飞呀飞呀飞不放 LV7
2023年8月9日
linkage LV1
2023年7月17日
999999999qqq LV2
2023年6月30日
微信网友_6535161002496000
2023年6月26日
暂无贡献等级
1455384106 LV2
2023年5月8日