Files
KJD_WebService/TEMUKJD/BLL/ImportConverters/ConvertToPddFactory.cs
T
chfei b949d0a67e 新增导入格式
新增文件编码识别
新增编码 GB18030
2026-08-21 16:16:38 +08:00

42 lines
770 B
C#

using AllBase.Model.Result.PDDResult;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TemuKJD.BLL.ImportConverters;
namespace TemuKJD.BLL.ImportConverts
{
public class ConverterToPddFactory
{
private static List<IGoodsConverter> _converters = new List<IGoodsConverter>
{
new ConverterToPddV5(),
new ConverterWXToPddV1(),
new ConverterWXToPddV2(),
};
public static PDDFrontProductInfo5 Convert(string filePath)
{
foreach (IGoodsConverter item in _converters)
{
try
{
item.ReadContent(filePath);
if (item.IsMatch())
{
return item.Convert();
}
}
catch (Exception ex)
{
throw ex;
}
}
return null;
}
}
}