Skip to content

Commit 3665a32

Browse files
author
dongfo
committed
维护接口添加
1 parent 874c0a9 commit 3665a32

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1847
-354
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Http;
6+
using Microsoft.AspNetCore.Mvc;
7+
using Microsoft.EntityFrameworkCore;
8+
using PaySharp.DataStore.Application;
9+
using PaySharp.DataStore.Domain;
10+
11+
namespace PaySharp.PayCenter.Controllers
12+
{
13+
[Route("api/[controller]")]
14+
[ApiController]
15+
public class AlipayManagerController : Controller//ControllerBase
16+
{
17+
private readonly IAlipayManageAppService _alipayAppService;
18+
public AlipayManagerController(IAlipayManageAppService alipayAppService)
19+
{
20+
_alipayAppService = alipayAppService;
21+
}
22+
23+
/// <summary>
24+
/// 查询支付宝账户列表
25+
/// </summary>
26+
/// <returns></returns>
27+
[HttpGet("list")]
28+
public async Task<IEnumerable<AlipayAccountDto>> GetAccounts()
29+
{
30+
return await _alipayAppService.GetListAsync();
31+
}
32+
33+
/// <summary>
34+
/// 新增支付宝账户
35+
/// </summary>
36+
/// <param name="input"></param>
37+
/// <returns></returns>
38+
[HttpPost]
39+
public async Task<int> AddAccount(AddAlipayAccountDto input)
40+
{
41+
return await _alipayAppService.AddAccountAsync(input);
42+
}
43+
44+
/// <summary>
45+
/// 修改支付宝账户信息
46+
/// </summary>
47+
/// <param name="input"></param>
48+
/// <returns></returns>
49+
[HttpPut]
50+
public async Task<int> Modify(ModifyAliPayAccountDto input)
51+
{
52+
return await _alipayAppService.ModifyAsync(input);
53+
}
54+
}
55+
}

PayCenter/PaySharp.PayCenter/Controllers/AlipayController.cs renamed to PayCenter/PaySharp.PayCenter/Controllers/Pay/WechatPayController.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,18 @@
55
using Microsoft.AspNetCore.Http;
66
using Microsoft.AspNetCore.Mvc;
77

8-
namespace PaySharp.PayCenter.Controllers
8+
namespace PaySharp.PayCenter.Controllers.Pay
99
{
1010
[Route("api/[controller]")]
1111
[ApiController]
12-
public class AlipayController : ControllerBase
12+
public class WechatPayController : ControllerBase
1313
{
14-
}
14+
public WechatPayController()
15+
{
16+
17+
}
18+
19+
//public
20+
21+
}
1522
}

PayCenter/PaySharp.PayCenter/Controllers/QpayController.cs

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Http;
6+
using Microsoft.AspNetCore.Mvc;
7+
using PaySharp.DataStore.Application;
8+
9+
namespace PaySharp.PayCenter.Controllers
10+
{
11+
[Route("api/[controller]")]
12+
[ApiController]
13+
public class QpayManagerController : ControllerBase
14+
{
15+
private readonly IQPayAppService _qPayAppService;
16+
public QpayManagerController(IQPayAppService qPayAppService)
17+
{
18+
_qPayAppService = qPayAppService;
19+
}
20+
21+
/// <summary>
22+
/// 查询QQ钱包账户
23+
/// </summary>
24+
/// <returns></returns>
25+
[HttpGet("list")]
26+
public async Task<IEnumerable<QPayAccountDto>> GetList()
27+
{
28+
return await _qPayAppService.GetListAsync();
29+
}
30+
31+
/// <summary>
32+
/// 新增QQ钱包账户
33+
/// </summary>
34+
/// <param name="input"></param>
35+
/// <returns></returns>
36+
[HttpPost]
37+
public async Task<int> Add(AddQpayAccountDto input)
38+
{
39+
return await _qPayAppService.AddQPayAccountAsync(input);
40+
}
41+
42+
/// <summary>
43+
/// 修改QQ钱包账户信息
44+
/// </summary>
45+
/// <param name="input"></param>
46+
/// <returns></returns>
47+
[HttpPut]
48+
public async Task<int> Modify(ModifyQPayAccountDto input)
49+
{
50+
return await _qPayAppService.ModifyQPayAccountAsync(input);
51+
}
52+
}
53+
}

