Commit 2282a6e9 authored by 李腾威's avatar 李腾威

日常管理-redis key值修改

parent fc890e47
...@@ -26,6 +26,8 @@ public class RedisKey { ...@@ -26,6 +26,8 @@ public class RedisKey {
public static final String THOUGHT_ID="thought_id_"; public static final String THOUGHT_ID="thought_id_";
/**根据警情id查询警情详情记录*/ /**根据警情id查询警情详情记录*/
public static final String ALERTCALLED_ID="alertcalled_id_"; public static final String ALERTCALLED_ID="alertcalled_id_";
/**特种设备根据警情id查询警情详情记录*/
public static final String TZS_ALERTCALLED_ID="tzs_alertcalled_id_";
/** 驼峰转下划线(简单写法,效率低于{@link #humpToLine2(String)}) */ /** 驼峰转下划线(简单写法,效率低于{@link #humpToLine2(String)}) */
public static String humpToLine(String str) { public static String humpToLine(String str) {
......
...@@ -21,7 +21,7 @@ import java.util.Date; ...@@ -21,7 +21,7 @@ import java.util.Date;
*/ */
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
@Document(indexName = "tzs", type = "alertCalled", shards = 1, replicas = 0) @Document(indexName = "tzs", type = "tzsAlertCalled", shards = 1, replicas = 0)
public class ESAlertCalled { public class ESAlertCalled {
/** 主键 */ /** 主键 */
......
...@@ -76,10 +76,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -76,10 +76,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
@Override @Override
public Object selectAlertCalledById(Long id) { public Object selectAlertCalledById(Long id) {
/* if(redisUtils.hasKey(RedisKey.ALERTCALLED_ID+id)){ if(redisUtils.hasKey(RedisKey.TZS_ALERTCALLED_ID+id)){
Object obj= redisUtils.get(RedisKey.ALERTCALLED_ID+id); Object obj= redisUtils.get(RedisKey.TZS_ALERTCALLED_ID+id);
return JSON.toJavaObject((JSON) obj,AlertCalledFormDto.class); return obj;
}else{*/ }else{
// 警情基本信息 // 警情基本信息
AlertCalled alertCalled = this.getById(id); AlertCalled alertCalled = this.getById(id);
QueryWrapper<AlertFormValue> queryWrapper = new QueryWrapper<>(); QueryWrapper<AlertFormValue> queryWrapper = new QueryWrapper<>();
...@@ -111,9 +111,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -111,9 +111,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
} }
AlertCalledFormDto alertCalledFormVo = new AlertCalledFormDto(alertCalledVo, formValue); AlertCalledFormDto alertCalledFormVo = new AlertCalledFormDto(alertCalledVo, formValue);
//redisUtils.set(RedisKey.ALERTCALLED_ID+id, JSON.toJSON(alertCalledFormVo),time); redisUtils.set(RedisKey.TZS_ALERTCALLED_ID+id, JSON.toJSON(alertCalledFormVo),time);
return alertCalledFormVo; return alertCalledFormVo;
//} }
} }
......
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