This commit is contained in:
xiaolipro 2024-08-20 09:07:19 +08:00
parent 1a21180ac7
commit 4ddad722e1
198 changed files with 494 additions and 358 deletions

View File

@ -1,33 +1,34 @@
root = true
# EditorConfig is awesome: https://EditorConfig.org # EditorConfig is awesome: https://EditorConfig.org
# Please feel free to update it (by considering the code style of ABP Team). # Please feel free to update it (by considering the code style of ABP Team).
# top-most EditorConfig file # top-most EditorConfig file
root = true
[*]
charset = utf-8
end_of_line = crlf
trim_trailing_whitespace = false
insert_final_newline = false
indent_style = space
indent_size = 4
tab_width = 4
[*.json]
indent_size = 2
[*.cs] [*.cs]
# diagnostic规则配置 各个项目自己定义
# CS8618 表示在定义非空属性时,没有在构造函数、初始化器或默认值中对其进行初始化。
dotnet_diagnostic.cs8618.severity = none
# CS8618 表示方法的返回类型的可空性与目标委托的不匹配。
dotnet_diagnostic.cs8613.severity = none
# CS1591 表示缺少XML注释
dotnet_diagnostic.cs1591.severity = none
#Namespace设置 #Namespace设置
# noinspection EditorConfigKeyCorrectness csharp_style_namespace_declarations = file_scoped:silent
csharp_style_namespace_declarations = file_scoped
# diagnostic规则配置 各个项目自己定义
# noinspection EditorConfigKeyCorrectness
# CS8618 表示在定义非空属性时,没有在构造函数、初始化器或默认值中对其进行初始化。
dotnet_diagnostic.CS8618.severity = none
# noinspection EditorConfigKeyCorrectness
# CS8618 表示方法的返回类型的可空性与目标委托的不匹配。
dotnet_diagnostic.CS8613.severity = none
# noinspection EditorConfigKeyCorrectness
# CS1591 表示缺少XML注释
dotnet_diagnostic.CS1591.severity = none
#Core editorconfig formatting - indentation
#使用制表符进行缩进
# noinspection EditorConfigValueCorrectness
indent_style = tabs
#Formatting - indentation options
# 设置每行的最大列数
max_line_length = 120
#缩进switch case内容 #缩进switch case内容
csharp_indent_case_contents = true csharp_indent_case_contents = true
#缩进switch标签 #缩进switch标签
@ -132,7 +133,7 @@ dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggest
#Style - Modifier preferences #Style - Modifier preferences
#当此规则设置为修饰符列表时,偏好指定的顺序。 #当此规则设置为修饰符列表时,偏好指定的顺序。
csharp_preferred_modifier_order = public, protected, private, virtual, async, readonly, static, override, abstract:suggestion csharp_preferred_modifier_order = public, private, protected, internal, file, new, static, abstract, virtual, sealed, readonly, override, extern, unsafe, volatile, async, required:suggestion
#Style - Pattern matching #Style - Pattern matching
@ -147,3 +148,86 @@ dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_method = false:suggestion dotnet_style_qualification_for_method = false:suggestion
#偏好属性前不加this. 或 Me.(在Visual Basic中) #偏好属性前不加this. 或 Me.(在Visual Basic中)
dotnet_style_qualification_for_property = false:suggestion dotnet_style_qualification_for_property = false:suggestion
# Microsoft .NET properties
csharp_style_prefer_utf8_string_literals = true:suggestion
dotnet_naming_rule.unity_serialized_field_rule.import_to_resharper = True
dotnet_naming_rule.unity_serialized_field_rule.resharper_description = Unity serialized field
dotnet_naming_rule.unity_serialized_field_rule.resharper_guid = 5f0fdb63-c892-4d2c-9324-15c80b22a7ef
dotnet_naming_rule.unity_serialized_field_rule.severity = warning
dotnet_naming_rule.unity_serialized_field_rule.style = lower_camel_case_style
dotnet_naming_rule.unity_serialized_field_rule.symbols = unity_serialized_field_symbols
dotnet_naming_style.lower_camel_case_style.capitalization = camel_case
dotnet_naming_symbols.unity_serialized_field_symbols.applicable_accessibilities = *
dotnet_naming_symbols.unity_serialized_field_symbols.applicable_kinds =
dotnet_naming_symbols.unity_serialized_field_symbols.resharper_applicable_kinds = unity_serialised_field
dotnet_naming_symbols.unity_serialized_field_symbols.resharper_required_modifiers = instance
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:none
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:none
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:none
dotnet_style_qualification_for_event = false:suggestion
# ReSharper properties
resharper_autodetect_indent_settings = true
resharper_braces_for_for = not_required
resharper_braces_for_foreach = not_required
resharper_braces_for_ifelse = not_required_for_both
resharper_braces_for_while = not_required
resharper_braces_redundant = true
resharper_csharp_keep_existing_enum_arrangement = false
resharper_formatter_off_tag = @formatter:off
resharper_formatter_on_tag = @formatter:on
resharper_formatter_tags_enabled = true
resharper_keep_existing_declaration_block_arrangement = false
resharper_keep_existing_embedded_block_arrangement = false
resharper_use_heuristics_for_body_style = true
resharper_use_indent_from_vs = false
# ReSharper inspection severities
resharper_arrange_accessor_owner_body_highlighting = suggestion
resharper_arrange_constructor_or_destructor_body_highlighting = none
resharper_arrange_method_or_operator_body_highlighting = none
resharper_arrange_redundant_parentheses_highlighting = hint
resharper_arrange_this_qualifier_highlighting = hint
resharper_arrange_type_member_modifiers_highlighting = hint
resharper_arrange_type_modifiers_highlighting = hint
resharper_built_in_type_reference_style_for_member_access_highlighting = hint
resharper_built_in_type_reference_style_highlighting = hint
resharper_enforce_do_while_statement_braces_highlighting = none
resharper_enforce_fixed_statement_braces_highlighting = none
resharper_enforce_foreach_statement_braces_highlighting = none
resharper_enforce_for_statement_braces_highlighting = none
resharper_enforce_if_statement_braces_highlighting = none
resharper_enforce_lock_statement_braces_highlighting = none
resharper_enforce_using_statement_braces_highlighting = none
resharper_enforce_while_statement_braces_highlighting = none
resharper_mvc_action_not_resolved_highlighting = warning
resharper_mvc_area_not_resolved_highlighting = warning
resharper_mvc_controller_not_resolved_highlighting = warning
resharper_mvc_masterpage_not_resolved_highlighting = warning
resharper_mvc_partial_view_not_resolved_highlighting = warning
resharper_mvc_template_not_resolved_highlighting = warning
resharper_mvc_view_component_not_resolved_highlighting = warning
resharper_mvc_view_component_view_not_resolved_highlighting = warning
resharper_mvc_view_not_resolved_highlighting = warning
resharper_razor_assembly_not_resolved_highlighting = warning
resharper_redundant_base_qualifier_highlighting = warning
resharper_remove_redundant_braces_highlighting = none
resharper_suggest_var_or_type_built_in_types_highlighting = hint
resharper_suggest_var_or_type_elsewhere_highlighting = hint
resharper_suggest_var_or_type_simple_types_highlighting = hint
resharper_web_config_module_not_resolved_highlighting = warning
resharper_web_config_type_not_resolved_highlighting = warning
resharper_web_config_wrong_module_highlighting = warning
csharp_using_directive_placement = outside_namespace:silent
csharp_prefer_simple_using_statement = true:suggestion
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_prefer_primary_constructors = true:suggestion
csharp_style_expression_bodied_operators = false:silent
csharp_style_expression_bodied_indexers = true:silent
csharp_style_expression_bodied_accessors = true:silent
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent
csharp_indent_labels = one_less_than_current
csharp_space_around_binary_operators = before_and_after

