diff --git a/BPA.SAAS.KitChenManage.Application/BPA.SAAS.KitChenManage.Application.xml b/BPA.SAAS.KitChenManage.Application/BPA.SAAS.KitChenManage.Application.xml index de8299e..cf2b156 100644 --- a/BPA.SAAS.KitChenManage.Application/BPA.SAAS.KitChenManage.Application.xml +++ b/BPA.SAAS.KitChenManage.Application/BPA.SAAS.KitChenManage.Application.xml @@ -254,6 +254,12 @@ + + + 查询所有店铺 + + + 添加 @@ -310,6 +316,12 @@ + + + 查询所有店铺 + + + 添加 diff --git a/BPA.SAAS.KitChenManage.Application/Store/Services/IStoreService.cs b/BPA.SAAS.KitChenManage.Application/Store/Services/IStoreService.cs index 4d2f354..ec83b3f 100644 --- a/BPA.SAAS.KitChenManage.Application/Store/Services/IStoreService.cs +++ b/BPA.SAAS.KitChenManage.Application/Store/Services/IStoreService.cs @@ -17,6 +17,11 @@ namespace BPA.SAAS.KitChenManage.Application.Store.Services /// Task Page(StoreDtoPageInput input); /// + /// 查询所有店铺 + /// + /// + Task> GetStoreList(); + /// /// 添加 /// /// diff --git a/BPA.SAAS.KitChenManage.Application/Store/Services/StoreService.cs b/BPA.SAAS.KitChenManage.Application/Store/Services/StoreService.cs index 3cf9239..dd6ecd8 100644 --- a/BPA.SAAS.KitChenManage.Application/Store/Services/StoreService.cs +++ b/BPA.SAAS.KitChenManage.Application/Store/Services/StoreService.cs @@ -48,6 +48,24 @@ namespace BPA.SAAS.KitChenManage.Application.Store.Services }; return util; } + public async Task> GetStoreList() + { + RefAsync total = 0; + var res = await _db.Queryable() + .Select(t => new StoreDtoOutput + { + CreateAt = t.CreateAt, + Id = t.Id, + Name = t.Name, + Phone = t.Phone, + Description = t.Description, + OrgName = t.OrgName, + OrgId = t.OrgId, + Sort = t.Sort, + }).OrderBy(t => t.Sort).OrderBy(x => x.CreateAt, OrderByType.Desc).ToListAsync(); + + return res; + } /// /// 添加 /// diff --git a/BPA.SAAS.KitChenManage.Application/Store/StoreServices.cs b/BPA.SAAS.KitChenManage.Application/Store/StoreServices.cs index cb4f569..ee9793a 100644 --- a/BPA.SAAS.KitChenManage.Application/Store/StoreServices.cs +++ b/BPA.SAAS.KitChenManage.Application/Store/StoreServices.cs @@ -29,6 +29,15 @@ namespace BPA.SAAS.KitChenManage.Application.Store return await _storeService.Page(input); } /// + /// 查询所有店铺 + /// + /// + [HttpGet("/api/store/getstorelist")] + public async Task> GetStoreList() + { + return await _storeService.GetStoreList(); + } + /// /// 添加 /// ///