Commit 265baedb by lizefeng

fix

parent a3e8740f
......@@ -25,6 +25,7 @@ using System.Xml;
using System.IO;
using FikaAmazonAPI.AmazonSpApiSDK.Models.Reports;
using System.Text;
using FikaAmazonAPI.ReportGeneration;
namespace AutoTurnOver.Services
{
......@@ -606,6 +607,7 @@ namespace AutoTurnOver.Services
public IList<FinancialEventGroup> GetFinancialEventGroups(AmazonAccountDto account, DateTime btime, DateTime etime)
{
AmazonConnection amazonConnection = MapAmazonConnection(account);
var parameters = new ParameterListFinancialEventGroup();
parameters.FinancialEventGroupStartedAfter = btime;
parameters.FinancialEventGroupStartedBefore = etime;
......
using FikaAmazonAPI.AmazonSpApiSDK.Models.Finances;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
......@@ -119,4 +120,143 @@ namespace AutoTurnOver.Services.Dto
}
}
public class ApiAmazonSettlementDto
{
[JsonProperty(PropertyName = "AmazonEnvelope")]
public AmazonEnvelopeDto AmazonEnvelope { get; set; }
public class AmazonEnvelopeDto {
[JsonProperty(PropertyName = "Message")]
public MessageDto Message
{
get;set;
}
public class MessageDto
{
public SettlementReportDto SettlementReport { get; set; }
public class SettlementReportDto
{
public SettlementDataDto SettlementData { get; set; }
public class SettlementDataDto
{
public string AmazonSettlementID { get; set; }
public Amount TotalAmount { get; set; }
public DateTime? StartDate { get; set; }
public DateTime? EndDate { get; set; }
public DateTime? DepositDate { get; set; }
}
public List<OtherTransactionDto> OtherTransaction { get; set; }
public class OtherTransactionDto
{
public string AmazonOrderID { get; set; }
public string TransactionID { get; set; }
public string TransactionType { get; set; }
public DateTime? PostedDate { get; set; }
public Amount Amount { get; set; }
}
public List<OrderDto> Order { get; set; }
public class OrderDto
{
public string AmazonOrderID { get; set; }
public string MerchantOrderID { get; set; }
public string ShipmentID { get; set; }
public string MarketplaceName { get; set; }
public FulfillmentDto Fulfillment { get; set; }
public class FulfillmentDto
{
public string MerchantFulfillmentID { get; set; }
public DateTime? PostedDate { get; set; }
public ItemDto Item { get; set; }
public class ItemDto
{
public string AmazonOrderItemCode { get; set; }
public string SKU { get; set; }
public int? Quantity { get; set; }
public ItemPriceDto ItemPrice { get; set; }
public ItemFeesDto ItemFees { get; set; }
public class ItemPriceDto
{
public List<FeeDto> Component { get; set; }
}
public class ItemFeesDto
{
public List<FeeDto> Fee { get; set; }
}
public PromotionDto Promotion { get; set; }
public class PromotionDto
{
public string MerchantPromotionID { get; set; }
public string Type { get; set; }
public Amount Amount { get; set; }
}
}
}
}
public List<RefundDto> Refund { get; set; }
public class RefundDto
{
public string AmazonOrderID { get; set; }
public string MerchantOrderID { get; set; }
public string ShipmentID { get; set; }
public string MarketplaceName { get; set; }
public FulfillmentDto Fulfillment { get; set; }
public class FulfillmentDto
{
public string MerchantFulfillmentID { get; set; }
public DateTime? PostedDate { get; set; }
public ItemDto AdjustedItem { get; set; }
public class ItemDto
{
public string AmazonOrderItemCode { get; set; }
public string SKU { get; set; }
public int? Quantity { get; set; }
public ItemPriceDto ItemPriceAdjustments { get; set; }
public ItemFeesDto ItemFeeAdjustments { get; set; }
public class ItemPriceDto
{
public List<FeeDto> Component { get; set; }
}
public class ItemFeesDto
{
public List<FeeDto> Fee { get; set; }
}
public PromotionDto PromotionAdjustment { get; set; }
public class PromotionDto
{
public string MerchantPromotionID { get; set; }
public string Type { get; set; }
public Amount Amount { get; set; }
}
}
}
}
}
}
public class FeeDto
{
public string Type { get; set; }
public Amount Amount { get; set; }
}
public class Amount
{
[JsonProperty(PropertyName = "@currency")]
public string Currency { get; set; }
[JsonProperty(PropertyName = "#text")]
public string Text { get; set; }
}
}
}
}
......@@ -37,7 +37,7 @@
<PackageReference Include="AWSSDK.SQS" Version="3.7.100.52" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="RestSharp" Version="108.0.0" />
<PackageReference Include="RestSharp" Version="108.0.3" />
<PackageReference Include="RestSharp.Serializers.NewtonsoftJson" Version="108.0.0" />
<PackageReference Include="System.Collections" Version="4.3.0" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
......
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/runtime:2.1 AS base
FROM mcr.microsoft.com/dotnet/runtime:3.1 AS base
WORKDIR /app
RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
FROM mcr.microsoft.com/dotnet/sdk:2.1 AS build
FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build
WORKDIR /src
COPY ["ResetOutofstock/ResetOutofstock.csproj", "ResetOutofstock/"]
COPY ["AutoTurnOver.DB/AutoTurnOver.DB.csproj", "AutoTurnOver.DB/"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment