40 lines
1.0 KiB
C#
40 lines
1.0 KiB
C#
using AllBase;
|
|
using CefSharp.DevTools.FedCm;
|
|
using Newtonsoft.Json;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.Security.Policy;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Work.ERP.API.Orders;
|
|
using WxOrder.Framework.Commons;
|
|
|
|
namespace Work.ERP.API.Orders
|
|
{
|
|
public class ShipGiftServiceApi
|
|
{
|
|
public async Task<bool> SendShipGift(string[] orderIds, int giftType, decimal amount, decimal oemGiftAmount)
|
|
{
|
|
string data = JsonConvert.SerializeObject(new
|
|
{
|
|
platformCode = "WEISHOP",
|
|
orderIds = orderIds,
|
|
userId = BaseClass.UserId,
|
|
userName = BaseClass.UserName,
|
|
giftOrderType = (int)giftType,
|
|
amount = (int)(amount * 100),
|
|
oemAmount = (int)(oemGiftAmount * 100)
|
|
});
|
|
Debug.WriteLine($"礼品单:{data}");
|
|
var result = await ERPHttp.e57PostResponseAsync<Result>("/prod-api/api/oms-api/gift/order/deliveryFor29Erp", data);
|
|
if (result.Code != 200)
|
|
{
|
|
throw new Exception(result.Msg);
|
|
}
|
|
return true;
|
|
}
|
|
}
|
|
}
|