kookob / plugin

Intellij Plugin Document.
https://plugins.jetbrains.com/organization/abc
Other
3 stars 3 forks source link

设置Parameters 自动加冒号 #2

Closed wangjinhai555 closed 3 years ago

wangjinhai555 commented 3 years ago

设置Parameters: binding parameter 再次查看变成Parameters: binding parameter: 我不知道是我设置错了吗,用官方提供的例子也是我无法解析

kookob commented 3 years ago

冒号是插件自动加的,因为日志默认不是有带冒号吗?还是你的格式是没有冒号输出的?

kookob commented 3 years ago

可以把原始输出日志粘贴出来看一下。

wangjinhai555 commented 3 years ago

冒号是插件自己加的,我的日志格式如下 ,没能正常解析 Hibernate: select oapersonal0_.ID as id1_114_, oapersonal0_.BELONGED_ORG_ID as belonged2_114_, oapersonal0_.CREATE_DEPT_CODE as create_d3_114_, oapersonal0_.CREATE_DEPT_ID as create_d4_114_, oapersonal0_.CREATE_DEPT_NAME as create_d5_114_, oapersonal0_.CREATION_TIME as creation6_114_, oapersonal0_.CREATOR_ACCOUNT as creator_7_114_, oapersonal0_.CREATOR_ID as creator_8_114_, oapersonal0_.CREATOR_NAME as creator_9_114_, oapersonal0_.DELETED as deleted10_114_, oapersonal0_.LAST_MODIFIED_TIME as last_mo11_114_, oapersonal0_.MODIFY_EMP_ACCOUNT as modify_12_114_, oapersonal0_.MODIFY_EMP_ID as modify_13_114_, oapersonal0_.MODIFY_EMP_NAME as modify_14_114_, oapersonal0_.PARAM_ID as param_i15_114_, oapersonal0_.PARAM_NAME as param_n16_114_, oapersonal0_.PARAM_VALUE as param_v17_114_ from OA_BASE_PERSONALSET oapersonal0_ where oapersonal0_.DELETED=0 and oapersonal0_.PARAM_ID=? and oapersonal0_.CREATOR_ACCOUNT=? 2021-02-02 12:04:05.036 TRACE [xcoa,ea7e189de222b591,ea7e189de222b591,true] 23044 --- [nio-8888-exec-6] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [VARCHAR] - [2] 2021-02-02 12:04:05.036 TRACE [xcoa,ea7e189de222b591,ea7e189de222b591,true] 23044 --- [nio-8888-exec-6] o.h.type.descriptor.sql.BasicBinder : binding parameter [2] as [VARCHAR] - [dev2]

wangjinhai555 commented 3 years ago

Hibernate: SELECT COUNT(*) FROM HD_WF_INST entry, HD_WF_ACT_STEP curstep, HD_WF_LIST list_, HD_WF_PROCESSED ids, HD_WF_INPROCESS inps , OA_DOC_DISPATCH oaDocDispatch WHERE oaDocDispatch.DELETED = 0 AND entry.ID = ids.INSTID AND list_.ID = ids.INSTID AND list_.ID = inps.INSTID AND list_.ID = curstep.INSTID AND curstep.STEPSN > 0 AND list_.BEAN_ID = oaDocDispatch.ID AND list_.FORM_ID = ? AND ( ids.ACCOUNT = ? ) 2021-02-02 12:07:12.063 TRACE [xcoa,e74a28ed1e12c47c,e74a28ed1e12c47c,true] 23044 --- [io-8888-exec-10] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [VARCHAR] - [oaDocDispatch] 2021-02-02 12:07:12.063 TRACE [xcoa,e74a28ed1e12c47c,e74a28ed1e12c47c,true] 23044 --- [io-8888-exec-10] o.h.type.descriptor.sql.BasicBinder : binding parameter [2] as [VARCHAR] - [dev2] 解析结果如下 ‘-- 4 ; -- ------------------------------------------------------------------------------------------------’

wangjinhai555 commented 3 years ago

image image image

kookob commented 3 years ago

配置的冒号是个bug,后续版本修复一下。 你把两个配置都清空,点OK再试下,会自动带上默认的,应该不会加冒号。

kookob commented 3 years ago

你上面粘贴的参数输出好像不太正常,[1] 和 [2]之间多这么多其他字符的吗?

