Commit e82a452a by xiongyuwen

no message

parent 12fd1aa6
......@@ -224,12 +224,13 @@ namespace Bailun.Discuz.Application.WeiPan
var apiOutput = HttpHelper.PostAsync<GetFileListRequest, GetFileListResponse>(apiUrl, getFileListRequest);
return apiOutput;
}
List<WeipanUserFiles> weipanUserFileList = null;
/// <summary>
/// 递归获取所有首页下的所有文件列表数据
/// </summary>
public async Task<List<FileListTreeDto>> GetFileListTree(string userId, string fildId)
{
weipanUserFileList = new List<WeipanUserFiles>();
List<FileListTreeDto> fileListTreeDtos = new List<FileListTreeDto>();
//判断缓存中是否有值,如果有值直接读取
var redisKey = Constants.File_List_Tree;
......@@ -269,6 +270,7 @@ namespace Bailun.Discuz.Application.WeiPan
weipanUserFiles.UserId = userId;
weipanUserFiles.FatherFileId = fildId;
weipanUserFiles.File_Id = u.fileid;
weipanUserFileList.Add(weipanUserFiles);
await _weipanUserFilesRepository.AddAsync(weipanUserFiles, true);
}
}
......@@ -302,6 +304,7 @@ namespace Bailun.Discuz.Application.WeiPan
{
throw new Exception(apiOutput.errmsg);
}
_weipanUserFilesRepository.BulkInsert(weipanUserFileList.ToArray());
RedisHelper.HSet(redisKey, userId + "_" + fildId, fileListTreeDtos);
}
return fileListTreeDtos;
......@@ -324,6 +327,7 @@ namespace Bailun.Discuz.Application.WeiPan
/// <param name="token"></param>
/// <param name="start"></param>
/// <returns></returns>
public async Task<List<FileListTreeDto>> GetChildrens(string userId, string fatherid, string token, int start,string parentId)
{
......@@ -371,7 +375,7 @@ namespace Bailun.Discuz.Application.WeiPan
weipanUserFiles.UserId = userId;
weipanUserFiles.FatherFileId = parentId;
weipanUserFiles.File_Id = i.fileid;
await _weipanUserFilesRepository.AddAsync(weipanUserFiles, true);
weipanUserFileList.Add(weipanUserFiles);
}
}
}
......@@ -530,6 +534,7 @@ namespace Bailun.Discuz.Application.WeiPan
public async Task<string> ProcessWeiPanWorker()
{
await CreateUserFilesTreeRedis();
StringBuilder messageSb = new StringBuilder(); ;
string userId = "chenzekai";
List<WeiPanFileList> inserWeiPanFileList = new List<WeiPanFileList>();
......
......@@ -9,7 +9,7 @@
"Defaultdatabase": 1
},
"PublishWeiPanWorkerRunTime": {
"minute": "360"
"minute": "60"
},
"QYWeChat": {
"AppId": "ww833808f6b8dc0745",
......
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