mirror of https://github.com/EasyAbp/EShop.git
48 changed files with 8863 additions and 125 deletions
@ -1,31 +1,28 @@ |
|||
using System; |
|||
using EasyAbp.PaymentService.Payments; |
|||
using System.Collections.Generic; |
|||
using EasyAbp.PaymentService.Refunds; |
|||
using Volo.Abp.Application.Dtos; |
|||
|
|||
namespace EasyAbp.EShop.Payments.Refunds.Dtos |
|||
{ |
|||
public class RefundItemDto : ExtensibleFullAuditedEntityDto<Guid>, IRefund |
|||
public class RefundItemDto : ExtensibleFullAuditedEntityDto<Guid>, IRefundItem |
|||
{ |
|||
public virtual Guid PaymentId { get; set; } |
|||
#region Base properties
|
|||
|
|||
public virtual string RefundPaymentMethod { get; set; } |
|||
public Guid PaymentItemId { get; set; } |
|||
|
|||
public virtual string ExternalTradingCode { get; set; } |
|||
public decimal RefundAmount { get; set; } |
|||
|
|||
public virtual string Currency { get; set; } |
|||
|
|||
public virtual decimal RefundAmount { get; set; } |
|||
|
|||
public virtual string DisplayReason { get; set; } |
|||
|
|||
public virtual string CustomerRemark { get; set; } |
|||
|
|||
public virtual string StaffRemark { get; set; } |
|||
|
|||
public virtual DateTime? CompletedTime { get; set; } |
|||
|
|||
public virtual DateTime? CanceledTime { get; set; } |
|||
public string CustomerRemark { get; set; } |
|||
|
|||
public string StaffRemark { get; set; } |
|||
|
|||
#endregion
|
|||
|
|||
public Guid StoreId { get; set; } |
|||
|
|||
public Guid OrderId { get; set; } |
|||
|
|||
public List<RefundItemOrderLineDto> RefundItemOrderLines { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,14 @@ |
|||
using System; |
|||
|
|||
namespace EasyAbp.EShop.Payments.Refunds.Dtos |
|||
{ |
|||
[Serializable] |
|||
public class RefundItemOrderLineDto |
|||
{ |
|||
public Guid OrderLineId { get; set; } |
|||
|
|||
public int RefundedQuantity { get; set; } |
|||
|
|||
public decimal RefundAmount { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
using System; |
|||
using Volo.Abp; |
|||
|
|||
namespace EasyAbp.EShop.Payments.Refunds |
|||
{ |
|||
public class OrderIsNotInSpecifiedPaymentException : BusinessException |
|||
{ |
|||
public OrderIsNotInSpecifiedPaymentException(Guid orderId, Guid paymentId) |
|||
: base("OrderIsNotInSpecifiedPayment", $"The order ({orderId}) is not in the specified payment ({paymentId}).") |
|||
{ |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
namespace EasyAbp.EShop.Payments.Refunds |
|||
{ |
|||
public class OrderRefundCompletedEto |
|||
{ |
|||
public OrderRefundEto Refund { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,10 @@ |
|||
using EasyAbp.PaymentService.Prepayment.Options.AccountGroups; |
|||
|
|||
namespace EShopSample |
|||
{ |
|||
[AccountGroupName("default")] |
|||
public class DefaultAccountGroup |
|||
{ |
|||
|
|||
} |
|||
} |
|||
File diff suppressed because it is too large
@ -0,0 +1,86 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace EShopSample.Migrations |
|||
{ |
|||
public partial class AddedPrepaymentModule : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.CreateTable( |
|||
name: "EasyAbpPaymentServicePrepaymentAccounts", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(nullable: false), |
|||
ExtraProperties = table.Column<string>(nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(maxLength: 40, nullable: true), |
|||
CreationTime = table.Column<DateTime>(nullable: false), |
|||
CreatorId = table.Column<Guid>(nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|||
LastModifierId = table.Column<Guid>(nullable: true), |
|||
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false), |
|||
DeleterId = table.Column<Guid>(nullable: true), |
|||
DeletionTime = table.Column<DateTime>(nullable: true), |
|||
TenantId = table.Column<Guid>(nullable: true), |
|||
AccountGroupName = table.Column<string>(nullable: true), |
|||
UserId = table.Column<Guid>(nullable: false), |
|||
Balance = table.Column<decimal>(type: "decimal(20,8)", nullable: false), |
|||
LockedBalance = table.Column<decimal>(type: "decimal(20,8)", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_EasyAbpPaymentServicePrepaymentAccounts", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "EasyAbpPaymentServicePrepaymentTransactions", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(nullable: false), |
|||
ExtraProperties = table.Column<string>(nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(maxLength: 40, nullable: true), |
|||
CreationTime = table.Column<DateTime>(nullable: false), |
|||
CreatorId = table.Column<Guid>(nullable: true), |
|||
TenantId = table.Column<Guid>(nullable: true), |
|||
AccountId = table.Column<Guid>(nullable: false), |
|||
AccountUserId = table.Column<Guid>(nullable: false), |
|||
PaymentId = table.Column<Guid>(nullable: true), |
|||
TransactionType = table.Column<int>(nullable: false), |
|||
ActionName = table.Column<string>(nullable: true), |
|||
PaymentMethod = table.Column<string>(nullable: true), |
|||
ExternalTradingCode = table.Column<string>(nullable: true), |
|||
Currency = table.Column<string>(nullable: true), |
|||
ChangedBalance = table.Column<decimal>(type: "decimal(20,8)", nullable: false), |
|||
OriginalBalance = table.Column<decimal>(type: "decimal(20,8)", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_EasyAbpPaymentServicePrepaymentTransactions", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_EasyAbpPaymentServicePrepaymentAccounts_UserId", |
|||
table: "EasyAbpPaymentServicePrepaymentAccounts", |
|||
column: "UserId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_EasyAbpPaymentServicePrepaymentTransactions_AccountId", |
|||
table: "EasyAbpPaymentServicePrepaymentTransactions", |
|||
column: "AccountId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_EasyAbpPaymentServicePrepaymentTransactions_AccountUserId", |
|||
table: "EasyAbpPaymentServicePrepaymentTransactions", |
|||
column: "AccountUserId"); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "EasyAbpPaymentServicePrepaymentAccounts"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "EasyAbpPaymentServicePrepaymentTransactions"); |
|||
} |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
@ -0,0 +1,23 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace EShopSample.Migrations |
|||
{ |
|||
public partial class RemovedCurrencyFromPaymentItem : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropColumn( |
|||
name: "Currency", |
|||
table: "EasyAbpEShopPaymentsPaymentItems"); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Currency", |
|||
table: "EasyAbpEShopPaymentsPaymentItems", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue