fmt
This commit is contained in:
parent
1a21180ac7
commit
4ddad722e1
132
.editorconfig
132
.editorconfig
@ -1,33 +1,34 @@
|
||||
root = true
|
||||
# EditorConfig is awesome: https://EditorConfig.org
|
||||
# Please feel free to update it (by considering the code style of ABP Team).
|
||||
# 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]
|
||||
# diagnostic规则配置 各个项目自己定义
|
||||
# CS8618 表示在定义非空属性时,没有在构造函数、初始化器或默认值中对其进行初始化。
|
||||
dotnet_diagnostic.cs8618.severity = none
|
||||
# CS8618 表示方法的返回类型的可空性与目标委托的不匹配。
|
||||
dotnet_diagnostic.cs8613.severity = none
|
||||
# CS1591 表示缺少XML注释
|
||||
dotnet_diagnostic.cs1591.severity = none
|
||||
|
||||
#Namespace设置
|
||||
# noinspection EditorConfigKeyCorrectness
|
||||
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
|
||||
csharp_style_namespace_declarations = file_scoped:silent
|
||||
|
||||
# 设置每行的最大列数
|
||||
max_line_length = 120
|
||||
#缩进switch case内容
|
||||
csharp_indent_case_contents = true
|
||||
#缩进switch标签
|
||||
@ -132,7 +133,7 @@ dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggest
|
||||
#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
|
||||
|
||||
@ -146,4 +147,87 @@ dotnet_style_qualification_for_field = false:suggestion
|
||||
#偏好方法前不加this. 或 Me.(在Visual Basic中)
|
||||
dotnet_style_qualification_for_method = false:suggestion
|
||||
#偏好属性前不加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
|
||||
@ -1,4 +1,4 @@
|
||||
using FluentValidation.AspNetCore;
|
||||
using FluentValidation.AspNetCore;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SJZY.Expand.ABP.Core;
|
||||
using SJZY.Expand.ABP.Core.Cors;
|
||||
|
||||
@ -1,13 +1,17 @@
|
||||
{
|
||||
"Configuration": {
|
||||
"UseLocalConfiguration": false, //是否使用本地配置文件
|
||||
"ConfiguraFileName": "appsettings.Development.json", //指定配置文件名称,开启UseLocalConfiguration时生效
|
||||
"UseLocalConfiguration": false,
|
||||
//是否使用本地配置文件
|
||||
"ConfiguraFileName": "appsettings.Development.json",
|
||||
//指定配置文件名称,开启UseLocalConfiguration时生效
|
||||
"Apollo": {
|
||||
"AppId": "SJZY.Track.Configuration",
|
||||
"Env": "DEV",
|
||||
"Namespace": "Test",
|
||||
"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": {
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
using SJZY.Track.Domain.Dtos.Forewarning;
|
||||
|
||||
namespace SJZY.Track.Application.Contract.Dtos.Forewarning;
|
||||
|
||||
public class ModifyTimeSpanInput
|
||||
@ -13,5 +11,4 @@ public class ModifyTimeSpanInput
|
||||
/// 规则详情中的时效相关信息
|
||||
/// </summary>
|
||||
public List<WarningTimeSpanDto> Items { get; set; } = new();
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
|
||||
public class GetOrderDetailsInput
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
|
||||
public class GetPageTrackOrderInput : PageInfoInput
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
|
||||
/// <summary>
|
||||
/// 查询轨迹推送映射关系入参
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
|
||||
public class RefreshTrackInput
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
|
||||
public class UpdateOrderStatusInput
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackContents;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackContents;
|
||||
|
||||
public class EditTrackContentInput
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackContents;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackContents;
|
||||
|
||||
public class EditTrackContentMapInput
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackContents;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackContents;
|
||||
|
||||
public class GetPageTrackContentInput : PageInfoInput
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackFlags;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackFlags;
|
||||
|
||||
public class EditTrackFlagInput
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackFlags;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackFlags;
|
||||
|
||||
public class GetTrackFlagListDto
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackOrder;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackOrder;
|
||||
|
||||
public class GetTrackCounterOutput
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackOrder;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackOrder;
|
||||
|
||||
public class TrackPushRecordItem
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackOrder;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackOrder;
|
||||
|
||||
public class TrackPushRecordOutput
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackPull;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackPull;
|
||||
|
||||
public class EditTrackPullConfigInput
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackPull;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackPull;
|
||||
|
||||
public class EditTrackPullContentInput
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackPull;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackPull;
|
||||
|
||||
public class TrackPullConfigDto
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackPull;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackPull;
|
||||
|
||||
public class TrackPullContentConfigDto
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackPull;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackPull;
|
||||
|
||||
public class TrackPullParamConfigDto
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackPull;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackPull;
|
||||
|
||||
public class TrackRefreshAttach
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using SJZY.Track.Share.Enums;
|
||||
using SJZY.Track.Share.Enums;
|
||||
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackPush;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackPush;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackPush;
|
||||
|
||||
public class EditTrackPushContentInput
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using SJZY.Expand.ABP.Core.PublicMethords;
|
||||
using SJZY.Expand.ABP.Core.PublicMethords;
|
||||
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackPush;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackPush;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackPush;
|
||||
|
||||
public class TrackPushAfterUpdateOrderDto
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using SJZY.Track.Share.Enums;
|
||||
using SJZY.Track.Share.Enums;
|
||||
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackPush;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackPush;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackPush;
|
||||
|
||||
public class TrackPushInput
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackStatus;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackStatus;
|
||||
|
||||
public class EditTrackStatusInput
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackStatus;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackStatus;
|
||||
|
||||
public class GetTrackStatusDetailDto
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackStatus;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackStatus;
|
||||
|
||||
public class GetTrackStatusListDto
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackTemplates;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackTemplates;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public class EditTrackTemplateContentInput
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackTemplates;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackTemplates;
|
||||
|
||||
/// <summary>
|
||||
/// 获取轨迹模版分页输入
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackTemplates;
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackTemplates;
|
||||
|
||||
/// <summary>
|
||||
/// 获取轨迹模版详情
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using SJZY.Expand.ABP.Core.PublicMethords;
|
||||
using SJZY.Expand.ABP.Core.PublicMethords;
|
||||
|
||||
namespace SJZY.Track.Application.Contract.Dtos.TrackTemplates;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Events;
|
||||
namespace SJZY.Track.Application.Contract.Events;
|
||||
|
||||
public class TrackChangeAfterUpdateOrderEvent
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Events;
|
||||
namespace SJZY.Track.Application.Contract.Events;
|
||||
|
||||
public class TrackDeleteEvent
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Events;
|
||||
namespace SJZY.Track.Application.Contract.Events;
|
||||
|
||||
public class TrackPushEvent
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Events;
|
||||
namespace SJZY.Track.Application.Contract.Events;
|
||||
|
||||
public class TrackUpsertEvent
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Events;
|
||||
namespace SJZY.Track.Application.Contract.Events;
|
||||
|
||||
public class TrackUpsertForRefreshEvent
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Global using directives
|
||||
// Global using directives
|
||||
|
||||
global using SJZY.Expand.ABP.Common.Enums;
|
||||
global using SJZY.Expand.ABP.Core.Common.Dto;
|
||||
@ -1,4 +1,4 @@
|
||||
using SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
using SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
using Volo.Abp;
|
||||
|
||||
namespace SJZY.Track.Application.Contract.Services;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Services;
|
||||
namespace SJZY.Track.Application.Contract.Services;
|
||||
|
||||
public interface ITrackContentService
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Services;
|
||||
namespace SJZY.Track.Application.Contract.Services;
|
||||
|
||||
public interface ITrackFlagService
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using SJZY.Track.Application.Contract.Dtos.TrackPull;
|
||||
using SJZY.Track.Application.Contract.Dtos.TrackPull;
|
||||
|
||||
namespace SJZY.Track.Application.Contract.Services;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using SJZY.Track.Application.Contract.Dtos.TrackPush;
|
||||
using SJZY.Track.Application.Contract.Dtos.TrackPush;
|
||||
|
||||
namespace SJZY.Track.Application.Contract.Services;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
using SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
using Volo.Abp;
|
||||
|
||||
namespace SJZY.Track.Application.Contract.Services;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
using SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
using Volo.Abp;
|
||||
|
||||
namespace SJZY.Track.Application.Contract.Services;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.Contract.Services;
|
||||
namespace SJZY.Track.Application.Contract.Services;
|
||||
|
||||
public interface ITrackStatusService
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using Volo.Abp.Modularity;
|
||||
using Volo.Abp.Modularity;
|
||||
|
||||
namespace SJZY.Track.Application.Contract;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using AutoMapper;
|
||||
using AutoMapper;
|
||||
using SJZY.Expand.ABP.Core.PublicMethords;
|
||||
using SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
using SJZY.Track.Application.Contract.Dtos.TrackOrder;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using AutoMapper;
|
||||
using AutoMapper;
|
||||
using SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
using SJZY.Track.Application.Contract.Events;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using AutoMapper;
|
||||
using AutoMapper;
|
||||
using SJZY.Track.Application.Contract.Dtos.TrackContents;
|
||||
using SJZY.Track.Domain.Aggregates.TrackContentAggregate;
|
||||
using SJZY.Track.Domain.Dtos.TrackContents;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using AutoMapper;
|
||||
using AutoMapper;
|
||||
using SJZY.Track.Application.Contract.Dtos.TrackFlags;
|
||||
using SJZY.Track.Domain.Aggregates.TrackFlagAggregate;
|
||||
using SJZY.Track.Domain.Dtos.TrackFlags;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using AutoMapper;
|
||||
using AutoMapper;
|
||||
using SJZY.Track.Application.Contract.Dtos.TrackPull;
|
||||
using SJZY.Track.Domain.Aggregates.TrackPullAggregate;
|
||||
using SJZY.Track.Domain.Dtos.TrackPull;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using AutoMapper;
|
||||
using AutoMapper;
|
||||
using SJZY.Track.Application.Contract.Dtos.TrackPush;
|
||||
using SJZY.Track.Domain.Aggregates.TrackPullAggregate;
|
||||
using SJZY.Track.Domain.Aggregates.TrackPushAggregate;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using AutoMapper;
|
||||
using AutoMapper;
|
||||
using SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
using SJZY.Track.Domain.Dtos.TrackPush;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using AutoMapper;
|
||||
using AutoMapper;
|
||||
using SJZY.Track.Application.Contract.Dtos.TrackStatus;
|
||||
using SJZY.Track.Domain.Aggregates.TrackStatusAggregate;
|
||||
using SJZY.Track.Domain.Dtos.TrackStatus;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using AutoMapper;
|
||||
using AutoMapper;
|
||||
using SJZY.Track.Application.Contract.Dtos.TrackTemplates;
|
||||
using SJZY.Track.Domain.Aggregates.TrackTemplateAggregate;
|
||||
using SJZY.Track.Domain.Dtos.TrackTemplate;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using DotNetCore.CAP.Filter;
|
||||
using DotNetCore.CAP.Filter;
|
||||
using SJZY.Expand.ABP.Core;
|
||||
using SJZY.Expand.ABP.Core.Logger;
|
||||
using SJZY.Expand.ABP.Core.PublicMethords;
|
||||
@ -20,11 +20,7 @@ public class CapFilter : SubscribeFilter
|
||||
{
|
||||
// 轨迹新增、更新要做幂等
|
||||
if (!context.DeliverMessage.Headers["cap-msg-name"]
|
||||
.IsIn(GlobalConst.TrackUpsertSubscribe, GlobalConst.TrackManualPushSubscribe))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
.IsIn(GlobalConst.TrackUpsertSubscribe, GlobalConst.TrackManualPushSubscribe)) return;
|
||||
var argumentJsonStr = context.Arguments.ToJson();
|
||||
|
||||
if (!string.IsNullOrEmpty(argumentJsonStr))
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using DotNetCore.CAP;
|
||||
using DotNetCore.CAP;
|
||||
using SJZY.Track.Application.Contract.Dtos.Forewarning;
|
||||
using SJZY.Track.Application.Contract.Events;
|
||||
using SJZY.Track.Application.Contract.Services;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using DotNetCore.CAP;
|
||||
using DotNetCore.CAP;
|
||||
using Newtonsoft.Json;
|
||||
using SJZY.InterfaceRelay.Application.Contracts;
|
||||
using SJZY.Track.Application.Contract.Dtos.TrackPush;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using DotNetCore.CAP;
|
||||
using DotNetCore.CAP;
|
||||
using SJZY.Expand.ABP.Core.Logger;
|
||||
using SJZY.Expand.ABP.Core.PublicMethords;
|
||||
using SJZY.Track.Application.Contract.Events;
|
||||
@ -13,10 +13,10 @@ namespace SJZY.Track.Application.CAP.EventHandlers;
|
||||
|
||||
public class TrackUpsertEventHandler : ITransientDependency, ICapSubscribe
|
||||
{
|
||||
private readonly ICapPublisher _capPublisher;
|
||||
private readonly IOrderRepository _orderRepository;
|
||||
private readonly IProvideQueries _provideQueries;
|
||||
private readonly ITrackDetailsRepository _trackDetailsRepository;
|
||||
private readonly ICapPublisher _capPublisher;
|
||||
|
||||
public TrackUpsertEventHandler(IOrderRepository orderRepository, ICapPublisher capPublisher,
|
||||
IProvideQueries provideQueries, ITrackDetailsRepository trackDetailsRepository)
|
||||
@ -82,9 +82,7 @@ public class TrackUpsertEventHandler : ITransientDependency, ICapSubscribe
|
||||
|
||||
var identifiers = group.Select(x => new OrderIdentifier
|
||||
{
|
||||
OrderId = x.OrderId,
|
||||
OrderNo = x.OrderNo,
|
||||
OrderType = x.OrderType,
|
||||
OrderId = x.OrderId, OrderNo = x.OrderNo, OrderType = x.OrderType,
|
||||
}).ToList();
|
||||
var idx = 0;
|
||||
while (idx < identifiers.Count)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace SJZY.Track.Application.CAP;
|
||||
|
||||
|
||||
@ -146,9 +146,7 @@ public class MySubscribeExecutor : ISubscribeExecutor
|
||||
{
|
||||
_options.FailedThresholdCallback?.Invoke(new FailedInfo
|
||||
{
|
||||
ServiceProvider = _provider,
|
||||
MessageType = MessageType.Subscribe,
|
||||
Message = message.Origin
|
||||
ServiceProvider = _provider, MessageType = MessageType.Subscribe, Message = message.Origin
|
||||
});
|
||||
|
||||
_logger.ConsumerExecutedAfterThreshold(message.DbId, _options.FailedRetryCount);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace SJZY.Track.Application.CAP;
|
||||
namespace SJZY.Track.Application.CAP;
|
||||
|
||||
internal class SubscriberExecutionFailedException : Exception
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
global using Microsoft.AspNetCore.Mvc;
|
||||
global using Microsoft.AspNetCore.Mvc;
|
||||
global using Microsoft.Extensions.DependencyInjection;
|
||||
global using SJZY.Expand.ABP.Common.Enums;
|
||||
global using SJZY.Expand.ABP.Core.Common.Dto;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using System.Text;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace SJZY.Track.Application.Helpers;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using SJZY.Expand.ABP.Core.Localization;
|
||||
using SJZY.Expand.ABP.Core.Localization;
|
||||
using Volo.Abp.Localization;
|
||||
|
||||
namespace SJZY.Track.Application.Localization;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using SJZY.Expand.ABP.Core;
|
||||
using SJZY.Expand.ABP.Core;
|
||||
|
||||
namespace SJZY.Track.Application.Options;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics;
|
||||
using System.Linq.Expressions;
|
||||
using System.Text;
|
||||
using BSI.Stack.Rabbit;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using DotNetCore.CAP;
|
||||
using DotNetCore.CAP;
|
||||
using SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
using SJZY.Track.Application.Contract.Events;
|
||||
using SJZY.Track.Domain.Aggregates.OrderAggregate;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using DotNetCore.CAP;
|
||||
using DotNetCore.CAP;
|
||||
using SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
using SJZY.Track.Application.Contract.Services;
|
||||
using SJZY.Track.Domain.Aggregates.OrderAggregate;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using SJZY.Expand.ABP.Core;
|
||||
using SJZY.Expand.ABP.Core.Logger;
|
||||
using SJZY.Expand.ABP.Core.PublicMethords;
|
||||
|
||||
@ -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.Domain.Aggregates.TrackPushAggregate;
|
||||
using SJZY.Track.Domain.Dtos.TrackPush;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using DotNetCore.CAP;
|
||||
using DotNetCore.CAP;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
using SJZY.Track.Application.Contract.Events;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using DotNetCore.CAP;
|
||||
using DotNetCore.CAP;
|
||||
using SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
using SJZY.Track.Application.Contract.Events;
|
||||
using SJZY.Track.Application.Contract.Services;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using System.Linq.Expressions;
|
||||
using System.Linq.Expressions;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using SJZY.Expand.ABP.Core.Localization;
|
||||
using SJZY.Expand.ABP.Core.PublicMethords;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using SJZY.Track.Application.Contract.Dtos.TrackFlags;
|
||||
using SJZY.Track.Application.Localization;
|
||||
using SJZY.Track.Domain.Aggregates.TrackContentAggregate;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics;
|
||||
using SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||||
using SJZY.Track.Application.Contract.Dtos.TrackOrder;
|
||||
using SJZY.Track.Domain.Aggregates.OrderAggregate;
|
||||
|
||||
@ -12,26 +12,25 @@ public class TrackPullCacheService : ApplicationService, ITrackPullCacheService
|
||||
{
|
||||
private readonly ITrackPullConfigRepository _trackPullConfigRepository;
|
||||
|
||||
public TrackPullCacheService(ITrackPullConfigRepository trackPullConfigRepository)
|
||||
{
|
||||
_trackPullConfigRepository = trackPullConfigRepository;
|
||||
}
|
||||
|
||||
public string TrackPullKey(int subSystemId, int serviceProviderId) =>
|
||||
$"{GlobalConst.TrackPullKeyPrefix}:{subSystemId}:{serviceProviderId}";
|
||||
|
||||
public string TrackPullContentKey(int subSystemId, int serviceProviderId) =>
|
||||
$"{GlobalConst.TrackPullContentKeyPrefix}:{subSystemId}:{serviceProviderId}";
|
||||
|
||||
public TrackPullCacheService(ITrackPullConfigRepository trackPullConfigRepository)
|
||||
{
|
||||
_trackPullConfigRepository = trackPullConfigRepository;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
public async Task<List<TrackPullConfigDto>> GetAllPullConfigsAsync()
|
||||
{
|
||||
return await _trackPullConfigRepository.GetListAsync(x => true, x => new TrackPullConfigDto
|
||||
{
|
||||
SubSystemId = x.SubSystemId,
|
||||
ServiceProviderId = x.ServiceProviderId,
|
||||
PullInterval = x.PullInterval
|
||||
});
|
||||
return await _trackPullConfigRepository.GetListAsync(x => true,
|
||||
x => new TrackPullConfigDto
|
||||
{
|
||||
SubSystemId = x.SubSystemId, ServiceProviderId = x.ServiceProviderId, PullInterval = x.PullInterval
|
||||
});
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using System.Linq.Expressions;
|
||||
using System.Linq.Expressions;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using SJZY.Expand.ABP.Core.Localization;
|
||||
using SJZY.Expand.ABP.Core.PublicMethords;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using SJZY.Track.Application.Contract.Dtos.TrackStatus;
|
||||
using SJZY.Track.Application.Localization;
|
||||
using SJZY.Track.Domain.Aggregates.TrackContentAggregate;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using System.Linq.Expressions;
|
||||
using System.Linq.Expressions;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using SJZY.Expand.ABP.Core.Localization;
|
||||
using SJZY.Expand.ABP.Core.PublicMethords;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using BSI.Stack.Rabbit;
|
||||
using BSI.Stack.Rabbit;
|
||||
using DotNetCore.CAP;
|
||||
using DotNetCore.CAP.Internal;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
@ -65,10 +65,7 @@ public class SjzyTrackApplicationModule : AbpModule
|
||||
.AddVirtualJson("/Localization/Resources");
|
||||
});
|
||||
//授权拦截提示
|
||||
context.Services.Configure<MvcOptions>(options =>
|
||||
{
|
||||
options.Filters.Add(new ApiAsyncAuthorizationFilter());
|
||||
});
|
||||
context.Services.Configure<MvcOptions>(options => { options.Filters.Add(new ApiAsyncAuthorizationFilter()); });
|
||||
|
||||
//用户中心
|
||||
context.Services.AddHttpClientProxies(typeof(SjzyUserCenterHttpApiModule).Assembly, "UserCenter", false);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using FluentValidation;
|
||||
using FluentValidation;
|
||||
using SJZY.Track.Application.Contract.Dtos.TrackContents;
|
||||
|
||||
namespace SJZY.Track.Application.Validations.TrackContents;
|
||||
|
||||
@ -10,36 +10,50 @@ public class EditTrackContentMapInputValidation : AbstractValidator<EditTrackCon
|
||||
{
|
||||
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.新增, () =>
|
||||
{
|
||||
RuleFor(x => x.Id).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackContentMapInput.Id)]);
|
||||
});
|
||||
When(x => x.Options != OptionTypeNoNull.新增,
|
||||
() =>
|
||||
{
|
||||
RuleFor(x => x.Id).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull,
|
||||
nameof(EditTrackContentMapInput.Id)]);
|
||||
});
|
||||
|
||||
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)]);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
using FluentValidation;
|
||||
using FluentValidation;
|
||||
using SJZY.Track.Application.Contract.Dtos.TrackFlags;
|
||||
|
||||
namespace SJZY.Track.Application.Validations.TrackFlags;
|
||||
|
||||
@ -10,55 +10,78 @@ public class EditTrackPullConfigInputValidation : AbstractValidator<EditTrackPul
|
||||
{
|
||||
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)
|
||||
.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.新增, () =>
|
||||
{
|
||||
RuleFor(x => x.Id).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackPullConfigInput.Id)]);
|
||||
});
|
||||
When(x => x.Options != OptionTypeNoNull.新增,
|
||||
() =>
|
||||
{
|
||||
RuleFor(x => x.Id).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull,
|
||||
nameof(EditTrackPullConfigInput.Id)]);
|
||||
});
|
||||
|
||||
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, () =>
|
||||
{
|
||||
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)]);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -10,24 +10,32 @@ public class EditTrackPullContentInputValidation : AbstractValidator<EditTrackPu
|
||||
{
|
||||
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.新增, () =>
|
||||
{
|
||||
RuleFor(x => x.Id).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull, nameof(EditTrackPullContentInput.Id)]);
|
||||
});
|
||||
When(x => x.Options != OptionTypeNoNull.新增,
|
||||
() =>
|
||||
{
|
||||
RuleFor(x => x.Id).NotNull().WithMessage(stringLocalizer[SjzyBasicLocalization.Validation_NotNull,
|
||||
nameof(EditTrackPullContentInput.Id)]);
|
||||
});
|
||||
|
||||
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
Loading…
Reference in New Issue
Block a user