🔄refactor: 调整为SqlSugar

This commit is contained in:
yubaolee
2026-05-24 23:34:27 +08:00
parent 237fc49f2f
commit d2c8f783e1
10 changed files with 130 additions and 166 deletions

View File

@@ -1,25 +1,24 @@
using System;
using OpenAuth.Repository;
using OpenAuth.Repository.Domain;
using OpenAuth.Repository.Interface;
using Infrastructure;
using SqlSugar;
namespace OpenAuth.App
{
public class FormFactory
{
public static IForm CreateForm(Form form, IUnitWork<OpenAuthDBContext> unitWork)
public static IForm CreateForm(Form form, ISqlSugarClient sugarClient)
{
if (form.FrmType == Define.FORM_TYPE_DYNAMIC)
{
return new LeipiForm(unitWork);
return new LeipiForm(sugarClient);
}else if (form.FrmType == Define.FORM_TYPE_DEVELOP)
{
throw new Exception("自定义表单不需要创建数据库表");
}
else
{
return new DragForm(unitWork);
return new DragForm(sugarClient);
}
}
}