1.新增销售模块自动审核功能

This commit is contained in:
qmj
2025-09-25 00:03:24 +08:00
parent 858538df17
commit 5def74f70a
11 changed files with 199 additions and 98 deletions
@@ -9,6 +9,8 @@ using System.Web.Http.Description;
using System.Web.UI.WebControls;
using log4net;
using Microsoft.Extensions.Hosting;
using SqlSugar;
using UFIDA.U8.Framework.Api.Common.Entity;
using UFIDA.U8.Framework.Api.ControlObject.Common;
using UFIDA.U8.Framework.Api.ControlObject.Entity;
using UFIDA.U8.Framework.Api.ControlObject.Json;
@@ -16,6 +18,7 @@ using UFIDA.U8.Framework.Api.ControlObject.U8M;
using UFIDA.U8.Framework.Api.Entity;
using UFIDA.U8.Framework.Api.Models;
using UFIDA.U8.Framework.Api.Unit;
using SysU8AccountConfig = UFIDA.U8.Framework.Api.ControlObject.Entity.SysU8AccountConfig;
namespace UFIDA.U8.Framework.Api.Controllers.U8
{
@@ -454,5 +457,41 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8
return ex.Message;
}
}
[HttpPost]
[Route("api/U8/DP/InitSubSystem")]
public async Task<BaseResult<long>> InitSubSystem(Dictionary<string,string> input)
{
try
{
if (!input.TryGetValue("cAppInfo", out var cValue) || string.IsNullOrWhiteSpace(cValue))
{
throw new Exception("参数错误");
}
var info = CommUnit.GetDecrypt(cValue).ToObject<SysSubSystem>();
var db = CommUnit.GetDbClient();
if (await db.Queryable<SysSubSystem>().AnyAsync(a => a.AppKey == info.AppKey))
{
throw new Exception("当前子系统已注册");
}
info.Id=SnowFlakeSingle.instance.NextId();
await db.Insertable(info).ExecuteCommandAsync();
return new BaseResult<long>() { bSuccess = true, message = "注册成功", result = info.Id };
}
catch (Exception ex)
{
_logInfo.Error(ex.Message, ex);
await Task.Delay(1);
return new BaseResult<long>() { bSuccess = false, message = "子系统初始化失败", result = 0 };
}
}
}
}