162 lines
8.4 KiB
C#
162 lines
8.4 KiB
C#
using Newtonsoft.Json;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AllBase.Model.Result.PDDResult
|
|
{
|
|
public class PddBuyerOrderInfoLite
|
|
{
|
|
//平台快递编码 微信快递名称 PDD
|
|
//EMS EMS 邮政快递包裹
|
|
//EMS EMS 邮政电商标快
|
|
//JTSD 极兔速递 极兔速递
|
|
//STO 申通快递 申通快递
|
|
//YD 韵达速递 韵达快递
|
|
//YTO 圆通速递 圆通快递
|
|
//ZTO 中通快递 中通快递
|
|
//BTWL 百世快运
|
|
//HTKY 百世快递
|
|
|
|
public static string GetPddToWxExpressCompanyCode(string expressCompanyName)
|
|
{
|
|
if (expressCompanyName == null || expressCompanyName == "") return "";
|
|
if (expressCompanyName.Contains("邮政快递包裹")) return "EMS";
|
|
if (expressCompanyName.Contains("邮政电商标快")) return "EMS";
|
|
if (expressCompanyName.Contains("邮政EMS")) return "EMS";
|
|
if (expressCompanyName.Contains("极兔速递")) return "JTSD";
|
|
if (expressCompanyName.Contains("极兔快递")) return "JTSD";
|
|
if (expressCompanyName.Contains("申通快递")) return "STO";
|
|
if (expressCompanyName.Contains("韵达快递")) return "YD";
|
|
if (expressCompanyName.Contains("圆通快递")) return "YTO";
|
|
if (expressCompanyName.Contains("中通快递")) return "ZTO";
|
|
if (expressCompanyName.Contains("百世快运")) return "BTWL";
|
|
if (expressCompanyName.Contains("百世快递")) return "HTKY";
|
|
if (expressCompanyName.Contains("顺丰速运")) return "SF";
|
|
if (expressCompanyName.Contains("京东快递")) return "JD";
|
|
if (expressCompanyName.Contains("京东快运")) return "JDKY";
|
|
if (expressCompanyName.Contains("京东大件物流")) return "JD";
|
|
if (expressCompanyName.Contains("其他快递")) return "OTHER";
|
|
return "";
|
|
}
|
|
|
|
public static string GetWxExpressNameToWxExpressCode(string expressCompanyName)
|
|
{
|
|
if (expressCompanyName == null || expressCompanyName == "") return "";
|
|
if (expressCompanyName.Contains("邮政快递包裹")) return "EMS";
|
|
if (expressCompanyName.Contains("邮政电商标快")) return "EMS";
|
|
if (expressCompanyName.Contains("邮政EMS")) return "EMS";
|
|
if (expressCompanyName.Contains("极兔速递")) return "JTSD";
|
|
if (expressCompanyName.Contains("申通快递")) return "STO";
|
|
if (expressCompanyName.Contains("韵达速递")) return "YD";
|
|
if (expressCompanyName.Contains("圆通速递")) return "YTO";
|
|
if (expressCompanyName.Contains("中通快递")) return "ZTO";
|
|
if (expressCompanyName.Contains("百世快运")) return "BTWL";
|
|
if (expressCompanyName.Contains("百世快递")) return "HTKY";
|
|
if (expressCompanyName.Contains("顺丰速运")) return "SF";
|
|
if (expressCompanyName.Contains("京东快递")) return "JD";
|
|
if (expressCompanyName.Contains("京东快运")) return "JDKY";
|
|
if (expressCompanyName.Contains("其他快递")) return "OTHER";
|
|
return "";
|
|
}
|
|
|
|
public string outExpressCompanyMsg { get; set; } // 物流公司名称,可以尝试直接从列表中匹配
|
|
public string outExpressCompanyCode
|
|
{
|
|
get
|
|
{
|
|
return GetPddToWxExpressCompanyCode(outExpressCompanyName);
|
|
}
|
|
}
|
|
public string outExpressCompanyName
|
|
{
|
|
get
|
|
{
|
|
if (outExpressCompanyMsg == null || outExpressCompanyMsg == "") return "";
|
|
if (outExpressCompanyMsg.Contains("邮政快递包裹")) return "邮政快递包裹";
|
|
if (outExpressCompanyMsg.Contains("邮政电商标快")) return "邮政电商标快";
|
|
if (outExpressCompanyMsg.Contains("邮政EMS")) return "邮政EMS";
|
|
if (outExpressCompanyMsg.Contains("极兔速递")) return "极兔速递";
|
|
if (outExpressCompanyMsg.Contains("极兔快递")) return "极兔速递";
|
|
if (outExpressCompanyMsg.Contains("申通快递")) return "申通快递";
|
|
if (outExpressCompanyMsg.Contains("韵达快递")) return "韵达快递";
|
|
if (outExpressCompanyMsg.Contains("圆通快递")) return "圆通快递";
|
|
if (outExpressCompanyMsg.Contains("中通快递")) return "中通快递";
|
|
if (outExpressCompanyMsg.Contains("百世快运")) return "百世快运";
|
|
if (outExpressCompanyMsg.Contains("百世快递")) return "百世快递";
|
|
if (outExpressCompanyMsg.Contains("顺丰速运")) return "顺丰速运";
|
|
if (outExpressCompanyMsg.Contains("顺丰快递")) return "顺丰速运";
|
|
if (outExpressCompanyMsg.Contains("京东快递")) return "京东快递";
|
|
if (outExpressCompanyMsg.Contains("京东快运")) return "京东快运";
|
|
if (outExpressCompanyMsg.Contains("京东大件物流")) return "京东大件物流";
|
|
if (outExpressCompanyMsg.Contains("其他快递")) return "其他快递";
|
|
return "物流名称获取失败";
|
|
}
|
|
}
|
|
public string sendStatus { get; set; } = "";
|
|
/// <summary>
|
|
/// 微信退款单状态
|
|
/// </summary>
|
|
public string wxRefundStatus { get; set; } = "";
|
|
public string buyerId { get; set; } // 买手Id
|
|
public string buyerName { get; set; } // 买手名称
|
|
|
|
public string order_sn { get; set; } // "260409-440915730042665",
|
|
public string parent_order_sn { get; set; } // "",
|
|
public int? order_amount { get; set; } // 2090,
|
|
public int? shipping_amount { get; set; } // 0,
|
|
public int? discount_amount { get; set; } // 200,
|
|
public int? service_amount { get; set; } // 0,
|
|
public string display_amount { get; set; } // 2090 实付款
|
|
public long? order_time { get; set; } // 1775731637
|
|
public string tracking_number { get; set; } // "JT5474027114111", 物流单号
|
|
public string order_link_url { get; set; } // "order.html?order_sn=260408-386657164922665&page_from=1",
|
|
|
|
public List<order_good> order_Goods { get; set; }
|
|
public after_sales after_sales { get; set; }
|
|
public string order_status_prompt { get; set; } // "待收货",
|
|
public string order_prompt_color { get; set; } // "#E02E24",
|
|
public string activity_type { get; set; } // 3,
|
|
|
|
//[JsonProperty(PropertyName = "extraInfo")]
|
|
public extra_info extra_info { get; set; }
|
|
}
|
|
|
|
public class extra_info
|
|
{
|
|
public order_hint order_hint { get; set; }
|
|
}
|
|
public class order_hint
|
|
{
|
|
public string type { get; set; } // "express_info",
|
|
public string message { get; set; } // "商家已发货,正在通知极兔速递取件",
|
|
}
|
|
|
|
public class after_sales
|
|
{
|
|
public string after_sales_id { get; set; } // "20032511557436",
|
|
public int? after_sales_type { get; set; } // 2,
|
|
public int? after_sales_status { get; set; } // 31 // 待用户拒收商品
|
|
}
|
|
|
|
public class order_good
|
|
{
|
|
public string goods_id { get; set; } // "865983669848",
|
|
public string sku_id { get; set; } // "1824184724450",
|
|
public string goods_name { get; set; } // "新款夏季性感上衣蕾丝吊带带胸垫防走光吊带打底背心女美背内衣女",
|
|
public int? goods_price { get; set; } // 2290,
|
|
public int? goods_number { get; set; } // 1,
|
|
public string thumb_url { get; set; } // "https://img.pddpic.com/mms-goods-image/2026-03-03/bdf06666-5663-4ddf-96a4-cfc09a3ba3aa.jpeg.a.jpeg",
|
|
public string spec { get; set; } // "XL(适合140-160斤),白色+可可棕",
|
|
public int? event_type { get; set; } // 0,
|
|
public int? is_pre_sale { get; set; } // 0,
|
|
public int? goods_type { get; set; } // 1,
|
|
public long? cat_id_1 { get; set; } // 8583,
|
|
public long? cat_id_2 { get; set; } // 8589,
|
|
public long? cat_id_3 { get; set; } // 8614,
|
|
public long? cat_id_4 { get; set; } // 0
|
|
}
|
|
}
|