Commit 59584c15 by xiongyuwen

no message

parent 20339753
...@@ -179,7 +179,7 @@ namespace Bailun.Discuz.Application.WeiPan ...@@ -179,7 +179,7 @@ namespace Bailun.Discuz.Application.WeiPan
{ {
u.create_user_name = user.wxUserId; u.create_user_name = user.wxUserId;
} }
u.ctime = ConvertToDateTime(u.ctime).ToString(); u.ctime = ConvertToDateTime(u.ctime);
}); });
} }
if(isGetRedis) if(isGetRedis)
...@@ -190,7 +190,7 @@ namespace Bailun.Discuz.Application.WeiPan ...@@ -190,7 +190,7 @@ namespace Bailun.Discuz.Application.WeiPan
/// <summary> /// <summary>
/// Unix时间戳转换为DateTime /// Unix时间戳转换为DateTime
/// </summary> /// </summary>
private DateTime ConvertToDateTime(string timestamp) private string ConvertToDateTime(string timestamp)
{ {
System.DateTime time = System.DateTime.MinValue; System.DateTime time = System.DateTime.MinValue;
//精确到毫秒 //精确到毫秒
...@@ -202,9 +202,9 @@ namespace Bailun.Discuz.Application.WeiPan ...@@ -202,9 +202,9 @@ namespace Bailun.Discuz.Application.WeiPan
} }
catch (Exception ex) catch (Exception ex)
{ {
return start;//转换失败 return "";//转换失败
} }
return time; return string.Format("{0:G}", time); ;
} }
///// <summary> ///// <summary>
...@@ -466,7 +466,7 @@ namespace Bailun.Discuz.Application.WeiPan ...@@ -466,7 +466,7 @@ namespace Bailun.Discuz.Application.WeiPan
/// <returns></returns> /// <returns></returns>
public async Task<AttachmentsDto> GetAttchmattachmentByFileId(string fileId) public async Task<AttachmentsDto> GetAttchmattachmentByFileId(string fileId)
{ {
var attchment=await _attachmentsRepository.Query().AsNoTracking().Where(u => u.Uuid == fileId).FirstOrDefaultAsync(); var attchment=await _attachmentsRepository.Query().AsNoTracking().Where(u => u.Uuid == fileId).OrderByDescending(u=>u.Id).FirstOrDefaultAsync();
AttachmentsDto attachmentsDto = new AttachmentsDto(); AttachmentsDto attachmentsDto = new AttachmentsDto();
attachmentsDto.attachment = attchment.Attachment; attachmentsDto.attachment = attchment.Attachment;
attachmentsDto.extension = Path.GetExtension(attchment.Attachment); attachmentsDto.extension = Path.GetExtension(attchment.Attachment);
......
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