wangjinhai555 commented 3 years ago

是的 我们还有这种 2021-02-02 12:46:18.710 DEBUG [xcoa,26afc63a86594551,26afc63a86594551,true] 23044 --- [nio-8888-exec-9] org.hibernate.SQL : SELECT COUNT(*) FROM HD_WF_INST entry, HD_WF_LIST list_, HD_WF_COMPLETED ids , OA_DOC_DISPATCH oaDocDispatch WHERE oaDocDispatch.DELETED = 0 AND entry.ID = ids.INSTID AND list_.ID = ids.INSTID AND list_.BEAN_ID = oaDocDispatch.ID AND list_.FORM_ID = ? AND ( ids.ACCOUNT = ? ) Hibernate: SELECT COUNT(*) FROM HD_WF_INST entry, HD_WF_LIST list_, HD_WF_COMPLETED ids , OA_DOC_DISPATCH oaDocDispatch WHERE oaDocDispatch.DELETED = 0 AND entry.ID = ids.INSTID AND list_.ID = ids.INSTID AND list_.BEAN_ID = oaDocDispatch.ID AND list_.FORM_ID = ? AND ( ids.ACCOUNT = ? ) 2021-02-02 12:46:18.712 TRACE [xcoa,26afc63a86594551,26afc63a86594551,true] 23044 --- [nio-8888-exec-9] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [VARCHAR] - [oaDocDispatch] 2021-02-02 12:46:18.712 TRACE [xcoa,26afc63a86594551,26afc63a86594551,true] 23044 --- [nio-8888-exec-9] o.h.type.descriptor.sql.BasicBinder : binding parameter [2] as [VARCHAR] - [dev2]

kookob commented 3 years ago

为什么你粘贴出来的是没有换行的?还是输出就是同有换行?

wangjinhai555 commented 3 years ago

输出是有换行的

kookob commented 3 years ago

image

如果有换行应该能正常解析吧? 你把配置清空恢复默认可以正常解析了吗?

wangjinhai555 commented 3 years ago

image image image

没有正常解析

wangjinhai555 commented 3 years ago

换行的不能正常解析 ,不换行的可以

kookob commented 3 years ago

把你左边粘贴的文本发出来下,我测试下

wangjinhai555 commented 3 years ago

Hibernate: select oapersonal0_.ID as id1114, oapersonal0_.BELONGED_ORG_ID as belonged2114, oapersonal0_.CREATE_DEPT_CODE as create_d3114, oapersonal0_.CREATE_DEPT_ID as create_d4114, oapersonal0_.CREATE_DEPT_NAME as create_d5114, oapersonal0_.CREATION_TIME as creation6114, oapersonal0_.CREATOR_ACCOUNT as creator_7114, oapersonal0_.CREATOR_ID as creator_8114, oapersonal0_.CREATOR_NAME as creator_9114, oapersonal0_.DELETED as deleted10114, oapersonal0_.LAST_MODIFIED_TIME as last_mo11114, oapersonal0_.MODIFY_EMP_ACCOUNT as modify_12114, oapersonal0_.MODIFY_EMP_ID as modify_13114, oapersonal0_.MODIFY_EMP_NAME as modify_14114, oapersonal0_.PARAM_ID as param_i15114, oapersonal0_.PARAM_NAME as param_n16114, oapersonal0_.PARAM_VALUE as param_v17114 from OA_BASEPERSONALSET oapersonal0 where oapersonal0.DELETED=0 and oapersonal0.PARAMID=? and oapersonal0.CREATOR_ACCOUNT=? 2021-02-02 12:53:17.154 TRACE [xcoa,0c6f0b3c2958f6db,0c6f0b3c2958f6db,true] 17500 --- [nio-8888-exec-8] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [VARCHAR] - [2] 2021-02-02 12:53:17.159 TRACE [xcoa,0c6f0b3c2958f6db,0c6f0b3c2958f6db,true] 17500 --- [nio-8888-exec-8] o.h.type.descriptor.sql.BasicBinder : binding parameter [2] as [VARCHAR] - [dev2]

kookob commented 3 years ago

收到,确实是换行的问题,没考虑到格式化后的换行,是个bug,后续版本修复一下,感谢反馈!

wangjinhai555 commented 3 years ago

有QQ群之类的没

kookob commented 3 years ago

试下新版本