|
|
@@ -7,6 +7,7 @@ using Furion.DependencyInjection; |
|
|
|
using Furion.DynamicApiController; |
|
|
|
using Furion.FriendlyException; |
|
|
|
using Mapster; |
|
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
|
using Microsoft.AspNetCore.Components.Forms; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using SqlSugar; |
|
|
@@ -41,12 +42,38 @@ namespace BPA.KitChen.GroupMeal.Application.Service.Shop |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
[AllowAnonymous] |
|
|
|
public async Task<List<ShopEntity>> GetAllList() |
|
|
|
{ |
|
|
|
var data = await SqlSugarDb.Db.Queryable<ShopEntity>().Where(x=>x.IsDeleted==0).ToListAsync(); |
|
|
|
return data; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 根据店铺id查询店铺(外部调用) |
|
|
|
/// </summary> |
|
|
|
/// <param name="id"></param> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpGet("/api/shop/getbyIdstorelist_alm"), AllowAnonymous] |
|
|
|
public async Task<StoreDtoOutput> GetByIdStoreList_alm(string id) |
|
|
|
{ |
|
|
|
string groupId = App.HttpContext.Request.Headers["groupId"].ToString(); |
|
|
|
if (string.IsNullOrWhiteSpace(groupId)) throw Oops.Oh("加盟商id不能为空"); |
|
|
|
var res = await SqlSugarDb.Db.Queryable<ShopEntity>().Where(x => x.GroupId == groupId && x.Id == id) |
|
|
|
.Select(t => new StoreDtoOutput |
|
|
|
{ |
|
|
|
CreateAt = t.CreateAt, |
|
|
|
Id = t.Id, |
|
|
|
Name = t.Name, |
|
|
|
Phone = t.Phone, |
|
|
|
OrgId = t.OrgId, |
|
|
|
}).OrderBy(t => t.Sort).OrderBy(x => x.CreateAt, OrderByType.Desc).FirstAsync(); |
|
|
|
|
|
|
|
return res; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 新增 |
|
|
|
/// </summary> |
|
|
|