1.添加用户
点击查看代码
//03_1 DML 添加用户
@Insert("insert into users values(default,#{username},#{usersex})")
int insertUsers(Users users);
2.删除用户
点击查看代码
//03_2 DML 修改用户
@Update("update users set username=#{username}, usersex=#{usersex} where userid = #{userid}")
int updateUsers(Users users);
3.修改用户
点击查看代码
//03_3 DML 删除用户
@Delete("delete from users where userid=#{userid}")
int deleteUsers(int userid);