@@ -78,7 +78,7 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.CheckService.Ser | |||||
try | try | ||||
{ | { | ||||
Dictionary<string, string> dic = new Dictionary<string, string>(); | Dictionary<string, string> dic = new Dictionary<string, string>(); | ||||
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 jsonData = HttpHelper.HttpGet(url, null, dic, "application/json"); | ||||
var data = JsonConvert.DeserializeObject<ResultSAASManageDto<CompanyDto>>(jsonData); | var data = JsonConvert.DeserializeObject<ResultSAASManageDto<CompanyDto>>(jsonData); | ||||
if (data.statusCode != 200) throw Oops.Oh(ErrorCodeEnum.Code10016); | if (data.statusCode != 200) throw Oops.Oh(ErrorCodeEnum.Code10016); | ||||
@@ -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; } | |||||
} | |||||
} |
@@ -1,4 +1,5 @@ | |||||
using System; | |||||
using BPA.KitChen.GroupMeal.Application.Service.Shop.Dtos; | |||||
using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | using System.Linq; | ||||
using System.Text; | using System.Text; | ||||
@@ -8,5 +9,6 @@ namespace BPA.KitChen.GroupMeal.Application.Service.Shop | |||||
{ | { | ||||
public interface IShopService | public interface IShopService | ||||
{ | { | ||||
Task<StoreDtoOutput> GetByIdStoreList_alm(string id); | |||||
} | } | ||||
} | } |
@@ -7,6 +7,7 @@ using Furion.DependencyInjection; | |||||
using Furion.DynamicApiController; | using Furion.DynamicApiController; | ||||
using Furion.FriendlyException; | using Furion.FriendlyException; | ||||
using Mapster; | using Mapster; | ||||
using Microsoft.AspNetCore.Authorization; | |||||
using Microsoft.AspNetCore.Components.Forms; | using Microsoft.AspNetCore.Components.Forms; | ||||
using Microsoft.AspNetCore.Mvc; | using Microsoft.AspNetCore.Mvc; | ||||
using SqlSugar; | using SqlSugar; | ||||
@@ -41,12 +42,38 @@ namespace BPA.KitChen.GroupMeal.Application.Service.Shop | |||||
}; | }; | ||||
} | } | ||||
[AllowAnonymous] | |||||
public async Task<List<ShopEntity>> GetAllList() | public async Task<List<ShopEntity>> GetAllList() | ||||
{ | { | ||||
var data = await SqlSugarDb.Db.Queryable<ShopEntity>().Where(x=>x.IsDeleted==0).ToListAsync(); | var data = await SqlSugarDb.Db.Queryable<ShopEntity>().Where(x=>x.IsDeleted==0).ToListAsync(); | ||||
return data; | 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> | ||||
/// 新增 | /// 新增 | ||||
/// </summary> | /// </summary> | ||||
@@ -21,5 +21,8 @@ namespace BPA.KitChen.GroupMeal.Core.Entity | |||||
[SugarColumn(ColumnDataType = "varchar(20)", ColumnDescription = "电话", IsNullable = false)] | [SugarColumn(ColumnDataType = "varchar(20)", ColumnDescription = "电话", IsNullable = false)] | ||||
public string Phone { get; set; } | public string Phone { get; set; } | ||||
[SugarColumn(ColumnDataType = "int", ColumnDescription = "排序", IsNullable = true)] | |||||
public int Sort { get; set; } | |||||
} | } | ||||
} | } |
@@ -87,9 +87,9 @@ namespace BPA.KitChen.GroupMeal.Handlers | |||||
{ | { | ||||
foreach (var parameter in parameters) | foreach (var parameter in parameters) | ||||
{ | { | ||||
var stingA = DtoValidator.GetSign(parameter.Value); | |||||
// var stingA = DtoValidator.GetSign(parameter.Value); | |||||
//var sign = DtoValidator.GetAttributePrice(parameter.Value, "sign"); | //var sign = DtoValidator.GetAttributePrice(parameter.Value, "sign"); | ||||
await _checkServices.CheckSign(key, stingA, sign); | |||||
await _checkServices.CheckSign(key, "stingA", sign); | |||||
} | } | ||||
} | } | ||||
@@ -14,7 +14,7 @@ | |||||
"dotnetRunMessages": true, | "dotnetRunMessages": true, | ||||
"launchBrowser": true, | "launchBrowser": true, | ||||
"launchUrl": "api/index.html", | "launchUrl": "api/index.html", | ||||
"applicationUrl": "http://localhost:5002", | |||||
"applicationUrl": "http://192.168.1.16:5002", | |||||
"environmentVariables": { | "environmentVariables": { | ||||
"ASPNETCORE_ENVIRONMENT": "Development" | "ASPNETCORE_ENVIRONMENT": "Development" | ||||
} | } | ||||
@@ -32,9 +32,9 @@ | |||||
"UserName": "emqx_u_block", | "UserName": "emqx_u_block", | ||||
"Password": "emqx_p_admin8765490789" | "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;", | "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;", | "DBConnectionLogStr": "server=10.2.1.21;Port=3306;Database=bpa_kitchen_groupmeallog;Uid=root;Pwd=cygadmin;", | ||||
"AllowedHosts": "*" | "AllowedHosts": "*" | ||||