From cf7c40febd4c0863039b6e30af6c06d7717a46b1 Mon Sep 17 00:00:00 2001 From: zhaoy <137053305@qq.com> Date: Thu, 22 Feb 2024 13:45:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BPA.SAAS.KitChenManage.Application.xml | 12 ++++++++++++ .../Store/Services/IStoreService.cs | 5 +++++ .../Store/Services/StoreService.cs | 18 ++++++++++++++++++ .../Store/StoreServices.cs | 9 +++++++++ 4 files changed, 44 insertions(+) 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(); + } + /// /// 添加 /// ///