Browse Source

Upgrade PaymentService module to version 1.0.0

pull/96/head
gdlcf88 6 years ago
parent
commit
1bed29a04f
  1. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp.EShop.Orders.Domain.csproj
  2. 9
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderPaymentCompletedEventHandler.cs
  3. 9
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderPaymentCreatedEventHandler.cs
  4. 6
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/BasicPayableCheckProvider.cs
  5. 12
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/MultiCurrencyNotSupportedException.cs
  6. 3
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/PaymentAppService.cs
  7. 2
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp.EShop.Payments.Domain.csproj
  8. 2
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Payments/PaymentItem.cs
  9. 4
      samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSample.Application.Contracts.csproj
  10. 4
      samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj
  11. 4
      samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSample.Domain.Shared.csproj
  12. 4
      samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj
  13. 3865
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200824110408_UpgradedPaymentServiceTo1_0_0.Designer.cs
  14. 423
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200824110408_UpgradedPaymentServiceTo1_0_0.cs
  15. 47
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/EShopSampleMigrationsDbContextModelSnapshot.cs
  16. 4
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EShopSample.EntityFrameworkCore.csproj
  17. 4
      samples/EShopSample/aspnet-core/src/EShopSample.HttpApi.Client/EShopSample.HttpApi.Client.csproj
  18. 4
      samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/EShopSample.HttpApi.csproj
  19. 4
      samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj

2
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp.EShop.Orders.Domain.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EasyAbp.PaymentService.Domain.Shared" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.Domain.Shared" Version="1.0.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="3.0.4" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Payments\src\EasyAbp.EShop.Payments.Domain.Shared\EasyAbp.EShop.Payments.Domain.Shared.csproj" />

9
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderPaymentCompletedEventHandler.cs

