ChenJiaHe
2022-01-23 5c933de8e9024a194432e6feeef71bf987e3939f
src/main/java/com/hx/mybatis/aes/springbean/SqlUtils.java
@@ -138,7 +138,7 @@
                }else{
                    tableAl = column.getName();
                }
                sql = sql.replaceAll("\\b((?<!\\.)"+tableAl+"(?!\\.))\\b","AES_DECRYPT(UNHEX("+tableAl+"),'"+aeskey+"')");
                sql = sql.replaceAll("((?<!\\.)\\b"+tableAl+"\\b(?!\\.))","AES_DECRYPT(UNHEX("+tableAl+"),'"+aeskey+"')");
            }
        }
        return sqlSelect.toString()+sql;
@@ -247,7 +247,7 @@
                }else{
                    tableAl = column.getName();
                }
                sql = sql.replaceAll("\\b((?<!\\.)"+tableAl+"(?!\\.))\\b","AES_DECRYPT(UNHEX("+tableAl+"),'"+aeskey+"')");
                sql = sql.replaceAll("((?<!\\.)\\b"+tableAl+"\\b(?!\\.))","AES_DECRYPT(UNHEX("+tableAl+"),'"+aeskey+"')");
            }
        }
        return sqlSelect.toString()+sql;
@@ -411,7 +411,7 @@
                }else{
                    tableAl = column.getName();
                }
                sqlWhere = sqlWhere.replaceAll("\\b((?<!\\.)"+tableAl+"(?!\\.))\\b","AES_DECRYPT(UNHEX("+tableAl+"),'"+aeskey+"')");
                sqlWhere = sqlWhere.replaceAll("((?<!\\.)\\b"+tableAl+"\\b(?!\\.))","AES_DECRYPT(UNHEX("+tableAl+"),'"+aeskey+"')");
            }
        }
@@ -489,7 +489,7 @@
                }else{
                    tableAl = column.getName();
                }
                sqlWhere = sqlWhere.replaceAll("\\b((?<!\\.)"+tableAl+"(?!\\.))\\b","AES_DECRYPT(UNHEX("+tableAl+"),'"+aeskey+"')");
                sqlWhere = sqlWhere.replaceAll("((?<!\\.)\\b"+tableAl+"\\b(?!\\.))","AES_DECRYPT(UNHEX("+tableAl+"),'"+aeskey+"')");
            }
        }