sql删除xml基本写法

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.keyou.dao.userManager.UserDao">
   <delete id="removeUser" >
    DELETE FROM KGUSERS WHERE USERGUID =#{userId}
    </delete>
    </mapper>
接口中方法
boolean removeUser(@Param("userId")String userId);
sql入参与@Param标识类对应
userId与sql语句入参对应
namespace与接口全类名对应
 id与接口方法名对应``

猜你喜欢

转载自blog.csdn.net/phillip629/article/details/92356941