Map.xml
< delete id = "deleteAccountById" parameterClass = "int" > <![CDATA[ delete from t_account where id=#id# ]]> </ delete > |
DAO
int delete (java.lang.String id, java.lang.Object parameterObject) throws java.sql.SQLException
|
补充:
占位符#id#的名字是可以随意,因为只要参数类型是int,只要传入的是int类型的,就可以执行成功