From 7b0feb2e5e1a2d46f49c5850c21a8a2dd2ba0031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Czhaozhan=E2=80=9D?= <“zhaozhan@kezaihui.com”> Date: Thu, 22 Dec 2022 10:24:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dorm-jdbctemplate=E4=B8=AD?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=89=93=E5=8D=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xkcoding/orm/jdbctemplate/dao/base/BaseDao.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demo-orm-jdbctemplate/src/main/java/com/xkcoding/orm/jdbctemplate/dao/base/BaseDao.java b/demo-orm-jdbctemplate/src/main/java/com/xkcoding/orm/jdbctemplate/dao/base/BaseDao.java index 563e7bdaa..97560c541 100644 --- a/demo-orm-jdbctemplate/src/main/java/com/xkcoding/orm/jdbctemplate/dao/base/BaseDao.java +++ b/demo-orm-jdbctemplate/src/main/java/com/xkcoding/orm/jdbctemplate/dao/base/BaseDao.java @@ -82,7 +82,7 @@ protected Integer deleteById(P pk) { String tableName = getTableName(); String sql = StrUtil.format("DELETE FROM {table} where id = ?", Dict.create().set("table", tableName)); log.debug("【执行SQL】SQL:{}", sql); - log.debug("【执行SQL】参数:{}", JSONUtil.toJsonStr(pk)); + log.debug("【执行SQL】参数:{}", pk); return jdbcTemplate.update(sql, pk); } @@ -127,7 +127,7 @@ public T findOneById(P pk) { String sql = StrUtil.format("SELECT * FROM {table} where id = ?", Dict.create().set("table", tableName)); RowMapper rowMapper = new BeanPropertyRowMapper<>(clazz); log.debug("【执行SQL】SQL:{}", sql); - log.debug("【执行SQL】参数:{}", JSONUtil.toJsonStr(pk)); + log.debug("【执行SQL】参数:{}", pk); return jdbcTemplate.queryForObject(sql, new Object[]{pk}, rowMapper); }