fix func字段处理
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
using Dlhis.Entity.Device.Enums;
|
using Dlhis.Entity.Device.Enums;
|
||||||
|
using Kurisu.AspNetCore.Utils.Extensions;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Dlhis.Basic.Device.Response;
|
namespace Dlhis.Basic.Device.Response;
|
||||||
|
|
||||||
@@ -32,9 +34,20 @@ public class DeviceResponse
|
|||||||
public string Supplier { get; set; }
|
public string Supplier { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设备功能
|
/// 设备功能 DeviceFuncEnumType
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<DeviceFuncEnumType> Funcs { get; set; }
|
public List<DeviceFuncEnumType> Funcs
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (FuncsStr.IsEmpty()) FuncsStr = "[]";
|
||||||
|
|
||||||
|
return FuncsStr.ToObject<List<DeviceFuncEnumType>>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public string FuncsStr { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 部署点
|
/// 部署点
|
||||||
|
|||||||
@@ -24,7 +24,11 @@ public class DeviceService : IDeviceService
|
|||||||
public async Task<Pagination<DeviceResponse>> GetPageAsync(DevicePageRequest request)
|
public async Task<Pagination<DeviceResponse>> GetPageAsync(DevicePageRequest request)
|
||||||
{
|
{
|
||||||
var page = await _dbContext.Queryable<DeviceEntity>()
|
var page = await _dbContext.Queryable<DeviceEntity>()
|
||||||
.Select<DeviceResponse>()
|
.Select(device => new DeviceResponse
|
||||||
|
{
|
||||||
|
FuncsStr = device.Funcs.ToString()
|
||||||
|
|
||||||
|
}, true)
|
||||||
.ToPageListAsync(request);
|
.ToPageListAsync(request);
|
||||||
|
|
||||||
return page;
|
return page;
|
||||||
|
|||||||
22
Src/Dlhis.User/Dockerfile
Normal file
22
Src/Dlhis.User/Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||||
|
|
||||||
|
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
|
||||||
|
WORKDIR /app
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||||
|
WORKDIR /src
|
||||||
|
COPY ["Src/Dlhis.User/Dlhis.User.csproj", "Src/Dlhis.User/"]
|
||||||
|
COPY ["Src/Dlhis.Entity/Dlhis.Entity.csproj", "Src/Dlhis.Entity/"]
|
||||||
|
RUN dotnet restore "Src/Dlhis.User/Dlhis.User.csproj"
|
||||||
|
COPY . .
|
||||||
|
WORKDIR "/src/Src/Dlhis.User"
|
||||||
|
RUN dotnet build "Dlhis.User.csproj" -c Release -o /app/build
|
||||||
|
|
||||||
|
FROM build AS publish
|
||||||
|
RUN dotnet publish "Dlhis.User.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||||
|
|
||||||
|
FROM base AS final
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=publish /app/publish .
|
||||||
|
ENTRYPOINT ["dotnet", "Dlhis.User.dll"]
|
||||||
Reference in New Issue
Block a user