jdbctemplate 怎么获取表的主键
1个回答
展开全部
[html] view plain copy print?
JSONObject obj = new JSONObject();
obj.put("code", transactionTemplate.execute(new TransactionCallback<Integer>() {
@Override
public Integer doInTransaction(TransactionStatus status) {
Object spt = status.createSavepoint();
try {
final String sql = "insert into article (title, content, source, keyword, intro,"
+ " type, author, recommend, headline,leaveNumber,clickNumber,userid,"
+ "createtime,updatetime,deploytime) values"
+ " (?, ?, ?, ?, ?, ?, ?, ?,?, ?, ?, ?, ?, ?, ?) ";
KeyHolder keyHolder = new GeneratedKeyHolder();
jdbcTemplate.update(new Prepared
JSONObject obj = new JSONObject();
obj.put("code", transactionTemplate.execute(new TransactionCallback<Integer>() {
@Override
public Integer doInTransaction(TransactionStatus status) {
Object spt = status.createSavepoint();
try {
final String sql = "insert into article (title, content, source, keyword, intro,"
+ " type, author, recommend, headline,leaveNumber,clickNumber,userid,"
+ "createtime,updatetime,deploytime) values"
+ " (?, ?, ?, ?, ?, ?, ?, ?,?, ?, ?, ?, ?, ?, ?) ";
KeyHolder keyHolder = new GeneratedKeyHolder();
jdbcTemplate.update(new Prepared
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
TableDI
2024-07-18 广告
2024-07-18 广告
在Excel中,使用`VLOOKUP`函数进行单一条件查找非常常见,但`VLOOKUP`本身并不直接支持双重条件。然而,你可以通过一些间接方法实现。一种方法是将两个条件合并为一个标识符(例如,通过连接或串联),然后在另一个区域中查找此标识符...
点击进入详情页
本回答由TableDI提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询