View File

@ -1,4 +1,4 @@
using FluentValidation.AspNetCore; using FluentValidation.AspNetCore;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using SJZY.Expand.ABP.Core; using SJZY.Expand.ABP.Core;
using SJZY.Expand.ABP.Core.Cors; using SJZY.Expand.ABP.Core.Cors;

View File

@ -1,13 +1,17 @@
{ {
"Configuration": { "Configuration": {
"UseLocalConfiguration": false, //是否使用本地配置文件 "UseLocalConfiguration": false,
"ConfiguraFileName": "appsettings.Development.json", //指定配置文件名称,开启UseLocalConfiguration时生效 //是否使用本地配置文件
"ConfiguraFileName": "appsettings.Development.json",
//指定配置文件名称,开启UseLocalConfiguration时生效
"Apollo": { "Apollo": {
"AppId": "SJZY.Track.Configuration", "AppId": "SJZY.Track.Configuration",
"Env": "DEV", "Env": "DEV",
"Namespace": "Test", "Namespace": "Test",
"MetaServer": "http://apollo-service-test-apollo-configservice.apollo.svc.cluster.local:8080", "MetaServer": "http://apollo-service-test-apollo-configservice.apollo.svc.cluster.local:8080",
"ConfigServer": [ "http://apollo-service-test-apollo-configservice.apollo.svc.cluster.local:8080" ] "ConfigServer": [
"http://apollo-service-test-apollo-configservice.apollo.svc.cluster.local:8080"
]
} }
}, },
"Kestrel": { "Kestrel": {

View File

@ -1,5 +1,3 @@
using SJZY.Track.Domain.Dtos.Forewarning;
namespace SJZY.Track.Application.Contract.Dtos.Forewarning; namespace SJZY.Track.Application.Contract.Dtos.Forewarning;
public class ModifyTimeSpanInput public class ModifyTimeSpanInput
@ -14,4 +12,3 @@ public class ModifyTimeSpanInput
/// </summary> /// </summary>
public List<WarningTimeSpanDto> Items { get; set; } = new(); public List<WarningTimeSpanDto> Items { get; set; } = new();
} }

View File

@ -1,4 +1,4 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices; namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;

View File

@ -1,4 +1,4 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices; namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;

View File

@ -1,4 +1,4 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices; namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices; namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
public class GetOrderDetailsInput public class GetOrderDetailsInput
{ {

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices; namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
public class GetPageTrackOrderInput : PageInfoInput public class GetPageTrackOrderInput : PageInfoInput
{ {

View File

@ -1,4 +1,4 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices; namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;

View File

@ -1,4 +1,4 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices; namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;

View File

@ -1,4 +1,4 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices; namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices; namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
/// <summary> /// <summary>
/// 查询轨迹推送映射关系入参 /// 查询轨迹推送映射关系入参

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices; namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
public class RefreshTrackInput public class RefreshTrackInput
{ {

View File

@ -1,4 +1,4 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices; namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices; namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
public class UpdateOrderStatusInput public class UpdateOrderStatusInput
{ {

View File

@ -1,4 +1,4 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices; namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;

View File

@ -1,4 +1,4 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices; namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.TrackContents; namespace SJZY.Track.Application.Contract.Dtos.TrackContents;
public class EditTrackContentInput public class EditTrackContentInput
{ {

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.TrackContents; namespace SJZY.Track.Application.Contract.Dtos.TrackContents;
public class EditTrackContentMapInput public class EditTrackContentMapInput
{ {

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.TrackContents; namespace SJZY.Track.Application.Contract.Dtos.TrackContents;
public class GetPageTrackContentInput : PageInfoInput public class GetPageTrackContentInput : PageInfoInput
{ {

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.TrackFlags; namespace SJZY.Track.Application.Contract.Dtos.TrackFlags;
public class EditTrackFlagInput public class EditTrackFlagInput
{ {

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.TrackFlags; namespace SJZY.Track.Application.Contract.Dtos.TrackFlags;
public class GetTrackFlagListDto public class GetTrackFlagListDto
{ {

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.TrackOrder; namespace SJZY.Track.Application.Contract.Dtos.TrackOrder;
public class GetTrackCounterOutput public class GetTrackCounterOutput
{ {

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.TrackOrder; namespace SJZY.Track.Application.Contract.Dtos.TrackOrder;
public class TrackPushRecordItem public class TrackPushRecordItem
{ {

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.TrackOrder; namespace SJZY.Track.Application.Contract.Dtos.TrackOrder;
public class TrackPushRecordOutput public class TrackPushRecordOutput
{ {

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.TrackPull; namespace SJZY.Track.Application.Contract.Dtos.TrackPull;
public class EditTrackPullConfigInput public class EditTrackPullConfigInput
{ {

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.TrackPull; namespace SJZY.Track.Application.Contract.Dtos.TrackPull;
public class EditTrackPullContentInput public class EditTrackPullContentInput
{ {

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.TrackPull; namespace SJZY.Track.Application.Contract.Dtos.TrackPull;
public class TrackPullConfigDto public class TrackPullConfigDto
{ {

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.TrackPull; namespace SJZY.Track.Application.Contract.Dtos.TrackPull;
public class TrackPullContentConfigDto public class TrackPullContentConfigDto
{ {

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.TrackPull; namespace SJZY.Track.Application.Contract.Dtos.TrackPull;
public class TrackPullParamConfigDto public class TrackPullParamConfigDto
{ {

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.TrackPull; namespace SJZY.Track.Application.Contract.Dtos.TrackPull;
public class TrackRefreshAttach public class TrackRefreshAttach
{ {

View File

@ -1,4 +1,4 @@
using SJZY.Track.Share.Enums; using SJZY.Track.Share.Enums;
namespace SJZY.Track.Application.Contract.Dtos.TrackPush; namespace SJZY.Track.Application.Contract.Dtos.TrackPush;

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.TrackPush; namespace SJZY.Track.Application.Contract.Dtos.TrackPush;
public class EditTrackPushContentInput public class EditTrackPushContentInput
{ {

View File

@ -1,4 +1,4 @@
using SJZY.Expand.ABP.Core.PublicMethords; using SJZY.Expand.ABP.Core.PublicMethords;
namespace SJZY.Track.Application.Contract.Dtos.TrackPush; namespace SJZY.Track.Application.Contract.Dtos.TrackPush;

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.TrackPush; namespace SJZY.Track.Application.Contract.Dtos.TrackPush;
public class TrackPushAfterUpdateOrderDto public class TrackPushAfterUpdateOrderDto
{ {

View File

@ -1,4 +1,4 @@
using SJZY.Track.Share.Enums; using SJZY.Track.Share.Enums;
namespace SJZY.Track.Application.Contract.Dtos.TrackPush; namespace SJZY.Track.Application.Contract.Dtos.TrackPush;

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.TrackPush; namespace SJZY.Track.Application.Contract.Dtos.TrackPush;
public class TrackPushInput public class TrackPushInput
{ {

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.TrackStatus; namespace SJZY.Track.Application.Contract.Dtos.TrackStatus;
public class EditTrackStatusInput public class EditTrackStatusInput
{ {

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.TrackStatus; namespace SJZY.Track.Application.Contract.Dtos.TrackStatus;
public class GetTrackStatusDetailDto public class GetTrackStatusDetailDto
{ {

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.TrackStatus; namespace SJZY.Track.Application.Contract.Dtos.TrackStatus;
public class GetTrackStatusListDto public class GetTrackStatusListDto
{ {

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.TrackTemplates; namespace SJZY.Track.Application.Contract.Dtos.TrackTemplates;
/// <inheritdoc/> /// <inheritdoc/>
public class EditTrackTemplateContentInput public class EditTrackTemplateContentInput

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.TrackTemplates; namespace SJZY.Track.Application.Contract.Dtos.TrackTemplates;
/// <summary> /// <summary>
/// 获取轨迹模版分页输入 /// 获取轨迹模版分页输入

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Dtos.TrackTemplates; namespace SJZY.Track.Application.Contract.Dtos.TrackTemplates;
/// <summary> /// <summary>
/// 获取轨迹模版详情 /// 获取轨迹模版详情

View File

@ -1,4 +1,4 @@
using SJZY.Expand.ABP.Core.PublicMethords; using SJZY.Expand.ABP.Core.PublicMethords;
namespace SJZY.Track.Application.Contract.Dtos.TrackTemplates; namespace SJZY.Track.Application.Contract.Dtos.TrackTemplates;

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Events; namespace SJZY.Track.Application.Contract.Events;
public class TrackChangeAfterUpdateOrderEvent public class TrackChangeAfterUpdateOrderEvent
{ {

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Events; namespace SJZY.Track.Application.Contract.Events;
public class TrackDeleteEvent public class TrackDeleteEvent
{ {

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Events; namespace SJZY.Track.Application.Contract.Events;
public class TrackPushEvent public class TrackPushEvent
{ {

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Events; namespace SJZY.Track.Application.Contract.Events;
public class TrackUpsertEvent public class TrackUpsertEvent
{ {

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Events; namespace SJZY.Track.Application.Contract.Events;
public class TrackUpsertForRefreshEvent public class TrackUpsertForRefreshEvent
{ {

View File

@ -1,4 +1,4 @@
// Global using directives // Global using directives
global using SJZY.Expand.ABP.Common.Enums; global using SJZY.Expand.ABP.Common.Enums;
global using SJZY.Expand.ABP.Core.Common.Dto; global using SJZY.Expand.ABP.Core.Common.Dto;

View File

@ -1,4 +1,4 @@
using SJZY.Track.Application.Contract.Dtos.ProvideServices; using SJZY.Track.Application.Contract.Dtos.ProvideServices;
using Volo.Abp; using Volo.Abp;
namespace SJZY.Track.Application.Contract.Services; namespace SJZY.Track.Application.Contract.Services;

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Services; namespace SJZY.Track.Application.Contract.Services;
public interface ITrackContentService public interface ITrackContentService
{ {

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Services; namespace SJZY.Track.Application.Contract.Services;
public interface ITrackFlagService public interface ITrackFlagService
{ {

View File

@ -1,4 +1,4 @@
using SJZY.Track.Application.Contract.Dtos.TrackPull; using SJZY.Track.Application.Contract.Dtos.TrackPull;
namespace SJZY.Track.Application.Contract.Services; namespace SJZY.Track.Application.Contract.Services;

View File

@ -1,4 +1,4 @@
using SJZY.Track.Application.Contract.Dtos.TrackPush; using SJZY.Track.Application.Contract.Dtos.TrackPush;
namespace SJZY.Track.Application.Contract.Services; namespace SJZY.Track.Application.Contract.Services;

View File

@ -1,4 +1,4 @@
using SJZY.Track.Application.Contract.Dtos.ProvideServices; using SJZY.Track.Application.Contract.Dtos.ProvideServices;
using Volo.Abp; using Volo.Abp;
namespace SJZY.Track.Application.Contract.Services; namespace SJZY.Track.Application.Contract.Services;

View File

@ -1,4 +1,4 @@
using SJZY.Track.Application.Contract.Dtos.ProvideServices; using SJZY.Track.Application.Contract.Dtos.ProvideServices;
using Volo.Abp; using Volo.Abp;
namespace SJZY.Track.Application.Contract.Services; namespace SJZY.Track.Application.Contract.Services;

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.Contract.Services; namespace SJZY.Track.Application.Contract.Services;
public interface ITrackStatusService public interface ITrackStatusService
{ {

View File

@ -1,4 +1,4 @@
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
namespace SJZY.Track.Application.Contract; namespace SJZY.Track.Application.Contract;

View File

@ -1,4 +1,4 @@
using AutoMapper; using AutoMapper;
using SJZY.Expand.ABP.Core.PublicMethords; using SJZY.Expand.ABP.Core.PublicMethords;
using SJZY.Track.Application.Contract.Dtos.ProvideServices; using SJZY.Track.Application.Contract.Dtos.ProvideServices;
using SJZY.Track.Application.Contract.Dtos.TrackOrder; using SJZY.Track.Application.Contract.Dtos.TrackOrder;

View File

@ -1,4 +1,4 @@
using AutoMapper; using AutoMapper;
using SJZY.Track.Application.Contract.Dtos.ProvideServices; using SJZY.Track.Application.Contract.Dtos.ProvideServices;
using SJZY.Track.Application.Contract.Events; using SJZY.Track.Application.Contract.Events;

View File

@ -1,4 +1,4 @@
using AutoMapper; using AutoMapper;
using SJZY.Track.Application.Contract.Dtos.TrackContents; using SJZY.Track.Application.Contract.Dtos.TrackContents;
using SJZY.Track.Domain.Aggregates.TrackContentAggregate; using SJZY.Track.Domain.Aggregates.TrackContentAggregate;
using SJZY.Track.Domain.Dtos.TrackContents; using SJZY.Track.Domain.Dtos.TrackContents;

View File

@ -1,4 +1,4 @@
using AutoMapper; using AutoMapper;
using SJZY.Track.Application.Contract.Dtos.TrackFlags; using SJZY.Track.Application.Contract.Dtos.TrackFlags;
using SJZY.Track.Domain.Aggregates.TrackFlagAggregate; using SJZY.Track.Domain.Aggregates.TrackFlagAggregate;
using SJZY.Track.Domain.Dtos.TrackFlags; using SJZY.Track.Domain.Dtos.TrackFlags;

View File

@ -1,4 +1,4 @@
using AutoMapper; using AutoMapper;
using SJZY.Track.Application.Contract.Dtos.TrackPull; using SJZY.Track.Application.Contract.Dtos.TrackPull;
using SJZY.Track.Domain.Aggregates.TrackPullAggregate; using SJZY.Track.Domain.Aggregates.TrackPullAggregate;
using SJZY.Track.Domain.Dtos.TrackPull; using SJZY.Track.Domain.Dtos.TrackPull;

View File

@ -1,4 +1,4 @@
using AutoMapper; using AutoMapper;
using SJZY.Track.Application.Contract.Dtos.TrackPush; using SJZY.Track.Application.Contract.Dtos.TrackPush;
using SJZY.Track.Domain.Aggregates.TrackPullAggregate; using SJZY.Track.Domain.Aggregates.TrackPullAggregate;
using SJZY.Track.Domain.Aggregates.TrackPushAggregate; using SJZY.Track.Domain.Aggregates.TrackPushAggregate;

View File

@ -1,4 +1,4 @@
using AutoMapper; using AutoMapper;
using SJZY.Track.Application.Contract.Dtos.ProvideServices; using SJZY.Track.Application.Contract.Dtos.ProvideServices;
using SJZY.Track.Domain.Dtos.TrackPush; using SJZY.Track.Domain.Dtos.TrackPush;

View File

@ -1,4 +1,4 @@
using AutoMapper; using AutoMapper;
using SJZY.Track.Application.Contract.Dtos.TrackStatus; using SJZY.Track.Application.Contract.Dtos.TrackStatus;
using SJZY.Track.Domain.Aggregates.TrackStatusAggregate; using SJZY.Track.Domain.Aggregates.TrackStatusAggregate;
using SJZY.Track.Domain.Dtos.TrackStatus; using SJZY.Track.Domain.Dtos.TrackStatus;

View File

@ -1,4 +1,4 @@
using AutoMapper; using AutoMapper;
using SJZY.Track.Application.Contract.Dtos.TrackTemplates; using SJZY.Track.Application.Contract.Dtos.TrackTemplates;
using SJZY.Track.Domain.Aggregates.TrackTemplateAggregate; using SJZY.Track.Domain.Aggregates.TrackTemplateAggregate;
using SJZY.Track.Domain.Dtos.TrackTemplate; using SJZY.Track.Domain.Dtos.TrackTemplate;

View File

@ -1,4 +1,4 @@
using DotNetCore.CAP.Filter; using DotNetCore.CAP.Filter;
using SJZY.Expand.ABP.Core; using SJZY.Expand.ABP.Core;
using SJZY.Expand.ABP.Core.Logger; using SJZY.Expand.ABP.Core.Logger;
using SJZY.Expand.ABP.Core.PublicMethords; using SJZY.Expand.ABP.Core.PublicMethords;
@ -20,11 +20,7 @@ public class CapFilter : SubscribeFilter
{ {
// 轨迹新增、更新要做幂等 // 轨迹新增、更新要做幂等
if (!context.DeliverMessage.Headers["cap-msg-name"] if (!context.DeliverMessage.Headers["cap-msg-name"]
.IsIn(GlobalConst.TrackUpsertSubscribe, GlobalConst.TrackManualPushSubscribe)) .IsIn(GlobalConst.TrackUpsertSubscribe, GlobalConst.TrackManualPushSubscribe)) return;
{
return;
}
var argumentJsonStr = context.Arguments.ToJson(); var argumentJsonStr = context.Arguments.ToJson();
if (!string.IsNullOrEmpty(argumentJsonStr)) if (!string.IsNullOrEmpty(argumentJsonStr))

View File

@ -1,4 +1,4 @@
using DotNetCore.CAP; using DotNetCore.CAP;
using SJZY.Track.Application.Contract.Dtos.Forewarning; using SJZY.Track.Application.Contract.Dtos.Forewarning;
using SJZY.Track.Application.Contract.Events; using SJZY.Track.Application.Contract.Events;
using SJZY.Track.Application.Contract.Services; using SJZY.Track.Application.Contract.Services;

View File

@ -1,4 +1,4 @@
using DotNetCore.CAP; using DotNetCore.CAP;
using Newtonsoft.Json; using Newtonsoft.Json;
using SJZY.InterfaceRelay.Application.Contracts; using SJZY.InterfaceRelay.Application.Contracts;
using SJZY.Track.Application.Contract.Dtos.TrackPush; using SJZY.Track.Application.Contract.Dtos.TrackPush;

View File

@ -1,4 +1,4 @@
using DotNetCore.CAP; using DotNetCore.CAP;
using SJZY.Expand.ABP.Core.Logger; using SJZY.Expand.ABP.Core.Logger;
using SJZY.Expand.ABP.Core.PublicMethords; using SJZY.Expand.ABP.Core.PublicMethords;
using SJZY.Track.Application.Contract.Events; using SJZY.Track.Application.Contract.Events;
@ -13,10 +13,10 @@ namespace SJZY.Track.Application.CAP.EventHandlers;
public class TrackUpsertEventHandler : ITransientDependency, ICapSubscribe public class TrackUpsertEventHandler : ITransientDependency, ICapSubscribe
{ {
private readonly ICapPublisher _capPublisher;
private readonly IOrderRepository _orderRepository; private readonly IOrderRepository _orderRepository;
private readonly IProvideQueries _provideQueries; private readonly IProvideQueries _provideQueries;
private readonly ITrackDetailsRepository _trackDetailsRepository; private readonly ITrackDetailsRepository _trackDetailsRepository;
private readonly ICapPublisher _capPublisher;
public TrackUpsertEventHandler(IOrderRepository orderRepository, ICapPublisher capPublisher, public TrackUpsertEventHandler(IOrderRepository orderRepository, ICapPublisher capPublisher,
IProvideQueries provideQueries, ITrackDetailsRepository trackDetailsRepository) IProvideQueries provideQueries, ITrackDetailsRepository trackDetailsRepository)
@ -82,9 +82,7 @@ public class TrackUpsertEventHandler : ITransientDependency, ICapSubscribe
var identifiers = group.Select(x => new OrderIdentifier var identifiers = group.Select(x => new OrderIdentifier
{ {
OrderId = x.OrderId, OrderId = x.OrderId, OrderNo = x.OrderNo, OrderType = x.OrderType,
OrderNo = x.OrderNo,
OrderType = x.OrderType,
}).ToList(); }).ToList();
var idx = 0; var idx = 0;
while (idx < identifiers.Count) while (idx < identifiers.Count)

View File

@ -1,4 +1,4 @@
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace SJZY.Track.Application.CAP; namespace SJZY.Track.Application.CAP;

View File

@ -146,9 +146,7 @@ public class MySubscribeExecutor : ISubscribeExecutor
{ {
_options.FailedThresholdCallback?.Invoke(new FailedInfo _options.FailedThresholdCallback?.Invoke(new FailedInfo
{ {
ServiceProvider = _provider, ServiceProvider = _provider, MessageType = MessageType.Subscribe, Message = message.Origin
MessageType = MessageType.Subscribe,
Message = message.Origin
}); });
_logger.ConsumerExecutedAfterThreshold(message.DbId, _options.FailedRetryCount); _logger.ConsumerExecutedAfterThreshold(message.DbId, _options.FailedRetryCount);

View File

@ -1,4 +1,4 @@
namespace SJZY.Track.Application.CAP; namespace SJZY.Track.Application.CAP;
internal class SubscriberExecutionFailedException : Exception internal class SubscriberExecutionFailedException : Exception
{ {

View File

@ -1,4 +1,4 @@
global using Microsoft.AspNetCore.Mvc; global using Microsoft.AspNetCore.Mvc;
global using Microsoft.Extensions.DependencyInjection; global using Microsoft.Extensions.DependencyInjection;
global using SJZY.Expand.ABP.Common.Enums; global using SJZY.Expand.ABP.Common.Enums;
global using SJZY.Expand.ABP.Core.Common.Dto; global using SJZY.Expand.ABP.Core.Common.Dto;

View File

@ -1,4 +1,4 @@
using System.Text; using System.Text;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace SJZY.Track.Application.Helpers; namespace SJZY.Track.Application.Helpers;

View File

@ -1,4 +1,4 @@
using SJZY.Expand.ABP.Core.Localization; using SJZY.Expand.ABP.Core.Localization;
using Volo.Abp.Localization; using Volo.Abp.Localization;
namespace SJZY.Track.Application.Localization; namespace SJZY.Track.Application.Localization;

View File

@ -1,4 +1,4 @@
using SJZY.Expand.ABP.Core; using SJZY.Expand.ABP.Core;
namespace SJZY.Track.Application.Options; namespace SJZY.Track.Application.Options;

View File

@ -1,4 +1,4 @@
using System.Diagnostics; using System.Diagnostics;
using System.Linq.Expressions; using System.Linq.Expressions;
using System.Text; using System.Text;
using BSI.Stack.Rabbit; using BSI.Stack.Rabbit;

View File

@ -1,4 +1,4 @@
using DotNetCore.CAP; using DotNetCore.CAP;
using SJZY.Track.Application.Contract.Dtos.ProvideServices; using SJZY.Track.Application.Contract.Dtos.ProvideServices;
using SJZY.Track.Application.Contract.Events; using SJZY.Track.Application.Contract.Events;
using SJZY.Track.Domain.Aggregates.OrderAggregate; using SJZY.Track.Domain.Aggregates.OrderAggregate;

View File

@ -1,4 +1,4 @@
using DotNetCore.CAP; using DotNetCore.CAP;
using SJZY.Track.Application.Contract.Dtos.ProvideServices; using SJZY.Track.Application.Contract.Dtos.ProvideServices;
using SJZY.Track.Application.Contract.Services; using SJZY.Track.Application.Contract.Services;
using SJZY.Track.Domain.Aggregates.OrderAggregate; using SJZY.Track.Domain.Aggregates.OrderAggregate;

View File

@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using SJZY.Expand.ABP.Core; using SJZY.Expand.ABP.Core;
using SJZY.Expand.ABP.Core.Logger; using SJZY.Expand.ABP.Core.Logger;
using SJZY.Expand.ABP.Core.PublicMethords; using SJZY.Expand.ABP.Core.PublicMethords;

View File

@ -1,4 +1,4 @@
using SJZY.Track.Application.Contract.Dtos.ProvideServices; using SJZY.Track.Application.Contract.Dtos.ProvideServices;
using SJZY.Track.Application.Contract.Services; using SJZY.Track.Application.Contract.Services;
using SJZY.Track.Domain.Aggregates.TrackPushAggregate; using SJZY.Track.Domain.Aggregates.TrackPushAggregate;
using SJZY.Track.Domain.Dtos.TrackPush; using SJZY.Track.Domain.Dtos.TrackPush;

View File

@ -1,4 +1,4 @@
using DotNetCore.CAP; using DotNetCore.CAP;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using SJZY.Track.Application.Contract.Dtos.ProvideServices; using SJZY.Track.Application.Contract.Dtos.ProvideServices;
using SJZY.Track.Application.Contract.Events; using SJZY.Track.Application.Contract.Events;

View File

@ -1,4 +1,4 @@
using DotNetCore.CAP; using DotNetCore.CAP;
using SJZY.Track.Application.Contract.Dtos.ProvideServices; using SJZY.Track.Application.Contract.Dtos.ProvideServices;
using SJZY.Track.Application.Contract.Events; using SJZY.Track.Application.Contract.Events;
using SJZY.Track.Application.Contract.Services; using SJZY.Track.Application.Contract.Services;

View File

@ -1,4 +1,4 @@
using System.Linq.Expressions; using System.Linq.Expressions;
using Microsoft.Extensions.Localization; using Microsoft.Extensions.Localization;
using SJZY.Expand.ABP.Core.Localization; using SJZY.Expand.ABP.Core.Localization;
using SJZY.Expand.ABP.Core.PublicMethords; using SJZY.Expand.ABP.Core.PublicMethords;

View File

@ -1,4 +1,4 @@
using Microsoft.Extensions.Localization; using Microsoft.Extensions.Localization;
using SJZY.Track.Application.Contract.Dtos.TrackFlags; using SJZY.Track.Application.Contract.Dtos.TrackFlags;
using SJZY.Track.Application.Localization; using SJZY.Track.Application.Localization;
using SJZY.Track.Domain.Aggregates.TrackContentAggregate; using SJZY.Track.Domain.Aggregates.TrackContentAggregate;

View File

@ -1,4 +1,4 @@
using System.Diagnostics; using System.Diagnostics;
using SJZY.Track.Application.Contract.Dtos.ProvideServices; using SJZY.Track.Application.Contract.Dtos.ProvideServices;
using SJZY.Track.Application.Contract.Dtos.TrackOrder; using SJZY.Track.Application.Contract.Dtos.TrackOrder;
using SJZY.Track.Domain.Aggregates.OrderAggregate; using SJZY.Track.Domain.Aggregates.OrderAggregate;

View File

@ -12,25 +12,24 @@ public class TrackPullCacheService : ApplicationService, ITrackPullCacheService
{ {
private readonly ITrackPullConfigRepository _trackPullConfigRepository; private readonly ITrackPullConfigRepository _trackPullConfigRepository;
public TrackPullCacheService(ITrackPullConfigRepository trackPullConfigRepository)
{
_trackPullConfigRepository = trackPullConfigRepository;
}
public string TrackPullKey(int subSystemId, int serviceProviderId) => public string TrackPullKey(int subSystemId, int serviceProviderId) =>
$"{GlobalConst.TrackPullKeyPrefix}:{subSystemId}:{serviceProviderId}"; $"{GlobalConst.TrackPullKeyPrefix}:{subSystemId}:{serviceProviderId}";
public string TrackPullContentKey(int subSystemId, int serviceProviderId) => public string TrackPullContentKey(int subSystemId, int serviceProviderId) =>
$"{GlobalConst.TrackPullContentKeyPrefix}:{subSystemId}:{serviceProviderId}"; $"{GlobalConst.TrackPullContentKeyPrefix}:{subSystemId}:{serviceProviderId}";
public TrackPullCacheService(ITrackPullConfigRepository trackPullConfigRepository)
{
_trackPullConfigRepository = trackPullConfigRepository;
}
[NonAction] [NonAction]
public async Task<List<TrackPullConfigDto>> GetAllPullConfigsAsync() public async Task<List<TrackPullConfigDto>> GetAllPullConfigsAsync()
{ {
return await _trackPullConfigRepository.GetListAsync(x => true, x => new TrackPullConfigDto return await _trackPullConfigRepository.GetListAsync(x => true,
x => new TrackPullConfigDto
{ {
SubSystemId = x.SubSystemId, SubSystemId = x.SubSystemId, ServiceProviderId = x.ServiceProviderId, PullInterval = x.PullInterval
ServiceProviderId = x.ServiceProviderId,
PullInterval = x.PullInterval
}); });
} }

View File

@ -1,4 +1,4 @@
using System.Linq.Expressions; using System.Linq.Expressions;
using Microsoft.Extensions.Localization; using Microsoft.Extensions.Localization;
using SJZY.Expand.ABP.Core.Localization; using SJZY.Expand.ABP.Core.Localization;
using SJZY.Expand.ABP.Core.PublicMethords; using SJZY.Expand.ABP.Core.PublicMethords;

View File

@ -1,4 +1,4 @@
using Microsoft.Extensions.Localization; using Microsoft.Extensions.Localization;
using SJZY.Track.Application.Contract.Dtos.TrackStatus; using SJZY.Track.Application.Contract.Dtos.TrackStatus;
using SJZY.Track.Application.Localization; using SJZY.Track.Application.Localization;
using SJZY.Track.Domain.Aggregates.TrackContentAggregate; using SJZY.Track.Domain.Aggregates.TrackContentAggregate;

View File

@ -1,4 +1,4 @@
using System.Linq.Expressions; using System.Linq.Expressions;
using Microsoft.Extensions.Localization; using Microsoft.Extensions.Localization;
using SJZY.Expand.ABP.Core.Localization; using SJZY.Expand.ABP.Core.Localization;
using SJZY.Expand.ABP.Core.PublicMethords; using SJZY.Expand.ABP.Core.PublicMethords;

View File

@ -1,4 +1,4 @@
using BSI.Stack.Rabbit; using BSI.Stack.Rabbit;
using DotNetCore.CAP; using DotNetCore.CAP;
using DotNetCore.CAP.Internal; using DotNetCore.CAP.Internal;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
@ -65,10 +65,7 @@ public class SjzyTrackApplicationModule : AbpModule
.AddVirtualJson("/Localization/Resources"); .AddVirtualJson("/Localization/Resources");
}); });
//授权拦截提示 //授权拦截提示
context.Services.Configure<MvcOptions>(options => context.Services.Configure<MvcOptions>(options => { options.Filters.Add(new ApiAsyncAuthorizationFilter()); });
{
options.Filters.Add(new ApiAsyncAuthorizationFilter());
});
//用户中心 //用户中心
context.Services.AddHttpClientProxies(typeof(SjzyUserCenterHttpApiModule).Assembly, "UserCenter", false); context.Services.AddHttpClientProxies(typeof(SjzyUserCenterHttpApiModule).Assembly, "UserCenter", false);

View File

@ -1,4 +1,4 @@
using FluentValidation; using FluentValidation;
using SJZY.Track.Application.Contract.Dtos.TrackContents; using SJZY.Track.Application.Contract.Dtos.TrackContents;
namespace SJZY.Track.Application.Validations.TrackContents; namespace SJZY.Track.Application.Validations.TrackContents;

View File

@ -10,36 +10,50 @@ public class EditTrackContentMapInputValidation : AbstractValidator<EditTrackCon
{ {
public EditTrackContentMapInputValidation(IStringLocalizer<TrackLocalizationResource> stringLocalizer) public EditTrackContentMapInputValidation(IStringLocalizer<TrackLocalizationResource> stringLocalizer)
{ {
RuleFor(x => x.Options).IsInEnum().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_IsInEnum, nameof(EditTrackContentMapInput.Options)]); RuleFor(x => x.Options).IsInEnum().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_IsInEnum,
nameof(EditTrackContentMapInput.Options)]);
RuleFor(x => x.Id).GreaterThan(0).WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_GreaterThan, nameof(EditTrackContentMapInput.Id), 0]); RuleFor(x => x.Id).GreaterThan(0).WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_GreaterThan,
nameof(EditTrackContentMapInput.Id), 0]);
RuleFor(x => x.MapSubSystemId).GreaterThan(0).WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_GreaterThan, nameof(EditTrackContentMapInput.MapSubSystemId), 0]); RuleFor(x => x.MapSubSystemId).GreaterThan(0).WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_GreaterThan, nameof(EditTrackContentMapInput.MapSubSystemId), 0]);
RuleFor(x => x.MapTrackContentId).GreaterThan(0).WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_GreaterThan, nameof(EditTrackContentMapInput.MapTrackContentId), 0]); RuleFor(x => x.MapTrackContentId).GreaterThan(0).WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_GreaterThan, nameof(EditTrackContentMapInput.MapTrackContentId), 0]);
RuleFor(x => x.SubSystemId).GreaterThan(0).WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_GreaterThan, nameof(EditTrackContentMapInput.SubSystemId), 0]); RuleFor(x => x.SubSystemId).GreaterThan(0).WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_GreaterThan, nameof(EditTrackContentMapInput.SubSystemId), 0]);
RuleFor(x => x.TrackContentId).GreaterThan(0).WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_GreaterThan, nameof(EditTrackContentMapInput.TrackContentId), 0]); RuleFor(x => x.TrackContentId).GreaterThan(0).WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_GreaterThan, nameof(EditTrackContentMapInput.TrackContentId), 0]);
When(x => x.Options != OptionTypeNoNull.新增, () => When(x => x.Options != OptionTypeNoNull.新增,
() =>
{ {
RuleFor(x => x.Id).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackContentMapInput.Id)]); RuleFor(x => x.Id).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull,
nameof(EditTrackContentMapInput.Id)]);
}); });
When(x => x.Options != OptionTypeNoNull.删除, () => When(x => x.Options != OptionTypeNoNull.删除, () =>
{ {
RuleFor(x => x.MapSubSystemId).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackContentMapInput.MapSubSystemId)]); RuleFor(x => x.MapSubSystemId).NotNull().WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackContentMapInput.MapSubSystemId)]);
RuleFor(x => x.MapTrackContentCode).NotEmpty().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotEmpty, nameof(EditTrackContentMapInput.MapTrackContentCode)]); RuleFor(x => x.MapTrackContentCode).NotEmpty().WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_NotEmpty, nameof(EditTrackContentMapInput.MapTrackContentCode)]);
RuleFor(x => x.MapTrackContentId).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackContentMapInput.MapTrackContentId)]); RuleFor(x => x.MapTrackContentId).NotNull().WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackContentMapInput.MapTrackContentId)]);
RuleFor(x => x.SubSystemId).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackContentMapInput.SubSystemId)]); RuleFor(x => x.SubSystemId).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull,
nameof(EditTrackContentMapInput.SubSystemId)]);
RuleFor(x => x.TrackContentCode).NotEmpty().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotEmpty, nameof(EditTrackContentMapInput.TrackContentCode)]); RuleFor(x => x.TrackContentCode).NotEmpty().WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_NotEmpty, nameof(EditTrackContentMapInput.TrackContentCode)]);
RuleFor(x => x.TrackContentId).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackContentMapInput.TrackContentId)]); RuleFor(x => x.TrackContentId).NotNull().WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackContentMapInput.TrackContentId)]);
}); });
} }
} }

View File

@ -1,4 +1,4 @@
using FluentValidation; using FluentValidation;
using SJZY.Track.Application.Contract.Dtos.TrackFlags; using SJZY.Track.Application.Contract.Dtos.TrackFlags;
namespace SJZY.Track.Application.Validations.TrackFlags; namespace SJZY.Track.Application.Validations.TrackFlags;

View File

@ -10,55 +10,78 @@ public class EditTrackPullConfigInputValidation : AbstractValidator<EditTrackPul
{ {
public EditTrackPullConfigInputValidation(IStringLocalizer<TrackLocalizationResource> stringLocalizer) public EditTrackPullConfigInputValidation(IStringLocalizer<TrackLocalizationResource> stringLocalizer)
{ {
RuleFor(x => x.Options).IsInEnum().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_IsInEnum, nameof(EditTrackPullConfigInput.Options)]); RuleFor(x => x.Options).IsInEnum().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_IsInEnum,
nameof(EditTrackPullConfigInput.Options)]);
RuleFor(x => x.Id).GreaterThan(0).WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_GreaterThan, nameof(EditTrackPullConfigInput.Id), 0]); RuleFor(x => x.Id).GreaterThan(0).WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_GreaterThan,
nameof(EditTrackPullConfigInput.Id), 0]);
RuleFor(x => x.ParseMethod).GreaterThan(0).WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_GreaterThan, nameof(EditTrackPullConfigInput.ParseMethod), 0]); RuleFor(x => x.ParseMethod).GreaterThan(0).WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_GreaterThan, nameof(EditTrackPullConfigInput.ParseMethod), 0]);
RuleFor(x => x.PullInterval) RuleFor(x => x.PullInterval)
.GreaterThanOrEqualTo(30).WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_GreaterThanOrEqualTo, nameof(EditTrackPullConfigInput.PullInterval), 30]); .GreaterThanOrEqualTo(30).WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_GreaterThanOrEqualTo,
nameof(EditTrackPullConfigInput.PullInterval), 30]);
RuleFor(x => x.SubSystemId).GreaterThan(0).WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_GreaterThan, nameof(EditTrackPullConfigInput.SubSystemId), 0]); RuleFor(x => x.SubSystemId).GreaterThan(0).WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_GreaterThan, nameof(EditTrackPullConfigInput.SubSystemId), 0]);
RuleFor(x => x.ServiceProviderId).GreaterThan(0).WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_GreaterThan, nameof(EditTrackPullConfigInput.ServiceProviderId), 0]); RuleFor(x => x.ServiceProviderId).GreaterThan(0).WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_GreaterThan, nameof(EditTrackPullConfigInput.ServiceProviderId), 0]);
RuleFor(x => x.SubSystemId).GreaterThan(0).WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_GreaterThan, nameof(EditTrackPullConfigInput.SubSystemId), 0]); RuleFor(x => x.SubSystemId).GreaterThan(0).WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_GreaterThan, nameof(EditTrackPullConfigInput.SubSystemId), 0]);
When(x => x.Options != OptionTypeNoNull.新增, () => When(x => x.Options != OptionTypeNoNull.新增,
() =>
{ {
RuleFor(x => x.Id).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackPullConfigInput.Id)]); RuleFor(x => x.Id).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull,
nameof(EditTrackPullConfigInput.Id)]);
}); });
When(x => x.Options != OptionTypeNoNull.删除, () => When(x => x.Options != OptionTypeNoNull.删除, () =>
{ {
RuleFor(x => x.SubSystemId).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackPullConfigInput.SubSystemId)]); RuleFor(x => x.SubSystemId).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull,
nameof(EditTrackPullConfigInput.SubSystemId)]);
RuleFor(x => x.ServiceProviderId).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackPullConfigInput.ServiceProviderId)]); RuleFor(x => x.ServiceProviderId).NotNull().WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackPullConfigInput.ServiceProviderId)]);
RuleFor(x => x.PullInterval).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackPullConfigInput.PullInterval)]); RuleFor(x => x.PullInterval).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull,
nameof(EditTrackPullConfigInput.PullInterval)]);
RuleFor(x => x.ParseMethod).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackPullConfigInput.ParseMethod)]); RuleFor(x => x.ParseMethod).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull,
nameof(EditTrackPullConfigInput.ParseMethod)]);
RuleFor(x => x.OrderNoName).NotEmpty().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotEmpty, nameof(EditTrackPullConfigInput.OrderNoName)]); RuleFor(x => x.OrderNoName).NotEmpty().WithMessage(
stringLocalizer[SjzyBasicLocalization.Validation_NotEmpty,
nameof(EditTrackPullConfigInput.OrderNoName)]);
RuleFor(x => x.OrderPath).NotEmpty().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotEmpty, nameof(EditTrackPullConfigInput.OrderPath)]); RuleFor(x => x.OrderPath).NotEmpty().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotEmpty,
nameof(EditTrackPullConfigInput.OrderPath)]);
RuleFor(x => x.TrackDetailsPath).NotEmpty().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotEmpty, nameof(EditTrackPullConfigInput.TrackDetailsPath)]); RuleFor(x => x.TrackDetailsPath).NotEmpty().WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_NotEmpty, nameof(EditTrackPullConfigInput.TrackDetailsPath)]);
When(x => x.ParseMethod == 1, () => When(x => x.ParseMethod == 1, () =>
{ {
RuleFor(x => x.TrackTimeZoneName).NotEmpty().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotEmpty, nameof(EditTrackPullConfigInput.TrackTimeZoneName)]); RuleFor(x => x.TrackTimeZoneName).NotEmpty().WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_NotEmpty, nameof(EditTrackPullConfigInput.TrackTimeZoneName)]);
RuleFor(x => x.TrackContentCodeName).NotEmpty().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotEmpty, nameof(EditTrackPullConfigInput.TrackContentCodeName)]); RuleFor(x => x.TrackContentCodeName).NotEmpty().WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_NotEmpty, nameof(EditTrackPullConfigInput.TrackContentCodeName)]);
RuleFor(x => x.TrackContentName).NotEmpty().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotEmpty, nameof(EditTrackPullConfigInput.TrackContentName)]); RuleFor(x => x.TrackContentName).NotEmpty().WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_NotEmpty, nameof(EditTrackPullConfigInput.TrackContentName)]);
RuleFor(x => x.TrackPlaceName).NotEmpty().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotEmpty, nameof(EditTrackPullConfigInput.TrackPlaceName)]); RuleFor(x => x.TrackPlaceName).NotEmpty().WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_NotEmpty, nameof(EditTrackPullConfigInput.TrackPlaceName)]);
RuleFor(x => x.TrackStatusName).NotEmpty().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotEmpty, nameof(EditTrackPullConfigInput.TrackStatusName)]); RuleFor(x => x.TrackStatusName).NotEmpty().WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_NotEmpty, nameof(EditTrackPullConfigInput.TrackStatusName)]);
RuleFor(x => x.TrackTimeName).NotEmpty().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotEmpty, nameof(EditTrackPullConfigInput.TrackTimeName)]); RuleFor(x => x.TrackTimeName).NotEmpty().WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_NotEmpty, nameof(EditTrackPullConfigInput.TrackTimeName)]);
}); });
}); });
} }

