diff --git a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Authorization/AuthServices.cs b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Authorization/AuthServices.cs index 48c53c5..3c237c5 100644 --- a/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Authorization/AuthServices.cs +++ b/BPA.SAAS.Manage.Application/AExternalPlatform/Service/Authorization/AuthServices.cs @@ -1,4 +1,7 @@  +using BPA.SAAS.Manage.Core.Org; +using Microsoft.AspNetCore.Authorization; + namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Authorization { @@ -6,6 +9,24 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.Authorization [ApiDescriptionSettings("开放平台", Tag = "授权管理"), AllowAnonymous, NonUnify] public class AuthServices : IDynamicApiController { + private readonly ISqlSugarClient _db; + public AuthServices(ISqlSugarClient db) + { + _db = db; + } + /// + /// 获取加盟商信息 + /// + /// + /// + [HttpGet("/api/authorization/GetCompanyById")] + [AllowAnonymous] + public async Task GetCompanyById(string id) + { + var data = await _db.Queryable().FirstAsync(x => x.Id == id); + + return data; + } } } diff --git a/BPA.SAAS.Manage.Application/BPA.SAAS.Manage.Application.csproj b/BPA.SAAS.Manage.Application/BPA.SAAS.Manage.Application.csproj index 6e8a2cf..6306e4c 100644 --- a/BPA.SAAS.Manage.Application/BPA.SAAS.Manage.Application.csproj +++ b/BPA.SAAS.Manage.Application/BPA.SAAS.Manage.Application.csproj @@ -30,4 +30,10 @@ + + + + + + diff --git a/BPA.SAAS.Manage.Application/DataBase/Services/GoodsService.cs b/BPA.SAAS.Manage.Application/DataBase/Services/GoodsService.cs index bdf4de9..fcb9114 100644 --- a/BPA.SAAS.Manage.Application/DataBase/Services/GoodsService.cs +++ b/BPA.SAAS.Manage.Application/DataBase/Services/GoodsService.cs @@ -202,8 +202,10 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services if (goods == null) throw Oops.Oh("商品不存在"); var goodsbom = _db.Queryable().Where(x => x.Goods_Id == id).ToList(); var goodsTechnology = _db.Queryable().Where(x => x.GoodsId == id).ToList(); + //var FoodMenuGoods = _db.Queryable().Where(x => x.GoodsId == id).ToList(); await _db.Deleteable(goodsbom).ExecuteCommandAsync(); await _db.Deleteable(goodsTechnology).ExecuteCommandAsync(); + //await _db.Deleteable(FoodMenuGoods).ExecuteCommandAsync(); var res = await _db.Deleteable(goods).ExecuteCommandAsync(); _db.Ado.CommitTran(); return res > 0; diff --git a/BPA.SAAS.Manage.Application/System/Services/MenuService.cs b/BPA.SAAS.Manage.Application/System/Services/MenuService.cs index 4ce0f7c..084e647 100644 --- a/BPA.SAAS.Manage.Application/System/Services/MenuService.cs +++ b/BPA.SAAS.Manage.Application/System/Services/MenuService.cs @@ -57,7 +57,7 @@ namespace BPA.SAAS.Manage.Application.System.Services Status = t.Status, IsAdmin=t.IsAdmin, Type= t.Type, - //TypeName= GetTypeName(t.Type), + // TypeName= GetTypeName(t.Type), Children = AllMenus.Where(x => x.Pid == t.Id).Select(x => new MenuTreeDtoOutput { Id = x.Id, @@ -87,42 +87,13 @@ namespace BPA.SAAS.Manage.Application.System.Services Status = y.Status, IsAdmin=y.IsAdmin, Type = y.Type, - // TypeName = GetTypeName(y.Type), + //TypeName = GetTypeName(y.Type), }).ToList() }).ToList() }).ToList(); return data; } - public string GetTypeName(string type) - { - var ary = type.Split(','); - var name = ""; - for (int i = 0; i < ary.Length; i++) - { - if (ary[i] == "0") - { - name += "团餐"; - } - if (ary[i] == "1") - { - name += "门店"; - } - if (ary[i] == "2") - { - name += "后厨"; - } - if (ary[i] == "3") - { - name += "公共"; - } - if(i< ary.Length - 1) - { - name += ","; - } - } - return name; - } /// /// 新增菜单 /// diff --git a/BPA.SAAS.Manage.Core/DataBase/BPA_FoodMenuGoods.cs b/BPA.SAAS.Manage.Core/DataBase/BPA_FoodMenuGoods.cs new file mode 100644 index 0000000..08f05ed --- /dev/null +++ b/BPA.SAAS.Manage.Core/DataBase/BPA_FoodMenuGoods.cs @@ -0,0 +1,24 @@ +using BPA.SAAS.Manage.Core.Base; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPA.SAAS.Manage.Core.DataBase +{ + [SugarTable("bpa_foodmenugoods")] + public class BPA_FoodMenuGoods : IBaseEntity, IGroupId + { + /// + /// 菜谱id + /// + public string FoodMenuId { get; set; } + /// + /// 商品id + /// + public string GoodsId { get; set; } + public string GroupId { get; set; } + } +}