为redis入库返回的错误提示添加固定前缀:后台错误

This commit is contained in:
RenKaiGe-Office
2018-07-01 11:51:36 +08:00
parent cb784e560e
commit 4f4ad8464a
2 changed files with 46 additions and 54 deletions

View File

@@ -43,7 +43,7 @@ public class BaseRedisDao {
}
return hasKey;
} else {
throw new RuntimeException("" + index + "号redis库中判断" + key + "是否存在时失败,失败原因:redisTemplate为null请联系开发人员");
throw new RuntimeException("后台错误:" + index + "号redis库中判断" + key + "是否存在时失败,失败原因:redisTemplate为null请联系开发人员");
}
}
@@ -60,7 +60,7 @@ public class BaseRedisDao {
Long id = redisTemplate.boundValueOps(key.toUpperCase()).increment(1l);
return id;
} else {
throw new RuntimeException("" + index + "号redis库中获取" + key + "的自增长值时失败,失败原因:redisTemplate为null请联系开发人员");
throw new RuntimeException("后台错误:" + index + "号redis库中获取" + key + "的自增长值时失败,失败原因:redisTemplate为null请联系开发人员");
}
}
@@ -70,7 +70,7 @@ public class BaseRedisDao {
redisTemplate.setEnableTransactionSupport(false);
return redisTemplate.opsForValue().get(key);
} else {
throw new RuntimeException("" + index + "号redis库中获取" + key + "的值时失败,失败原因:redisTemplate为null请联系开发人员");
throw new RuntimeException("后台错误:" + index + "号redis库中获取" + key + "的值时失败,失败原因:redisTemplate为null请联系开发人员");
}
}