修改考试一级培训
This commit is contained in:
@@ -620,7 +620,7 @@ namespace BLL
|
||||
{
|
||||
BLL.RedisHelper redis = new BLL.RedisHelper();
|
||||
var getDataLists= redis.GetObjString<List<TestRecordItemItem>>(testRecordId); //先从redis取数据,不存在再从数据库取
|
||||
if (getDataLists.Count==0)
|
||||
if (getDataLists==null)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
|
||||
@@ -98,6 +98,7 @@ namespace BLL
|
||||
GetConnectRedisMultiplexer();
|
||||
//添加注册事件
|
||||
AddRegisterEvent();
|
||||
SelectDB(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2053,11 +2054,18 @@ namespace BLL
|
||||
private static T DeserializeJson<T>(string strjson)
|
||||
{
|
||||
T tmp = default(T);
|
||||
if (!string.IsNullOrEmpty(strjson))
|
||||
try
|
||||
{
|
||||
tmp = JsonConvert.DeserializeObject<T>(strjson);
|
||||
if (!string.IsNullOrEmpty(strjson))
|
||||
{
|
||||
tmp = JsonConvert.DeserializeObject<T>(strjson);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
throw;
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user