Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DataCenter_Core2.1_20190520
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bltdc
DataCenter_Core2.1_20190520
Commits
be78629b
Commit
be78629b
authored
May 21, 2021
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加导入2020年购买人的数据逻辑
parent
a9331fab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
91 additions
and
9 deletions
+91
-9
ApiController.cs
Bailun.DC.Web/Controllers/ApiController.cs
+91
-9
No files found.
Bailun.DC.Web/Controllers/ApiController.cs
View file @
be78629b
...
...
@@ -1005,19 +1005,100 @@ namespace Bailun.DC.Web.Controllers
}
///// <summary>
///// 首次入库时间
///// </summary>
///// <param name="start">开始时间</param>
///// <param name="end">结束时间</param>
///// <returns></returns>
//[HttpPost]
//public JsonResult FirstPutinTime(DateTime start, DateTime end)
//public JsonResult TestInsertBuyer()
//{
// using (var read = new System.IO.StreamReader(@"C:\Allan\百伦\2020年之前的客户.csv"))
// {
// if (read != null)
// {
// int index = 0;
// var str_insert = "insert into temp_buyer2020 (buyer_id) values ";
// var str_value = "";
// while (read.Read() > 0)
// {
// var str = read.ReadLine();
// str = str.Replace("\"", "");
// str = str.Replace("'", "''");
// str = str.Replace(@"\", @"\\");
// if (!string.IsNullOrEmpty(str))
// {
// str_value += "('"+str+"'),";
// index++;
// if (index % 1000 == 0)
// {
// SaveBuyerData(str_insert + str_value.Substring(0,str_value.Length-1));
// str_value = "";
// }
// //using (var cn = new MySql.Data.MySqlClient.MySqlConnection(Common.GlobalConfig.ConnectionString))
// //{
// // if (cn.State == System.Data.ConnectionState.Closed)
// // {
// // cn.Open();
// // }
// // using (var cm = new MySql.Data.MySqlClient.MySqlCommand())
// // {
// // cm.Connection = cn;
// // cm.CommandText = "insert into temp_buyer2020 (buyer_id) value ('" + str + "')";
// // cm.ExecuteNonQuery();
// // }
// //}
// }
// }
// if(!string.IsNullOrEmpty(str_value))
// {
// SaveBuyerData(str_insert + str_value.Substring(0, str_value.Length - 1));
// }
// }
// }
// return Json("");
//}
//private void SaveBuyerData(string sql)
//{
// try
// {
// using (var cn = new MySql.Data.MySqlClient.MySqlConnection(Common.GlobalConfig.ConnectionString))
// {
// if (cn.State == System.Data.ConnectionState.Closed)
// {
// cn.Open();
// }
// using (var cm = new MySql.Data.MySqlClient.MySqlCommand())
// {
// cm.Connection = cn;
// cm.CommandText = sql;
// cm.ExecuteNonQuery();
// }
// }
// }
// catch (Exception ex)
// {
// SaveBuyerData(sql);
// }
//}
/// <summary>
/// 首次入库时间
/// </summary>
/// <param name="start">开始时间</param>
/// <param name="end">结束时间</param>
/// <returns></returns>
[
HttpPost
]
public
JsonResult
FirstPutinTime
(
DateTime
start
,
DateTime
end
)
{
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment