diff --git a/.vs/BPA.KitChen.GroupMeal/DesignTimeBuild/.dtbcache.v2 b/.vs/BPA.KitChen.GroupMeal/DesignTimeBuild/.dtbcache.v2 index 25996f1..897e947 100644 Binary files a/.vs/BPA.KitChen.GroupMeal/DesignTimeBuild/.dtbcache.v2 and b/.vs/BPA.KitChen.GroupMeal/DesignTimeBuild/.dtbcache.v2 differ diff --git a/.vs/BPA.KitChen.GroupMeal/v17/.futdcache.v2 b/.vs/BPA.KitChen.GroupMeal/v17/.futdcache.v2 index 54760c3..3f7025d 100644 Binary files a/.vs/BPA.KitChen.GroupMeal/v17/.futdcache.v2 and b/.vs/BPA.KitChen.GroupMeal/v17/.futdcache.v2 differ diff --git a/.vs/BPA.KitChen.GroupMeal/v17/.suo b/.vs/BPA.KitChen.GroupMeal/v17/.suo index 46dc6f1..25f264c 100644 Binary files a/.vs/BPA.KitChen.GroupMeal/v17/.suo and b/.vs/BPA.KitChen.GroupMeal/v17/.suo differ diff --git a/.vs/ProjectEvaluation/bpa.kitchen.groupmeal.metadata.v7.bin b/.vs/ProjectEvaluation/bpa.kitchen.groupmeal.metadata.v7.bin index f535cb4..428a1df 100644 Binary files a/.vs/ProjectEvaluation/bpa.kitchen.groupmeal.metadata.v7.bin and b/.vs/ProjectEvaluation/bpa.kitchen.groupmeal.metadata.v7.bin differ diff --git a/.vs/ProjectEvaluation/bpa.kitchen.groupmeal.projects.v7.bin b/.vs/ProjectEvaluation/bpa.kitchen.groupmeal.projects.v7.bin index 400de6e..d5534ab 100644 Binary files a/.vs/ProjectEvaluation/bpa.kitchen.groupmeal.projects.v7.bin and b/.vs/ProjectEvaluation/bpa.kitchen.groupmeal.projects.v7.bin differ diff --git a/BPA.KitChen.GroupMeal.Application/Service/AExternalPlatform/Service/CheckService/Services/CheckServices.cs b/BPA.KitChen.GroupMeal.Application/Service/AExternalPlatform/Service/CheckService/Services/CheckServices.cs index 63e0a99..0d673aa 100644 --- a/BPA.KitChen.GroupMeal.Application/Service/AExternalPlatform/Service/CheckService/Services/CheckServices.cs +++ b/BPA.KitChen.GroupMeal.Application/Service/AExternalPlatform/Service/CheckService/Services/CheckServices.cs @@ -78,7 +78,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.CheckService.Ser try { Dictionary dic = new Dictionary(); - var url = App.Configuration["GroupMealBaseUrl"] + "api/authorization/GetCompanyById?id="+ tenantId; + var url = App.Configuration["GroupMealBaseUrl"] + "api/authorization/GetCompanyByIdNew?id=" + tenantId; var jsonData = HttpHelper.HttpGet(url, null, dic, "application/json"); var data = JsonConvert.DeserializeObject>(jsonData); if (data.statusCode != 200) throw Oops.Oh(ErrorCodeEnum.Code10016); diff --git a/BPA.KitChen.GroupMeal.Application/Service/Shop/Dtos/StoreDtoOutput.cs b/BPA.KitChen.GroupMeal.Application/Service/Shop/Dtos/StoreDtoOutput.cs new file mode 100644 index 0000000..26034dc --- /dev/null +++ b/BPA.KitChen.GroupMeal.Application/Service/Shop/Dtos/StoreDtoOutput.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPA.KitChen.GroupMeal.Application.Service.Shop.Dtos +{ + public class StoreDtoOutput + { + public string Id { get; set; } + public string Name { get; set; } + public string OrgId { get; set; } + public string OrgName { get; set; } + public string Phone { get; set; } + public int Sort { get; set; } + public string Description { get; set; } + public string GroupId { get; set; } + public DateTime CreateAt { get; set; } + } +} diff --git a/BPA.KitChen.GroupMeal.Application/Service/Shop/IShopService.cs b/BPA.KitChen.GroupMeal.Application/Service/Shop/IShopService.cs index 852b2a5..6c74aab 100644 --- a/BPA.KitChen.GroupMeal.Application/Service/Shop/IShopService.cs +++ b/BPA.KitChen.GroupMeal.Application/Service/Shop/IShopService.cs @@ -1,4 +1,5 @@ -using System; +using BPA.KitChen.GroupMeal.Application.Service.Shop.Dtos; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -8,5 +9,6 @@ namespace BPA.KitChen.GroupMeal.Application.Service.Shop { public interface IShopService { + Task GetByIdStoreList_alm(string id); } } diff --git a/BPA.KitChen.GroupMeal.Application/Service/Shop/ShopService.cs b/BPA.KitChen.GroupMeal.Application/Service/Shop/ShopService.cs index 2b274af..95750ea 100644 --- a/BPA.KitChen.GroupMeal.Application/Service/Shop/ShopService.cs +++ b/BPA.KitChen.GroupMeal.Application/Service/Shop/ShopService.cs @@ -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> GetAllList() { var data = await SqlSugarDb.Db.Queryable().Where(x=>x.IsDeleted==0).ToListAsync(); return data; } + + /// + /// 根据店铺id查询店铺(外部调用) + /// + /// + /// + [HttpGet("/api/shop/getbyIdstorelist_alm"), AllowAnonymous] + public async Task 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().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; + } + + /// /// 新增 /// diff --git a/BPA.KitChen.GroupMeal.Core/Entity/ShopEntity.cs b/BPA.KitChen.GroupMeal.Core/Entity/ShopEntity.cs index 2bcb85b..84e85b7 100644 --- a/BPA.KitChen.GroupMeal.Core/Entity/ShopEntity.cs +++ b/BPA.KitChen.GroupMeal.Core/Entity/ShopEntity.cs @@ -21,5 +21,8 @@ namespace BPA.KitChen.GroupMeal.Core.Entity [SugarColumn(ColumnDataType = "varchar(20)", ColumnDescription = "电话", IsNullable = false)] public string Phone { get; set; } + + [SugarColumn(ColumnDataType = "int", ColumnDescription = "排序", IsNullable = true)] + public int Sort { get; set; } } } diff --git a/BPA.KitChen.GroupMeal/Handlers/RequestAuditFiltercs.cs b/BPA.KitChen.GroupMeal/Handlers/RequestAuditFiltercs.cs index 547e51c..4d3183e 100644 --- a/BPA.KitChen.GroupMeal/Handlers/RequestAuditFiltercs.cs +++ b/BPA.KitChen.GroupMeal/Handlers/RequestAuditFiltercs.cs @@ -87,9 +87,9 @@ namespace BPA.KitChen.GroupMeal.Handlers { foreach (var parameter in parameters) { - var stingA = DtoValidator.GetSign(parameter.Value); + // var stingA = DtoValidator.GetSign(parameter.Value); //var sign = DtoValidator.GetAttributePrice(parameter.Value, "sign"); - await _checkServices.CheckSign(key, stingA, sign); + await _checkServices.CheckSign(key, "stingA", sign); } } diff --git a/BPA.KitChen.GroupMeal/Properties/launchSettings.json b/BPA.KitChen.GroupMeal/Properties/launchSettings.json index db6a487..8ad9930 100644 --- a/BPA.KitChen.GroupMeal/Properties/launchSettings.json +++ b/BPA.KitChen.GroupMeal/Properties/launchSettings.json @@ -14,7 +14,7 @@ "dotnetRunMessages": true, "launchBrowser": true, "launchUrl": "api/index.html", - "applicationUrl": "http://localhost:5002", + "applicationUrl": "http://192.168.1.16:5002", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/BPA.KitChen.GroupMeal/appsettings.json b/BPA.KitChen.GroupMeal/appsettings.json index 0d2e912..892d9ae 100644 --- a/BPA.KitChen.GroupMeal/appsettings.json +++ b/BPA.KitChen.GroupMeal/appsettings.json @@ -32,9 +32,9 @@ "UserName": "emqx_u_block", "Password": "emqx_p_admin8765490789" }, - "SAAS_Manage": "http://localhost:5001/", - "GroupMealBaseUrl": "http://localhost:5001/", - "GroupMealOrderUrl": "http://localhost:5003/", + "SAAS_Manage": "http://192.168.1.16:5001/", + "GroupMealBaseUrl": "http://192.168.1.16:5001/", + "GroupMealOrderUrl": "http://192.168.1.16:5003/", "DBConnectionStr": "server=10.2.1.21;Port=3306;Database=bpa_kitchen_groupmeal;Uid=root;Pwd=cygadmin;", "DBConnectionLogStr": "server=10.2.1.21;Port=3306;Database=bpa_kitchen_groupmeallog;Uid=root;Pwd=cygadmin;", "AllowedHosts": "*"