|
|
@@ -13,6 +13,7 @@ using System.Threading.Tasks; |
|
|
|
using BPA.SAAS.KitChenManage.Core; |
|
|
|
using BPA.KitChen.GroupMeal.SqlSugar; |
|
|
|
using BPA.SAAS.Manage.Core.System; |
|
|
|
using BPA.SAAS.Manage.Core.Device; |
|
|
|
|
|
|
|
namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.CheckService.Services |
|
|
|
{ |
|
|
@@ -94,5 +95,16 @@ namespace BPA.SAAS.Manage.Application.AExternalPlatform.Service.CheckService.Ser |
|
|
|
return null; |
|
|
|
return data.CreateBy; |
|
|
|
} |
|
|
|
|
|
|
|
public async Task<string> GetAuthKey(int deviceId) |
|
|
|
{ |
|
|
|
var deviceInfo = await SqlSugarDb.Db.Queryable<BPA_DeviceInfo>().ClearFilter().FirstAsync(t => t.AutoKey == deviceId); |
|
|
|
if (deviceInfo == null) |
|
|
|
throw Oops.Oh("设备不存在"); |
|
|
|
var auth = await SqlSugarDb.Db.Queryable<BPA_PlatformAuthorization>().ClearFilter().FirstAsync(t => t.GroupId == deviceInfo.GroupId); |
|
|
|
if (auth == null) |
|
|
|
throw Oops.Oh("不存在授权码"); |
|
|
|
return auth.Key; |
|
|
|
} |
|
|
|
} |
|
|
|
} |