Files
KJD/TEMUKJD/BLL/ImportConverters/ConvertToPddFactory.cs
T
2026-08-24 15:29:01 +08:00

43 lines
799 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(),
new ConverterWXToPddV3(),
};
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;
}
}
}