@@ -38,8 +38,8 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
[HttpGet]
|
||||
public async Task<Result> PageList([FromQuery] ArticleEntity entity, [FromQuery] PageParModel page)
|
||||
{
|
||||
var pageData= await _iArticleService.SelctPageList(entity, page);
|
||||
return Result.Success().SetData(new PageModel() { Data = _mapper.Map<List<ArticleVo>>(pageData.Data), Total = pageData.Total }) ;
|
||||
var pageData = await _iArticleService.SelctPageList(entity, page);
|
||||
return Result.Success().SetData(new PageModel() { Data = _mapper.Map<List<ArticleVo>>(pageData.Data), Total = pageData.Total });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -49,6 +49,8 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
/// <returns></returns>
|
||||
public override Task<Result> Add(ArticleEntity entity)
|
||||
{
|
||||
//如果标题为空,默认为内容的前20个字符
|
||||
entity.Title = entity.Title ?? entity.Content.Substring(0, 20);
|
||||
entity.UserId = HttpContext.GetUserIdInfo();
|
||||
return base.Add(entity);
|
||||
}
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="vue3-ruoyi\view.vue">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>view.tt</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="vue3-ruoyi\view.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>view.tt</DependentUpon>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="vue3-ruoyi\view.tt">
|
||||
<LastGenOutput>view.vue</LastGenOutput>
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
</None>
|
||||
<None Update="vue3-ruoyi\api.tt">
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>api.js</LastGenOutput>
|
||||
</None>
|
||||
<None Update="vue3-ruoyi\api.js">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>api.tt</DependentUpon>
|
||||
</None>
|
||||
<None Update="vue3-ruoyi\view.vue">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>view.tt</DependentUpon>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -6,6 +6,14 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="vue3-ruoyi\view.vue">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>view.tt</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="vue3-ruoyi\view.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
|
||||
Reference in New Issue
Block a user