Skip to content

Commit

Permalink
维护接口添加
Browse files Browse the repository at this point in the history
  • Loading branch information
dongfo committed May 29, 2019
1 parent 874c0a9 commit 3665a32
Show file tree
Hide file tree
Showing 53 changed files with 1,847 additions and 354 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using PaySharp.DataStore.Application;
using PaySharp.DataStore.Domain;

namespace PaySharp.PayCenter.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class AlipayManagerController : Controller//ControllerBase
{
private readonly IAlipayManageAppService _alipayAppService;
public AlipayManagerController(IAlipayManageAppService alipayAppService)
{
_alipayAppService = alipayAppService;
}

/// <summary>
/// 查询支付宝账户列表
/// </summary>
/// <returns></returns>
[HttpGet("list")]
public async Task<IEnumerable<AlipayAccountDto>> GetAccounts()
{
return await _alipayAppService.GetListAsync();
}

/// <summary>
/// 新增支付宝账户
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
public async Task<int> AddAccount(AddAlipayAccountDto input)
{
return await _alipayAppService.AddAccountAsync(input);
}

/// <summary>
/// 修改支付宝账户信息
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPut]
public async Task<int> Modify(ModifyAliPayAccountDto input)
{
return await _alipayAppService.ModifyAsync(input);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace PaySharp.PayCenter.Controllers
namespace PaySharp.PayCenter.Controllers.Pay
{
[Route("api/[controller]")]
[ApiController]
public class AlipayController : ControllerBase
public class WechatPayController : ControllerBase
{
}
public WechatPayController()
{

}

//public

}
}
15 changes: 0 additions & 15 deletions PayCenter/PaySharp.PayCenter/Controllers/QpayController.cs

This file was deleted.

53 changes: 53 additions & 0 deletions PayCenter/PaySharp.PayCenter/Controllers/QpayManagerController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using PaySharp.DataStore.Application;

namespace PaySharp.PayCenter.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class QpayManagerController : ControllerBase
{
private readonly IQPayAppService _qPayAppService;
public QpayManagerController(IQPayAppService qPayAppService)
{
_qPayAppService = qPayAppService;
}

/// <summary>
/// 查询QQ钱包账户
/// </summary>
/// <returns></returns>
[HttpGet("list")]
public async Task<IEnumerable<QPayAccountDto>> GetList()
{
return await _qPayAppService.GetListAsync();
}

/// <summary>
/// 新增QQ钱包账户
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
public async Task<int> Add(AddQpayAccountDto input)
{
return await _qPayAppService.AddQPayAccountAsync(input);
}

/// <summary>
/// 修改QQ钱包账户信息
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPut]
public async Task<int> Modify(ModifyQPayAccountDto input)
{
return await _qPayAppService.ModifyQPayAccountAsync(input);
}
}
}
15 changes: 0 additions & 15 deletions PayCenter/PaySharp.PayCenter/Controllers/UnionpayController.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using PaySharp.DataStore.Application;

namespace PaySharp.PayCenter.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class UnionpayManagerController : ControllerBase
{
private readonly IUnionPayAppService _unionPayAppService;
public UnionpayManagerController(IUnionPayAppService unionPayAppService)
{
_unionPayAppService = unionPayAppService;
}

/// <summary>
/// 查询银联支付账户
/// </summary>
/// <returns></returns>
[HttpGet("list")]
public async Task<IEnumerable<UnionPayAccountDto>> GetList()
{
return await _unionPayAppService.GetListAsync();
}

/// <summary>
/// 新增银联支付账户
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
public async Task<int> Add(AddUnionPayAccountDto input)
{
return await _unionPayAppService.AddQPayAccountAsync(input);
}

/// <summary>
/// 修改银联支付账户信息
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPut]
public async Task<int> Modify(ModifyUnionPayAccountDto input)
{
return await _unionPayAppService.ModifyQPayAccountAsync(input);
}
}
}
15 changes: 0 additions & 15 deletions PayCenter/PaySharp.PayCenter/Controllers/WechatpayController.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using PaySharp.DataStore.Application;

namespace PaySharp.PayCenter.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class WechatpayManagerController : ControllerBase
{
private readonly IWechatPayManageAppService _wechatPayAppService;
public WechatpayManagerController(IWechatPayManageAppService wechatPayAppService)
{
_wechatPayAppService = wechatPayAppService;
}

/// <summary>
/// 查询微信支付账户列表
/// </summary>
/// <returns></returns>
[HttpGet("list")]
public async Task<IEnumerable<WechatPayAccountDto>> GetList()
{
return await _wechatPayAppService.GetListAsync();
}

/// <summary>
/// 新增微信支付账户
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
public async Task<int> Add(AddWechatPayAccountDto input)
{
return await _wechatPayAppService.AddAccountAsync(input);
}

/// <summary>
/// 修改威胁你支付账户信息
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPut]
public async Task<int> Modify(ModifyWechatPayAccountDto input)
{
return await _wechatPayAppService.ModifyAccountAsync(input);
}
}
}
21 changes: 20 additions & 1 deletion PayCenter/PaySharp.PayCenter/PaySharp.PayCenter.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
Expand All @@ -9,10 +9,29 @@


<ItemGroup>
<PackageReference Include="Hangfire" Version="1.7.1" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.UnitOfWork" Version="2.1.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.4.10" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
</ItemGroup>


<ItemGroup>
<ProjectReference Include="..\..\src\PaySharp.Core\PaySharp.Core.csproj" />
<ProjectReference Include="..\..\src\PaySharp.DataStore\PaySharp.DataStore.csproj" />
</ItemGroup>

<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile />
</PropertyGroup>

</Project>
Loading

0 comments on commit 3665a32

Please sign in to comment.