Commit e7b08086 by guanzhenshan

1

parent f50a81db
using System;
using System.Collections.Generic;
using System.Text;
namespace Bailun.DC.Models.DataWareHouse
{
public class exchange_rate_finance
{
/// <summary>
///
/// </summary>
public int id { get; set; }
/// <summary>
/// 月份
/// </summary>
public string month { get; set; }
/// <summary>
/// 币种
/// </summary>
public string currency { get; set; }
/// <summary>
/// 币种简码
/// </summary>
public string code { get; set; }
/// <summary>
/// 汇率
/// </summary>
public decimal exchange_rate { get; set; }
/// <summary>
///
/// </summary>
public DateTime createtime { get; set; }
/// <summary>
/// 模糊匹配币种的条件
/// </summary>
public string likecondition { get; set; }
}
}
...@@ -62,6 +62,9 @@ namespace Bailun.DC.Services.DataWareHouse ...@@ -62,6 +62,9 @@ namespace Bailun.DC.Services.DataWareHouse
/// <returns></returns> /// <returns></returns>
public string SaveOrderFeeConfig(List<order_fee_config> configs) public string SaveOrderFeeConfig(List<order_fee_config> configs)
{ {
var listpw = configs.Select(a => new Tuple<string, string>(a.platform, a.website));
listpw = listpw.Distinct();
if(configs.Count==0) if(configs.Count==0)
{ {
return "至少需要有一个配置。"; return "至少需要有一个配置。";
...@@ -74,8 +77,11 @@ namespace Bailun.DC.Services.DataWareHouse ...@@ -74,8 +77,11 @@ namespace Bailun.DC.Services.DataWareHouse
cn.Open(); cn.Open();
} }
cn.Execute($"update order_fee_config set delstatus=1 where platform='{configs.FirstOrDefault().platform}' and website='{configs.FirstOrDefault().website}'"); foreach (var item in listpw)
{
cn.Execute($"update order_fee_config set delstatus=1 where platform='{item.Item1}' and website='{item.Item2}'");
}
foreach (var item in configs) foreach (var item in configs)
{ {
cn.Insert(item); cn.Insert(item);
......
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