Commit de9e9c31 authored by zhangyong's avatar zhangyong

1

parent d1487b51
...@@ -57,16 +57,19 @@ public class JobServiceImpl implements JobService { ...@@ -57,16 +57,19 @@ public class JobServiceImpl implements JobService {
public void executeJob(JobCommon jobCommon) { public void executeJob(JobCommon jobCommon) {
String data = jobCommon.getData()+""; String data = jobCommon.getData()+"";
if(data.equals("redisInit")) { redisTemplate.opsForHash().delete("SystemCtl", "Client_Md5Key");
String sql = "SELECT * FROM tSystemCtrl WHERE sCode IN ('Client_Md5Key') AND nTag&1=0 "; if(data.equals("redisInit")) { ///初始化前端签名用的 md5 key
String sql = "SELECT * FROM tSystemCtrl WHERE sSysTypeID = 'RedisInit' AND nTag&1=0 ";
List<Map<String,Object>> list = jdbcTemplate.queryForList(sql); List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
if(list != null && list.size() >0) { if(list != null && list.size() >0) {
for(Map<String,Object> map:list) { for(Map<String,Object> map:list) {
if(map.get("sCode").equals("Client_Md5Key")) { String scode = map.get("sCode")+"";
redisTemplate.opsForValue().set("Client_Md5Key", map.get("sValue1")); redisTemplate.opsForHash().put("SystemCtl", scode, map);
}
} }
} }
} }
Map<String,Object> map = (Map<String,Object>)redisTemplate.opsForHash().get("SystemCtl", "Client_Md5Key");
System.out.println(map.get("sValue1"));
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment