From ed9730ed5536d18539743300850a247522c7de23 Mon Sep 17 00:00:00 2001
From: xiaolipro <2357729423@qq.com>
Date: Tue, 24 Sep 2024 17:31:17 +0800
Subject: [PATCH] =?UTF-8?q?add=EF=BC=9A=E8=8E=B7=E5=8F=96=E6=9C=8D?=
=?UTF-8?q?=E5=8A=A1=E5=95=86code=E6=A0=B9=E6=8D=AE=E5=AE=A2=E6=88=B7id?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Services/TrackPush/TrackPushService.cs | 12 ++++++++++++
.../TrackPushAggregate/ITrackPushConfigRepository.cs | 1 +
.../VEntities/VExternalSubjectEntity.cs | 8 +++++++-
.../Repositories/TrackPushConfigRepository.cs | 8 ++++++++
4 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/src/SJZY.Track.Application/Services/TrackPush/TrackPushService.cs b/src/SJZY.Track.Application/Services/TrackPush/TrackPushService.cs
index a5be2639..93a5e4c7 100644
--- a/src/SJZY.Track.Application/Services/TrackPush/TrackPushService.cs
+++ b/src/SJZY.Track.Application/Services/TrackPush/TrackPushService.cs
@@ -135,6 +135,18 @@ public class TrackPushService : ApplicationService
return true;
}
+
+ ///
+ /// 获取服务商code根据客户id
+ ///
+ ///
+ ///
+ [HttpGet("GetServiceCodeByCustomerId")]
+ public async Task GetServiceCodeByCustomerId(int customerId)
+ {
+ return await _trackPushConfigRepository.GetServiceCodeByCustomerIdAsync(customerId);
+ }
+
///
/// 轨迹推送配置内容编辑
///
diff --git a/src/SJZY.Track.Domain/Aggregates/TrackPushAggregate/ITrackPushConfigRepository.cs b/src/SJZY.Track.Domain/Aggregates/TrackPushAggregate/ITrackPushConfigRepository.cs
index ab97e52f..7784d57f 100644
--- a/src/SJZY.Track.Domain/Aggregates/TrackPushAggregate/ITrackPushConfigRepository.cs
+++ b/src/SJZY.Track.Domain/Aggregates/TrackPushAggregate/ITrackPushConfigRepository.cs
@@ -38,4 +38,5 @@ public interface ITrackPushConfigRepository : IBasicRepository> QueryTrackPullMappingsAsync(QueryTrackPullMappingsInputVO input);
Task> GetTrackPushContentListAsync(int subSystemId, int customerId);
+ Task GetServiceCodeByCustomerIdAsync(int customerId);
}
diff --git a/src/SJZY.Track.Domain/VEntities/VExternalSubjectEntity.cs b/src/SJZY.Track.Domain/VEntities/VExternalSubjectEntity.cs
index 11bfd62d..376ae476 100644
--- a/src/SJZY.Track.Domain/VEntities/VExternalSubjectEntity.cs
+++ b/src/SJZY.Track.Domain/VEntities/VExternalSubjectEntity.cs
@@ -1,4 +1,4 @@
-namespace SJZY.Track.Domain.VEntities;
+namespace SJZY.Track.Domain.VEntities;
///
/// 外部主体
@@ -125,4 +125,10 @@ public class VExternalSubjectEntity : IFullAuditedBasicEntitys
///
[SugarColumn(ColumnName = "VerifiedName")]
public string VerifiedName { get; set; }
+
+ ///
+ /// api服务商代码
+ ///
+ [SugarColumn(ColumnName = "ApiServiceCode")]
+ public string ApiServiceCode { get; set; }
}
diff --git a/src/SJZY.Track.Repository/Repositories/TrackPushConfigRepository.cs b/src/SJZY.Track.Repository/Repositories/TrackPushConfigRepository.cs
index 4d890d42..62883d47 100644
--- a/src/SJZY.Track.Repository/Repositories/TrackPushConfigRepository.cs
+++ b/src/SJZY.Track.Repository/Repositories/TrackPushConfigRepository.cs
@@ -217,4 +217,12 @@ public class TrackPushConfigRepository : BasicRepository,
})
.ToListAsync();
}
+
+ public async Task GetServiceCodeByCustomerIdAsync(int customerId)
+ {
+ return await Context.Queryable()
+ .Where(x => x.Id == customerId)
+ .Select(x => x.ApiServiceCode)
+ .FirstAsync();
+ }
}