自定义sql
Sql sql = Sqls.create("insert into agent_document"
+ " (document_name,document_type,document_address,create_time,create_by)"
+ " values"
+ " (@document_name,@document_type,@document_address,@create_time,@create_by)");
sql.setParam("document_name", pic.getPic_title());
sql.setParam("document_type", "jpg");
sql.setParam("document_address", pic.getPic_url());
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
sql.setParam("create_time",sdf.format(new Date()));
sql.setParam("create_by", user.getId());
dao().execute(sql);
我该怎么拿到插入后的主键?