fix sth
This commit is contained in:
parent
625846967b
commit
577f5aec95
@ -146,13 +146,13 @@ public class TrackPushService : ApplicationServiceBase
|
||||
/// <summary>
|
||||
/// 获取轨迹推送内容
|
||||
/// </summary>
|
||||
/// <param name="AppKey"></param>
|
||||
/// <param name="appKey"></param>
|
||||
/// <param name="customer"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("Track/GetTrackPushContentList")]
|
||||
public async Task<List<TrackPushContentDto>> GetTrackPushContentListAsync(string AppKey, string customer)
|
||||
public async Task<List<TrackPushContentDto>> GetTrackPushContentListAsync(string appKey, string customer)
|
||||
{
|
||||
var list = await _trackPushConfigRepository.GetTrackPushContentListAsync(AppKey, customer);
|
||||
var list = await _trackPushConfigRepository.GetTrackPushContentListAsync(appKey, customer);
|
||||
|
||||
var result = ObjectMapper.Map<List<GetTrackPushContentListVo>, List<TrackPushContentDto>>(list);
|
||||
|
||||
|
||||
@ -371,7 +371,7 @@ public partial class TrackService : ApplicationServiceBase
|
||||
private async Task TrackUpsertValidation(
|
||||
bool isAdd,
|
||||
string? esId,
|
||||
string AppKey,
|
||||
string appKey,
|
||||
int orderId,
|
||||
string orderNo,
|
||||
string trackCode,
|
||||
@ -424,7 +424,7 @@ public partial class TrackService : ApplicationServiceBase
|
||||
|
||||
#region 轨迹内容中的配置规则检查
|
||||
|
||||
var trackContent = await _trackContentRepository.GetByCodeAsync(AppKey, trackCode);
|
||||
var trackContent = await _trackContentRepository.GetByCodeAsync(appKey, trackCode);
|
||||
if (trackContent == null)
|
||||
{
|
||||
throw new BusinessException(message: $"轨迹代码:{trackCode}轨迹内容不存在");
|
||||
|
||||
@ -16,16 +16,16 @@ public class TrackPullCacheService : ITransientDependency
|
||||
_objectMapper = objectMapper;
|
||||
}
|
||||
|
||||
public string TrackPullKey(string AppKey, string serviceProviderCode) =>
|
||||
$"{GlobalConst.TrackPullKeyPrefix}:{AppKey}:{serviceProviderCode}";
|
||||
public string TrackPullKey(string appKey, string serviceProviderCode) =>
|
||||
$"{GlobalConst.TrackPullKeyPrefix}:{appKey}:{serviceProviderCode}";
|
||||
|
||||
public async Task<TrackPullParamsWithContentDto?> GetPullParamsWithContentAsync(string AppKey,
|
||||
public async Task<TrackPullParamsWithContentDto?> GetPullParamsWithContentAsync(string appKey,
|
||||
string serviceProviderCode)
|
||||
{
|
||||
var data = await RedisHelper.Client.GetAsync<TrackPullParamsWithContentDto>(TrackPullContentKey(
|
||||
AppKey, serviceProviderCode));
|
||||
appKey, serviceProviderCode));
|
||||
|
||||
var pullId = await _trackPullConfigRepository.FindIdAsync(AppKey, serviceProviderCode);
|
||||
var pullId = await _trackPullConfigRepository.FindIdAsync(appKey, serviceProviderCode);
|
||||
data ??= await SetPullConfigAsync(pullId);
|
||||
|
||||
return data;
|
||||
@ -59,6 +59,6 @@ public class TrackPullCacheService : ITransientDependency
|
||||
return data;
|
||||
}
|
||||
|
||||
public static string TrackPullContentKey(string AppKey, string serviceProviderCode) =>
|
||||
$"{GlobalConst.TrackPullContentKeyPrefix}:{AppKey}:{serviceProviderCode}";
|
||||
public static string TrackPullContentKey(string appKey, string serviceProviderCode) =>
|
||||
$"{GlobalConst.TrackPullContentKeyPrefix}:{appKey}:{serviceProviderCode}";
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ public interface IOrderRepository : IBasicRepository<OrderEntity>
|
||||
/// 更新推送预警单
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<int> PushWarnOrdersAsync(string AppKey, int pageSize, int pageindex);
|
||||
Task<int> PushWarnOrdersAsync(string appKey, int pageSize, int pageindex);
|
||||
|
||||
/// <summary>
|
||||
/// 更新缺失标记,时区缺失和发生地缺失标记,1表示时区,2表示发生地,3表示两种
|
||||
|
||||
@ -6,7 +6,7 @@ namespace TrackCenter.Domain.Aggregates.TrackContentAggregate;
|
||||
/// 轨迹内容映射表
|
||||
/// </summary>
|
||||
[SugarTable("t_track_content_map")]
|
||||
public class TrackContentMapEntity : FullAuditedEntity<int>
|
||||
public class TrackContentMapEntity : FullAuditedEntity<int, int>
|
||||
{
|
||||
/// <summary>
|
||||
/// 自增主键
|
||||
|
||||
@ -50,5 +50,5 @@ public interface ITrackPullConfigRepository : IBasicRepository<TrackPullConfigEn
|
||||
Task<bool> UpdateContentAsync(TrackPullContentConfigEntity updateObj);
|
||||
|
||||
Task<bool> IsContentAnyAsync(Expression<Func<TrackPullContentConfigEntity, bool>> whereExpression);
|
||||
Task<int> FindIdAsync(string AppKey, string serviceProviderCode);
|
||||
Task<int> FindIdAsync(string appKey, string serviceProviderCode);
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@ namespace TrackCenter.Domain.Aggregates.TrackPullAggregate;
|
||||
/// 轨迹拉取内容配置表
|
||||
/// </summary>
|
||||
[SugarTable("t_track_pull_content_config")]
|
||||
public class TrackPullContentConfigEntity : FullAuditedEntity<int>
|
||||
public class TrackPullContentConfigEntity : FullAuditedEntity<int, int>
|
||||
{
|
||||
/// <summary>
|
||||
/// 自增主键
|
||||
|
||||
@ -7,7 +7,7 @@ namespace TrackCenter.Domain.Aggregates.TrackPushAggregate;
|
||||
/// 轨迹推送内容配置表
|
||||
/// </summary>
|
||||
[SugarTable("t_track_push_content_config")]
|
||||
public class TrackPushContentConfigEntity : FullAuditedEntity<int>
|
||||
public class TrackPushContentConfigEntity : FullAuditedEntity<int, int>
|
||||
{
|
||||
/// <summary>
|
||||
/// 自增主键
|
||||
|
||||
@ -3,7 +3,7 @@ using Fake.Domain.Entities.Auditing;
|
||||
namespace TrackCenter.Domain.Aggregates.WarningAggregate.Complete;
|
||||
|
||||
[SugarTable("t_warning_complete_rule_item", TableDescription = "完整预警规则项")]
|
||||
public sealed class CompleteWarningRuleItemEntity : FullAuditedEntity<int>
|
||||
public sealed class CompleteWarningRuleItemEntity : FullAuditedEntity<int, int>
|
||||
{
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
@ -5,7 +5,7 @@ namespace TrackCenter.Domain.Aggregates.WarningAggregate.Return;
|
||||
|
||||
// 预警重试推送任务
|
||||
[SugarTable("t_warning_return_retry_task", TableDescription = "回传预警重试推送任务")]
|
||||
public sealed class ReturnWarningRetryPushTaskEntity : FullAuditedEntity<int>
|
||||
public sealed class ReturnWarningRetryPushTaskEntity : FullAuditedEntity<int, int>
|
||||
{
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
@ -4,7 +4,7 @@ namespace TrackCenter.Domain.Aggregates.WarningAggregate.Return;
|
||||
|
||||
// 回传预警规则项
|
||||
[SugarTable("t_warning_return_rule_item", TableDescription = "回传预警规则项")]
|
||||
public sealed class ReturnWarningRuleItemEntity : FullAuditedEntity<int>
|
||||
public sealed class ReturnWarningRuleItemEntity : FullAuditedEntity<int, int>
|
||||
{
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
@ -6,7 +6,7 @@ namespace TrackCenter.Domain.Aggregates.WarningAggregate.Transport;
|
||||
|
||||
[SugarTable("t_warning_transport_generate_task", TableDescription = "运输时效预警明细生成任务")]
|
||||
[SugarIndex("IDX_PlanExecutionTime_IsClosed", nameof(PlanExecutionTime), OrderByType.Asc, nameof(IsClosed), OrderByType.Asc)]
|
||||
public sealed class TransportWarningDetailsGenerateTaskEntity : FullAuditedEntity<int>
|
||||
public sealed class TransportWarningDetailsGenerateTaskEntity : FullAuditedEntity<int, int>
|
||||
{
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
@ -5,7 +5,7 @@ namespace TrackCenter.Domain.Aggregates.WarningAggregate.Transport;
|
||||
|
||||
// 运输时效场景
|
||||
[SugarTable("t_warning_transport_scene", TableDescription = "运输时效规则场景")]
|
||||
public sealed class TransportWarningSceneEntity : FullAuditedEntity<int>
|
||||
public sealed class TransportWarningSceneEntity : FullAuditedEntity<int, int>
|
||||
{
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
@ -5,7 +5,7 @@ namespace TrackCenter.Domain.Aggregates.WarningAggregate.Transport;
|
||||
|
||||
// 运输时效场景规则项
|
||||
[SugarTable("t_warning_transport_scene_rule_item", TableDescription = "运输时效规则场景规则项")]
|
||||
public sealed class TransportWarningSceneRuleItemEntity : FullAuditedEntity<int>
|
||||
public sealed class TransportWarningSceneRuleItemEntity : FullAuditedEntity<int, int>
|
||||
{
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
@ -36,22 +36,22 @@ public sealed class WarningRuleEntity : FullAuditedAggregateRoot<int, int>
|
||||
{
|
||||
}
|
||||
|
||||
public WarningRuleEntity(int id, string name, string AppKey, string customer, bool isEnabled, int warningType, string version)
|
||||
public WarningRuleEntity(int id, string name, string appKey, string customer, bool isEnabled, int warningType, string version)
|
||||
{
|
||||
Id = id;
|
||||
Name = name;
|
||||
AppKey = AppKey;
|
||||
AppKey = appKey;
|
||||
Customer = customer;
|
||||
IsEnabled = isEnabled;
|
||||
WarningType = warningType;
|
||||
Version = version;
|
||||
}
|
||||
|
||||
public WarningRuleEntity(int id, string name, string AppKey, string customer, bool isEnabled, int warningType)
|
||||
public WarningRuleEntity(int id, string name, string appKey, string customer, bool isEnabled, int warningType)
|
||||
{
|
||||
Id = id;
|
||||
Name = name;
|
||||
AppKey = AppKey;
|
||||
AppKey = appKey;
|
||||
Customer = customer;
|
||||
IsEnabled = isEnabled;
|
||||
WarningType = warningType;
|
||||
@ -59,8 +59,8 @@ public sealed class WarningRuleEntity : FullAuditedAggregateRoot<int, int>
|
||||
}
|
||||
|
||||
// 应用+客户id确定命中规则主体
|
||||
public bool CanHitRule(string AppKey, string customer)
|
||||
public bool CanHitRule(string appKey, string customer)
|
||||
{
|
||||
return AppKey == AppKey && Customer == customer;
|
||||
return AppKey == appKey && Customer == customer;
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ namespace TrackCenter.Domain.VEntities;
|
||||
/// 服务商主表
|
||||
/// </summary>
|
||||
[SugarTable("v_service_provider")]
|
||||
public class VServiceProviderEntity : FullAuditedEntity<int>
|
||||
public class VServiceProviderEntity : FullAuditedEntity<int, int>
|
||||
{
|
||||
/// <summary>
|
||||
/// 自增主键
|
||||
|
||||
@ -308,14 +308,14 @@ public class OrderRepository : BasicRepository<OrderEntity>, IOrderRepository, I
|
||||
/// <summary>
|
||||
/// 更新推送预警单
|
||||
/// </summary>
|
||||
/// <param name="AppKey"></param>
|
||||
/// <param name="appKey"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
/// <param name="pageindex"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<int> PushWarnOrdersAsync(string AppKey, int pageSize, int pageindex)
|
||||
public async Task<int> PushWarnOrdersAsync(string appKey, int pageSize, int pageindex)
|
||||
{
|
||||
var ordersToUpdate = await Context.Queryable<OrderEntity>()
|
||||
.Where(b => b.AppKey == AppKey && !b.IsCompleted && b.QuestionType != TrackProblemType.Error)
|
||||
.Where(b => b.AppKey == appKey && !b.IsCompleted && b.QuestionType != TrackProblemType.Error)
|
||||
.Select(b => new
|
||||
{
|
||||
b.LatestPushTime,
|
||||
|
||||
@ -152,11 +152,11 @@ public class TrackPullConfigRepository : BasicRepository<TrackPullConfigEntity>,
|
||||
return await Context.Queryable<TrackPullContentConfigEntity>().Where(whereExpression).AnyAsync();
|
||||
}
|
||||
|
||||
public async Task<int> FindIdAsync(string AppKey, string serviceProviderCode)
|
||||
public async Task<int> FindIdAsync(string appKey, string serviceProviderCode)
|
||||
{
|
||||
return await AsQueryable()
|
||||
.LeftJoin<VServiceProviderEntity>((trackPull, service) => trackPull.ServiceProviderId == service.Id)
|
||||
.Where((trackPull, service) => trackPull.AppKey == AppKey && service.Code == serviceProviderCode)
|
||||
.Where((trackPull, service) => trackPull.AppKey == appKey && service.Code == serviceProviderCode)
|
||||
.Select(trackPull => trackPull.Id)
|
||||
.FirstAsync();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user