//返回插入id
@Insert("insert into notice(title,content,username,createTime) values(#{title},#{content},#{username},NOW())")
@Options(useGeneratedKeys = true, keyProperty = "id")
int save(Notice notice) throws Exception;
主鍵id自動封裝進傳入對象中
//返回插入id
@Insert("insert into notice(title,content,username,createTime) values(#{title},#{content},#{username},NOW())")
@Options(useGeneratedKeys = true, keyProperty = "id")
int save(Notice notice) throws Exception;
主鍵id自動封裝進傳入對象中