Commit a397d3b4 authored by 黄奎's avatar 黄奎

页面修改

parent 734930b2
This diff is collapsed.
This diff is collapsed.
...@@ -23,14 +23,16 @@ namespace Mall.DataHelper.Import ...@@ -23,14 +23,16 @@ namespace Mall.DataHelper.Import
{ {
//图片所在的列 //图片所在的列
List<int> imgColList = new List<int>(); List<int> imgColList = new List<int>();
imgColList.Add(1); imgColList.Add(2);
imgColList.Add(3);
List<RB_Brand_Enterprise_Extend> list = new List<RB_Brand_Enterprise_Extend>(); List<RB_Brand_Enterprise_Extend> list = new List<RB_Brand_Enterprise_Extend>();
DataTable dt = Mall.Common.Plugin.NPOIHelper.ImportYBExceltoDt(fileName, 0, 1, true, imgColList: imgColList, tempFilePath: tempFilePath); Mall.Common.Plugin.ImportExcelNPOIHelper importExcelNPOIHelper = new Common.Plugin.ImportExcelNPOIHelper(tempFilePath);
DataTable dt = importExcelNPOIHelper.ExcelToDataTable(fileName, 0, 0, true, imgColList: imgColList);
if (dt != null && dt.Rows.Count > 0) if (dt != null && dt.Rows.Count > 0)
{ {
foreach (DataRow dr in dt.Rows) foreach (DataRow dr in dt.Rows)
{ {
list.Add(DataRowToModel(dr)); list.Add(DataRowToModel(dr));
} }
} }
return list; return list;
......
...@@ -2230,7 +2230,7 @@ namespace Mall.WebApi.Controllers.User ...@@ -2230,7 +2230,7 @@ namespace Mall.WebApi.Controllers.User
{ {
string rootPath = Path.Combine(Directory.GetCurrentDirectory(), "upfile"); string rootPath = Path.Combine(Directory.GetCurrentDirectory(), "upfile");
string filePath = rootPath + @"\消费品牌.xlsx"; string filePath = rootPath + @"\消费品牌.xlsx";
string tempPath = rootPath + @"\TempImg"; string tempPath = rootPath + @"\TempImport\TempFile";
var list = BrandHelper.ImportYBBrandData(filePath, tempPath); var list = BrandHelper.ImportYBBrandData(filePath, tempPath);
return ApiResult.Success(data: Common.Plugin.JsonHelper.Serialize(list)); return ApiResult.Success(data: Common.Plugin.JsonHelper.Serialize(list));
} }
......
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