@ -1,4 +1,5 @@
using System.Linq;
using System;
using System.Linq;
using System.Threading.Tasks;
using EasyAbp.EShop.Payments;
using EasyAbp.PaymentService.Payments;
@ -55,7 +56,9 @@ namespace EasyAbp.EShop.Orders.Orders
foreach (var item in payment.PaymentItems.Where(item => item.ItemType == PaymentsConsts.PaymentItemType))
{
var order = await _orderRepository.GetAsync(item.ItemKey);
var orderId = Guid.Parse(item.ItemKey);
var order = await _orderRepository.GetAsync(orderId);
if (order.PaymentId != payment.Id || order.PaidTime.HasValue ||
order.OrderStatus != OrderStatus.Pending)
@ -65,7 +68,7 @@ namespace EasyAbp.EShop.Orders.Orders
if (!await _orderPaymentChecker.IsValidPaymentAsync(order, payment, item))
{
throw new OrderPaymentInvalidException(payment.Id, item.ItemKey);
throw new OrderPaymentInvalidException(payment.Id, orderId);
}
order.SetPaidTime(_clock.Now);

9
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderPaymentCreatedEventHandler.cs

@ -1,4 +1,5 @@
using System.Linq;
using System;
using System.Linq;
using System.Threading.Tasks;
using EasyAbp.EShop.Payments;
using EasyAbp.PaymentService.Payments;
@ -32,7 +33,9 @@ namespace EasyAbp.EShop.Orders.Orders
foreach (var item in eventData.Entity.PaymentItems.Where(item => item.ItemType == PaymentsConsts.PaymentItemType))
{
var order = await _orderRepository.GetAsync(item.ItemKey);
var orderId = Guid.Parse(item.ItemKey);
var order = await _orderRepository.GetAsync(orderId);
if (order.PaymentId.HasValue || order.OrderStatus != OrderStatus.Pending)
{
@ -43,7 +46,7 @@ namespace EasyAbp.EShop.Orders.Orders
if (!await _orderPaymentChecker.IsValidPaymentAsync(order, eventData.Entity, item))
{
// Todo: should cancel the payment?
throw new OrderPaymentInvalidException(eventData.Entity.Id, item.ItemKey);
throw new OrderPaymentInvalidException(eventData.Entity.Id, orderId);
}
order.SetPaymentId(eventData.Entity.Id);

6
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/BasicPayableCheckProvider.cs

@ -19,14 +19,10 @@ namespace EasyAbp.EShop.Payments.Payments
if (orders.Select(order => order.Currency).Distinct().Count() != 1)
{
// Todo: convert to a single currency.
throw new MultiCurrencyNotSupportedException();
}
// if (orders.Select(order => order.StoreId).Distinct().Count() != 1)
// {
// throw new MultiStorePaymentNotSupportedException();
// }
return Task.CompletedTask;
}
}

12
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/MultiCurrencyNotSupportedException.cs

@ -0,0 +1,12 @@
using Volo.Abp;
namespace EasyAbp.EShop.Payments.Payments
{
public class MultiCurrencyNotSupportedException : BusinessException
{
public MultiCurrencyNotSupportedException() : base(message: $"The currency of all orders should be the same.")
{
}
}
}

3
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/PaymentAppService.cs

@ -97,8 +97,7 @@ namespace EasyAbp.EShop.Payments.Payments
PaymentItems = orders.Select(order => new CreatePaymentItemEto
{
ItemType = PaymentsConsts.PaymentItemType,
ItemKey = order.Id,
Currency = order.Currency,
ItemKey = order.Id.ToString(),
OriginalPaymentAmount = order.TotalPrice,
ExtraProperties = new Dictionary<string, object> {{"StoreId", orders.First().StoreId.ToString()}}
}).ToList()

2
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp.EShop.Payments.Domain.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EasyAbp.PaymentService.Domain.Shared" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.Domain.Shared" Version="1.0.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="3.0.4" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Stores\src\EasyAbp.EShop.Stores.Domain.Shared\EasyAbp.EShop.Stores.Domain.Shared.csproj" />

2
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Payments/PaymentItem.cs

@ -15,7 +15,7 @@ namespace EasyAbp.EShop.Payments.Payments
[NotNull]
public virtual string ItemType { get; protected set; }
public virtual Guid ItemKey { get; protected set; }
public virtual string ItemKey { get; protected set; }
[NotNull]
public virtual string Currency { get; protected set; }

4
samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSample.Application.Contracts.csproj

@ -14,8 +14,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="EasyAbp.PaymentService.Application.Contracts" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.Application.Contracts" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.Application.Contracts" Version="1.0.0" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.Application.Contracts" Version="1.0.0" />
<PackageReference Include="Volo.Abp.ObjectExtending" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Account.Application.Contracts" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Identity.Application.Contracts" Version="3.0.4" />

4
samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj

@ -15,8 +15,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="EasyAbp.PaymentService.Application" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.Application" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.Application" Version="1.0.0" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.Application" Version="1.0.0" />
<PackageReference Include="Volo.Abp.Account.Application" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Identity.Application" Version="3.0.4" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="3.0.4" />

4
samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSample.Domain.Shared.csproj

@ -9,8 +9,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EasyAbp.PaymentService.Domain.Shared" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.Domain.Shared" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.Domain.Shared" Version="1.0.0" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.Domain.Shared" Version="1.0.0" />
<PackageReference Include="Volo.Abp.Identity.Domain.Shared" Version="3.0.4" />
<PackageReference Include="Volo.Abp.IdentityServer.Domain.Shared" Version="3.0.4" />
<PackageReference Include="Volo.Abp.BackgroundJobs.Domain.Shared" Version="3.0.4" />

4
samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj

@ -14,8 +14,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="EasyAbp.PaymentService.Domain" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.Domain" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.Domain" Version="1.0.0" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.Domain" Version="1.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.DataAnnotations" Version="2.2.0" />
<PackageReference Include="Volo.Abp.Identity.Domain" Version="3.0.4" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Identity" Version="3.0.4" />

3865
samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200824110408_UpgradedPaymentServiceTo1_0_0.Designer.cs

File diff suppressed because it is too large

423
samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200824110408_UpgradedPaymentServiceTo1_0_0.cs

@ -0,0 +1,423 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace EShopSample.Migrations
{
public partial class UpgradedPaymentServiceTo1_0_0 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_PaymentServicePaymentItems_PaymentServicePayments_PaymentId",
table: "PaymentServicePaymentItems");
migrationBuilder.DropPrimaryKey(
name: "PK_PaymentServiceWeChatPayRefundRecords",
table: "PaymentServiceWeChatPayRefundRecords");
migrationBuilder.DropPrimaryKey(
name: "PK_PaymentServiceWeChatPayPaymentRecords",
table: "PaymentServiceWeChatPayPaymentRecords");
migrationBuilder.DropPrimaryKey(
name: "PK_PaymentServiceRefunds",
table: "PaymentServiceRefunds");
migrationBuilder.DropPrimaryKey(
name: "PK_PaymentServicePayments",
table: "PaymentServicePayments");
migrationBuilder.DropPrimaryKey(
name: "PK_PaymentServicePaymentItems",
table: "PaymentServicePaymentItems");
migrationBuilder.DropColumn(
name: "Currency",
table: "PaymentServicePaymentItems");
migrationBuilder.RenameTable(
name: "PaymentServiceWeChatPayRefundRecords",
newName: "EasyAbpPaymentServiceWeChatPayRefundRecords");
migrationBuilder.RenameTable(
name: "PaymentServiceWeChatPayPaymentRecords",
newName: "EasyAbpPaymentServiceWeChatPayPaymentRecords");
migrationBuilder.RenameTable(
name: "PaymentServiceRefunds",
newName: "EasyAbpPaymentServiceRefunds");
migrationBuilder.RenameTable(
name: "PaymentServicePayments",
newName: "EasyAbpPaymentServicePayments");
migrationBuilder.RenameTable(
name: "PaymentServicePaymentItems",
newName: "EasyAbpPaymentServicePaymentItems");
migrationBuilder.RenameIndex(
name: "IX_PaymentServiceWeChatPayRefundRecords_PaymentId",
table: "EasyAbpPaymentServiceWeChatPayRefundRecords",
newName: "IX_EasyAbpPaymentServiceWeChatPayRefundRecords_PaymentId");
migrationBuilder.RenameIndex(
name: "IX_PaymentServiceWeChatPayPaymentRecords_PaymentId",
table: "EasyAbpPaymentServiceWeChatPayPaymentRecords",
newName: "IX_EasyAbpPaymentServiceWeChatPayPaymentRecords_PaymentId");
migrationBuilder.RenameIndex(
name: "IX_PaymentServicePaymentItems_PaymentId",
table: "EasyAbpPaymentServicePaymentItems",
newName: "IX_EasyAbpPaymentServicePaymentItems_PaymentId");
migrationBuilder.AlterColumn<string>(
name: "ItemKey",
table: "EShopPaymentsPaymentItems",
nullable: true,
oldClrType: typeof(Guid),
oldType: "uniqueidentifier");
migrationBuilder.AddColumn<string>(
name: "ExtraProperties",
table: "EShopPaymentsPaymentItems",
nullable: true);
migrationBuilder.AlterColumn<decimal>(
name: "RefundAmount",
table: "EasyAbpPaymentServiceRefunds",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "RefundAmount",
table: "EasyAbpPaymentServicePayments",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "PendingRefundAmount",
table: "EasyAbpPaymentServicePayments",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "PaymentDiscount",
table: "EasyAbpPaymentServicePayments",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "OriginalPaymentAmount",
table: "EasyAbpPaymentServicePayments",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "ActualPaymentAmount",
table: "EasyAbpPaymentServicePayments",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "RefundAmount",
table: "EasyAbpPaymentServicePaymentItems",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "PendingRefundAmount",
table: "EasyAbpPaymentServicePaymentItems",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "PaymentDiscount",
table: "EasyAbpPaymentServicePaymentItems",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<decimal>(
name: "OriginalPaymentAmount",
table: "EasyAbpPaymentServicePaymentItems",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AlterColumn<string>(
name: "ItemKey",
table: "EasyAbpPaymentServicePaymentItems",
nullable: true,
oldClrType: typeof(Guid),
oldType: "uniqueidentifier");
migrationBuilder.AlterColumn<decimal>(
name: "ActualPaymentAmount",
table: "EasyAbpPaymentServicePaymentItems",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,6)");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpPaymentServiceWeChatPayRefundRecords",
table: "EasyAbpPaymentServiceWeChatPayRefundRecords",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpPaymentServiceWeChatPayPaymentRecords",
table: "EasyAbpPaymentServiceWeChatPayPaymentRecords",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpPaymentServiceRefunds",
table: "EasyAbpPaymentServiceRefunds",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpPaymentServicePayments",
table: "EasyAbpPaymentServicePayments",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpPaymentServicePaymentItems",
table: "EasyAbpPaymentServicePaymentItems",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_EasyAbpPaymentServicePaymentItems_EasyAbpPaymentServicePayments_PaymentId",
table: "EasyAbpPaymentServicePaymentItems",
column: "PaymentId",
principalTable: "EasyAbpPaymentServicePayments",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_EasyAbpPaymentServicePaymentItems_EasyAbpPaymentServicePayments_PaymentId",
table: "EasyAbpPaymentServicePaymentItems");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpPaymentServiceWeChatPayRefundRecords",
table: "EasyAbpPaymentServiceWeChatPayRefundRecords");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpPaymentServiceWeChatPayPaymentRecords",
table: "EasyAbpPaymentServiceWeChatPayPaymentRecords");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpPaymentServiceRefunds",
table: "EasyAbpPaymentServiceRefunds");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpPaymentServicePayments",
table: "EasyAbpPaymentServicePayments");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpPaymentServicePaymentItems",
table: "EasyAbpPaymentServicePaymentItems");
migrationBuilder.DropColumn(
name: "ExtraProperties",
table: "EShopPaymentsPaymentItems");
migrationBuilder.RenameTable(
name: "EasyAbpPaymentServiceWeChatPayRefundRecords",
newName: "PaymentServiceWeChatPayRefundRecords");
migrationBuilder.RenameTable(
name: "EasyAbpPaymentServiceWeChatPayPaymentRecords",
newName: "PaymentServiceWeChatPayPaymentRecords");
migrationBuilder.RenameTable(
name: "EasyAbpPaymentServiceRefunds",
newName: "PaymentServiceRefunds");
migrationBuilder.RenameTable(
name: "EasyAbpPaymentServicePayments",
newName: "PaymentServicePayments");
migrationBuilder.RenameTable(
name: "EasyAbpPaymentServicePaymentItems",
newName: "PaymentServicePaymentItems");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpPaymentServiceWeChatPayRefundRecords_PaymentId",
table: "PaymentServiceWeChatPayRefundRecords",
newName: "IX_PaymentServiceWeChatPayRefundRecords_PaymentId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpPaymentServiceWeChatPayPaymentRecords_PaymentId",
table: "PaymentServiceWeChatPayPaymentRecords",
newName: "IX_PaymentServiceWeChatPayPaymentRecords_PaymentId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpPaymentServicePaymentItems_PaymentId",
table: "PaymentServicePaymentItems",
newName: "IX_PaymentServicePaymentItems_PaymentId");
migrationBuilder.AlterColumn<Guid>(
name: "ItemKey",
table: "EShopPaymentsPaymentItems",
type: "uniqueidentifier",
nullable: false,
oldClrType: typeof(string),
oldNullable: true);
migrationBuilder.AlterColumn<decimal>(
name: "RefundAmount",
table: "PaymentServiceRefunds",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
migrationBuilder.AlterColumn<decimal>(
name: "RefundAmount",
table: "PaymentServicePayments",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
migrationBuilder.AlterColumn<decimal>(
name: "PendingRefundAmount",
table: "PaymentServicePayments",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
migrationBuilder.AlterColumn<decimal>(
name: "PaymentDiscount",
table: "PaymentServicePayments",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
migrationBuilder.AlterColumn<decimal>(
name: "OriginalPaymentAmount",
table: "PaymentServicePayments",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
migrationBuilder.AlterColumn<decimal>(
name: "ActualPaymentAmount",
table: "PaymentServicePayments",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
migrationBuilder.AlterColumn<decimal>(
name: "RefundAmount",
table: "PaymentServicePaymentItems",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
migrationBuilder.AlterColumn<decimal>(
name: "PendingRefundAmount",
table: "PaymentServicePaymentItems",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
migrationBuilder.AlterColumn<decimal>(
name: "PaymentDiscount",
table: "PaymentServicePaymentItems",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
migrationBuilder.AlterColumn<decimal>(
name: "OriginalPaymentAmount",
table: "PaymentServicePaymentItems",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
migrationBuilder.AlterColumn<Guid>(
name: "ItemKey",
table: "PaymentServicePaymentItems",
type: "uniqueidentifier",
nullable: false,
oldClrType: typeof(string),
oldNullable: true);
migrationBuilder.AlterColumn<decimal>(
name: "ActualPaymentAmount",
table: "PaymentServicePaymentItems",
type: "decimal(18,6)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
migrationBuilder.AddColumn<string>(
name: "Currency",
table: "PaymentServicePaymentItems",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddPrimaryKey(
name: "PK_PaymentServiceWeChatPayRefundRecords",
table: "PaymentServiceWeChatPayRefundRecords",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_PaymentServiceWeChatPayPaymentRecords",
table: "PaymentServiceWeChatPayPaymentRecords",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_PaymentServiceRefunds",
table: "PaymentServiceRefunds",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_PaymentServicePayments",
table: "PaymentServicePayments",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_PaymentServicePaymentItems",
table: "PaymentServicePaymentItems",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_PaymentServicePaymentItems_PaymentServicePayments_PaymentId",
table: "PaymentServicePaymentItems",
column: "PaymentId",
principalTable: "PaymentServicePayments",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
}
}

47
samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/EShopSampleMigrationsDbContextModelSnapshot.cs

@ -341,14 +341,18 @@ namespace EShopSample.Migrations
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<Guid>("ItemKey")
.HasColumnType("uniqueidentifier");
b.Property<string>("ItemKey")
.HasColumnType("nvarchar(max)");
b.Property<string>("ItemType")
.HasColumnType("nvarchar(max)");
@ -1411,7 +1415,7 @@ namespace EShopSample.Migrations
.HasColumnType("uniqueidentifier");
b.Property<decimal>("ActualPaymentAmount")
.HasColumnType("decimal(18,6)");
.HasColumnType("decimal(20,8)");
b.Property<DateTime?>("CanceledTime")
.HasColumnType("datetime2");
@ -1466,22 +1470,22 @@ namespace EShopSample.Migrations
.HasColumnType("uniqueidentifier");
b.Property<decimal>("OriginalPaymentAmount")
.HasColumnType("decimal(18,6)");
.HasColumnType("decimal(20,8)");
b.Property<string>("PayeeAccount")
.HasColumnType("nvarchar(max)");
b.Property<decimal>("PaymentDiscount")
.HasColumnType("decimal(18,6)");
.HasColumnType("decimal(20,8)");
b.Property<string>("PaymentMethod")
.HasColumnType("nvarchar(max)");
b.Property<decimal>("PendingRefundAmount")
.HasColumnType("decimal(18,6)");
.HasColumnType("decimal(20,8)");
b.Property<decimal>("RefundAmount")
.HasColumnType("decimal(18,6)");
.HasColumnType("decimal(20,8)");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
@ -1492,7 +1496,7 @@ namespace EShopSample.Migrations
b.HasKey("Id");
b.ToTable("PaymentServicePayments");
b.ToTable("EasyAbpPaymentServicePayments");
});
modelBuilder.Entity("EasyAbp.PaymentService.Payments.PaymentItem", b =>
@ -1502,7 +1506,7 @@ namespace EShopSample.Migrations
.HasColumnType("uniqueidentifier");
b.Property<decimal>("ActualPaymentAmount")
.HasColumnType("decimal(18,6)");
.HasColumnType("decimal(20,8)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
@ -1512,9 +1516,6 @@ namespace EShopSample.Migrations
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Currency")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
@ -1533,8 +1534,8 @@ namespace EShopSample.Migrations
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<Guid>("ItemKey")
.HasColumnType("uniqueidentifier");
b.Property<string>("ItemKey")
.HasColumnType("nvarchar(max)");
b.Property<string>("ItemType")
.HasColumnType("nvarchar(max)");
@ -1548,25 +1549,25 @@ namespace EShopSample.Migrations
.HasColumnType("uniqueidentifier");
b.Property<decimal>("OriginalPaymentAmount")
.HasColumnType("decimal(18,6)");
.HasColumnType("decimal(20,8)");
b.Property<decimal>("PaymentDiscount")
.HasColumnType("decimal(18,6)");
.HasColumnType("decimal(20,8)");
b.Property<Guid?>("PaymentId")
.HasColumnType("uniqueidentifier");
b.Property<decimal>("PendingRefundAmount")
.HasColumnType("decimal(18,6)");
.HasColumnType("decimal(20,8)");
b.Property<decimal>("RefundAmount")
.HasColumnType("decimal(18,6)");
.HasColumnType("decimal(20,8)");
b.HasKey("Id");
b.HasIndex("PaymentId");
b.ToTable("PaymentServicePaymentItems");
b.ToTable("EasyAbpPaymentServicePaymentItems");
});
modelBuilder.Entity("EasyAbp.PaymentService.Refunds.Refund", b =>
@ -1637,7 +1638,7 @@ namespace EShopSample.Migrations
.HasColumnType("uniqueidentifier");
b.Property<decimal>("RefundAmount")
.HasColumnType("decimal(18,6)");
.HasColumnType("decimal(20,8)");
b.Property<string>("RefundPaymentMethod")
.HasColumnType("nvarchar(max)");
@ -1651,7 +1652,7 @@ namespace EShopSample.Migrations
b.HasKey("Id");
b.ToTable("PaymentServiceRefunds");
b.ToTable("EasyAbpPaymentServiceRefunds");
});
modelBuilder.Entity("EasyAbp.PaymentService.WeChatPay.PaymentRecords.PaymentRecord", b =>
@ -1767,7 +1768,7 @@ namespace EShopSample.Migrations
b.HasIndex("PaymentId");
b.ToTable("PaymentServiceWeChatPayPaymentRecords");
b.ToTable("EasyAbpPaymentServiceWeChatPayPaymentRecords");
});
modelBuilder.Entity("EasyAbp.PaymentService.WeChatPay.RefundRecords.RefundRecord", b =>
@ -1883,7 +1884,7 @@ namespace EShopSample.Migrations
b.HasIndex("PaymentId");
b.ToTable("PaymentServiceWeChatPayRefundRecords");
b.ToTable("EasyAbpPaymentServiceWeChatPayRefundRecords");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>

4
samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EShopSample.EntityFrameworkCore.csproj

@ -11,8 +11,8 @@
<ProjectReference Include="..\..\..\..\..\integration\EasyAbp.EShop\src\EasyAbp.EShop.EntityFrameworkCore\EasyAbp.EShop.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\plugins\Baskets\src\EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore\EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\EShopSample.Domain\EShopSample.Domain.csproj" />
<PackageReference Include="EasyAbp.PaymentService.EntityFrameworkCore" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.EntityFrameworkCore" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.EntityFrameworkCore" Version="1.0.0" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.EntityFrameworkCore" Version="1.0.0" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="3.0.4" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="3.0.4" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="3.0.4" />

4
samples/EShopSample/aspnet-core/src/EShopSample.HttpApi.Client/EShopSample.HttpApi.Client.csproj

@ -14,8 +14,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="EasyAbp.PaymentService.HttpApi.Client" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.HttpApi.Client" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.HttpApi.Client" Version="1.0.0" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.HttpApi.Client" Version="1.0.0" />
<PackageReference Include="Volo.Abp.Account.HttpApi.Client" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Identity.HttpApi.Client" Version="3.0.4" />
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi.Client" Version="3.0.4" />

4
samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/EShopSample.HttpApi.csproj

@ -14,8 +14,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="EasyAbp.PaymentService.HttpApi" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.HttpApi" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.HttpApi" Version="1.0.0" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.HttpApi" Version="1.0.0" />
<PackageReference Include="Volo.Abp.Account.HttpApi" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Identity.HttpApi" Version="3.0.4" />
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi" Version="3.0.4" />

4
samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj

@ -46,8 +46,8 @@
<ProjectReference Include="..\EShopSample.Application\EShopSample.Application.csproj" />
<ProjectReference Include="..\EShopSample.HttpApi\EShopSample.HttpApi.csproj" />
<ProjectReference Include="..\EShopSample.EntityFrameworkCore.DbMigrations\EShopSample.EntityFrameworkCore.DbMigrations.csproj" />
<PackageReference Include="EasyAbp.PaymentService.Web" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.Web" Version="0.6.4" />
<PackageReference Include="EasyAbp.PaymentService.Web" Version="1.0.0" />
<PackageReference Include="EasyAbp.PaymentService.WeChatPay.Web" Version="1.0.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Autofac" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="3.0.4" />

Loading…
Cancel
Save