Skip to content

Commit

Permalink
Resolve the controller warning
Browse files Browse the repository at this point in the history
  • Loading branch information
gdlcf88 committed Aug 4, 2023
1 parent 4b15d21 commit b615bbe
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>3.0.0-preview.3</Version>
<Version>3.0.0-preview.4</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>EasyAbp Team</Authors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ public class WeChatController : AbpControllerBase
/// <summary>
/// 微信应用事件通知接口,开发人员需要实现 <see cref="IWeChatOfficialAppEventHandler"/> 处理器来处理回调请求。
/// </summary>
[HttpGet]
[HttpPost]
[Route("notify")]
public virtual async Task<ActionResult> NotifyAsync([CanBeNull] string tenantId, [CanBeNull] string appId)
Expand Down Expand Up @@ -228,6 +227,16 @@ public virtual async Task<ActionResult> NotifyAsync([CanBeNull] string tenantId,
/// 见 <see cref="NotifyAsync"/>
/// </summary>
[HttpGet]
[Route("notify")]
public virtual Task<ActionResult> NotifyGetAsync([CanBeNull] string tenantId, [NotNull] string appId)
{
return NotifyAsync(tenantId, appId);
}

/// <summary>
/// 本方法是为了避免多 Route 导致 ABP ApiDescription 报 Warning。
/// 见 <see cref="NotifyAsync"/>
/// </summary>
[HttpPost]
[Route("notify/tenant-id/{tenantId}")]
public virtual Task<ActionResult> Notify2Async([CanBeNull] string tenantId, [NotNull] string appId)
Expand All @@ -240,6 +249,16 @@ public virtual Task<ActionResult> Notify2Async([CanBeNull] string tenantId, [Not
/// 见 <see cref="NotifyAsync"/>
/// </summary>
[HttpGet]
[Route("notify/tenant-id/{tenantId}")]
public virtual Task<ActionResult> Notify2GetAsync([CanBeNull] string tenantId, [NotNull] string appId)
{
return Notify2Async(tenantId, appId);
}

/// <summary>
/// 本方法是为了避免多 Route 导致 ABP ApiDescription 报 Warning。
/// 见 <see cref="NotifyAsync"/>
/// </summary>
[HttpPost]
[Route("notify/app-id/{appId}")]
public virtual Task<ActionResult> Notify3Async([CanBeNull] string tenantId, [NotNull] string appId)
Expand All @@ -252,13 +271,34 @@ public virtual Task<ActionResult> Notify3Async([CanBeNull] string tenantId, [Not
/// 见 <see cref="NotifyAsync"/>
/// </summary>
[HttpGet]
[Route("notify/app-id/{appId}")]
public virtual Task<ActionResult> Notify3GetAsync([CanBeNull] string tenantId, [NotNull] string appId)
{
return Notify3Async(tenantId, appId);
}

/// <summary>
/// 本方法是为了避免多 Route 导致 ABP ApiDescription 报 Warning。
/// 见 <see cref="NotifyAsync"/>
/// </summary>
[HttpPost]
[Route("notify/tenant-id/{tenantId}/app-id/{appId}")]
public virtual Task<ActionResult> Notify4Async([CanBeNull] string tenantId, [NotNull] string appId)
{
return NotifyAsync(tenantId, appId);
}

/// <summary>
/// 本方法是为了避免多 Route 导致 ABP ApiDescription 报 Warning。
/// 见 <see cref="NotifyAsync"/>
/// </summary>
[HttpGet]
[Route("notify/tenant-id/{tenantId}/app-id/{appId}")]
public virtual Task<ActionResult> Notify4GetAsync([CanBeNull] string tenantId, [NotNull] string appId)
{
return Notify4Async(tenantId, appId);
}

[ItemCanBeNull]
protected virtual async Task<WeChatOfficialEventRequestModel> CreateRequestModelAsync()
{
Expand Down

0 comments on commit b615bbe

Please sign in to comment.