Commit 2830e40f authored by chenhao's avatar chenhao

添加手动清楚缓存的方式

parent 0445ed80
......@@ -302,6 +302,35 @@ public class DataDictionaryController extends BaseController {
return ResponseHelper.buildResponse(menuList);
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/cleanRedis", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "清楚redis缓存", notes = "清楚redis缓存")
public ResponseModel<Object> cleanRedis(@RequestParam String type)
throws Exception {
type=type.toLowerCase();
if(RedisKey.FORM_CODE.startsWith(type)) {
redisUtils.del(RedisKey.FORM_CODE);
}else if(RedisKey.DATA_DICTIONARY_CODE.startsWith(type)) {
redisUtils.del(RedisKey.DATA_DICTIONARY_CODE);
}else if(RedisKey.DATA_DICTIONARY_CODE_XIN.startsWith(type)) {
redisUtils.del(RedisKey.DATA_DICTIONARY_CODE_XIN);
}else if(RedisKey.FIREFIGHTERS_ID.startsWith(type)) {
redisUtils.del(RedisKey.FIREFIGHTERS_ID);
}else if(RedisKey.FIREFIGHTERS_LIST_ID.startsWith(type)) {
redisUtils.del(RedisKey.FIREFIGHTERS_LIST_ID );
}else if(RedisKey.EDUCATION_POST_EXPERIENCE_FIREFIGHTERS_ID.startsWith(type)) {
redisUtils.del(RedisKey.EDUCATION_POST_EXPERIENCE_FIREFIGHTERS_ID);
}else if(RedisKey.CONTRACT_ID.startsWith(type)) {
redisUtils.del(RedisKey.CONTRACT_ID );
}else if(RedisKey.THOUGHT_ID.startsWith(type)) {
redisUtils.del(RedisKey.THOUGHT_ID);
}else if(RedisKey.ALERTCALLED_ID.startsWith(type)) {
redisUtils.del(RedisKey.ALERTCALLED_ID);
}else if(RedisKey.TZS_ALERTCALLED_ID.startsWith(type)) {
redisUtils.del(RedisKey.TZS_ALERTCALLED_ID);
}
return ResponseHelper.buildResponse(type);
}
}
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