PayCenter/PaySharp.PayCenter/Controllers/UnionpayController.cs

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Http;
6+
using Microsoft.AspNetCore.Mvc;
7+
using PaySharp.DataStore.Application;
8+
9+
namespace PaySharp.PayCenter.Controllers
10+
{
11+
[Route("api/[controller]")]
12+
[ApiController]
13+
public class UnionpayManagerController : ControllerBase
14+
{
15+
private readonly IUnionPayAppService _unionPayAppService;
16+
public UnionpayManagerController(IUnionPayAppService unionPayAppService)
17+
{
18+
_unionPayAppService = unionPayAppService;
19+
}
20+
21+
/// <summary>
22+
/// 查询银联支付账户
23+
/// </summary>
24+
/// <returns></returns>
25+
[HttpGet("list")]
26+
public async Task<IEnumerable<UnionPayAccountDto>> GetList()
27+
{
28+
return await _unionPayAppService.GetListAsync();
29+
}
30+
31+
/// <summary>
32+
/// 新增银联支付账户
33+
/// </summary>
34+
/// <param name="input"></param>
35+
/// <returns></returns>
36+
[HttpPost]
37+
public async Task<int> Add(AddUnionPayAccountDto input)
38+
{
39+
return await _unionPayAppService.AddQPayAccountAsync(input);
40+
}
41+
42+
/// <summary>
43+
/// 修改银联支付账户信息
44+
/// </summary>
45+
/// <param name="input"></param>
46+
/// <returns></returns>
47+
[HttpPut]
48+
public async Task<int> Modify(ModifyUnionPayAccountDto input)
49+
{
50+
return await _unionPayAppService.ModifyQPayAccountAsync(input);
51+
}
52+
}
53+
}

PayCenter/PaySharp.PayCenter/Controllers/WechatpayController.cs

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Http;
6+
using Microsoft.AspNetCore.Mvc;
7+
using PaySharp.DataStore.Application;
8+
9+
namespace PaySharp.PayCenter.Controllers
10+
{
11+
[Route("api/[controller]")]
12+
[ApiController]
13+
public class WechatpayManagerController : ControllerBase
14+
{
15+
private readonly IWechatPayManageAppService _wechatPayAppService;
16+
public WechatpayManagerController(IWechatPayManageAppService wechatPayAppService)
17+
{
18+
_wechatPayAppService = wechatPayAppService;
19+
}
20+
21+
/// <summary>
22+
/// 查询微信支付账户列表
23+
/// </summary>
24+
/// <returns></returns>
25+
[HttpGet("list")]
26+
public async Task<IEnumerable<WechatPayAccountDto>> GetList()
27+
{
28+
return await _wechatPayAppService.GetListAsync();
29+
}
30+
31+
/// <summary>
32+
/// 新增微信支付账户
33+
/// </summary>
34+
/// <param name="input"></param>
35+
/// <returns></returns>
36+
[HttpPost]
37+
public async Task<int> Add(AddWechatPayAccountDto input)
38+
{
39+
return await _wechatPayAppService.AddAccountAsync(input);
40+
}
41+
42+
/// <summary>
43+
/// 修改威胁你支付账户信息
44+
/// </summary>
45+
/// <param name="input"></param>
46+
/// <returns></returns>
47+
[HttpPut]
48+
public async Task<int> Modify(ModifyWechatPayAccountDto input)
49+
{
50+
return await _wechatPayAppService.ModifyAccountAsync(input);
51+
}
52+
}
53+
}

PayCenter/PaySharp.PayCenter/PaySharp.PayCenter.csproj

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Web">
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp2.2</TargetFramework>
@@ -9,10 +9,29 @@
99

1010

1111
<ItemGroup>
12+
<PackageReference Include="Hangfire" Version="1.7.1" />
1213
<PackageReference Include="Microsoft.AspNetCore.App" />
1314
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
15+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.4" />
16+
<PackageReference Include="Microsoft.EntityFrameworkCore.UnitOfWork" Version="2.1.0" />
1417
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.4.10" />
1518
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" />
19+
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
1620
</ItemGroup>
1721

22+
23+
<ItemGroup>
24+
<ProjectReference Include="..\..\src\PaySharp.Core\PaySharp.Core.csproj" />
25+
<ProjectReference Include="..\..\src\PaySharp.DataStore\PaySharp.DataStore.csproj" />
26+
</ItemGroup>
27+
28+
<PropertyGroup>
29+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
30+
<NoWarn>$(NoWarn);1591</NoWarn>
31+
</PropertyGroup>
32+
33+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
34+
<DocumentationFile />
35+
</PropertyGroup>
36+
1837
</Project>

0 commit comments

Comments
 (0)