Skip to content

Commit

Permalink
feat: 🉑 change api param
Browse files Browse the repository at this point in the history
  • Loading branch information
anjoy8 committed Apr 2, 2023
1 parent 18861bc commit 070e441
Show file tree
Hide file tree
Showing 22 changed files with 93 additions and 108 deletions.
50 changes: 25 additions & 25 deletions Blog.Core.Api/Blog.Core.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Blog.Core.Api/Controllers/BlogController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public async Task<MessageModel<PageModel<BlogArticle>>> Get(int id, int page = 1
[HttpGet("{id}")]
//[Authorize(Policy = "Scope_BlogModule_Policy")]
[Authorize]
public async Task<MessageModel<BlogViewModels>> Get(int id)
public async Task<MessageModel<BlogViewModels>> Get(long id)
{
return Success(await _blogArticleServices.GetBlogDetails(id));
}
Expand All @@ -96,15 +96,15 @@ public async Task<MessageModel<BlogViewModels>> Get(int id)
/// <returns></returns>
[HttpGet]
[Route("DetailNuxtNoPer")]
public async Task<MessageModel<BlogViewModels>> DetailNuxtNoPer(int id)
public async Task<MessageModel<BlogViewModels>> DetailNuxtNoPer(long id)
{
_logger.LogInformation("xxxxxxxxxxxxxxxxxxx");
return Success(await _blogArticleServices.GetBlogDetails(id));
}

[HttpGet]
[Route("GoUrl")]
public async Task<IActionResult> GoUrl(int id = 0)
public async Task<IActionResult> GoUrl(long id = 0)
{
var response = await _blogArticleServices.QueryById(id);
if (response != null && response.bsubmitter.IsNotEmptyOrNull())
Expand Down Expand Up @@ -136,7 +136,7 @@ public async Task<MessageModel<List<BlogArticle>>> GetBlogsByTypesForMVP(string

[HttpGet]
[Route("GetBlogByIdForMVP")]
public async Task<MessageModel<BlogArticle>> GetBlogByIdForMVP(int id = 0)
public async Task<MessageModel<BlogArticle>> GetBlogByIdForMVP(long id = 0)
{
if (id > 0)
{
Expand Down Expand Up @@ -247,7 +247,7 @@ public async Task<MessageModel<string>> Put([FromBody] BlogArticle BlogArticle)
[HttpDelete]
[Authorize(Permissions.Name)]
[Route("Delete")]
public async Task<MessageModel<string>> Delete(int id)
public async Task<MessageModel<string>> Delete(long id)
{
if (id > 0)
{
Expand Down
4 changes: 2 additions & 2 deletions Blog.Core.Api/Controllers/DepartmentController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public async Task<MessageModel<List<Department>>> GetTreeTable(long f = 0, strin
/// <param name="pid"></param>
/// <returns></returns>
[HttpGet]
public async Task<MessageModel<DepartmentTree>> GetDepartmentTree(int pid = 0)
public async Task<MessageModel<DepartmentTree>> GetDepartmentTree(long pid = 0)
{
var departments = await _departmentServices.Query(d => d.IsDeleted == false);
var departmentTrees = (from child in departments
Expand Down Expand Up @@ -168,7 +168,7 @@ public async Task<MessageModel<string>> Put([FromBody] Department request)
}

[HttpDelete]
public async Task<MessageModel<string>> Delete(int id)
public async Task<MessageModel<string>> Delete(long id)
{
var data = new MessageModel<string>();
var model = await _departmentServices.QueryById(id);
Expand Down
2 changes: 1 addition & 1 deletion Blog.Core.Api/Controllers/ModuleController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public async Task<MessageModel<string>> Put([FromBody] Modules module)
/// <returns></returns>
// DELETE: api/ApiWithActions/5
[HttpDelete]
public async Task<MessageModel<string>> Delete(int id)
public async Task<MessageModel<string>> Delete(long id)
{
if (id <= 0)
return Failed("缺少参数");
Expand Down
Loading

0 comments on commit 070e441

Please sign in to comment.