线上不打印执行sql的日志

This commit is contained in:
guoshengxiong 2024-09-07 15:12:42 +08:00
parent 7a6e3ae123
commit c296f7f8d3

View File

@ -163,17 +163,18 @@ public class DataScopeInterceptor extends JsqlParserSupport implements InnerInte
} else if (sct == SqlCommandType.DELETE) {
log.debug("删除mapper ↙↙↙ \r\n {}#{}{}", clazz.getName(), methodName, getCallPositionForDev());
}
} else {
if (sct == SqlCommandType.SELECT) {
log.debug("查询mapper方法: {} >>> {}#{}", getCallPosition(), clazz.getName(), methodName);
} else if (sct == SqlCommandType.UPDATE) {
log.debug("更新mapper方法: {} >>> {}#{}", getCallPosition(), clazz.getName(), methodName);
} else if (sct == SqlCommandType.INSERT) {
log.debug("插入mapper方法: {} >>> {}#{}", getCallPosition(), clazz.getName(), methodName);
} else if (sct == SqlCommandType.DELETE) {
log.debug("删除mapper方法: {} >>> {}#{}", getCallPosition(), clazz.getName(), methodName);
}
}
// else {
// if (sct == SqlCommandType.SELECT) {
// log.debug("查询mapper方法: {} >>> {}#{}", getCallPosition(), clazz.getName(), methodName);
// } else if (sct == SqlCommandType.UPDATE) {
// log.debug("更新mapper方法: {} >>> {}#{}", getCallPosition(), clazz.getName(), methodName);
// } else if (sct == SqlCommandType.INSERT) {
// log.debug("插入mapper方法: {} >>> {}#{}", getCallPosition(), clazz.getName(), methodName);
// } else if (sct == SqlCommandType.DELETE) {
// log.debug("删除mapper方法: {} >>> {}#{}", getCallPosition(), clazz.getName(), methodName);
// }
// }
} catch (Exception e) {
log.error(e.getMessage(), e);
}