View File

@ -10,24 +10,32 @@ public class EditTrackPullContentInputValidation : AbstractValidator<EditTrackPu
{ {
public EditTrackPullContentInputValidation(IStringLocalizer<TrackLocalizationResource> stringLocalizer) public EditTrackPullContentInputValidation(IStringLocalizer<TrackLocalizationResource> stringLocalizer)
{ {
RuleFor(x => x.Options).IsInEnum().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_IsInEnum, nameof(EditTrackPullContentInput.Options)]); RuleFor(x => x.Options).IsInEnum().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_IsInEnum,
nameof(EditTrackPullContentInput.Options)]);
RuleFor(x => x.Id).GreaterThan(0).WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_GreaterThan, nameof(EditTrackPullContentInput.Id), 0]); RuleFor(x => x.Id).GreaterThan(0).WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_GreaterThan,
nameof(EditTrackPullContentInput.Id), 0]);
RuleFor(x => x.TrackContentId).GreaterThan(0).WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_GreaterThan, nameof(EditTrackPullContentInput.TrackContentId), 0]); RuleFor(x => x.TrackContentId).GreaterThan(0).WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_GreaterThan, nameof(EditTrackPullContentInput.TrackContentId), 0]);
RuleFor(x => x.TrackPullConfigId).GreaterThan(0).WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_GreaterThan, nameof(EditTrackPullContentInput.TrackPullConfigId), 0]); RuleFor(x => x.TrackPullConfigId).GreaterThan(0).WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_GreaterThan, nameof(EditTrackPullContentInput.TrackPullConfigId), 0]);
When(x => x.Options != OptionTypeNoNull.新增, () => When(x => x.Options != OptionTypeNoNull.新增,
() =>
{ {
RuleFor(x => x.Id).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackPullContentInput.Id)]); RuleFor(x => x.Id).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull,
nameof(EditTrackPullContentInput.Id)]);
}); });
When(x => x.Options != OptionTypeNoNull.删除, () => When(x => x.Options != OptionTypeNoNull.删除, () =>
{ {
RuleFor(x => x.TrackContentId).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackPullContentInput.TrackContentId)]); RuleFor(x => x.TrackContentId).NotNull().WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackPullContentInput.TrackContentId)]);
RuleFor(x => x.TrackPullConfigId).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackPullContentInput.TrackPullConfigId)]); RuleFor(x => x.TrackPullConfigId).NotNull().WithMessage(stringLocalizer[
SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackPullContentInput.TrackPullConfigId)]);
}); });
} }
} }

Some files were not shown because too many files have changed in this diff Show More