using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using LitJson; using MySystem; using MySystem.Models.Main; namespace MySystem { /// /// 订单申请分账参数赋值 /// public class OrderDivideAccountsUtil { /// /// /// /// 批次号 /// 慧掌柜商户号 /// 交易订单号(好哒平台订单号,G开头) /// 账户号,账户类型为商户收款账户时填收款商户号, 账户类型为分账接收方时填分账接收方账户号 /// 账户类型(0:商户收款账户(大B),1:分账接收方账户(小B)) /// 金额(分) /// public static OrderDivideAccounts AddValue(string applyNo, string mchtNo, string orderNo, string acctNo, string sacctNo, string acctType, string amount, string seviceAmount) { OrderDivideAccounts orderDivideAccounts = new OrderDivideAccounts(); orderDivideAccounts.applyNo = applyNo; orderDivideAccounts.mchtNo = mchtNo; orderDivideAccounts.orderNo = orderNo; List> list = new List>(); Dictionary obj = new Dictionary(); //分账接收方账户 if(seviceAmount != "0") { obj = new Dictionary(); obj.Add("acctNo", "230817000000000278"); obj.Add("acctType", "1"); obj.Add("amount", seviceAmount); list.Add(obj); } //商户收款账户 obj = new Dictionary(); obj.Add("acctNo", sacctNo); obj.Add("acctType", "0"); obj.Add("amount", amount); list.Add(obj); orderDivideAccounts.detail = list; return orderDivideAccounts; } } }