diff --git a/ZR.Admin.WebApi/Controllers/System/SysNoticeController.cs b/ZR.Admin.WebApi/Controllers/System/SysNoticeController.cs index 5e7961b..d79bd5a 100644 --- a/ZR.Admin.WebApi/Controllers/System/SysNoticeController.cs +++ b/ZR.Admin.WebApi/Controllers/System/SysNoticeController.cs @@ -2,6 +2,7 @@ using System.Net.Sockets; using Microsoft.AspNetCore.SignalR; using Microsoft.AspNetCore.SignalR.Client; +using NLog; using SqlSugar; using ZR.Admin.WebApi.Filters; using ZR.Model; @@ -28,6 +29,7 @@ namespace ZR.Admin.WebApi.Controllers.System private readonly IHubContext _hubContext; private readonly ISysNoticeLogService _sysNoticeLogService; private readonly IWebHostEnvironment _webHostEnvironment; + private readonly Logger Logger = LogManager.GetCurrentClassLogger(); public SysNoticeController(ISysNoticeService sysNoticeService, IHubContext hubContext, ISysNoticeLogService sysNoticeLogService, IWebHostEnvironment webHostEnvironment) { _sysNoticeService = sysNoticeService; diff --git a/ZR.Admin.WebApi/Dockerfile b/ZR.Admin.WebApi/Dockerfile index edc8210..f48ba20 100644 --- a/ZR.Admin.WebApi/Dockerfile +++ b/ZR.Admin.WebApi/Dockerfile @@ -2,6 +2,8 @@ WORKDIR /app EXPOSE 8888 #EXPOSE 443 +VOLUME /app/adminlogs +VOLUME /app/wwwroot FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build WORKDIR /src @@ -27,4 +29,6 @@ FROM base AS final WORKDIR /app COPY --from=publish /app/publish . ENTRYPOINT ["dotnet", "ZR.Admin.WebApi.dll"] +ENV TZ=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN apt-get update && apt-get install -y libfontconfig1 \ No newline at end of file diff --git a/ZR.Admin.WebApi/appsettings.json b/ZR.Admin.WebApi/appsettings.json index 04f0c9e..f821864 100644 --- a/ZR.Admin.WebApi/appsettings.json +++ b/ZR.Admin.WebApi/appsettings.json @@ -8,7 +8,7 @@ }, "dbConfigs": [ { - "Conn": "server=8.140.174.251;user=admin;pwd=admin123;database=ZrAdmin", + "Conn": "server=8.140.174.251;user=admin;pwd=admin123;database=ZrAdmin;port=33060", "DbType": 0, //数据库类型 MySql = 0, SqlServer = 1, Oracle = 3,PgSql = 4 "ConfigId": "0", //多租户唯一标识 "IsAutoCloseConnection": true diff --git a/ZR.ServiceCore/Model/SysNoticeLog.cs b/ZR.ServiceCore/Model/SysNoticeLog.cs index fc2a0e6..e8a8a4c 100644 --- a/ZR.ServiceCore/Model/SysNoticeLog.cs +++ b/ZR.ServiceCore/Model/SysNoticeLog.cs @@ -3,6 +3,10 @@ [SugarTable("sys_notice_log")] public class SysNoticeLog { + [SugarColumn(IsPrimaryKey = true)] + [JsonConverter(typeof(ValueToStringConverter))] + public long Id { get; set; } + [JsonConverter(typeof(ValueToStringConverter))] public long NoticeId { get; set; }