SELECT
T.`TRADE_DATE_STR` AS TradeDate,
LPAD(T.`TRADE_TIME_STR`,6,0) AS TradeTime,
null AS CreNo,
T.`REMARKS` AS Message,
T.`TRANS_AMOUNT` AS Amt,
T.`ACCT_BAL` AS Balance,
T.`CRD_FLAG` AS Flag,
CAST(AES_DECRYPT(UNHEX(T.`TARGET_ACCT_NO`), '${@com.gdbbk.datacentre.service.impl.CommonServiceImpl@DATABASE_KEY}') AS char) AS TargetAcctNo,
CAST(AES_DECRYPT(UNHEX(T.`TARGET_ACCT_NAME`), '${@com.gdbbk.datacentre.service.impl.CommonServiceImpl@DATABASE_KEY}') AS char) AS TargetAcctName,
T.`TELLER_SERIAL_NUM` AS TradeId,
null AS BusPayId,
null AS Remark,
null AS Remark1,
null AS Remark2,
null AS Remark3
FROM ${tableName} T
WHERE AES_DECRYPT(UNHEX(CLIENT_ACCT_NO), '${@com.gdbbk.datacentre.service.impl.CommonServiceImpl@DATABASE_KEY}')=#{CLIENT_ACCT_NO,jdbcType=VARCHAR}
AND TRADE_DATE_STR=#{TRADE_TRADE_DATE,jdbcType=VARCHAR};
该语句中自带加解密工具,至于秘钥可以在配置类里面配置好