修改oracle token问题
This commit is contained in:
parent
eb35dddfbd
commit
8640398252
|
|
@ -134,12 +134,15 @@ public class SalaryTokenUtil {
|
|||
// 对秘钥进行加密传输,防止篡改数据
|
||||
secret = rsa.encrypt(null, (String) (datas.get("secrit")), null, "utf-8", spk, false);
|
||||
// secret存库
|
||||
String date = SalaryDateUtil.getFormatLocalDateTime(LocalDateTime.now());
|
||||
sql = String.format("insert into hrsa_salary_sys_conf(id, conf_key, conf_value, title, module, order_weight, delete_type, create_time, update_time) values (%s,'%s','%s','%s','%s',%s,%s,'%s','%s')",
|
||||
String date = "'"+SalaryDateUtil.getFormatLocalDateTime(LocalDateTime.now())+"'";
|
||||
if(rs.getDBType().equalsIgnoreCase("oracle")){
|
||||
date = String.format("to_date(%s,'yyyy-mm-dd hh24:mi:ss')", date);
|
||||
}
|
||||
sql = String.format("insert into hrsa_salary_sys_conf(id, conf_key, conf_value, title, module, order_weight, delete_type, create_time, update_time) values (%s,'%s','%s','%s','%s',%s,%s,%s,%s)",
|
||||
IdGenerator.generate(), "SALARY_TOKEN_SECRET", secret, "token", "basic",0,0,date,date);
|
||||
rs.execute(sql);
|
||||
// 保存spk
|
||||
sql = String.format("insert into hrsa_salary_sys_conf(id, conf_key, conf_value, title, module, order_weight, delete_type, create_time, update_time) values (%s,'%s','%s','%s','%s',%s,%s,'%s','%s')",
|
||||
sql = String.format("insert into hrsa_salary_sys_conf(id, conf_key, conf_value, title, module, order_weight, delete_type, create_time, update_time) values (%s,'%s','%s','%s','%s',%s,%s,%s,%s)",
|
||||
IdGenerator.generate(), "SALARY_TOKEN_SPK", spk, "spk", "basic",0,0,date,date);
|
||||
rs.execute(sql);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue