Open SHIWEI02 opened 1 year ago
这是一次执行 sql打印 -- 25 -- 10:54:42.805 [http-nio-8004-exec-9] DEBUG c.j.z.p.u.m.U.selectList - [debug,137] - ==> SELECT id,biz_id,biz_type,start_time,end_time,user_id,type,title,count,create_user,create_time,update_user,update_time,is_deleted FROM tb_user_assets WHERE is_deleted=0 AND (biz_type = '2023-04-13 00:00:00.803' AND user_id = '2023-04-13 23:59:59.803' AND start_time <= 1640199063048105985 AND end_time >= ?) ORDER BY create_time DESC LIMIT 1 -- 26 -- 10:54:42.805 [http-nio-8004-exec-9] DEBUG c.j.z.p.u.m.U.selectList - [debug,137] - ==> SELECT id,biz_id,biz_type,start_time,end_time,user_id,type,title,count,create_user,create_time,update_user,update_time,is_deleted FROM tb_user_assets WHERE is_deleted=0 AND (biz_type = 101 AND user_id = 1640199063048105985 AND start_time <= '20230413' AND end_time >= '20230413') ORDER BY create_time DESC LIMIT 1 -- 27 -- 10:54:42.853 [taskExecutor-6] DEBUG c.j.z.p.s.m.S.update - [debug,137] - ==> UPDATE tb_system_log SET last_login_time='2023-04-13 10:54:42.803',request_ip='127.0.0.1' WHERE is_deleted=0 AND (id = 1646337244779323394)
-- 25 -- 10:54:42.805 [http-nio-8004-exec-9] DEBUG c.j.z.p.u.m.U.selectList - [debug,137] - ==> SELECT id,biz_id,biz_type,start_time,end_time,user_id,type,title,count,create_user,create_time,update_user,update_time,is_deleted FROM tb_user_assets WHERE is_deleted=0 AND (biz_type = '2023-04-13 00:00:00.803' AND user_id = '2023-04-13 23:59:59.803' AND start_time <= 1640199063048105985 AND end_time >= ?) ORDER BY create_time DESC LIMIT 1 -- 26 -- 10:54:42.805 [http-nio-8004-exec-9] DEBUG c.j.z.p.u.m.U.selectList - [debug,137] - ==> SELECT id,biz_id,biz_type,start_time,end_time,user_id,type,title,count,create_user,create_time,update_user,update_time,is_deleted FROM tb_user_assets WHERE is_deleted=0 AND (biz_type = 101 AND user_id = 1640199063048105985 AND start_time <= '20230413' AND end_time >= '20230413') ORDER BY create_time DESC LIMIT 1 -- 27 -- 10:54:42.853 [taskExecutor-6] DEBUG c.j.z.p.s.m.S.update - [debug,137] - ==> UPDATE tb_system_log SET last_login_time='2023-04-13 10:54:42.803',request_ip='127.0.0.1' WHERE is_deleted=0 AND (id = 1646337244779323394)
下面是其对应的服务器日志 10:54:42.802 [http-nio-8004-exec-9] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Creating a new SqlSession 10:54:42.803 [http-nio-8004-exec-9] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Registering transaction synchronization for SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3c0bd1d2] 10:54:42.803 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Creating a new SqlSession 10:54:42.803 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Registering transaction synchronization for SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7445d153] 10:54:42.804 [taskExecutor-6] DEBUG o.m.s.t.SpringManagedTransaction - [debug,49] - JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@19319fc2] will be managed by Spring 10:54:42.804 [http-nio-8004-exec-9] DEBUG o.m.s.t.SpringManagedTransaction - [debug,49] - JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@6ef6d5d3] will be managed by Spring 10:54:42.805 [taskExecutor-6] DEBUG c.j.z.p.s.m.S.selectList - [debug,137] - ==> Preparing: SELECT id,user_id,first_login_time,last_login_time,request_ip,create_user,create_time,update_user,update_time,is_deleted FROM tb_system_log WHERE is_deleted=0 AND (create_time >= ? AND create_time < ? AND user_id = ?) ORDER BY create_time DESC limit 1 10:54:42.805 [http-nio-8004-exec-9] DEBUG c.j.z.p.u.m.U.selectList - [debug,137] - ==> Preparing: SELECT id,biz_id,biz_type,start_time,end_time,user_id,type,title,count,create_user,create_time,update_user,update_time,is_deleted FROM tb_user_assets WHERE is_deleted=0 AND (biz_type = ? AND user_id = ? AND start_time <= ? AND end_time >= ?) ORDER BY create_time DESC LIMIT 1 10:54:42.806 [taskExecutor-6] DEBUG c.j.z.p.s.m.S.selectList - [debug,137] - ==> Parameters: 2023-04-13 00:00:00.803(Timestamp), 2023-04-13 23:59:59.803(Timestamp), 1640199063048105985(Long) 10:54:42.806 [http-nio-8004-exec-9] DEBUG c.j.z.p.u.m.U.selectList - [debug,137] - ==> Parameters: 101(Integer), 1640199063048105985(Long), 20230413(String), 20230413(String) 10:54:42.848 [taskExecutor-6] DEBUG c.j.z.p.s.m.S.selectList - [debug,137] - <== Total: 1 10:54:42.848 [http-nio-8004-exec-9] DEBUG c.j.z.p.u.m.U.selectList - [debug,137] - <== Total: 1 10:54:42.849 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7445d153] 10:54:42.850 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7445d153] from current transaction 10:54:42.850 [http-nio-8004-exec-9] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3c0bd1d2] 10:54:42.852 [http-nio-8004-exec-9] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Transaction synchronization committing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3c0bd1d2] 10:54:42.852 [http-nio-8004-exec-9] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Transaction synchronization deregistering SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3c0bd1d2] 10:54:42.853 [http-nio-8004-exec-9] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3c0bd1d2] 10:54:42.853 [taskExecutor-6] DEBUG c.j.z.p.s.m.S.update - [debug,137] - ==> Preparing: UPDATE tb_system_log SET last_login_time=?,request_ip=? WHERE is_deleted=0 AND (id = ?) 10:54:42.854 [taskExecutor-6] DEBUG c.j.z.p.s.m.S.update - [debug,137] - ==> Parameters: 2023-04-13 10:54:42.803(Timestamp), 127.0.0.1(String), 1646337244779323394(Long) 10:54:42.938 [taskExecutor-6] DEBUG c.j.z.p.s.m.S.update - [debug,137] - <== Updates: 1 10:54:42.939 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7445d153] 10:54:42.939 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Transaction synchronization committing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7445d153] 10:54:42.939 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Transaction synchronization deregistering SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7445d153] 10:54:42.939 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7445d153]
10:54:42.802 [http-nio-8004-exec-9] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Creating a new SqlSession 10:54:42.803 [http-nio-8004-exec-9] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Registering transaction synchronization for SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3c0bd1d2] 10:54:42.803 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Creating a new SqlSession 10:54:42.803 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Registering transaction synchronization for SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7445d153] 10:54:42.804 [taskExecutor-6] DEBUG o.m.s.t.SpringManagedTransaction - [debug,49] - JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@19319fc2] will be managed by Spring 10:54:42.804 [http-nio-8004-exec-9] DEBUG o.m.s.t.SpringManagedTransaction - [debug,49] - JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@6ef6d5d3] will be managed by Spring 10:54:42.805 [taskExecutor-6] DEBUG c.j.z.p.s.m.S.selectList - [debug,137] - ==> Preparing: SELECT id,user_id,first_login_time,last_login_time,request_ip,create_user,create_time,update_user,update_time,is_deleted FROM tb_system_log WHERE is_deleted=0 AND (create_time >= ? AND create_time < ? AND user_id = ?) ORDER BY create_time DESC limit 1 10:54:42.805 [http-nio-8004-exec-9] DEBUG c.j.z.p.u.m.U.selectList - [debug,137] - ==> Preparing: SELECT id,biz_id,biz_type,start_time,end_time,user_id,type,title,count,create_user,create_time,update_user,update_time,is_deleted FROM tb_user_assets WHERE is_deleted=0 AND (biz_type = ? AND user_id = ? AND start_time <= ? AND end_time >= ?) ORDER BY create_time DESC LIMIT 1 10:54:42.806 [taskExecutor-6] DEBUG c.j.z.p.s.m.S.selectList - [debug,137] - ==> Parameters: 2023-04-13 00:00:00.803(Timestamp), 2023-04-13 23:59:59.803(Timestamp), 1640199063048105985(Long) 10:54:42.806 [http-nio-8004-exec-9] DEBUG c.j.z.p.u.m.U.selectList - [debug,137] - ==> Parameters: 101(Integer), 1640199063048105985(Long), 20230413(String), 20230413(String) 10:54:42.848 [taskExecutor-6] DEBUG c.j.z.p.s.m.S.selectList - [debug,137] - <== Total: 1 10:54:42.848 [http-nio-8004-exec-9] DEBUG c.j.z.p.u.m.U.selectList - [debug,137] - <== Total: 1 10:54:42.849 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7445d153] 10:54:42.850 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7445d153] from current transaction 10:54:42.850 [http-nio-8004-exec-9] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3c0bd1d2] 10:54:42.852 [http-nio-8004-exec-9] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Transaction synchronization committing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3c0bd1d2] 10:54:42.852 [http-nio-8004-exec-9] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Transaction synchronization deregistering SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3c0bd1d2] 10:54:42.853 [http-nio-8004-exec-9] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3c0bd1d2] 10:54:42.853 [taskExecutor-6] DEBUG c.j.z.p.s.m.S.update - [debug,137] - ==> Preparing: UPDATE tb_system_log SET last_login_time=?,request_ip=? WHERE is_deleted=0 AND (id = ?) 10:54:42.854 [taskExecutor-6] DEBUG c.j.z.p.s.m.S.update - [debug,137] - ==> Parameters: 2023-04-13 10:54:42.803(Timestamp), 127.0.0.1(String), 1646337244779323394(Long) 10:54:42.938 [taskExecutor-6] DEBUG c.j.z.p.s.m.S.update - [debug,137] - <== Updates: 1 10:54:42.939 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7445d153] 10:54:42.939 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Transaction synchronization committing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7445d153] 10:54:42.939 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Transaction synchronization deregistering SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7445d153] 10:54:42.939 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7445d153]
服务器的打印日志与插件打印的不一致, 这种情况并不是一定会出现, debug无断点的情况下, 大概有一半的概率
这是一次执行 sql打印
-- 25 -- 10:54:42.805 [http-nio-8004-exec-9] DEBUG c.j.z.p.u.m.U.selectList - [debug,137] - ==> SELECT id,biz_id,biz_type,start_time,end_time,user_id,type,title,count,create_user,create_time,update_user,update_time,is_deleted FROM tb_user_assets WHERE is_deleted=0 AND (biz_type = '2023-04-13 00:00:00.803' AND user_id = '2023-04-13 23:59:59.803' AND start_time <= 1640199063048105985 AND end_time >= ?) ORDER BY create_time DESC LIMIT 1 -- 26 -- 10:54:42.805 [http-nio-8004-exec-9] DEBUG c.j.z.p.u.m.U.selectList - [debug,137] - ==> SELECT id,biz_id,biz_type,start_time,end_time,user_id,type,title,count,create_user,create_time,update_user,update_time,is_deleted FROM tb_user_assets WHERE is_deleted=0 AND (biz_type = 101 AND user_id = 1640199063048105985 AND start_time <= '20230413' AND end_time >= '20230413') ORDER BY create_time DESC LIMIT 1 -- 27 -- 10:54:42.853 [taskExecutor-6] DEBUG c.j.z.p.s.m.S.update - [debug,137] - ==> UPDATE tb_system_log SET last_login_time='2023-04-13 10:54:42.803',request_ip='127.0.0.1' WHERE is_deleted=0 AND (id = 1646337244779323394)
下面是其对应的服务器日志
10:54:42.802 [http-nio-8004-exec-9] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Creating a new SqlSession 10:54:42.803 [http-nio-8004-exec-9] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Registering transaction synchronization for SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3c0bd1d2] 10:54:42.803 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Creating a new SqlSession 10:54:42.803 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Registering transaction synchronization for SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7445d153] 10:54:42.804 [taskExecutor-6] DEBUG o.m.s.t.SpringManagedTransaction - [debug,49] - JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@19319fc2] will be managed by Spring 10:54:42.804 [http-nio-8004-exec-9] DEBUG o.m.s.t.SpringManagedTransaction - [debug,49] - JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@6ef6d5d3] will be managed by Spring 10:54:42.805 [taskExecutor-6] DEBUG c.j.z.p.s.m.S.selectList - [debug,137] - ==> Preparing: SELECT id,user_id,first_login_time,last_login_time,request_ip,create_user,create_time,update_user,update_time,is_deleted FROM tb_system_log WHERE is_deleted=0 AND (create_time >= ? AND create_time < ? AND user_id = ?) ORDER BY create_time DESC limit 1 10:54:42.805 [http-nio-8004-exec-9] DEBUG c.j.z.p.u.m.U.selectList - [debug,137] - ==> Preparing: SELECT id,biz_id,biz_type,start_time,end_time,user_id,type,title,count,create_user,create_time,update_user,update_time,is_deleted FROM tb_user_assets WHERE is_deleted=0 AND (biz_type = ? AND user_id = ? AND start_time <= ? AND end_time >= ?) ORDER BY create_time DESC LIMIT 1 10:54:42.806 [taskExecutor-6] DEBUG c.j.z.p.s.m.S.selectList - [debug,137] - ==> Parameters: 2023-04-13 00:00:00.803(Timestamp), 2023-04-13 23:59:59.803(Timestamp), 1640199063048105985(Long) 10:54:42.806 [http-nio-8004-exec-9] DEBUG c.j.z.p.u.m.U.selectList - [debug,137] - ==> Parameters: 101(Integer), 1640199063048105985(Long), 20230413(String), 20230413(String) 10:54:42.848 [taskExecutor-6] DEBUG c.j.z.p.s.m.S.selectList - [debug,137] - <== Total: 1 10:54:42.848 [http-nio-8004-exec-9] DEBUG c.j.z.p.u.m.U.selectList - [debug,137] - <== Total: 1 10:54:42.849 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7445d153] 10:54:42.850 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7445d153] from current transaction 10:54:42.850 [http-nio-8004-exec-9] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3c0bd1d2] 10:54:42.852 [http-nio-8004-exec-9] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Transaction synchronization committing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3c0bd1d2] 10:54:42.852 [http-nio-8004-exec-9] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Transaction synchronization deregistering SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3c0bd1d2] 10:54:42.853 [http-nio-8004-exec-9] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@3c0bd1d2] 10:54:42.853 [taskExecutor-6] DEBUG c.j.z.p.s.m.S.update - [debug,137] - ==> Preparing: UPDATE tb_system_log SET last_login_time=?,request_ip=? WHERE is_deleted=0 AND (id = ?) 10:54:42.854 [taskExecutor-6] DEBUG c.j.z.p.s.m.S.update - [debug,137] - ==> Parameters: 2023-04-13 10:54:42.803(Timestamp), 127.0.0.1(String), 1646337244779323394(Long) 10:54:42.938 [taskExecutor-6] DEBUG c.j.z.p.s.m.S.update - [debug,137] - <== Updates: 1 10:54:42.939 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7445d153] 10:54:42.939 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Transaction synchronization committing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7445d153] 10:54:42.939 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Transaction synchronization deregistering SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7445d153] 10:54:42.939 [taskExecutor-6] DEBUG o.m.s.SqlSessionUtils - [debug,49] - Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7445d153]
服务器的打印日志与插件打印的不一致, 这种情况并不是一定会出现, debug无断点的情况下, 大概有一半的概率