外部导入pdd格式。增加 格式工厂和 IgoodsConverter转换器

This commit is contained in:
chfei committed 2026-08-13 16:26:33 +08:00
1 parent 99237fae41
commit 7a07e172cd
9 files changed
+989 -1

No files matched your search

@@ -0,0 +1,38 @@
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(),
};
public static PDDFrontProductInfo5 Convert(string data)
{
foreach (var item in _converters)
{
try
{
if (item.IsMatch(data))
{
return item.Convert();
}
}
catch (Exception ex)
{
throw ex;
}
}
return null;
}
}
}