Compare commits

..

4 Commits
dev ... master

Author SHA1 Message Date
cafb099c40 测试完成回归正常 2024-01-25 14:52:32 +08:00
f33d9340b3 Merge remote-tracking branch 'origin/update' into update
# Conflicts:
#	README.md
2024-01-25 14:43:56 +08:00
cbc0eea5e7 Reapply "撤销提交重新推送"
This reverts commit 64b65acefff9607d2b9a670db18677ece0111eec.
2024-01-25 14:41:59 +08:00
5f66891b8b 学习 git 提交回滚 2024-01-25 14:39:09 +08:00
344 changed files with 1524 additions and 3648 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GrepConsole">
<option name="tailHistory">
<TailHistory>
<option name="items">
<set>
<TailItem>
<option name="path" value="$PROJECT_DIR$/README.md" />
</TailItem>
</set>
</option>
</TailHistory>
</option>
</component>
</project>

View File

@ -30,9 +30,6 @@
<module name="service-payment" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel>
<module name="service-doc" target="1.8" />
</bytecodeTargetLevel>
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
@ -44,7 +41,6 @@
<module name="service-activity-client" options="-parameters" />
<module name="service-cart" options="-parameters" />
<module name="service-cart-client" options="-parameters" />
<module name="service-doc" options="-parameters" />
<module name="service-gateway" options="-parameters" />
<module name="service-home" options="-parameters" />
<module name="service-order" options="-parameters" />

View File

@ -1,101 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="shequ-order" uuid="d1d0ade6-4993-4212-94bc-80081fe827ad">
<driver-ref>mysql.8</driver-ref>
<synchronize>true</synchronize>
<remarks>权限表</remarks>
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mysql://82.157.68.223:3306/shequ-order</jdbc-url>
<jdbc-additional-properties>
<property name="com.intellij.clouds.kubernetes.db.host.port" />
<property name="com.intellij.clouds.kubernetes.db.enabled" value="false" />
<property name="com.intellij.clouds.kubernetes.db.resource.type" value="Deployment" />
<property name="com.intellij.clouds.kubernetes.db.container.port" />
</jdbc-additional-properties>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
<data-source source="LOCAL" name="shequ-user" uuid="d1bd1059-c819-49c4-aa9a-07beec0beb9b">
<driver-ref>mysql.8</driver-ref>
<synchronize>true</synchronize>
<remarks>权限表</remarks>
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mysql://82.157.68.223:3306/shequ-user</jdbc-url>
<jdbc-additional-properties>
<property name="com.intellij.clouds.kubernetes.db.host.port" />
<property name="com.intellij.clouds.kubernetes.db.enabled" value="false" />
<property name="com.intellij.clouds.kubernetes.db.resource.type" value="Deployment" />
<property name="com.intellij.clouds.kubernetes.db.container.port" />
</jdbc-additional-properties>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
<data-source source="LOCAL" name="shequ-acl" uuid="a09f33a1-ada6-4824-9596-c3b490c80b64">
<driver-ref>mysql.8</driver-ref>
<synchronize>true</synchronize>
<remarks>权限表</remarks>
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mysql://82.157.68.223:3306/shequ-acl</jdbc-url>
<jdbc-additional-properties>
<property name="com.intellij.clouds.kubernetes.db.host.port" />
<property name="com.intellij.clouds.kubernetes.db.enabled" value="false" />
<property name="com.intellij.clouds.kubernetes.db.resource.type" value="Deployment" />
<property name="com.intellij.clouds.kubernetes.db.container.port" />
</jdbc-additional-properties>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
<data-source source="LOCAL" name="shequ-sys" uuid="c68f52b6-a34c-4f7b-bfdb-7fbb226511d9">
<driver-ref>mysql.8</driver-ref>
<synchronize>true</synchronize>
<remarks>权限表</remarks>
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mysql://82.157.68.223:3306/shequ-sys</jdbc-url>
<jdbc-additional-properties>
<property name="com.intellij.clouds.kubernetes.db.host.port" />
<property name="com.intellij.clouds.kubernetes.db.enabled" value="false" />
<property name="com.intellij.clouds.kubernetes.db.resource.type" value="Deployment" />
<property name="com.intellij.clouds.kubernetes.db.container.port" />
</jdbc-additional-properties>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
<data-source source="LOCAL" name="shequ-activity" uuid="03a3ad56-5ab1-4715-9d6a-2254cf6995ff">
<driver-ref>mysql.8</driver-ref>
<synchronize>true</synchronize>
<remarks>权限表</remarks>
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mysql://82.157.68.223:3306/shequ-activity</jdbc-url>
<jdbc-additional-properties>
<property name="com.intellij.clouds.kubernetes.db.host.port" />
<property name="com.intellij.clouds.kubernetes.db.enabled" value="false" />
<property name="com.intellij.clouds.kubernetes.db.resource.type" value="Deployment" />
<property name="com.intellij.clouds.kubernetes.db.container.port" />
</jdbc-additional-properties>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
<data-source source="LOCAL" name="shequ-product" uuid="0764afd5-6fdc-443b-8be1-692808c3afd5">
<driver-ref>mysql.8</driver-ref>
<synchronize>true</synchronize>
<remarks>权限表</remarks>
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mysql://82.157.68.223:3306</jdbc-url>
<jdbc-additional-properties>
<property name="com.intellij.clouds.kubernetes.db.host.port" />
<property name="com.intellij.clouds.kubernetes.db.enabled" value="false" />
<property name="com.intellij.clouds.kubernetes.db.resource.type" value="Deployment" />
<property name="com.intellij.clouds.kubernetes.db.container.port" />
</jdbc-additional-properties>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
<data-source source="LOCAL" name="Redis" uuid="5578efaa-9845-4abb-98c9-afdc8aa74f28">
<driver-ref>redis</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>jdbc.RedisDriver</jdbc-driver>
<jdbc-url>jdbc:redis://192.168.31.67:6379/0</jdbc-url>
<jdbc-additional-properties>
<property name="com.intellij.clouds.kubernetes.db.host.port" />
<property name="com.intellij.clouds.kubernetes.db.enabled" value="false" />
<property name="com.intellij.clouds.kubernetes.db.container.port" />
</jdbc-additional-properties>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component>
</project>

View File

@ -15,7 +15,6 @@
<file url="file://$PROJECT_DIR$/xlcs-parent/service-client/service-user-client/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/xlcs-parent/service-client/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/xlcs-parent/service-client/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/xlcs-parent/service-doc/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/xlcs-parent/service-gateway/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/xlcs-parent/service/service-acl/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/xlcs-parent/service/service-activity/src/main/java" charset="UTF-8" />

View File

@ -1,12 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="FindBugsConfigurable">
<option name="make" value="true" />
<option name="effort" value="default" />
<option name="priority" value="Medium" />
<option name="excludeFilter" value="" />
<component name="AnalysisProjectProfileManager">
<option name="PROJECT_PROFILE" />
<option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
<list size="0" />
</component>
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="JavaDocConfiguration">
<GENERAL>
<MODE>UPDATE</MODE>
@ -214,6 +213,7 @@
<option value="$PROJECT_DIR$/xlcs-parent/pom.xml" />
</list>
</option>
<option name="workspaceImportForciblyTurnedOn" value="true" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />

View File

@ -1,465 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AnalysisProjectProfileManager">
<option name="PROJECT_PROFILE" value="Project Default" />
<option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
<scopes />
<profiles>
<profile profile_name="Project Default" version="1.0" is_locked="false">
<coding_rule class="AM_CREATES_EMPTY_JAR_FILE_ENTRY" level="MAJOR" enabled="true" />
<coding_rule class="AM_CREATES_EMPTY_ZIP_FILE_ENTRY" level="MAJOR" enabled="true" />
<coding_rule class="AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION" level="CRITICAL" enabled="false" />
<coding_rule class="BAC_BAD_APPLET_CONSTRUCTOR" level="MAJOR" enabled="false" />
<coding_rule class="BC_BAD_CAST_TO_ABSTRACT_COLLECTION" level="MAJOR" enabled="true" />
<coding_rule class="BC_BAD_CAST_TO_CONCRETE_COLLECTION" level="CRITICAL" enabled="true" />
<coding_rule class="BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS" level="CRITICAL" enabled="true" />
<coding_rule class="BC_IMPOSSIBLE_CAST" level="BLOCKER" enabled="true" />
<coding_rule class="BC_IMPOSSIBLE_DOWNCAST" level="MAJOR" enabled="false" />
<coding_rule class="BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY" level="MAJOR" enabled="false" />
<coding_rule class="BC_IMPOSSIBLE_INSTANCEOF" level="CRITICAL" enabled="true" />
<coding_rule class="BC_UNCONFIRMED_CAST" level="CRITICAL" enabled="true" />
<coding_rule class="BC_UNCONFIRMED_CAST_OF_RETURN_VALUE" level="CRITICAL" enabled="false" />
<coding_rule class="BC_VACUOUS_INSTANCEOF" level="CRITICAL" enabled="true" />
<coding_rule class="BIT_ADD_OF_SIGNED_BYTE" level="CRITICAL" enabled="true" />
<coding_rule class="BIT_AND" level="CRITICAL" enabled="true" />
<coding_rule class="BIT_AND_ZZ" level="CRITICAL" enabled="true" />
<coding_rule class="BIT_IOR" level="CRITICAL" enabled="true" />
<coding_rule class="BIT_IOR_OF_SIGNED_BYTE" level="CRITICAL" enabled="true" />
<coding_rule class="BIT_SIGNED_CHECK" level="CRITICAL" enabled="true" />
<coding_rule class="BIT_SIGNED_CHECK_HIGH_BIT" level="CRITICAL" enabled="true" />
<coding_rule class="BOA_BADLY_OVERRIDDEN_ADAPTER" level="CRITICAL" enabled="true" />
<coding_rule class="BSHIFT_WRONG_ADD_PRIORITY" level="MAJOR" enabled="false" />
<coding_rule class="BX_BOXING_IMMEDIATELY_UNBOXED" level="MAJOR" enabled="true" />
<coding_rule class="BX_BOXING_IMMEDIATELY_UNBOXED_TO_PERFORM_COERCION" level="MAJOR" enabled="true" />
<coding_rule class="BX_UNBOXED_AND_COERCED_FOR_TERNARY_OPERATOR" level="MAJOR" enabled="true" />
<coding_rule class="BX_UNBOXING_IMMEDIATELY_REBOXED" level="CRITICAL" enabled="false" />
<coding_rule class="CAA_COVARIANT_ARRAY_ELEMENT_STORE" level="MAJOR" enabled="false" />
<coding_rule class="CAA_COVARIANT_ARRAY_FIELD" level="MAJOR" enabled="false" />
<coding_rule class="CAA_COVARIANT_ARRAY_LOCAL" level="MAJOR" enabled="false" />
<coding_rule class="CAA_COVARIANT_ARRAY_RETURN" level="MAJOR" enabled="false" />
<coding_rule class="CD_CIRCULAR_DEPENDENCY" level="MAJOR" enabled="false" />
<coding_rule class="CI_CONFUSED_INHERITANCE" level="MINOR" enabled="true" />
<coding_rule class="CNT_ROUGH_CONSTANT_VALUE" level="MAJOR" enabled="false" />
<coding_rule class="CN_IDIOM" level="MAJOR" enabled="true" />
<coding_rule class="CN_IDIOM_NO_SUPER_CALL" level="MAJOR" enabled="true" />
<coding_rule class="CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE" level="MAJOR" enabled="true" />
<coding_rule class="CO_ABSTRACT_SELF" level="MAJOR" enabled="true" />
<coding_rule class="CO_COMPARETO_INCORRECT_FLOATING" level="MAJOR" enabled="false" />
<coding_rule class="CO_COMPARETO_RESULTS_MIN_VALUE" level="CRITICAL" enabled="false" />
<coding_rule class="CO_SELF_NO_OBJECT" level="MAJOR" enabled="true" />
<coding_rule class="DB_DUPLICATE_BRANCHES" level="CRITICAL" enabled="true" />
<coding_rule class="DB_DUPLICATE_SWITCH_CLAUSES" level="CRITICAL" enabled="true" />
<coding_rule class="DC_DOUBLECHECK" level="MAJOR" enabled="true" />
<coding_rule class="DC_PARTIALLY_CONSTRUCTED" level="MAJOR" enabled="false" />
<coding_rule class="DE_MIGHT_DROP" level="MAJOR" enabled="true" />
<coding_rule class="DE_MIGHT_IGNORE" level="MAJOR" enabled="true" />
<coding_rule class="DLS_DEAD_LOCAL_INCREMENT_IN_RETURN" level="MAJOR" enabled="false" />
<coding_rule class="DLS_DEAD_LOCAL_STORE" level="CRITICAL" enabled="true" />
<coding_rule class="DLS_DEAD_LOCAL_STORE_IN_RETURN" level="CRITICAL" enabled="true" />
<coding_rule class="DLS_DEAD_LOCAL_STORE_OF_NULL" level="CRITICAL" enabled="true" />
<coding_rule class="DLS_DEAD_LOCAL_STORE_SHADOWS_FIELD" level="CRITICAL" enabled="false" />
<coding_rule class="DLS_DEAD_STORE_OF_CLASS_LITERAL" level="CRITICAL" enabled="true" />
<coding_rule class="DLS_OVERWRITTEN_INCREMENT" level="CRITICAL" enabled="true" />
<coding_rule class="DL_SYNCHRONIZATION_ON_BOOLEAN" level="CRITICAL" enabled="true" />
<coding_rule class="DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE" level="CRITICAL" enabled="true" />
<coding_rule class="DL_SYNCHRONIZATION_ON_SHARED_CONSTANT" level="CRITICAL" enabled="true" />
<coding_rule class="DL_SYNCHRONIZATION_ON_UNSHARED_BOXED_PRIMITIVE" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_ANNOTATION_IS_NOT_VISIBLE_TO_REFLECTION" level="MAJOR" enabled="true" />
<coding_rule class="DMI_ARGUMENTS_WRONG_ORDER" level="CRITICAL" enabled="false" />
<coding_rule class="DMI_BAD_MONTH" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_BIGDECIMAL_CONSTRUCTED_FROM_DOUBLE" level="CRITICAL" enabled="false" />
<coding_rule class="DMI_BLOCKING_METHODS_ON_URL" level="BLOCKER" enabled="true" />
<coding_rule class="DMI_CALLING_NEXT_FROM_HASNEXT" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_COLLECTIONS_SHOULD_NOT_CONTAIN_THEMSELVES" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_COLLECTION_OF_URLS" level="BLOCKER" enabled="true" />
<coding_rule class="DMI_CONSTANT_DB_PASSWORD" level="BLOCKER" enabled="true" />
<coding_rule class="DMI_DOH" level="CRITICAL" enabled="false" />
<coding_rule class="DMI_EMPTY_DB_PASSWORD" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS" level="CRITICAL" enabled="false" />
<coding_rule class="DMI_FUTILE_ATTEMPT_TO_CHANGE_MAXPOOL_SIZE_OF_SCHEDULED_THREAD_POOL_EXECUTOR" level="MINOR" enabled="true" />
<coding_rule class="DMI_HARDCODED_ABSOLUTE_FILENAME" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_INVOKING_HASHCODE_ON_ARRAY" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_INVOKING_TOSTRING_ON_ANONYMOUS_ARRAY" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_INVOKING_TOSTRING_ON_ARRAY" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_LONG_BITS_TO_DOUBLE_INVOKED_ON_INT" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_NONSERIALIZABLE_OBJECT_WRITTEN" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_RANDOM_USED_ONLY_ONCE" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_SCHEDULED_THREAD_POOL_EXECUTOR_WITH_ZERO_CORE_THREADS" level="MINOR" enabled="true" />
<coding_rule class="DMI_THREAD_PASSED_WHERE_RUNNABLE_EXPECTED" level="MAJOR" enabled="true" />
<coding_rule class="DMI_UNSUPPORTED_METHOD" level="MAJOR" enabled="true" />
<coding_rule class="DMI_USELESS_SUBSTRING" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_USING_REMOVEALL_TO_CLEAR_COLLECTION" level="CRITICAL" enabled="true" />
<coding_rule class="DMI_VACUOUS_CALL_TO_EASYMOCK_METHOD" level="MINOR" enabled="true" />
<coding_rule class="DMI_VACUOUS_SELF_COLLECTION_CALL" level="CRITICAL" enabled="true" />
<coding_rule class="DM_BOOLEAN_CTOR" level="MAJOR" enabled="true" />
<coding_rule class="DM_BOXED_PRIMITIVE_FOR_COMPARE" level="MAJOR" enabled="false" />
<coding_rule class="DM_BOXED_PRIMITIVE_FOR_PARSING" level="MAJOR" enabled="false" />
<coding_rule class="DM_BOXED_PRIMITIVE_TOSTRING" level="MAJOR" enabled="true" />
<coding_rule class="DM_CONVERT_CASE" level="INFO" enabled="true" />
<coding_rule class="DM_DEFAULT_ENCODING" level="CRITICAL" enabled="false" />
<coding_rule class="DM_EXIT" level="MAJOR" enabled="true" />
<coding_rule class="DM_FP_NUMBER_CTOR" level="MAJOR" enabled="true" />
<coding_rule class="DM_GC" level="MAJOR" enabled="true" />
<coding_rule class="DM_INVALID_MIN_MAX" level="MAJOR" enabled="false" />
<coding_rule class="DM_MONITOR_WAIT_ON_CONDITION" level="MAJOR" enabled="true" />
<coding_rule class="DM_NEW_FOR_GETCLASS" level="MAJOR" enabled="true" />
<coding_rule class="DM_NEXTINT_VIA_NEXTDOUBLE" level="MAJOR" enabled="true" />
<coding_rule class="DM_NUMBER_CTOR" level="CRITICAL" enabled="true" />
<coding_rule class="DM_RUN_FINALIZERS_ON_EXIT" level="MAJOR" enabled="true" />
<coding_rule class="DM_STRING_CTOR" level="MAJOR" enabled="true" />
<coding_rule class="DM_STRING_TOSTRING" level="INFO" enabled="true" />
<coding_rule class="DM_STRING_VOID_CTOR" level="MAJOR" enabled="true" />
<coding_rule class="DM_USELESS_THREAD" level="MAJOR" enabled="true" />
<coding_rule class="DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED" level="MAJOR" enabled="true" />
<coding_rule class="DP_DO_INSIDE_DO_PRIVILEGED" level="MAJOR" enabled="true" />
<coding_rule class="EC_ARRAY_AND_NONARRAY" level="CRITICAL" enabled="true" />
<coding_rule class="EC_BAD_ARRAY_COMPARE" level="CRITICAL" enabled="true" />
<coding_rule class="EC_INCOMPATIBLE_ARRAY_COMPARE" level="MAJOR" enabled="false" />
<coding_rule class="EC_NULL_ARG" level="CRITICAL" enabled="true" />
<coding_rule class="EC_UNRELATED_CLASS_AND_INTERFACE" level="CRITICAL" enabled="true" />
<coding_rule class="EC_UNRELATED_INTERFACES" level="CRITICAL" enabled="true" />
<coding_rule class="EC_UNRELATED_TYPES" level="CRITICAL" enabled="true" />
<coding_rule class="EC_UNRELATED_TYPES_USING_POINTER_EQUALITY" level="CRITICAL" enabled="true" />
<coding_rule class="EI_EXPOSE_REP" level="MAJOR" enabled="true" />
<coding_rule class="EI_EXPOSE_REP2" level="MAJOR" enabled="true" />
<coding_rule class="EI_EXPOSE_STATIC_REP2" level="MAJOR" enabled="true" />
<coding_rule class="EQ_ABSTRACT_SELF" level="MAJOR" enabled="true" />
<coding_rule class="EQ_ALWAYS_FALSE" level="BLOCKER" enabled="true" />
<coding_rule class="EQ_ALWAYS_TRUE" level="BLOCKER" enabled="true" />
<coding_rule class="EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THIS" level="MAJOR" enabled="true" />
<coding_rule class="EQ_COMPARETO_USE_OBJECT_EQUALS" level="CRITICAL" enabled="true" />
<coding_rule class="EQ_COMPARING_CLASS_NAMES" level="MAJOR" enabled="true" />
<coding_rule class="EQ_DOESNT_OVERRIDE_EQUALS" level="MAJOR" enabled="false" />
<coding_rule class="EQ_DONT_DEFINE_EQUALS_FOR_ENUM" level="MAJOR" enabled="true" />
<coding_rule class="EQ_GETCLASS_AND_CLASS_CONSTANT" level="CRITICAL" enabled="true" />
<coding_rule class="EQ_OTHER_NO_OBJECT" level="MAJOR" enabled="true" />
<coding_rule class="EQ_OTHER_USE_OBJECT" level="MAJOR" enabled="true" />
<coding_rule class="EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC" level="MAJOR" enabled="true" />
<coding_rule class="EQ_SELF_NO_OBJECT" level="MAJOR" enabled="true" />
<coding_rule class="EQ_SELF_USE_OBJECT" level="MAJOR" enabled="true" />
<coding_rule class="EQ_UNUSUAL" level="MINOR" enabled="true" />
<coding_rule class="ES_COMPARING_PARAMETER_STRING_WITH_EQ" level="MAJOR" enabled="true" />
<coding_rule class="ES_COMPARING_STRINGS_WITH_EQ" level="MAJOR" enabled="true" />
<coding_rule class="ESync_EMPTY_SYNC" level="MAJOR" enabled="true" />
<coding_rule class="FB_MISSING_EXPECTED_WARNING" level="CRITICAL" enabled="false" />
<coding_rule class="FB_UNEXPECTED_WARNING" level="CRITICAL" enabled="false" />
<coding_rule class="FE_FLOATING_POINT_EQUALITY" level="CRITICAL" enabled="true" />
<coding_rule class="FE_TEST_IF_EQUAL_TO_NOT_A_NUMBER" level="CRITICAL" enabled="true" />
<coding_rule class="FI_EMPTY" level="MAJOR" enabled="true" />
<coding_rule class="FI_EXPLICIT_INVOCATION" level="MAJOR" enabled="true" />
<coding_rule class="FI_FINALIZER_NULLS_FIELDS" level="MAJOR" enabled="true" />
<coding_rule class="FI_FINALIZER_ONLY_NULLS_FIELDS" level="MAJOR" enabled="true" />
<coding_rule class="FI_MISSING_SUPER_CALL" level="MAJOR" enabled="true" />
<coding_rule class="FI_NULLIFY_SUPER" level="CRITICAL" enabled="true" />
<coding_rule class="FI_PUBLIC_SHOULD_BE_PROTECTED" level="MAJOR" enabled="true" />
<coding_rule class="FI_USELESS" level="MINOR" enabled="true" />
<coding_rule class="FL_MATH_USING_FLOAT_PRECISION" level="CRITICAL" enabled="true" />
<coding_rule class="GC_UNCHECKED_TYPE_IN_GENERIC_CALL" level="CRITICAL" enabled="true" />
<coding_rule class="GC_UNRELATED_TYPES" level="CRITICAL" enabled="true" />
<coding_rule class="HE_EQUALS_NO_HASHCODE" level="MAJOR" enabled="true" />
<coding_rule class="HE_EQUALS_USE_HASHCODE" level="CRITICAL" enabled="true" />
<coding_rule class="HE_HASHCODE_NO_EQUALS" level="CRITICAL" enabled="true" />
<coding_rule class="HE_HASHCODE_USE_OBJECT_EQUALS" level="CRITICAL" enabled="true" />
<coding_rule class="HE_INHERITS_EQUALS_USE_HASHCODE" level="CRITICAL" enabled="true" />
<coding_rule class="HE_SIGNATURE_DECLARES_HASHING_OF_UNHASHABLE_CLASS" level="CRITICAL" enabled="true" />
<coding_rule class="HE_USE_OF_UNHASHABLE_CLASS" level="CRITICAL" enabled="true" />
<coding_rule class="HRS_REQUEST_PARAMETER_TO_COOKIE" level="MAJOR" enabled="true" />
<coding_rule class="HRS_REQUEST_PARAMETER_TO_HTTP_HEADER" level="MAJOR" enabled="true" />
<coding_rule class="HSC_HUGE_SHARED_STRING_CONSTANT" level="CRITICAL" enabled="true" />
<coding_rule class="IA_AMBIGUOUS_INVOCATION_OF_INHERITED_OR_OUTER_METHOD" level="MAJOR" enabled="true" />
<coding_rule class="ICAST_BAD_SHIFT_AMOUNT" level="CRITICAL" enabled="true" />
<coding_rule class="ICAST_IDIV_CAST_TO_DOUBLE" level="CRITICAL" enabled="true" />
<coding_rule class="ICAST_INTEGER_MULTIPLY_CAST_TO_LONG" level="CRITICAL" enabled="true" />
<coding_rule class="ICAST_INT_2_LONG_AS_INSTANT" level="CRITICAL" enabled="false" />
<coding_rule class="ICAST_INT_CAST_TO_DOUBLE_PASSED_TO_CEIL" level="CRITICAL" enabled="true" />
<coding_rule class="ICAST_INT_CAST_TO_FLOAT_PASSED_TO_ROUND" level="CRITICAL" enabled="true" />
<coding_rule class="ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT" level="CRITICAL" enabled="true" />
<coding_rule class="IC_INIT_CIRCULARITY" level="CRITICAL" enabled="true" />
<coding_rule class="IC_SUPERCLASS_USES_SUBCLASS_DURING_INITIALIZATION" level="MAJOR" enabled="true" />
<coding_rule class="IIL_ELEMENTS_GET_LENGTH_IN_LOOP" level="MAJOR" enabled="false" />
<coding_rule class="IIL_PATTERN_COMPILE_IN_LOOP" level="MAJOR" enabled="false" />
<coding_rule class="IIL_PATTERN_COMPILE_IN_LOOP_INDIRECT" level="MAJOR" enabled="false" />
<coding_rule class="IIL_PREPARE_STATEMENT_IN_LOOP" level="MAJOR" enabled="false" />
<coding_rule class="IIO_INEFFICIENT_INDEX_OF" level="MAJOR" enabled="false" />
<coding_rule class="IIO_INEFFICIENT_LAST_INDEX_OF" level="MAJOR" enabled="false" />
<coding_rule class="IJU_ASSERT_METHOD_INVOKED_FROM_RUN_METHOD" level="CRITICAL" enabled="true" />
<coding_rule class="IJU_BAD_SUITE_METHOD" level="CRITICAL" enabled="true" />
<coding_rule class="IJU_NO_TESTS" level="CRITICAL" enabled="true" />
<coding_rule class="IJU_SETUP_NO_SUPER" level="CRITICAL" enabled="true" />
<coding_rule class="IJU_SUITE_NOT_STATIC" level="CRITICAL" enabled="true" />
<coding_rule class="IJU_TEARDOWN_NO_SUPER" level="CRITICAL" enabled="true" />
<coding_rule class="IL_CONTAINER_ADDED_TO_ITSELF" level="CRITICAL" enabled="true" />
<coding_rule class="IL_INFINITE_LOOP" level="CRITICAL" enabled="true" />
<coding_rule class="IL_INFINITE_RECURSIVE_LOOP" level="CRITICAL" enabled="true" />
<coding_rule class="IMA_INEFFICIENT_MEMBER_ACCESS" level="MAJOR" enabled="false" />
<coding_rule class="IMSE_DONT_CATCH_IMSE" level="MAJOR" enabled="true" />
<coding_rule class="IM_AVERAGE_COMPUTATION_COULD_OVERFLOW" level="CRITICAL" enabled="true" />
<coding_rule class="IM_BAD_CHECK_FOR_ODD" level="CRITICAL" enabled="true" />
<coding_rule class="IM_MULTIPLYING_RESULT_OF_IREM" level="CRITICAL" enabled="true" />
<coding_rule class="INT_BAD_COMPARISON_WITH_INT_VALUE" level="CRITICAL" enabled="false" />
<coding_rule class="INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE" level="CRITICAL" enabled="true" />
<coding_rule class="INT_BAD_COMPARISON_WITH_SIGNED_BYTE" level="CRITICAL" enabled="true" />
<coding_rule class="INT_BAD_REM_BY_1" level="CRITICAL" enabled="true" />
<coding_rule class="INT_VACUOUS_BIT_OPERATION" level="CRITICAL" enabled="true" />
<coding_rule class="INT_VACUOUS_COMPARISON" level="CRITICAL" enabled="true" />
<coding_rule class="IO_APPENDING_TO_OBJECT_OUTPUT_STREAM" level="CRITICAL" enabled="true" />
<coding_rule class="IP_PARAMETER_IS_DEAD_BUT_OVERWRITTEN" level="CRITICAL" enabled="true" />
<coding_rule class="IS2_INCONSISTENT_SYNC" level="CRITICAL" enabled="true" />
<coding_rule class="ISC_INSTANTIATE_STATIC_CLASS" level="MAJOR" enabled="true" />
<coding_rule class="IS_FIELD_NOT_GUARDED" level="CRITICAL" enabled="true" />
<coding_rule class="ITA_INEFFICIENT_TO_ARRAY" level="CRITICAL" enabled="true" />
<coding_rule class="IT_NO_SUCH_ELEMENT" level="MINOR" enabled="true" />
<coding_rule class="J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION" level="CRITICAL" enabled="true" />
<coding_rule class="JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS" level="MINOR" enabled="true" />
<coding_rule class="JLM_JSR166_LOCK_MONITORENTER" level="CRITICAL" enabled="true" />
<coding_rule class="JLM_JSR166_UTILCONCURRENT_MONITORENTER" level="CRITICAL" enabled="false" />
<coding_rule class="JML_JSR166_CALLING_WAIT_RATHER_THAN_AWAIT" level="CRITICAL" enabled="false" />
<coding_rule class="LG_LOST_LOGGER_DUE_TO_WEAK_REFERENCE" level="MAJOR" enabled="false" />
<coding_rule class="LI_LAZY_INIT_STATIC" level="CRITICAL" enabled="true" />
<coding_rule class="LI_LAZY_INIT_UPDATE_STATIC" level="CRITICAL" enabled="true" />
<coding_rule class="ME_ENUM_FIELD_SETTER" level="MAJOR" enabled="false" />
<coding_rule class="ME_MUTABLE_ENUM_FIELD" level="MAJOR" enabled="false" />
<coding_rule class="MF_CLASS_MASKS_FIELD" level="MAJOR" enabled="true" />
<coding_rule class="MF_METHOD_MASKS_FIELD" level="MAJOR" enabled="true" />
<coding_rule class="ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD" level="MAJOR" enabled="true" />
<coding_rule class="ML_SYNC_ON_UPDATED_FIELD" level="MAJOR" enabled="true" />
<coding_rule class="MSF_MUTABLE_SERVLET_FIELD" level="MAJOR" enabled="true" />
<coding_rule class="MS_CANNOT_BE_FINAL" level="MAJOR" enabled="true" />
<coding_rule class="MS_EXPOSE_REP" level="CRITICAL" enabled="true" />
<coding_rule class="MS_FINAL_PKGPROTECT" level="MAJOR" enabled="true" />
<coding_rule class="MS_MUTABLE_ARRAY" level="MAJOR" enabled="true" />
<coding_rule class="MS_MUTABLE_COLLECTION" level="MAJOR" enabled="false" />
<coding_rule class="MS_MUTABLE_COLLECTION_PKGPROTECT" level="MAJOR" enabled="false" />
<coding_rule class="MS_MUTABLE_HASHTABLE" level="MAJOR" enabled="true" />
<coding_rule class="MS_OOI_PKGPROTECT" level="MAJOR" enabled="true" />
<coding_rule class="MS_PKGPROTECT" level="MAJOR" enabled="true" />
<coding_rule class="MS_SHOULD_BE_FINAL" level="MAJOR" enabled="true" />
<coding_rule class="MS_SHOULD_BE_REFACTORED_TO_BE_FINAL" level="CRITICAL" enabled="false" />
<coding_rule class="MTIA_SUSPECT_SERVLET_INSTANCE_FIELD" level="CRITICAL" enabled="true" />
<coding_rule class="MTIA_SUSPECT_STRUTS_INSTANCE_FIELD" level="CRITICAL" enabled="true" />
<coding_rule class="MWN_MISMATCHED_NOTIFY" level="CRITICAL" enabled="true" />
<coding_rule class="MWN_MISMATCHED_WAIT" level="CRITICAL" enabled="true" />
<coding_rule class="NM_BAD_EQUAL" level="MAJOR" enabled="false" />
<coding_rule class="NM_CLASS_NAMING_CONVENTION" level="MAJOR" enabled="false" />
<coding_rule class="NM_CLASS_NOT_EXCEPTION" level="MAJOR" enabled="true" />
<coding_rule class="NM_CONFUSING" level="MAJOR" enabled="true" />
<coding_rule class="NM_FIELD_NAMING_CONVENTION" level="MAJOR" enabled="false" />
<coding_rule class="NM_FUTURE_KEYWORD_USED_AS_IDENTIFIER" level="MAJOR" enabled="true" />
<coding_rule class="NM_FUTURE_KEYWORD_USED_AS_MEMBER_IDENTIFIER" level="MAJOR" enabled="true" />
<coding_rule class="NM_LCASE_HASHCODE" level="MAJOR" enabled="false" />
<coding_rule class="NM_LCASE_TOSTRING" level="MAJOR" enabled="false" />
<coding_rule class="NM_METHOD_CONSTRUCTOR_CONFUSION" level="MAJOR" enabled="true" />
<coding_rule class="NM_METHOD_NAMING_CONVENTION" level="MAJOR" enabled="false" />
<coding_rule class="NM_SAME_SIMPLE_NAME_AS_INTERFACE" level="MAJOR" enabled="true" />
<coding_rule class="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" level="MAJOR" enabled="true" />
<coding_rule class="NM_VERY_CONFUSING" level="MAJOR" enabled="true" />
<coding_rule class="NM_VERY_CONFUSING_INTENTIONAL" level="MAJOR" enabled="true" />
<coding_rule class="NM_WRONG_PACKAGE" level="MAJOR" enabled="true" />
<coding_rule class="NM_WRONG_PACKAGE_INTENTIONAL" level="MAJOR" enabled="true" />
<coding_rule class="NN_NAKED_NOTIFY" level="CRITICAL" enabled="true" />
<coding_rule class="NOISE_FIELD_REFERENCE" level="MAJOR" enabled="false" />
<coding_rule class="NOISE_METHOD_CALL" level="MAJOR" enabled="false" />
<coding_rule class="NOISE_NULL_DEREFERENCE" level="MAJOR" enabled="false" />
<coding_rule class="NOISE_OPERATION" level="MAJOR" enabled="false" />
<coding_rule class="NO_NOTIFY_NOT_NOTIFYALL" level="CRITICAL" enabled="true" />
<coding_rule class="NP_ALWAYS_NULL" level="CRITICAL" enabled="true" />
<coding_rule class="NP_ALWAYS_NULL_EXCEPTION" level="CRITICAL" enabled="true" />
<coding_rule class="NP_ARGUMENT_MIGHT_BE_NULL" level="MAJOR" enabled="true" />
<coding_rule class="NP_BOOLEAN_RETURN_NULL" level="MAJOR" enabled="true" />
<coding_rule class="NP_CLONE_COULD_RETURN_NULL" level="CRITICAL" enabled="true" />
<coding_rule class="NP_CLOSING_NULL" level="MAJOR" enabled="false" />
<coding_rule class="NP_DEREFERENCE_OF_READLINE_VALUE" level="CRITICAL" enabled="true" />
<coding_rule class="NP_EQUALS_SHOULD_HANDLE_NULL_ARGUMENT" level="CRITICAL" enabled="true" />
<coding_rule class="NP_GUARANTEED_DEREF" level="BLOCKER" enabled="true" />
<coding_rule class="NP_GUARANTEED_DEREF_ON_EXCEPTION_PATH" level="CRITICAL" enabled="true" />
<coding_rule class="NP_IMMEDIATE_DEREFERENCE_OF_READLINE" level="CRITICAL" enabled="true" />
<coding_rule class="NP_LOAD_OF_KNOWN_NULL_VALUE" level="CRITICAL" enabled="true" />
<coding_rule class="NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION" level="MAJOR" enabled="false" />
<coding_rule class="NP_METHOD_RETURN_RELAXING_ANNOTATION" level="MAJOR" enabled="false" />
<coding_rule class="NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" level="CRITICAL" enabled="false" />
<coding_rule class="NP_NONNULL_PARAM_VIOLATION" level="CRITICAL" enabled="true" />
<coding_rule class="NP_NONNULL_RETURN_VIOLATION" level="CRITICAL" enabled="true" />
<coding_rule class="NP_NULL_INSTANCEOF" level="BLOCKER" enabled="true" />
<coding_rule class="NP_NULL_ON_SOME_PATH" level="CRITICAL" enabled="true" />
<coding_rule class="NP_NULL_ON_SOME_PATH_EXCEPTION" level="CRITICAL" enabled="true" />
<coding_rule class="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE" level="CRITICAL" enabled="true" />
<coding_rule class="NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE" level="CRITICAL" enabled="true" />
<coding_rule class="NP_NULL_PARAM_DEREF" level="CRITICAL" enabled="true" />
<coding_rule class="NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS" level="CRITICAL" enabled="true" />
<coding_rule class="NP_NULL_PARAM_DEREF_NONVIRTUAL" level="CRITICAL" enabled="true" />
<coding_rule class="NP_OPTIONAL_RETURN_NULL" level="MAJOR" enabled="false" />
<coding_rule class="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE" level="CRITICAL" enabled="true" />
<coding_rule class="NP_STORE_INTO_NONNULL_FIELD" level="CRITICAL" enabled="true" />
<coding_rule class="NP_SYNC_AND_NULL_CHECK_FIELD" level="MAJOR" enabled="true" />
<coding_rule class="NP_TOSTRING_COULD_RETURN_NULL" level="CRITICAL" enabled="true" />
<coding_rule class="NP_UNWRITTEN_FIELD" level="MAJOR" enabled="false" />
<coding_rule class="NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD" level="CRITICAL" enabled="false" />
<coding_rule class="NS_DANGEROUS_NON_SHORT_CIRCUIT" level="CRITICAL" enabled="true" />
<coding_rule class="NS_NON_SHORT_CIRCUIT" level="MAJOR" enabled="true" />
<coding_rule class="OBL_UNSATISFIED_OBLIGATION" level="CRITICAL" enabled="false" />
<coding_rule class="OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE" level="CRITICAL" enabled="false" />
<coding_rule class="ODR_OPEN_DATABASE_RESOURCE" level="CRITICAL" enabled="true" />
<coding_rule class="ODR_OPEN_DATABASE_RESOURCE_EXCEPTION_PATH" level="CRITICAL" enabled="true" />
<coding_rule class="OS_OPEN_STREAM" level="CRITICAL" enabled="true" />
<coding_rule class="OS_OPEN_STREAM_EXCEPTION_PATH" level="CRITICAL" enabled="true" />
<coding_rule class="PS_PUBLIC_SEMAPHORES" level="CRITICAL" enabled="true" />
<coding_rule class="PT_ABSOLUTE_PATH_TRAVERSAL" level="CRITICAL" enabled="false" />
<coding_rule class="PT_RELATIVE_PATH_TRAVERSAL" level="CRITICAL" enabled="false" />
<coding_rule class="PZLA_PREFER_ZERO_LENGTH_ARRAYS" level="MAJOR" enabled="true" />
<coding_rule class="PZ_DONT_REUSE_ENTRY_OBJECTS_IN_ITERATORS" level="CRITICAL" enabled="false" />
<coding_rule class="QBA_QUESTIONABLE_BOOLEAN_ASSIGNMENT" level="CRITICAL" enabled="true" />
<coding_rule class="QF_QUESTIONABLE_FOR_LOOP" level="CRITICAL" enabled="true" />
<coding_rule class="RANGE_ARRAY_INDEX" level="MAJOR" enabled="false" />
<coding_rule class="RANGE_ARRAY_LENGTH" level="MAJOR" enabled="false" />
<coding_rule class="RANGE_ARRAY_OFFSET" level="MAJOR" enabled="false" />
<coding_rule class="RANGE_STRING_INDEX" level="MAJOR" enabled="false" />
<coding_rule class="RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE" level="CRITICAL" enabled="true" />
<coding_rule class="RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES" level="CRITICAL" enabled="true" />
<coding_rule class="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE" level="CRITICAL" enabled="true" />
<coding_rule class="RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE" level="CRITICAL" enabled="true" />
<coding_rule class="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE" level="CRITICAL" enabled="true" />
<coding_rule class="RC_REF_COMPARISON" level="CRITICAL" enabled="true" />
<coding_rule class="RC_REF_COMPARISON_BAD_PRACTICE" level="MAJOR" enabled="false" />
<coding_rule class="RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN" level="MAJOR" enabled="false" />
<coding_rule class="REC_CATCH_EXCEPTION" level="MAJOR" enabled="true" />
<coding_rule class="RE_BAD_SYNTAX_FOR_REGULAR_EXPRESSION" level="CRITICAL" enabled="true" />
<coding_rule class="RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION" level="CRITICAL" enabled="true" />
<coding_rule class="RE_POSSIBLE_UNINTENDED_PATTERN" level="CRITICAL" enabled="true" />
<coding_rule class="RI_REDUNDANT_INTERFACES" level="MAJOR" enabled="true" />
<coding_rule class="RR_NOT_CHECKED" level="MAJOR" enabled="true" />
<coding_rule class="RS_READOBJECT_SYNC" level="CRITICAL" enabled="true" />
<coding_rule class="RU_INVOKE_RUN" level="MAJOR" enabled="true" />
<coding_rule class="RV_01_TO_INT" level="MAJOR" enabled="true" />
<coding_rule class="RV_ABSOLUTE_VALUE_OF_HASHCODE" level="CRITICAL" enabled="true" />
<coding_rule class="RV_ABSOLUTE_VALUE_OF_RANDOM_INT" level="CRITICAL" enabled="true" />
<coding_rule class="RV_CHECK_COMPARETO_FOR_SPECIFIC_RETURN_VALUE" level="CRITICAL" enabled="false" />
<coding_rule class="RV_CHECK_FOR_POSITIVE_INDEXOF" level="MINOR" enabled="true" />
<coding_rule class="RV_DONT_JUST_NULL_CHECK_READLINE" level="MAJOR" enabled="true" />
<coding_rule class="RV_EXCEPTION_NOT_THROWN" level="CRITICAL" enabled="true" />
<coding_rule class="RV_NEGATING_RESULT_OF_COMPARETO" level="CRITICAL" enabled="false" />
<coding_rule class="RV_REM_OF_HASHCODE" level="CRITICAL" enabled="true" />
<coding_rule class="RV_REM_OF_RANDOM_INT" level="CRITICAL" enabled="true" />
<coding_rule class="RV_RETURN_VALUE_IGNORED" level="MINOR" enabled="true" />
<coding_rule class="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" level="MAJOR" enabled="true" />
<coding_rule class="RV_RETURN_VALUE_IGNORED_INFERRED" level="CRITICAL" enabled="false" />
<coding_rule class="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT" level="MAJOR" enabled="false" />
<coding_rule class="RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED" level="MAJOR" enabled="false" />
<coding_rule class="RpC_REPEATED_CONDITIONAL_TEST" level="MAJOR" enabled="true" />
<coding_rule class="SA_FIELD_DOUBLE_ASSIGNMENT" level="CRITICAL" enabled="true" />
<coding_rule class="SA_FIELD_SELF_ASSIGNMENT" level="CRITICAL" enabled="true" />
<coding_rule class="SA_FIELD_SELF_COMPARISON" level="CRITICAL" enabled="true" />
<coding_rule class="SA_FIELD_SELF_COMPUTATION" level="CRITICAL" enabled="true" />
<coding_rule class="SA_LOCAL_DOUBLE_ASSIGNMENT" level="CRITICAL" enabled="true" />
<coding_rule class="SA_LOCAL_SELF_ASSIGNMENT" level="CRITICAL" enabled="true" />
<coding_rule class="SA_LOCAL_SELF_ASSIGNMENT_INSTEAD_OF_FIELD" level="CRITICAL" enabled="false" />
<coding_rule class="SA_LOCAL_SELF_COMPARISON" level="CRITICAL" enabled="true" />
<coding_rule class="SA_LOCAL_SELF_COMPUTATION" level="CRITICAL" enabled="true" />
<coding_rule class="SBSC_USE_STRINGBUFFER_CONCATENATION" level="CRITICAL" enabled="true" />
<coding_rule class="SC_START_IN_CTOR" level="CRITICAL" enabled="true" />
<coding_rule class="SE_BAD_FIELD" level="MINOR" enabled="false" />
<coding_rule class="SE_BAD_FIELD_INNER_CLASS" level="MINOR" enabled="true" />
<coding_rule class="SE_BAD_FIELD_STORE" level="CRITICAL" enabled="true" />
<coding_rule class="SE_COMPARATOR_SHOULD_BE_SERIALIZABLE" level="MAJOR" enabled="true" />
<coding_rule class="SE_INNER_CLASS" level="MAJOR" enabled="true" />
<coding_rule class="SE_METHOD_MUST_BE_PRIVATE" level="MAJOR" enabled="true" />
<coding_rule class="SE_NONFINAL_SERIALVERSIONID" level="CRITICAL" enabled="true" />
<coding_rule class="SE_NONLONG_SERIALVERSIONID" level="MAJOR" enabled="true" />
<coding_rule class="SE_NONSTATIC_SERIALVERSIONID" level="MAJOR" enabled="true" />
<coding_rule class="SE_NO_SERIALVERSIONID" level="MAJOR" enabled="true" />
<coding_rule class="SE_NO_SUITABLE_CONSTRUCTOR" level="MAJOR" enabled="true" />
<coding_rule class="SE_NO_SUITABLE_CONSTRUCTOR_FOR_EXTERNALIZATION" level="MAJOR" enabled="true" />
<coding_rule class="SE_PRIVATE_READ_RESOLVE_NOT_INHERITED" level="MAJOR" enabled="true" />
<coding_rule class="SE_READ_RESOLVE_IS_STATIC" level="MAJOR" enabled="true" />
<coding_rule class="SE_READ_RESOLVE_MUST_RETURN_OBJECT" level="MAJOR" enabled="true" />
<coding_rule class="SE_TRANSIENT_FIELD_NOT_RESTORED" level="MAJOR" enabled="true" />
<coding_rule class="SE_TRANSIENT_FIELD_OF_NONSERIALIZABLE_CLASS" level="MAJOR" enabled="true" />
<coding_rule class="SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH" level="MAJOR" enabled="false" />
<coding_rule class="SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW" level="MAJOR" enabled="false" />
<coding_rule class="SF_SWITCH_FALLTHROUGH" level="MAJOR" enabled="false" />
<coding_rule class="SF_SWITCH_NO_DEFAULT" level="MAJOR" enabled="false" />
<coding_rule class="SIC_INNER_SHOULD_BE_STATIC" level="MAJOR" enabled="true" />
<coding_rule class="SIC_INNER_SHOULD_BE_STATIC_ANON" level="MAJOR" enabled="true" />
<coding_rule class="SIC_INNER_SHOULD_BE_STATIC_NEEDS_THIS" level="MAJOR" enabled="true" />
<coding_rule class="SIC_THREADLOCAL_DEADLY_EMBRACE" level="MAJOR" enabled="false" />
<coding_rule class="SIO_SUPERFLUOUS_INSTANCEOF" level="CRITICAL" enabled="true" />
<coding_rule class="SI_INSTANCE_BEFORE_FINALS_ASSIGNED" level="CRITICAL" enabled="true" />
<coding_rule class="SP_SPIN_ON_FIELD" level="MAJOR" enabled="true" />
<coding_rule class="SQL_BAD_PREPARED_STATEMENT_ACCESS" level="CRITICAL" enabled="true" />
<coding_rule class="SQL_BAD_RESULTSET_ACCESS" level="CRITICAL" enabled="true" />
<coding_rule class="SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE" level="CRITICAL" enabled="true" />
<coding_rule class="SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING" level="CRITICAL" enabled="true" />
<coding_rule class="SR_NOT_CHECKED" level="MAJOR" enabled="true" />
<coding_rule class="SS_SHOULD_BE_STATIC" level="MAJOR" enabled="true" />
<coding_rule class="STCAL_INVOKE_ON_STATIC_CALENDAR_INSTANCE" level="CRITICAL" enabled="true" />
<coding_rule class="STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE" level="CRITICAL" enabled="true" />
<coding_rule class="STCAL_STATIC_CALENDAR_INSTANCE" level="CRITICAL" enabled="true" />
<coding_rule class="STCAL_STATIC_SIMPLE_DATE_FORMAT_INSTANCE" level="CRITICAL" enabled="true" />
<coding_rule class="STI_INTERRUPTED_ON_CURRENTTHREAD" level="CRITICAL" enabled="true" />
<coding_rule class="STI_INTERRUPTED_ON_UNKNOWNTHREAD" level="CRITICAL" enabled="true" />
<coding_rule class="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" level="CRITICAL" enabled="true" />
<coding_rule class="SWL_SLEEP_WITH_LOCK_HELD" level="CRITICAL" enabled="true" />
<coding_rule class="SW_SWING_METHODS_INVOKED_IN_SWING_THREAD" level="MAJOR" enabled="true" />
<coding_rule class="TLW_TWO_LOCK_WAIT" level="MAJOR" enabled="true" />
<coding_rule class="TQ_ALWAYS_VALUE_USED_WHERE_NEVER_REQUIRED" level="CRITICAL" enabled="true" />
<coding_rule class="TQ_COMPARING_VALUES_WITH_INCOMPATIBLE_TYPE_QUALIFIERS" level="CRITICAL" enabled="false" />
<coding_rule class="TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_ALWAYS_SINK" level="CRITICAL" enabled="true" />
<coding_rule class="TQ_EXPLICIT_UNKNOWN_SOURCE_VALUE_REACHES_NEVER_SINK" level="CRITICAL" enabled="true" />
<coding_rule class="TQ_MAYBE_SOURCE_VALUE_REACHES_ALWAYS_SINK" level="CRITICAL" enabled="true" />
<coding_rule class="TQ_MAYBE_SOURCE_VALUE_REACHES_NEVER_SINK" level="CRITICAL" enabled="true" />
<coding_rule class="TQ_NEVER_VALUE_USED_WHERE_ALWAYS_REQUIRED" level="CRITICAL" enabled="true" />
<coding_rule class="TQ_UNKNOWN_VALUE_USED_WHERE_ALWAYS_STRICTLY_REQUIRED" level="CRITICAL" enabled="false" />
<coding_rule class="UCF_USELESS_CONTROL_FLOW" level="CRITICAL" enabled="true" />
<coding_rule class="UCF_USELESS_CONTROL_FLOW_NEXT_LINE" level="CRITICAL" enabled="true" />
<coding_rule class="UC_USELESS_CONDITION" level="MAJOR" enabled="false" />
<coding_rule class="UC_USELESS_CONDITION_TYPE" level="MAJOR" enabled="false" />
<coding_rule class="UC_USELESS_OBJECT" level="MAJOR" enabled="false" />
<coding_rule class="UC_USELESS_OBJECT_STACK" level="MAJOR" enabled="false" />
<coding_rule class="UC_USELESS_VOID_METHOD" level="MAJOR" enabled="false" />
<coding_rule class="UG_SYNC_SET_UNSYNC_GET" level="MAJOR" enabled="true" />
<coding_rule class="UI_INHERITANCE_UNSAFE_GETRESOURCE" level="MAJOR" enabled="true" />
<coding_rule class="UL_UNRELEASED_LOCK" level="CRITICAL" enabled="true" />
<coding_rule class="UL_UNRELEASED_LOCK_EXCEPTION_PATH" level="CRITICAL" enabled="true" />
<coding_rule class="UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS" level="CRITICAL" enabled="true" />
<coding_rule class="UM_UNNECESSARY_MATH" level="CRITICAL" enabled="true" />
<coding_rule class="UPM_UNCALLED_PRIVATE_METHOD" level="CRITICAL" enabled="true" />
<coding_rule class="URF_UNREAD_FIELD" level="MAJOR" enabled="true" />
<coding_rule class="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD" level="CRITICAL" enabled="false" />
<coding_rule class="UR_UNINIT_READ" level="MAJOR" enabled="true" />
<coding_rule class="UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR" level="MAJOR" enabled="false" />
<coding_rule class="USM_USELESS_ABSTRACT_METHOD" level="MAJOR" enabled="false" />
<coding_rule class="USM_USELESS_SUBCLASS_METHOD" level="MAJOR" enabled="false" />
<coding_rule class="UUF_UNUSED_FIELD" level="MAJOR" enabled="true" />
<coding_rule class="UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD" level="CRITICAL" enabled="false" />
<coding_rule class="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" level="MAJOR" enabled="false" />
<coding_rule class="UWF_NULL_FIELD" level="CRITICAL" enabled="true" />
<coding_rule class="UWF_UNWRITTEN_FIELD" level="MAJOR" enabled="false" />
<coding_rule class="UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD" level="CRITICAL" enabled="false" />
<coding_rule class="UW_UNCOND_WAIT" level="MAJOR" enabled="true" />
<coding_rule class="VA_FORMAT_STRING_BAD_ARGUMENT" level="CRITICAL" enabled="true" />
<coding_rule class="VA_FORMAT_STRING_BAD_CONVERSION" level="CRITICAL" enabled="true" />
<coding_rule class="VA_FORMAT_STRING_BAD_CONVERSION_FROM_ARRAY" level="MAJOR" enabled="true" />
<coding_rule class="VA_FORMAT_STRING_BAD_CONVERSION_TO_BOOLEAN" level="MAJOR" enabled="true" />
<coding_rule class="VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED" level="MAJOR" enabled="false" />
<coding_rule class="VA_FORMAT_STRING_EXTRA_ARGUMENTS_PASSED" level="MAJOR" enabled="true" />
<coding_rule class="VA_FORMAT_STRING_ILLEGAL" level="CRITICAL" enabled="true" />
<coding_rule class="VA_FORMAT_STRING_MISSING_ARGUMENT" level="CRITICAL" enabled="true" />
<coding_rule class="VA_FORMAT_STRING_NO_PREVIOUS_ARGUMENT" level="CRITICAL" enabled="true" />
<coding_rule class="VA_FORMAT_STRING_USES_NEWLINE" level="CRITICAL" enabled="false" />
<coding_rule class="VA_PRIMITIVE_ARRAY_PASSED_TO_OBJECT_VARARG" level="CRITICAL" enabled="true" />
<coding_rule class="VO_VOLATILE_INCREMENT" level="CRITICAL" enabled="false" />
<coding_rule class="VO_VOLATILE_REFERENCE_TO_ARRAY" level="MAJOR" enabled="true" />
<coding_rule class="VR_UNRESOLVABLE_REFERENCE" level="MAJOR" enabled="false" />
<coding_rule class="WA_AWAIT_NOT_IN_LOOP" level="CRITICAL" enabled="true" />
<coding_rule class="WA_NOT_IN_LOOP" level="CRITICAL" enabled="true" />
<coding_rule class="WL_USING_GETCLASS_RATHER_THAN_CLASS_LITERAL" level="CRITICAL" enabled="true" />
<coding_rule class="WMI_WRONG_MAP_ITERATOR" level="CRITICAL" enabled="true" />
<coding_rule class="WS_WRITEOBJECT_SYNC" level="CRITICAL" enabled="true" />
<coding_rule class="XFB_XML_FACTORY_BYPASS" level="CRITICAL" enabled="true" />
<coding_rule class="XSS_REQUEST_PARAMETER_TO_JSP_WRITER" level="CRITICAL" enabled="true" />
<coding_rule class="XSS_REQUEST_PARAMETER_TO_SEND_ERROR" level="CRITICAL" enabled="true" />
<coding_rule class="XSS_REQUEST_PARAMETER_TO_SERVLET_WRITER" level="CRITICAL" enabled="true" />
</profile>
</profiles>
<list size="0" />
</component>
</project>

View File

@ -3,6 +3,7 @@
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="service-acl" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.yovinchen.xlcs.ServiceAclApplication" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=ms::xlcs-parent-service-Acl -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<method v="2">
<option name="Make" enabled="true" />
</method>

View File

@ -3,6 +3,7 @@
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="service-activity" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.yovinchen.xlcs.ServiceActivityApplication" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=ms::xlcs-parent-service-Activity -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<method v="2">
<option name="Make" enabled="true" />
</method>

View File

@ -3,7 +3,7 @@
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="service-cart" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.yovinchen.xlcs.ServiceCartApplication" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=Cart -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=ms::xlcs-parent-service-Cart -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<method v="2">
<option name="Make" enabled="true" />
</method>

View File

@ -2,6 +2,7 @@
<configuration default="false" name="ServiceGatewayApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<module name="service-gateway" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.yovinchen.xlcs.ServiceGatewayApplication" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=ms::xlcs-parent-service-Gateway -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<method v="2">
<option name="Make" enabled="true" />
</method>

View File

@ -3,7 +3,7 @@
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="service-home" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.yovinchen.xlcs.ServiceHomeApplication" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=Home -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=ms::xlcs-parent-service-Home -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<method v="2">
<option name="Make" enabled="true" />
</method>

View File

@ -3,7 +3,7 @@
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="service-order" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.yovinchen.xlcs.ServiceOrderApplication" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=Order -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=ms::xlcs-parent-service-Order -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<method v="2">
<option name="Make" enabled="true" />
</method>

View File

@ -3,6 +3,7 @@
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="service-payment" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.yovinchen.xlcs.ServicePaymentApplication" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=ms::xlcs-parent-service-Payment -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<method v="2">
<option name="Make" enabled="true" />
</method>

View File

@ -3,7 +3,7 @@
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="service-product" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.yovinchen.xlcs.ServiceProductApplication" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=Product -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=ms::xlcs-parent-service-Product -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<method v="2">
<option name="Make" enabled="true" />
</method>

View File

@ -3,7 +3,7 @@
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="service-search" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.yovinchen.xlcs.ServiceSearchApplication" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=Search -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=ms::xlcs-parent-service-Search -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<method v="2">
<option name="Make" enabled="true" />
</method>

View File

@ -3,7 +3,7 @@
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="service-sys" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.yovinchen.xlcs.ServiceSysApplication" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=Sys -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=ms::xlcs-parent-service-Sys -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<method v="2">
<option name="Make" enabled="true" />
</method>

View File

@ -3,6 +3,7 @@
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="service-user" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.yovinchen.xlcs.ServiceUserApplication" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=ms::xlcs-parent-service-User -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<method v="2">
<option name="Make" enabled="true" />
</method>

View File

@ -1,124 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

197
README.md
View File

@ -1,97 +1,9 @@
# 小鹿超市项目
![](https://lsky.hhdxw.top/imghub/2024/02/image-202402201708423080.png)
## 配置信息
### 服务器硬件配置
| 硬件 | 配置 | 数量 | 参考单价 |
|-----|----------------------------|----|------------|
| CPU | E5 2673v3 | 2 | 56 |
| 主板 | 华南金牌 x99-8D3 双路 | 1 | 580 |
| 内存 | 三星 32G DDR3 ECC 4R*4 1866L | 2 | 88 |
| 机箱 | 金河田 凌霜Pro 黑色 | 1 | 148 |
| 电源 | 鑫谷 GN650 650W 金牌 | 1 | 299 |
| 风扇 | A500 风扇 | 2 | 40 |
| 显卡 | 亮机卡 | 1 | 20 |
| 硬盘 | 三星 970EVO 512G | 1 | 600笔记本拆机 |
| 硬盘 | 希捷 紫盘 4T | 1 | 439 |
| | | 总价 | 2454 |
### 内网穿透服务器(测试服务器)
| 厂商 | 配置 | IP | 时间 | 地区 |
|-----|---------|----|---------|------|
| 腾讯云 | 2c2g3m | | 2024-06 | 北京 |
| 腾讯云 | 4c4g8m | | 2024-06 | 北京 |
| 华为云 | 2c4g1m | | 2024-06 | 北京 |
| 阿里云 | 2c2g2m | | 2024-06 | 乌兰察布 |
| 雨云 | 8c8g80m | | 2024-03 | 洛杉矶 |
| | | | | |
### 服务器参数
| 指标 | 参数 |
|------|------|
| 核心 | 24 |
| 线程 | 48 |
| 内存 | 128 |
| 固态硬盘 | 512G |
| 机械硬盘 | 4T |
| | |
### 环境配置需求
| | |
|-------|-----------------|
| 底层虚拟化 | Debian12 PVE |
| 集群系统 | CentOS 8 Stream |
| 虚拟化系统 | CentOS 7.9 |
### 集群分配设置
| 模块 | 简称 | 核心 | 内存 | 硬盘 | 数量 | IP | 端口 |
|-------|----------|----|----|-----|----|----|----|
| 权限模块 | acl | 1 | 1 | 10 | 2 | | |
| 区域模块 | Sys | 1 | 1 | 10 | 2 | | |
| 订单模块 | order | 2 | 2 | 10 | 2 | | |
| 支付模块 | payment | 1 | 2 | 10 | 2 | | |
| 搜索模块 | search | 2 | 2 | 10 | 2 | | |
| 用户模块 | user | 1 | 1 | 10 | 2 | | |
| 商品模块 | product | 1 | 2 | 10 | 2 | | |
| 区域模块 | sys | 1 | 1 | 10 | 2 | | |
| 购物车模块 | cart | 2 | 1 | 10 | 2 | | |
| 优惠券模块 | activity | 1 | 1 | 10 | 2 | | |
| 网关 | gateway | 1 | 2 | 10 | 3 | | |
| 后台 | admin | 1 | 2 | 5 | 2 | | |
| 小程序 | user | | | | | | |
| 总数 | | 25 | 33 | 110 | 23 | | |
### 环境配置
| 模块 | 版本 | 核心 | 内存 | 硬盘 | 数量 | IP | |
|---------------|------------------------------|----|----|----|----|----|------|
| MySQL | 8.0.30 | | | | | | |
| Redis | 7.2.4 | | | | | | |
| Minio | RELEASE.2023-08-16T20-17-30Z | | | | | | |
| RabbitMQ | 3.12.12 | | | | | | |
| Elasticsearch | 7.17.7 | | | | | | |
| Kinbana | 7.17.7 | | | | | | |
| Nacos | 2.2.3 | | | | | | |
| OSS | 阿里云/Minio | | | | | | |
| SkyWalking | 9.7.0 | | | | | | |
| DevOps | Gitea+Jenkins+Kubernetes | | | | | | |
| Gitea | 1.21.3 | | | | | | |
| Nexus3 | 2023-12-27T07:29 | | | | | | |
| HarBor | 2.8.0 | | | | | | |
## 技术栈
### 后端技术栈
## 后端技术栈
| 核心技术 |
|:---------------------------------------------------------------------------------------------------------------------------------|
| :----------------------------------------------------------- |
| SpringBoot简化新Spring应用的初始搭建以及开发过程 |
| SpringCloud基于Spring Boot实现的云原生应用开发工具SpringCloud使用的技术Spring Cloud Gateway、Spring Cloud OpenFeign、Spring Cloud Alibaba Nacos等 |
| MyBatis-Plus持久层框架 |
@ -105,29 +17,36 @@
| Nginx负载均衡 |
| MySQL关系型数据库 |
| 微信支付 |
| 支付宝支付 |
| 微信小程序 |
| Docker容器技术 |
| DockerFile管理Docker镜像命令文本 |
| SkyWalking链路追踪、日志、监控框架 |
| |
| |
### 前端技术栈
## 前端技术栈
| 核心技术 | |
|--------------------|------|
| UinApp | |
| vue-admin-template | |
| ElementUI | |
| Axios | |
| Node.js | |
| Npm | |
| 核心技术 |
| ------------------ |
| UinApp |
| vue-admin-template |
| ElementUI |
| Axios |
| Node.js |
| Npm |
| |
| |
| |
### 开发工具
## 开发工具
| 开发工具 | 版本 |
|-------------------------------|----------------|
| Intellil IDEA Ultimate | 2024.1.1 |
| DataGrip | 2024.1.1 |
| WebStorm | 2024.1.1 |
| ----------------------------- | -------------- |
| Intellil IDEA Ultimate | 2023.3.2 |
| DataGrip | 2023.3.2 |
| WebStorm | 2023.3.2 |
| HBuilderx | 3.8.12 |
| Google Chrome | 120.0.6099.216 |
| Another Redis Desktop Manager | 1.6 |
@ -136,22 +55,16 @@
| Termius | 8.4.0 |
| 微信开发者工具 | 1.06.2306020 |
### 操作系统
## 操作系统
| 开发工具 | 版本 |
|---------------------|--------|
| ------------------- | ------ |
| Mac OS Ventura | 13.6.3 |
| Linux CentOS | 7.9 |
| Linux CentOS Stream | 8 |
| Linux CentOS Stream | 9 |
| Linux CentOS | 7.9 |
## 项目环境部署
### portainer docker 可视化
```shell
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
```
### Mysql 数据库
```shell
@ -191,33 +104,15 @@ nacos/nacos-server:v2.2.3
docker run -p 9200:9200 -p 9300:9300 --name elasticsearch \
-e "discovery.type=single-node" \
-e ES_JAVA_OPTS="-Xms512m -Xmx512m" \
-d elasticsearch:7.17.7
-d elasticsearch:7.8.0
docker exec -it elasticsearch /bin/bash
./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.17.7/elasticsearch-analysis-ik-7.17.7.zip
./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.17.5/elasticsearch-analysis-ik-7.17.5.zip
docker restart elasticsearch
docker run -d --name kibana --link elasticsearch:elasticsearch -p 5601:5601 kibana:7.17.7
```
其中服务器可能因为网络原因下载不下来 ik 分词器,我们下载后本地导入安装
```shell
# ik 分词器在服务器中的位置 /root/elasticsearch-analysis-ik-7.17.7.zip
# 导入 docker 中
docker cp /root/elasticsearch-analysis-ik-7.17.7.zip elasticsearch:/tmp/elasticsearch-analysis-ik-7.17.7.zip
# 进入容器
docker exec -it elasticsearch /bin/bash
# 安装
./bin/elasticsearch-plugin install file:///tmp/elasticsearch-analysis-ik-7.17.7.zip
# 退出后继续按照上述内容重启 安装 kibana
exit
docker run -d --name kibana --link elasticsearch:elasticsearch -p 5601:5601 kibana:7.8.0
```
### GrayLog 日志框架 (已弃用,日志服务整合到 SkyWalking)
@ -299,7 +194,7 @@ services:
environment:
SW_HEALTH_CHECKER: default
SW_STORAGE: elasticsearch
SW_STORAGE_ES_CLUSTER_NODES: 192.168.31.50:9200
SW_STORAGE_ES_CLUSTER_NODES: 124.70.87.134:9200
JAVA_OPTS: "-Xms2048m -Xmx2048m"
TZ: Asia/Shanghai
SW_TELEMETRY: prometheus
@ -324,7 +219,7 @@ services:
ports:
- "8080:8080"
environment:
SW_OAP_ADDRESS: http://192.168.31.50:12800
SW_OAP_ADDRESS: http://124.70.87.134:12800
SW_HEALTH_CHECKER: default
TZ: Asia/Shanghai
healthcheck:
@ -335,3 +230,31 @@ services:
start_period: 60s #⾸次检测延迟时间
```
## 学习 git 提交回滚
```shell
撤销提交重新推送
重新提交推送
再次尝试提交推送
```
总结:自己的远程分支版本回退的方法
```shell
#首先找到需要会退版本ID
git reflog
#如果你的错误提交已经推送到自己的远程分支了,那么就需要回滚远程分支了。
#首先要回退本地分支
git reflogç
git reset --hard Obfafd
#紧接着强制推送到远程分支
git push -f
```
最后强制推送效果(可视化中没有找到强制推送,先使用命令行强制推送吧)
![image-20240125145054441](https://lsky.hhdxw.top/imghub/2024/01/image-202401251706165455.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

BIN
logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

View File

@ -3,4 +3,4 @@ ENV = 'development'
# base api
# VUE_APP_BASE_API = '/dev-api'
VUE_APP_BASE_API = 'http://152.136.42.114:8200'
VUE_APP_BASE_API = 'http://localhost:8200'

View File

@ -3,5 +3,5 @@ ENV = 'production'
# base api
#VUE_APP_BASE_API = '/prod-api'
VUE_APP_BASE_API = 'http://152.136.42.114:8200'
VUE_APP_BASE_API = 'http://localhost:8200'

View File

@ -1,11 +0,0 @@
FROM nginx:latest
EXPOSE 80
WORKDIR /app
# 替换nginx配置
COPY nginx.conf /etc/nginx/conf.d/default.conf
# 将第一阶段的静态文件复制到nginx中
RUN rm -rf /usr/share/nginx/html
RUN mkdir /usr/share/nginx/html
COPY ./dist /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]

View File

@ -24,9 +24,9 @@ if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
)
app.listen(port, function () {
console.log(chalk.green(`> Preview at http://152.136.42.114:${port}${publicPath}`))
console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
if (report) {
console.log(chalk.green(`> Report at http://152.136.42.114:${port}${publicPath}report.html`))
console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
}
})

View File

@ -20,5 +20,5 @@ module.exports = {
'lcov',
'text-summary'
],
testURL: 'http://152.136.42.114/'
testURL: 'http://localhost/'
}

View File

@ -1,21 +0,0 @@
server {
listen 80;
listen [::]:80;
server_name 152.136.42.114;
access_log /var/log/nginx/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
# 新增下面这句其他是默认nginx配置
# 解决部分前端框架的路由问题在浏览器刷新报错404
try_files $uri $uri/ /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

View File

@ -13,7 +13,7 @@ export default {
getPageList(page, limit) {
return request({
url: `${api_name}/getPageCheckList/${page}/${limit}`,
url: `${api_name}/list/${page}/${limit}`,
method: 'get'
})
},

View File

@ -1,10 +1,11 @@
import Vue from 'vue'
import Router from 'vue-router'
/* Layout */
import Layout from '@/layout'
Vue.use(Router)
/* Layout */
import Layout from '@/layout'
/**
* Note: sub-menu only appear when route children.length >= 1
* Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
@ -314,20 +315,20 @@ export const constantRoutes = [
component: Layout,
redirect: '/user/leader/list',
name: 'Leader',
meta: {title: '配送员管理', icon: 'table'},
meta: { title: '团长管理', icon: 'table' },
alwaysShow: true,
children: [
{
path: 'leader/checkList',
name: 'LeaderCheck',
component: () => import('@/views/user/leader/checkList'),
meta: {title: '配送员待审核'}
meta: { title: '团长待审核' }
},
{
path: 'leader/list',
name: 'leader',
component: () => import('@/views/user/leader/list'),
meta: {title: '配送员已审核'}
meta: { title: '团长已审核' }
}
]
},

View File

@ -3,41 +3,41 @@
<!-- 工具条 -->
<div class="tools-div">
<el-button icon="el-icon-plus" size="mini" type="success" @click="add()"> </el-button>
<el-button type="success" icon="el-icon-plus" size="mini" @click="add()"> </el-button>
</div>
<el-table
:data="sysMenuList"
style="width: 100%;margin-bottom: 20px;margin-top: 10px;"
row-key="id"
border
:default-expand-all="false"
:tree-props="{children: 'children'}"
border
row-key="id"
style="width: 100%;margin-bottom: 20px;margin-top: 10px;"
>
<el-table-column label="菜单名称" prop="name" width="200"/>
<el-table-column prop="name" label="菜单名称" width="200" />
<el-table-column label="权限标识" prop="code" width="180"/>
<el-table-column prop="code" label="权限标识" width="180" />
<el-table-column label="创建时间" prop="createTime" width="200"/>
<el-table-column prop="createTime" label="创建时间" width="200" />
<el-table-column label="修改时间" prop="updateTime" width="200"/>
<el-table-column align="center" label="操作">
<el-table-column prop="updateTime" label="修改时间" width="200" />
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button
v-if="scope.row.type !== 2"
type="success"
icon="el-icon-plus"
size="mini"
title="添加下级节点"
type="success"
@click="add(scope.row)"
/>
<el-button icon="el-icon-edit" size="mini" title="修改" type="primary" @click="edit(scope.row)"/>
<el-button type="primary" icon="el-icon-edit" size="mini" title="修改" @click="edit(scope.row)" />
<el-button
:disabled="scope.row.children.length > 0"
type="danger"
icon="el-icon-delete"
size="mini"
title="删除"
type="danger"
:disabled="scope.row.children.length > 0"
@click="removeDataById(scope.row.id)"
/>
</template>
@ -51,9 +51,9 @@
</el-form-item>
<el-form-item label="菜单类型" prop="type">
<el-radio-group v-model="sysMenu.type" :disabled="typeDisabled">
<el-radio :disabled="type0Disabled" :label="0">目录</el-radio>
<el-radio :disabled="type1Disabled" :label="1">菜单</el-radio>
<el-radio :disabled="type2Disabled" :label="2">按钮</el-radio>
<el-radio :label="0" :disabled="type0Disabled">目录</el-radio>
<el-radio :label="1" :disabled="type1Disabled">菜单</el-radio>
<el-radio :label="2" :disabled="type2Disabled">按钮</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="菜单名称" prop="name">
@ -70,7 +70,7 @@
<el-input v-model="sysMenu.to_code" placeholder="请输入组件路径" />
</el-form-item>
<el-form-item v-if="sysMenu.type === 2">
<el-input v-model="sysMenu.code" maxlength="100" placeholder="请输入权限标识"/>
<el-input v-model="sysMenu.code" placeholder="请输入权限标识" maxlength="100" />
<span slot="label">
<el-tooltip
content="控制器中定义的权限字符,如:@PreAuthorize(hasAuthority('bnt.sysRole.list'))"
@ -84,8 +84,8 @@
</el-form>
<span slot="footer" class="dialog-footer">
<el-button icon="el-icon-refresh-right" size="small" @click="dialogVisible = false"> </el-button>
<el-button icon="el-icon-check" size="small" type="primary" @click="saveOrUpdate()"> </el-button>
<el-button size="small" icon="el-icon-refresh-right" @click="dialogVisible = false"> </el-button>
<el-button type="primary" icon="el-icon-check" size="small" @click="saveOrUpdate()"> </el-button>
</span>
</el-dialog>
</div>

View File

@ -3,12 +3,12 @@
<el-card class="operate-container" shadow="never">
<div style="margin-top: 15px">
<el-form :inline="true" label-width="140px" size="small">
<el-form :inline="true" size="small" label-width="140px">
<el-form-item label="输入搜索:">
<el-input v-model="tempSearchObj.roleName" placeholder="角色名称" style="width: 203px"/>
<el-input v-model="tempSearchObj.roleName" style="width: 203px" placeholder="角色名称" />
</el-form-item>
<el-button icon="el-icon-search" type="primary" @click="search()">查询</el-button>
<el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
<el-button type="default" @click="resetSearch()">清空</el-button>
</el-form>
</div>
@ -21,9 +21,9 @@
<el-button class="btn-add" size="mini" @click="addRole">添加</el-button>
<el-button
:disabled="selectedRoles.length === 0"
class="btn-add"
size="mini"
:disabled="selectedRoles.length === 0"
style="margin: 0 10px;"
@click="removeRoles()"
>批量删除
@ -32,9 +32,9 @@
<el-table
v-loading="listLoading"
:data="roles"
border
stripe
:data="roles"
@selection-change="handleSelectionChange"
>
@ -44,20 +44,20 @@
/>
<el-table-column
align="center"
label="序号"
type="index"
label="序号"
width="100"
align="center"
/>
<el-table-column align="center" label="角色名称" width="500">
<el-table-column label="角色名称" width="500" align="center">
<template slot-scope="{row}">
<template v-if="row.edit">
<el-input v-model="row.roleName" class="edit-input" size="small" />
<el-button
class="cancel-btn"
icon="el-icon-refresh"
size="small"
icon="el-icon-refresh"
type="warning"
@click="cancelEdit(row)"
>
@ -68,37 +68,37 @@
</template>
</el-table-column>
<el-table-column align="center" label="操作">
<el-table-column label="操作" align="center">
<template slot-scope="{row}">
<HintButton
icon="el-icon-info"
size="mini"
title="分配权限"
type="info"
icon="el-icon-info"
title="分配权限"
@click="$router.push(`/acl/role/auth/${row.id}?roleName=${row.roleName}`)"
/>
<HintButton
v-if="row.edit"
icon="el-icon-check"
size="mini"
title="确定"
type="primary"
icon="el-icon-check"
title="确定"
@click="updateRole(row)"
/>
<HintButton
v-if="!row.edit"
icon="el-icon-edit"
size="mini"
title="修改角色"
type="primary"
icon="el-icon-edit"
title="修改角色"
@click="row.edit= true"
/>
<HintButton
icon="el-icon-delete"
size="mini"
title="删除角色"
type="danger"
icon="el-icon-delete"
title="删除角色"
@click="removeRole(row)"
/>
</template>
@ -108,11 +108,11 @@
<!-- 分页组件 -->
<el-pagination
:current-page="page"
:total="total"
:page-size="limit"
:page-sizes="[5, 10, 20]"
:total="total"
layout="prev, pager, next, jumper, ->, sizes, total"
style="padding: 10px;"
layout="prev, pager, next, jumper, ->, sizes, total"
@current-change="getRoles"
@size-change="handleSizeChange"
/>

View File

@ -1,7 +1,6 @@
<template>
<div class="dashboard-container">
<div class="dashboard-text">欢迎您 {{ name }}</div>
<img alt="Description of the image" src="https://lsky.hhdxw.top/imghub/2024/02/image-202402201708423080.png">
<div class="dashboard-text">name: {{ name }}</div>
</div>
</template>

View File

@ -10,7 +10,7 @@
>
<div class="title-container">
<h3 class="title">小鹿超市管理端</h3>
<h3 class="title">购物商城管理端</h3>
</div>
<el-form-item prop="username">
@ -88,7 +88,7 @@ export default {
return {
loginForm: {
username: 'admin',
password: 'adminadmin'
password: '111111'
},
loginRules: {
username: [{ required: true, trigger: 'blur', validator: validateUsername }],

View File

@ -52,9 +52,9 @@
align="center"
/>
<el-table-column label="配送员" prop="leaderName" width="90"/>
<el-table-column label="配送员电话" prop="leaderPhone" width="100"/>
<el-table-column label="配送点" prop="takeName" width="130"/>
<el-table-column prop="leaderName" label="团长" width="90" />
<el-table-column prop="leaderPhone" label="团长电话" width="100" />
<el-table-column prop="takeName" label="提货点" width="130" />
<el-table-column prop="skuNum" label="商品数量" width="80" />
<el-table-column prop="driverName" label="司机" width="90" />
<el-table-column prop="driverPhone" label="司机电话" width="100" />

View File

@ -4,7 +4,7 @@
<el-card class="operate-container" shadow="never">
<el-form inline>
<el-form-item label="订单号">
<el-input v-model="searchObj.orderNo" clearable placeholder="订单号" type="text" width="100"/>
<el-input v-model="searchObj.outTradeNo" type="text" width="100" placeholder="订单号" clearable />
</el-form-item>
<el-form-item label="订单状态">
@ -89,10 +89,10 @@
<p>电话{{ scope.row.receiverPhone }}</p>
</template>
</el-table-column>
<el-table-column label="配送员信息">
<el-table-column label="团长信息">
<template slot-scope="scope">
<p>姓名{{ scope.row.leaderName }}</p>
<p>配送{{ scope.row.takeName }}</p>
<p>提货{{ scope.row.takeName }}</p>
</template>
</el-table-column>
<el-table-column label="操作时间" width="200px">
@ -127,6 +127,7 @@
<script>
import api from '@/api/order/orderInfo'
import leaderApi from '@/api/user/leader'
import wareApi from '@/api/sys/ware'
export default {

View File

@ -34,9 +34,9 @@
<td width="35%">{{ orderInfo.receiverPhone }}</td>
</tr>
<tr>
<th>配送员名称</th>
<th>团长名称</th>
<td>{{ orderInfo.leaderName }}</td>
<th>配送</th>
<th>提货</th>
<td>{{ orderInfo.takeName }}</td>
</tr>
<tr>

View File

@ -163,7 +163,7 @@ export default {
data() {
return {
// API
BASE_API: 'http://152.136.42.114:8200',
BASE_API: 'http://localhost:8203',
skuInfo: defaultForm,
saveBtnDisabled: false,
@ -328,13 +328,13 @@ export default {
//
this.skuInfo.skuImagesList.forEach(item => {
const obj = {}
const obj = new Object()
obj.url = item.imgUrl
this.fileList.push(obj)
})
this.skuInfo.skuPosterList.forEach(item => {
const obj = {}
const obj = new Object()
obj.url = item.imgUrl
this.filePosterList.push(obj)
})

View File

@ -35,7 +35,7 @@
<el-table-column prop="name" label="姓名" width="100px" />
<el-table-column prop="phone" label="手机号码" width="100px" />
<el-table-column label="配送点名称" prop="takeName"/>
<el-table-column prop="takeName" label="提货点名称" />
<el-table-column prop="param.provinceName" label="省" width="70px" />
<el-table-column prop="param.cityName" label="城市" width="70px" />
<el-table-column prop="param.districtName" label="区/县" width="70px" />
@ -68,7 +68,7 @@
<el-dialog title="添加/修改" :visible.sync="dialogVisible" width="60%">
<el-form ref="flashPromotionForm" label-width="150px" size="small" style="padding-right: 40px;">
<el-form-item label="配送员名称">
<el-form-item label="团长名称">
<el-input v-model="leader.name" />
</el-form-item>
<el-form-item label="手机号码">
@ -77,7 +77,7 @@
<el-form-item label="身份证">
<el-input v-model="leader.idNo" />
</el-form-item>
<el-form-item label="配送点名称">
<el-form-item label="提货点名称">
<el-input v-model="leader.takeName" />
</el-form-item>
<el-form-item label="选择地址">

View File

@ -5,7 +5,7 @@
<el-card class="operate-container" shadow="never">
<el-form :inline="true">
<el-form-item label="输入搜索:">
<el-input v-model="searchObj.keyword" placeholder="关键字" style="width: 203px"/>
<el-input v-model="searchObj.keyword" style="width: 203px" placeholder="关键字" />
</el-form-item>
<el-button type="primary" icon="el-icon-search" @click="fetchData()">查询</el-button>
@ -32,17 +32,17 @@
</template>
</el-table-column>
<el-table-column label="姓名" prop="name" width="100px"/>
<el-table-column label="手机号码" prop="phone" width="120px"/>
<el-table-column label="配送点名称" prop="takeName"/>
<el-table-column label="所属区域" prop="param.regionName" width="80px"/>
<el-table-column prop="name" label="姓名" width="100px" />
<el-table-column prop="phone" label="手机号码" width="120px" />
<el-table-column prop="takeName" label="提货点名称" />
<el-table-column prop="param.regionName" label="所属区域" width="80px" />
<el-table-column label="状态" width="100">
<template slot-scope="scope">
<p>{{ scope.row.checkStatus === 0 ? '待审核' : scope.row.checkStatus === 1 ? '通过' : '未通过' }}</p>
</template>
</el-table-column>
<el-table-column label="审核时间" prop="checkTime" width="150px"/>
<el-table-column label="申请时间" prop="createTime" width="150px"/>
<el-table-column prop="checkTime" label="审核时间" width="150px" />
<el-table-column prop="createTime" label="申请时间" width="150px" />
<el-table-column label="操作" width="200" align="center">
<template slot-scope="scope">

View File

@ -14,11 +14,11 @@ import java.util.Date;
*/
public class JwtHelper {
private static final long tokenExpiration = 7 * 60 * 60 * 1000;
private static final long tokenExpiration = 365L * 24 * 60 * 60 * 1000;
private static final String tokenSignKey = "xlcs";
public static String createToken(Long userId, String userName) {
return Jwts.builder()
String token = Jwts.builder()
.setSubject("xlcs-USER")
.setExpiration(new Date(System.currentTimeMillis() + tokenExpiration))
.claim("userId", userId)
@ -26,6 +26,7 @@ public class JwtHelper {
.signWith(SignatureAlgorithm.HS512, tokenSignKey)
.compressWith(CompressionCodecs.GZIP)
.compact();
return token;
}
public static Long getUserId(String token) {

View File

@ -3,7 +3,6 @@ package com.yovinchen.xlcs.common.auth;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import javax.annotation.Resource;
@ -25,15 +24,7 @@ public class LoginMvcConfigurerAdapter extends WebMvcConfigurationSupport {
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(new UserLoginInterceptor(redisTemplate))
.addPathPatterns("/api/**")
.excludePathPatterns("/api/user/weixin/wxLogin/*", "/api/user/h5/login/*");
.excludePathPatterns("/api/user/weixin/wxLogin/*");
super.addInterceptors(registry);
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/**")
.addResourceLocations("classpath:/META-INF/resources/");
super.addResourceHandlers(registry);
}
}

View File

@ -84,18 +84,18 @@ public class Swagger2Config {
private ApiInfo webApiInfo() {
return new ApiInfoBuilder()
.title("网站-API文档")
.description("本文档描述了小鹿商城网站微服务接口定义")
.description("本文档描述了尚上优选网站微服务接口定义")
.version("1.0")
.contact(new Contact("yovinchen", "http://xlcs.hhdxw.top", "gzh298255@gmail.com"))
.contact(new Contact("yovinchen", "http://yovinchen.com", "yovinchen"))
.build();
}
private ApiInfo adminApiInfo() {
return new ApiInfoBuilder()
.title("后台管理系统-API文档")
.description("本文档描述了小鹿商城后台系统服务接口定义")
.description("本文档描述了尚上优选后台系统服务接口定义")
.version("1.0")
.contact(new Contact("yovinchen", "http://yovinchen.com", "gzh298255@gmail.com"))
.contact(new Contact("yovinchen", "http://yovinchen.com", "yovinchen"))
.build();
}
}

View File

@ -35,11 +35,6 @@ public enum ResultCodeEnum {
ILLEGAL_CALLBACK_REQUEST_ERROR(217, "非法回调请求"),
FETCH_ACCESSTOKEN_FAILD(218, "获取accessToken失败"),
FETCH_USERINFO_ERROR(219, "获取用户信息失败"),
ACCOUNT_PASSWORD_ERROR(220, "账号密码错误"),
PHONE_NULL_ERROR(221, "手机号为空"),
PHONE_REGISTERED_ERROR(222, "手机号已被注册"),
PHONE_FORMAT_ERROR(223, "手机号格式错误"),
SKU_LIMIT_ERROR(230, "购买个数不能大于限购个数"),

View File

@ -25,7 +25,7 @@ public class CodeGet {
// 2全局配置
// 全局配置
GlobalConfig gc = new GlobalConfig();
gc.setOutputDir("xlcs-parent/service/service-user" + "/src/main/java");
gc.setOutputDir("xlcs-parent/service/service-acl" + "/src/main/java");
gc.setServiceName("%sService"); //去掉Service接口的首字母I
gc.setAuthor("yovinchen");
@ -34,17 +34,17 @@ public class CodeGet {
// 3数据源配置
DataSourceConfig dsc = new DataSourceConfig();
dsc.setUrl("jdbc:mysql://82.157.68.223:3306/xlcs-user?serverTimezone=GMT%2B8&useSSL=false");
dsc.setUrl("jdbc:mysql://82.157.68.223:3306/shequ-acl?serverTimezone=GMT%2B8&useSSL=false");
dsc.setDriverName("com.mysql.cj.jdbc.Driver");
dsc.setUsername("xlcs-user");
dsc.setPassword("xlcs-user");
dsc.setUsername("shequ-acl");
dsc.setPassword("shequ-acl");
dsc.setDbType(DbType.MYSQL);
mpg.setDataSource(dsc);
// 4包配置
PackageConfig pc = new PackageConfig();
pc.setParent("com.yovinchen.xlcs");
pc.setModuleName("user"); //模块名
pc.setModuleName("acl"); //模块名
pc.setController("controller");
pc.setService("service");
pc.setMapper("mapper");
@ -53,7 +53,7 @@ public class CodeGet {
// 5策略配置
StrategyConfig strategy = new StrategyConfig();
strategy.setInclude("driver", "leader", "leader_account", "leader_bank", "leader_bill", "leader_user", "region", "user_delivery", "user_login_log");
strategy.setInclude("role_permission", "admin_login_log");
strategy.setNaming(NamingStrategy.underline_to_camel);//数据库表映射到实体的命名策略

View File

@ -1,9 +1,9 @@
package com.yovinchen.xlcs.model.user;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yovinchen.xlcs.enums.UserType;
import com.yovinchen.xlcs.model.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -26,14 +26,6 @@ public class User extends BaseEntity {
@TableField("nick_name")
private String nickName;
@ApiModelProperty(value = "邮箱")
@TableField("email")
private String email;
@ApiModelProperty(value = "密码")
@TableField("password")
private String password;
@ApiModelProperty(value = "身份证号码")
@TableField("id_no")
private String idNo;

View File

@ -21,12 +21,6 @@ public class UserLoginVo implements Serializable {
@ApiModelProperty(value = "昵称")
private String nickName;
@ApiModelProperty(value = "邮箱")
private String email;
@ApiModelProperty(value = "密码")
private String password;
@ApiModelProperty(value = "小程序open id")
private String openId;

View File

@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.PathVariable;
public interface UserFeignClient {
/**
* 配送点地址信息
* 提货点地址信息
*
* @param userId
* @return

View File

@ -8,7 +8,7 @@ ARG WORK_PATH="/skywalking"
ENV JAR_FILE=${JAR_FILE}
ENV SW_AGENT_NAME=${APP_NAME}
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="192.168.31.50:11800"
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="10.211.55.50:11800"
RUN rm /skywalking/agent/plugins/apm-armeria-* \
/skywalking/agent/plugins/apm-cxf-* \

View File

@ -7,7 +7,7 @@ ARG WORK_PATH="/skywalking"
ENV JAR_FILE=${JAR_FILE}
ENV SW_AGENT_NAME=${APP_NAME}
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="192.168.31.50:11800"
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="10.211.55.50:11800"
RUN rm /skywalking/agent/plugins/apm-cxf-* \
/skywalking/agent/plugins/apm-dubbo-* \

View File

@ -17,11 +17,4 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- redis -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -1,11 +1,13 @@
package com.yovinchen.xlcs.acl.controller;
import com.yovinchen.xlcs.acl.service.AdminService;
import com.yovinchen.xlcs.common.result.Result;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map;
/**
@ -21,18 +23,13 @@ import java.util.Map;
@RequestMapping("/admin/acl/index")
public class IndexController {
@Autowired
private AdminService adminService;
/**
* 1请求登陆的login
*/
@PostMapping("login")
public Result login(@RequestBody Map<String, String> loginRequest) {
String username = loginRequest.get("username");
String password = loginRequest.get("password");
Map<String, Object> map = adminService.loginAdmin(username, password);
public Result login() {
Map<String, Object> map = new HashMap<>();
map.put("token", "admin-token");
return Result.ok(map);
}
@ -40,8 +37,10 @@ public class IndexController {
* 2 获取用户信息
*/
@GetMapping("info")
public Result info(String token) {
Map<String, Object> map = adminService.getInfo(token);
public Result info() {
Map<String, Object> map = new HashMap<>();
map.put("name", "yovinchen");
map.put("avatar", "https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
return Result.ok(map);
}

View File

@ -24,6 +24,7 @@ import java.util.Map;
@RestController
@RequestMapping("/admin/acl/permission")
@Api(tags = "菜单服务")
public class PermissionController {
@Autowired

View File

@ -10,6 +10,7 @@ import com.yovinchen.xlcs.vo.acl.RoleQueryVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -26,6 +27,8 @@ import java.util.List;
@RestController
@RequestMapping("/admin/acl/role")
@Api(tags = "角色管理")
@Slf4j
public class RoleController {
@Autowired

View File

@ -1,22 +0,0 @@
package com.yovinchen.xlcs.acl.controller;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 角色权限 前端控制器
* </p>
*
* @author yovinchen
* @since 2024-01-24
*/
@RestController
@RequestMapping("/admin/acl/rolePermission")
@Api(tags = "用户权限")
public class RolePermissionController {
}

View File

@ -1,17 +0,0 @@
package com.yovinchen.xlcs.acl.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yovinchen.xlcs.model.acl.AdminLoginLog;
/**
* <p>
* 后台用户登录日志表 Mapper 接口
* </p>
*
* @author yovinchen
* @since 2024-01-24
*/
public interface AdminLoginLogMapper extends BaseMapper<AdminLoginLog> {
}

View File

@ -1,16 +0,0 @@
package com.yovinchen.xlcs.acl.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yovinchen.xlcs.model.acl.AdminLoginLog;
/**
* <p>
* 后台用户登录日志表 服务类
* </p>
*
* @author yovinchen
* @since 2024-01-24
*/
public interface AdminLoginLogService extends IService<AdminLoginLog> {
}

View File

@ -6,8 +6,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.yovinchen.xlcs.model.acl.Admin;
import com.yovinchen.xlcs.vo.acl.AdminQueryVo;
import java.util.Map;
/**
* ClassName: AdminService
* Package: com.yovinchen.xlcs.acl.service
@ -27,19 +25,4 @@ public interface AdminService extends IService<Admin> {
*/
IPage<Admin> selectPage(Page<Admin> pageParam, AdminQueryVo userQueryVo);
/**
* 后台登录
*
* @param username
* @param password
* @return
*/
Map<String, Object> loginAdmin(String username, String password);
/**
* 获取用户信息
*
* @return
*/
Map<String, Object> getInfo(String token);
}

View File

@ -1,16 +0,0 @@
package com.yovinchen.xlcs.acl.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yovinchen.xlcs.model.acl.RolePermission;
/**
* <p>
* 角色权限 服务类
* </p>
*
* @author yovinchen
* @since 2024-01-24
*/
public interface RolePermissionService extends IService<RolePermission> {
}

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.acl.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yovinchen.xlcs.acl.mapper.AdminLoginLogMapper;
import com.yovinchen.xlcs.acl.service.AdminLoginLogService;
import com.yovinchen.xlcs.model.acl.AdminLoginLog;
import org.springframework.stereotype.Service;
/**
* <p>
* 后台用户登录日志表 服务实现类
* </p>
*
* @author yovinchen
* @since 2024-01-24
*/
@Service
public class AdminLoginLogServiceImpl extends ServiceImpl<AdminLoginLogMapper, AdminLoginLog> implements AdminLoginLogService {
}

View File

@ -1,6 +1,5 @@
package com.yovinchen.xlcs.acl.service.impl;
import cn.hutool.core.lang.UUID;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -8,19 +7,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yovinchen.xlcs.acl.mapper.AdminMapper;
import com.yovinchen.xlcs.acl.service.AdminService;
import com.yovinchen.xlcs.acl.service.RoleService;
import com.yovinchen.xlcs.common.utils.MD5;
import com.yovinchen.xlcs.model.acl.Admin;
import com.yovinchen.xlcs.vo.acl.AdminQueryVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
* ClassName: AdminServiceImpl
* Package: com.yovinchen.xlcs.acl.service.impl
@ -39,16 +32,6 @@ public class AdminServiceImpl extends ServiceImpl<AdminMapper, Admin> implements
@Autowired
private RoleService roleService;
@Autowired
private RedisTemplate redisTemplate;
/**
* 分页查询用户
*
* @param pageParam
* @param userQueryVo
* @return
*/
@Override
public IPage<Admin> selectPage(Page<Admin> pageParam, AdminQueryVo userQueryVo) {
log.info("获取管理用户分页列表入参{}", pageParam.toString() + userQueryVo.toString());
@ -64,42 +47,4 @@ public class AdminServiceImpl extends ServiceImpl<AdminMapper, Admin> implements
IPage<Admin> pageModel = baseMapper.selectPage(pageParam, wrapper);
return pageModel;
}
/**
* 后台登录
*
* @param username
* @param password
* @return
*/
@Override
public Map<String, Object> loginAdmin(String username, String password) {
Integer i = baseMapper.selectCount(new LambdaQueryWrapper<Admin>().eq(Admin::getUsername, username)
.eq(Admin::getPassword, MD5.encrypt(password)));
if (i != 0) {
// 验证通过生成随机token
String token = UUID.randomUUID()
.toString();
redisTemplate.opsForValue()
.set(token, username);
redisTemplate.expire(token, 5, TimeUnit.MINUTES); // 设置过期时间为五分钟
// 返回包含token的结果
Map<String, Object> map = new HashMap<>();
map.put("token", token);
return map;
}
return null;
}
@Override
public Map<String, Object> getInfo(String token) {
String username = (String) redisTemplate.opsForValue()
.get(token);
Admin admin = baseMapper.selectOne(new LambdaQueryWrapper<Admin>().eq(Admin::getUsername, username));
Map<String, Object> map = new HashMap<>();
map.put("name", admin.getName());
map.put("avatar", "https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
return map;
}
}

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.acl.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yovinchen.xlcs.acl.mapper.RolePermissionMapper;
import com.yovinchen.xlcs.acl.service.RolePermissionService;
import com.yovinchen.xlcs.model.acl.RolePermission;
import org.springframework.stereotype.Service;
/**
* <p>
* 角色权限 服务实现类
* </p>
*
* @author yovinchen
* @since 2024-01-24
*/
@Service
public class RolePermissionServiceImpl extends ServiceImpl<RolePermissionMapper, RolePermission> implements RolePermissionService {
}

View File

@ -7,7 +7,7 @@ ARG WORK_PATH="/skywalking"
ENV JAR_FILE=${JAR_FILE}
ENV SW_AGENT_NAME=${APP_NAME}
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="192.168.31.50:11800"
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="10.211.55.50:11800"
RUN rm /skywalking/agent/plugins/apm-cxf-* \
/skywalking/agent/plugins/apm-dubbo-* \

View File

@ -1,10 +1,5 @@
package com.yovinchen.xlcs.activity.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yovinchen.xlcs.activity.mapper.ActivityInfoMapper;
import com.yovinchen.xlcs.activity.mapper.ActivityRuleMapper;
import com.yovinchen.xlcs.activity.mapper.ActivitySkuMapper;
@ -21,6 +16,11 @@ import com.yovinchen.xlcs.model.product.SkuInfo;
import com.yovinchen.xlcs.vo.activity.ActivityRuleVo;
import com.yovinchen.xlcs.vo.order.CartInfoVo;
import com.yovinchen.xlcs.vo.order.OrderConfirmVo;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -436,10 +436,22 @@ public class ActivityInfoServiceImpl extends ServiceImpl<ActivityInfoMapper, Act
optimalActivityRule.setReduceAmount(new BigDecimal("0"));
optimalActivityRule.setSelectType(1);
String ruleDesc = "" + optimalActivityRule.getConditionNum() + "元打" + optimalActivityRule.getBenefitDiscount() + "折,还差" + (totalNum - optimalActivityRule.getConditionNum()) + "";
String ruleDesc = "" +
optimalActivityRule.getConditionNum() +
"元打" +
optimalActivityRule.getBenefitDiscount() +
"折,还差" +
(totalNum - optimalActivityRule.getConditionNum()) +
"";
optimalActivityRule.setRuleDesc(ruleDesc);
} else {
String ruleDesc = "" + optimalActivityRule.getConditionNum() + "元打" + optimalActivityRule.getBenefitDiscount() + "折,已减" + optimalActivityRule.getReduceAmount() + "";
String ruleDesc = "" +
optimalActivityRule.getConditionNum() +
"元打" +
optimalActivityRule.getBenefitDiscount() +
"折,已减" +
optimalActivityRule.getReduceAmount() +
"";
optimalActivityRule.setRuleDesc(ruleDesc);
optimalActivityRule.setSelectType(2);
}
@ -471,10 +483,22 @@ public class ActivityInfoServiceImpl extends ServiceImpl<ActivityInfoMapper, Act
optimalActivityRule.setReduceAmount(new BigDecimal("0"));
optimalActivityRule.setSelectType(1);
String ruleDesc = "" + optimalActivityRule.getConditionAmount() + "元减" + optimalActivityRule.getBenefitAmount() + "元,还差" + totalAmount.subtract(optimalActivityRule.getConditionAmount()) + "";
String ruleDesc = "" +
optimalActivityRule.getConditionAmount() +
"元减" +
optimalActivityRule.getBenefitAmount() +
"元,还差" +
totalAmount.subtract(optimalActivityRule.getConditionAmount()) +
"";
optimalActivityRule.setRuleDesc(ruleDesc);
} else {
String ruleDesc = "" + optimalActivityRule.getConditionAmount() + "元减" + optimalActivityRule.getBenefitAmount() + "元,已减" + optimalActivityRule.getReduceAmount() + "";
String ruleDesc = "" +
optimalActivityRule.getConditionAmount() +
"元减" +
optimalActivityRule.getBenefitAmount() +
"元,已减" +
optimalActivityRule.getReduceAmount() +
"";
optimalActivityRule.setRuleDesc(ruleDesc);
optimalActivityRule.setSelectType(2);
}

View File

@ -7,7 +7,7 @@ ARG WORK_PATH="/skywalking"
ENV JAR_FILE=${JAR_FILE}
ENV SW_AGENT_NAME=${APP_NAME}
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="192.168.31.50:11800"
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="10.211.55.50:11800"
RUN rm /skywalking/agent/plugins/apm-cxf-* \
/skywalking/agent/plugins/apm-dubbo-* \

View File

@ -153,8 +153,7 @@ public class CartInfoServiceImpl implements CartInfoService {
BoundHashOperations<String, String, CartInfo> hashOperations = redisTemplate.boundHashOps(cartKey);
List<CartInfo> cartInfoList = hashOperations.values();
for (CartInfo cartInfo : cartInfoList) {
hashOperations.delete(cartInfo.getSkuId()
.toString());
hashOperations.delete(cartInfo.getSkuId().toString());
}
}
@ -193,8 +192,7 @@ public class CartInfoServiceImpl implements CartInfoService {
cartInfoList = boundHashOperations.values();
if (!CollectionUtils.isEmpty(cartInfoList)) {
//根据商品添加时间降序
cartInfoList.sort((o1, o2) -> o1.getCreateTime()
.compareTo(o2.getCreateTime()));
cartInfoList.sort((o1, o2) -> o1.getCreateTime().compareTo(o2.getCreateTime()));
}
return cartInfoList;
}
@ -236,8 +234,7 @@ public class CartInfoServiceImpl implements CartInfoService {
List<CartInfo> cartInfoList = boundHashOperations.values();
cartInfoList.forEach(cartInfo -> {
cartInfo.setIsChecked(isChecked);
boundHashOperations.put(cartInfo.getSkuId()
.toString(), cartInfo);
boundHashOperations.put(cartInfo.getSkuId().toString(), cartInfo);
});
this.setCartKeyExpire(cartKey);
}
@ -256,8 +253,7 @@ public class CartInfoServiceImpl implements CartInfoService {
skuIdList.forEach(skuId -> {
CartInfo cartInfo = boundHashOperations.get(skuId.toString());
cartInfo.setIsChecked(isChecked);
boundHashOperations.put(cartInfo.getSkuId()
.toString(), cartInfo);
boundHashOperations.put(cartInfo.getSkuId().toString(), cartInfo);
});
this.setCartKeyExpire(cartKey);
}
@ -274,9 +270,9 @@ public class CartInfoServiceImpl implements CartInfoService {
BoundHashOperations<String, String, CartInfo> boundHashOperations = redisTemplate.boundHashOps(cartKey);
List<CartInfo> cartInfoList = boundHashOperations.values();
//isChecked = 1购物项选中
return cartInfoList != null ? cartInfoList.stream()
.filter(cartInfo -> cartInfo.getIsChecked() == 1)
.collect(Collectors.toList()) : null;
return cartInfoList.stream().filter(cartInfo -> {
return cartInfo.getIsChecked().intValue() == 1;
}).collect(Collectors.toList());
}
/**
@ -290,9 +286,7 @@ public class CartInfoServiceImpl implements CartInfoService {
List<CartInfo> cartInfoList = this.getCartCheckedList(userId);
//查询list数据处理得到skuId集合
List<Long> skuIdList = cartInfoList.stream()
.map(item -> item.getSkuId())
.collect(Collectors.toList());
List<Long> skuIdList = cartInfoList.stream().map(item -> item.getSkuId()).collect(Collectors.toList());
//构建redis的key值
// hash类型 key filed-value

View File

@ -7,7 +7,7 @@ ARG WORK_PATH="/skywalking"
ENV JAR_FILE=${JAR_FILE}
ENV SW_AGENT_NAME=${APP_NAME}
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="192.168.31.50:11800"
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="10.211.55.50:11800"
RUN rm /skywalking/agent/plugins/apm-cxf-* \
/skywalking/agent/plugins/apm-dubbo-* \

View File

@ -8,13 +8,12 @@ import com.yovinchen.xlcs.model.product.Category;
import com.yovinchen.xlcs.model.product.SkuInfo;
import com.yovinchen.xlcs.model.search.SkuEs;
import com.yovinchen.xlcs.vo.user.LeaderAddressVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.*;
/**
* ClassName: HomeServiceImpl
@ -24,7 +23,6 @@ import java.util.concurrent.*;
* @since 2023/9/25 12:12
*/
@Service
@Slf4j
public class HomeServiceImpl implements HomeService {
@ -45,105 +43,30 @@ public class HomeServiceImpl implements HomeService {
*/
@Override
public Map<String, Object> homeData(Long userId) {
Map<String, Object> result = new ConcurrentHashMap<>();
ExecutorService executorService = Executors.newFixedThreadPool(4);
ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(4);
// 1 根据userId获取当前登录用户地址信息
CompletableFuture<Void> getAddressFuture = CompletableFuture.runAsync(() -> {
try {
Map<String, Object> result = new HashMap<>();
//1 根据userId获取当前登录用户提货地址信息
// 远程调用service-user模块接口获取需要数据
LeaderAddressVo leaderAddressVo = userFeignClient.getUserAddressByUserId(userId);
if (leaderAddressVo != null) {
result.put("leaderAddressVo", leaderAddressVo);
}
} catch (Exception e) {
log.error("获取地址信息任务出错: {}", e.getMessage(), e);
}
}, executorService);
// 设置获取地址信息任务的超时
scheduler.schedule(() -> {
if (!getAddressFuture.isDone()) {
getAddressFuture.complete(null);
log.info("获取地址信息任务超时");
}
}, 1, TimeUnit.SECONDS);
//2 获取所有分类
CompletableFuture<Void> getCategoryFuture = CompletableFuture.runAsync(() -> {
try {
// 远程调用service-product模块接口
List<Category> categoryList = productFeignClient.findAllCategoryList();
if (categoryList != null) {
result.put("categoryList", categoryList);
}
} catch (Exception e) {
log.error("获取所有分类任务出错: {}", e.getMessage(), e);
}
}, executorService);
// 设置获取所有分类任务的超时
scheduler.schedule(() -> {
if (!getCategoryFuture.isDone()) {
getCategoryFuture.complete(null);
log.info("获取所有分类任务超时");
}
}, 1, TimeUnit.SECONDS);
//3 获取新人专享商品
CompletableFuture<Void> getNewPersonSkuInfoFuture = CompletableFuture.runAsync(() -> {
try {
// 远程调用service-product模块接口
List<SkuInfo> newPersonSkuInfoList = productFeignClient.findNewPersonSkuInfoList();
if (newPersonSkuInfoList != null) {
result.put("newPersonSkuInfoList", newPersonSkuInfoList);
}
} catch (Exception e) {
log.error("获取新人专享商品任务出错: {}", e.getMessage(), e);
}
}, executorService);
// 设置获取新人专享商品任务的超时
scheduler.schedule(() -> {
if (!getNewPersonSkuInfoFuture.isDone()) {
getNewPersonSkuInfoFuture.complete(null);
log.info("获取新人专享商品任务超时");
}
}, 1, TimeUnit.SECONDS);
//4 获取爆款商品
CompletableFuture<Void> getHotSkuFuture = CompletableFuture.runAsync(() -> {
try {
// 远程调用service-search模块接口
// hotscore 热门评分降序排序
List<SkuEs> hotSkuList = skuFeignClient.findHotSkuList();
if (hotSkuList != null) {
result.put("hotSkuList", hotSkuList);
}
} catch (Exception e) {
log.error("获取爆款商品任务出错: {}", e.getMessage(), e);
}
}, executorService);
// 设置获取爆款商品任务的超时
scheduler.schedule(() -> {
if (!getHotSkuFuture.isDone()) {
getHotSkuFuture.complete(null);
log.info("获取爆款商品任务超时");
}
}, 1, TimeUnit.SECONDS);
// 等待所有任务完成
CompletableFuture<Void> allFutures = CompletableFuture.allOf(getAddressFuture, getCategoryFuture, getNewPersonSkuInfoFuture, getHotSkuFuture);
try {
allFutures.get(); // 等待所有任务完成
} catch (InterruptedException | ExecutionException e) {
log.error("任务执行出错: {}", e.getMessage(), e);
} finally {
executorService.shutdown(); // 关闭线程池
scheduler.shutdown(); // 关闭调度器
}
//5 封装获取数据到map集合返回
return result;
}
}

View File

@ -7,7 +7,7 @@ ARG WORK_PATH="/skywalking"
ENV JAR_FILE=${JAR_FILE}
ENV SW_AGENT_NAME=${APP_NAME}
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="192.168.31.50:11800"
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="10.211.55.50:11800"
RUN rm /skywalking/agent/plugins/apm-cxf-* \
/skywalking/agent/plugins/apm-dubbo-* \

View File

@ -1,59 +0,0 @@
package com.yovinchen.xlcs.order.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yovinchen.xlcs.common.result.Result;
import com.yovinchen.xlcs.model.order.OrderInfo;
import com.yovinchen.xlcs.order.service.OrderInfoService;
import com.yovinchen.xlcs.vo.order.OrderQueryVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* ClassName: OrderInfoAdminController
* Package: com.yovinchen.xlcs.order.controller
*
* @author yovinchen
* @since 2024/1/30 10:47
*/
@Api(value = "订单管理", tags = "订单管理")
@RestController
@RequestMapping("/admin/order/orderInfo")
public class OrderInfoAdminController {
@Autowired
private OrderInfoService orderInfoService;
@ApiOperation(value = "获取订单分页列表")
@GetMapping("{page}/{limit}")
public Result<IPage<OrderInfo>> index(@ApiParam(name = "page", value = "当前页码", required = true) @PathVariable Long page,
@ApiParam(name = "limit", value = "每页记录数", required = true)
@PathVariable Long limit,
@ApiParam(name = "OrderQueryVo", value = "查询对象", required = false) OrderQueryVo orderQueryVo) {
try {
Page<OrderInfo> pageParam = new Page<>(page, limit);
IPage<OrderInfo> pageModel = orderInfoService.selectPage(pageParam, orderQueryVo);
return Result.ok(pageModel);
} catch (Exception e) {
throw new RuntimeException("获取sku分页列表异常", e);
}
}
@ApiOperation("获取订单详情信息")
@GetMapping("get/{orderId}")
public Result<OrderInfo> show(@ApiParam(name = "orderNo", value = "订单id", readOnly = true) @PathVariable Long orderId) {
try {
OrderInfo orderInfo = orderInfoService.getOrderInfoById(orderId);
return Result.ok(orderInfo);
} catch (Exception e) {
throw new RuntimeException("获取订单详情信息异常", e);
}
}
}

View File

@ -1,13 +1,12 @@
package com.yovinchen.xlcs.order.service;
import com.yovinchen.xlcs.model.order.OrderInfo;
import com.yovinchen.xlcs.vo.order.OrderConfirmVo;
import com.yovinchen.xlcs.vo.order.OrderSubmitVo;
import com.yovinchen.xlcs.vo.order.OrderUserQueryVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yovinchen.xlcs.model.order.OrderInfo;
import com.yovinchen.xlcs.vo.order.OrderConfirmVo;
import com.yovinchen.xlcs.vo.order.OrderQueryVo;
import com.yovinchen.xlcs.vo.order.OrderSubmitVo;
import com.yovinchen.xlcs.vo.order.OrderUserQueryVo;
/**
* <p>
@ -58,20 +57,11 @@ public interface OrderInfoService extends IService<OrderInfo> {
void orderPay(String orderNo);
/**
* 订单用户查询
* 订单查询
*
* @param pageParam
* @param orderUserQueryVo
* @return
*/
IPage<OrderInfo> getOrderInfoByUserIdPage(Page<OrderInfo> pageParam, OrderUserQueryVo orderUserQueryVo);
/**
* 订单后台查询
*
* @param pageParam
* @param orderQueryVo
* @return
*/
IPage<OrderInfo> selectPage(Page<OrderInfo> pageParam, OrderQueryVo orderQueryVo);
}

View File

@ -1,9 +1,5 @@
package com.yovinchen.xlcs.order.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yovinchen.xlcs.client.activity.ActivityFeignClient;
import com.yovinchen.xlcs.client.cart.CartFeignClient;
import com.yovinchen.xlcs.client.product.ProductFeignClient;
@ -19,15 +15,23 @@ import com.yovinchen.xlcs.model.activity.CouponInfo;
import com.yovinchen.xlcs.model.order.CartInfo;
import com.yovinchen.xlcs.model.order.OrderInfo;
import com.yovinchen.xlcs.model.order.OrderItem;
import com.yovinchen.xlcs.enums.*;
import com.yovinchen.xlcs.mq.constant.MqConst;
import com.yovinchen.xlcs.mq.service.RabbitService;
import com.yovinchen.xlcs.order.mapper.OrderInfoMapper;
import com.yovinchen.xlcs.order.mapper.OrderItemMapper;
import com.yovinchen.xlcs.order.service.OrderInfoService;
import com.yovinchen.xlcs.order.service.OrderItemService;
import com.yovinchen.xlcs.vo.order.*;
import com.yovinchen.xlcs.vo.order.CartInfoVo;
import com.yovinchen.xlcs.vo.order.OrderConfirmVo;
import com.yovinchen.xlcs.vo.order.OrderSubmitVo;
import com.yovinchen.xlcs.vo.order.OrderUserQueryVo;
import com.yovinchen.xlcs.vo.product.SkuStockLockVo;
import com.yovinchen.xlcs.vo.user.LeaderAddressVo;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.BoundHashOperations;
import org.springframework.data.redis.core.RedisTemplate;
@ -94,8 +98,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
//唯一标识订单
String orderNo = System.currentTimeMillis() + "";
redisTemplate.opsForValue()
.set(RedisConst.ORDER_REPEAT + orderNo, orderNo, 24, TimeUnit.HOURS);
redisTemplate.opsForValue().set(RedisConst.ORDER_REPEAT + orderNo, orderNo, 24, TimeUnit.HOURS);
//获取购物车满足条件活动和优惠卷信息
OrderConfirmVo orderConfirmVo = activityFeignClient.findCartActivityAndCoupon(cartInfoList, userId);
@ -144,21 +147,17 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
List<CartInfo> cartInfoList = cartFeignClient.getCartCheckedList(userId);
//2购物车有很多商品商品不同类型重点处理普通类型商品
List<CartInfo> commonSkuList = cartInfoList.stream()
.filter(cartInfo -> Objects.equals(cartInfo.getSkuType(), SkuType.COMMON.getCode()))
.collect(Collectors.toList());
List<CartInfo> commonSkuList = cartInfoList.stream().filter(cartInfo -> Objects.equals(cartInfo.getSkuType(), SkuType.COMMON.getCode())).collect(Collectors.toList());
//3把获取购物车里面普通类型商品list集合
// List<CartInfo>转换List<SkuStockLockVo>
if (!CollectionUtils.isEmpty(commonSkuList)) {
List<SkuStockLockVo> commonStockLockVoList = commonSkuList.stream()
.map(item -> {
List<SkuStockLockVo> commonStockLockVoList = commonSkuList.stream().map(item -> {
SkuStockLockVo skuStockLockVo = new SkuStockLockVo();
skuStockLockVo.setSkuId(item.getSkuId());
skuStockLockVo.setSkuNum(item.getSkuNum());
return skuStockLockVo;
})
.collect(Collectors.toList());
}).collect(Collectors.toList());
//4远程调用service-product模块实现锁定商品
//// 验证库存并锁定库存保证具备原子性
@ -188,7 +187,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
if (CollectionUtils.isEmpty(cartInfoList)) {
throw new xlcsException(ResultCodeEnum.DATA_ERROR);
}
//查询用户配送点和配送员信息
//查询用户提货点和配送员信息
Long userId = AuthContextHolder.getUserId();
LeaderAddressVo leaderAddressVo = userFeignClient.getUserAddressByUserId(userId);
if (leaderAddressVo == null) {
@ -232,11 +231,9 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
orderItem.setSplitCouponAmount(couponAmount);
//总金额
BigDecimal skuTotalAmount = orderItem.getSkuPrice()
.multiply(new BigDecimal(orderItem.getSkuNum()));
BigDecimal skuTotalAmount = orderItem.getSkuPrice().multiply(new BigDecimal(orderItem.getSkuNum()));
//优惠之后金额
BigDecimal splitTotalAmount = skuTotalAmount.subtract(activityAmount)
.subtract(couponAmount);
BigDecimal splitTotalAmount = skuTotalAmount.subtract(activityAmount).subtract(couponAmount);
orderItem.setSplitTotalAmount(splitTotalAmount);
orderItemList.add(orderItem);
}
@ -250,14 +247,14 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
orderInfo.setLeaderName(leaderAddressVo.getLeaderName());//配送员名称
orderInfo.setLeaderPhone(leaderAddressVo.getLeaderPhone());
orderInfo.setTakeName(leaderAddressVo.getTakeName());
orderInfo.setReceiverName(orderParamVo.getReceiverName());
orderInfo.setReceiverPhone(orderParamVo.getReceiverPhone());
orderInfo.setReceiverProvince(leaderAddressVo.getProvince());
orderInfo.setReceiverCity(leaderAddressVo.getCity());
orderInfo.setReceiverDistrict(leaderAddressVo.getDistrict());
orderInfo.setReceiverAddress(leaderAddressVo.getDetailAddress());
orderInfo.setWareId(cartInfoList.get(0)
.getWareId());
orderInfo.setWareId(cartInfoList.get(0).getWareId());
orderInfo.setProcessStatus(ProcessStatus.UNPAID);
//计算订单金额
@ -268,8 +265,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
BigDecimal couponAmount = couponInfoSplitAmount.get("coupon:total");
if (null == couponAmount) couponAmount = new BigDecimal(0);
BigDecimal totalAmount = originalTotalAmount.subtract(activityAmount)
.subtract(couponAmount);
BigDecimal totalAmount = originalTotalAmount.subtract(activityAmount).subtract(couponAmount);
//计算订单金额
orderInfo.setOriginalTotalAmount(originalTotalAmount);
orderInfo.setActivityAmount(activityAmount);
@ -278,8 +274,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
//计算配送员佣金
BigDecimal profitRate = new BigDecimal(0);//orderSetService.getProfitRate();
BigDecimal commissionAmount = orderInfo.getTotalAmount()
.multiply(profitRate);
BigDecimal commissionAmount = orderInfo.getTotalAmount().multiply(profitRate);
orderInfo.setCommissionAmount(commissionAmount);
//添加数据到订单基本信息表
@ -300,12 +295,9 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
String orderSkuKey = RedisConst.ORDER_SKU_MAP + orderParamVo.getUserId();
BoundHashOperations<String, String, Integer> hashOperations = redisTemplate.boundHashOps(orderSkuKey);
cartInfoList.forEach(cartInfo -> {
if (Boolean.TRUE.equals(hashOperations.hasKey(cartInfo.getSkuId()
.toString()))) {
Integer orderSkuNum = hashOperations.get(cartInfo.getSkuId()
.toString()) + cartInfo.getSkuNum();
hashOperations.put(cartInfo.getSkuId()
.toString(), orderSkuNum);
if (Boolean.TRUE.equals(hashOperations.hasKey(cartInfo.getSkuId().toString()))) {
Integer orderSkuNum = hashOperations.get(cartInfo.getSkuId().toString()) + cartInfo.getSkuNum();
hashOperations.put(cartInfo.getSkuId().toString(), orderSkuNum);
}
});
redisTemplate.expire(orderSkuKey, DateUtil.getCurrentExpireTimes(), TimeUnit.SECONDS);
@ -363,7 +355,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
}
/**
* 订单用户查询
* 订单查询
*
* @param pageParam
* @param orderUserQueryVo
@ -384,57 +376,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
//把订单项集合封装到每个订单里面
orderInfo.setOrderItemList(orderItemList);
//封装订单状态名称
orderInfo.getParam()
.put("orderStatusName", orderInfo.getOrderStatus()
.getComment());
}
return pageModel;
}
/**
* 订单后台查询
*
* @param pageParam
* @param orderQueryVo
* @return
*/
@Override
public IPage<OrderInfo> selectPage(Page<OrderInfo> pageParam, OrderQueryVo orderQueryVo) {
LambdaQueryWrapper<OrderInfo> wrapper = new LambdaQueryWrapper<>();
//获取查询信息
String receiver = orderQueryVo.getReceiver();
String orderNo = orderQueryVo.getOrderNo();
OrderStatus orderStatus = orderQueryVo.getOrderStatus();
Long leaderId = orderQueryVo.getLeaderId();
Long wareId = orderQueryVo.getWareId();
String createTimeBegin = orderQueryVo.getCreateTimeBegin();
String createTimeEnd = orderQueryVo.getCreateTimeEnd();
//拼接查询信息
wrapper.like(!StringUtils.isEmpty(receiver), OrderInfo::getReceiverName, receiver)
.or()
.like(!StringUtils.isEmpty(receiver), OrderInfo::getReceiverPhone, receiver)
.eq(!StringUtils.isEmpty(orderNo), OrderInfo::getOrderNo, orderNo)
.eq(!StringUtils.isEmpty(orderStatus), OrderInfo::getOrderStatus, orderStatus)
.eq(!StringUtils.isEmpty(leaderId), OrderInfo::getLeaderId, leaderId)
.eq(!StringUtils.isEmpty(wareId), OrderInfo::getWareId, wareId)
.ge(!StringUtils.isEmpty(createTimeBegin), OrderInfo::getCreateTime, createTimeBegin)
.le(!StringUtils.isEmpty(createTimeEnd), OrderInfo::getCreateTime, createTimeEnd);
IPage<OrderInfo> pageModel = baseMapper.selectPage(pageParam, wrapper);
//获取每个订单把每个订单里面订单项查询封装
List<OrderInfo> orderInfoList = pageModel.getRecords();
for (OrderInfo orderInfo : orderInfoList) {
//根据订单id查询里面所有订单项列表
List<OrderItem> orderItemList = orderItemMapper.selectList(new LambdaQueryWrapper<OrderItem>()
.eq(OrderItem::getOrderId, orderInfo.getId()));
//把订单项集合封装到每个订单里面
orderInfo.setOrderItemList(orderItemList);
//封装订单状态名称
orderInfo.getParam()
.put("orderStatusName", orderInfo.getOrderStatus()
.getComment());
orderInfo.getParam().put("orderStatusName", orderInfo.getOrderStatus().getComment());
}
return pageModel;
}
@ -451,8 +393,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
private BigDecimal computeTotalAmount(List<CartInfo> cartInfoList) {
BigDecimal total = new BigDecimal(0);
for (CartInfo cartInfo : cartInfoList) {
BigDecimal itemTotal = cartInfo.getCartPrice()
.multiply(new BigDecimal(cartInfo.getSkuNum()));
BigDecimal itemTotal = cartInfo.getCartPrice().multiply(new BigDecimal(cartInfo.getSkuNum()));
total = total.add(itemTotal);
}
return total;
@ -483,14 +424,12 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
BigDecimal reduceAmount = activityRule.getReduceAmount();
activityReduceAmount = activityReduceAmount.add(reduceAmount);
if (cartInfoList.size() == 1) {
activitySplitAmountMap.put("activity:" + cartInfoList.get(0)
.getSkuId(), reduceAmount);
activitySplitAmountMap.put("activity:" + cartInfoList.get(0).getSkuId(), reduceAmount);
} else {
//总金额
BigDecimal originalTotalAmount = new BigDecimal(0);
for (CartInfo cartInfo : cartInfoList) {
BigDecimal skuTotalAmount = cartInfo.getCartPrice()
.multiply(new BigDecimal(cartInfo.getSkuNum()));
BigDecimal skuTotalAmount = cartInfo.getCartPrice().multiply(new BigDecimal(cartInfo.getSkuNum()));
originalTotalAmount = originalTotalAmount.add(skuTotalAmount);
}
//记录除最后一项是所有分摊金额 最后一项=总的 - skuPartReduceAmount
@ -499,11 +438,9 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
for (int i = 0, len = cartInfoList.size(); i < len; i++) {
CartInfo cartInfo = cartInfoList.get(i);
if (i < len - 1) {
BigDecimal skuTotalAmount = cartInfo.getCartPrice()
.multiply(new BigDecimal(cartInfo.getSkuNum()));
BigDecimal skuTotalAmount = cartInfo.getCartPrice().multiply(new BigDecimal(cartInfo.getSkuNum()));
//sku分摊金额
BigDecimal skuReduceAmount = skuTotalAmount.divide(originalTotalAmount, 2, RoundingMode.HALF_UP)
.multiply(reduceAmount);
BigDecimal skuReduceAmount = skuTotalAmount.divide(originalTotalAmount, 2, RoundingMode.HALF_UP).multiply(reduceAmount);
activitySplitAmountMap.put("activity:" + cartInfo.getSkuId(), skuReduceAmount);
skuPartReduceAmount = skuPartReduceAmount.add(skuReduceAmount);
@ -516,12 +453,10 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
for (int i = 0, len = cartInfoList.size(); i < len; i++) {
CartInfo cartInfo = cartInfoList.get(i);
if (i < len - 1) {
BigDecimal skuTotalAmount = cartInfo.getCartPrice()
.multiply(new BigDecimal(cartInfo.getSkuNum()));
BigDecimal skuTotalAmount = cartInfo.getCartPrice().multiply(new BigDecimal(cartInfo.getSkuNum()));
//sku分摊金额
BigDecimal skuDiscountTotalAmount = skuTotalAmount.multiply(activityRule.getBenefitDiscount()
.divide(new BigDecimal("10")));
BigDecimal skuDiscountTotalAmount = skuTotalAmount.multiply(activityRule.getBenefitDiscount().divide(new BigDecimal("10")));
BigDecimal skuReduceAmount = skuTotalAmount.subtract(skuDiscountTotalAmount);
activitySplitAmountMap.put("activity:" + cartInfo.getSkuId(), skuReduceAmount);
@ -562,15 +497,13 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
BigDecimal reduceAmount = couponInfo.getAmount();
if (skuIdList.size() == 1) {
//sku的优化金额
couponInfoSplitAmountMap.put("coupon:" + skuIdToCartInfoMap.get(skuIdList.get(0))
.getSkuId(), reduceAmount);
couponInfoSplitAmountMap.put("coupon:" + skuIdToCartInfoMap.get(skuIdList.get(0)).getSkuId(), reduceAmount);
} else {
//总金额
BigDecimal originalTotalAmount = new BigDecimal(0);
for (Long skuId : skuIdList) {
CartInfo cartInfo = skuIdToCartInfoMap.get(skuId);
BigDecimal skuTotalAmount = cartInfo.getCartPrice()
.multiply(new BigDecimal(cartInfo.getSkuNum()));
BigDecimal skuTotalAmount = cartInfo.getCartPrice().multiply(new BigDecimal(cartInfo.getSkuNum()));
originalTotalAmount = originalTotalAmount.add(skuTotalAmount);
}
//记录除最后一项是所有分摊金额 最后一项=总的 - skuPartReduceAmount
@ -579,11 +512,9 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
for (int i = 0, len = skuIdList.size(); i < len; i++) {
CartInfo cartInfo = skuIdToCartInfoMap.get(skuIdList.get(i));
if (i < len - 1) {
BigDecimal skuTotalAmount = cartInfo.getCartPrice()
.multiply(new BigDecimal(cartInfo.getSkuNum()));
BigDecimal skuTotalAmount = cartInfo.getCartPrice().multiply(new BigDecimal(cartInfo.getSkuNum()));
//sku分摊金额
BigDecimal skuReduceAmount = skuTotalAmount.divide(originalTotalAmount, 2, RoundingMode.HALF_UP)
.multiply(reduceAmount);
BigDecimal skuReduceAmount = skuTotalAmount.divide(originalTotalAmount, 2, RoundingMode.HALF_UP).multiply(reduceAmount);
couponInfoSplitAmountMap.put("coupon:" + cartInfo.getSkuId(), skuReduceAmount);
skuPartReduceAmount = skuPartReduceAmount.add(skuReduceAmount);

View File

@ -7,7 +7,7 @@ ARG WORK_PATH="/skywalking"
ENV JAR_FILE=${JAR_FILE}
ENV SW_AGENT_NAME=${APP_NAME}
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="192.168.31.50:11800"
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="10.211.55.50:11800"
RUN rm /skywalking/agent/plugins/apm-cxf-* \
/skywalking/agent/plugins/apm-dubbo-* \

View File

@ -11,18 +11,12 @@
<artifactId>service-payment</artifactId>
<dependencies>
<!--微信支付 SDK-->
<!--导入微信支付sdk-->
<dependency>
<groupId>com.github.wxpay</groupId>
<artifactId>wxpay-sdk</artifactId>
<version>0.0.3</version>
</dependency>
<!-- 支付宝 SDK -->
<dependency>
<groupId>com.alipay.sdk</groupId>
<artifactId>alipay-sdk-java</artifactId>
<version>4.23.0.ALL</version>
</dependency>
<dependency>
<groupId>com.yovinchen</groupId>
<artifactId>service-order-client</artifactId>
@ -35,12 +29,6 @@
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.carrotsearch.thirdparty</groupId>
<artifactId>simple-xml-safe</artifactId>
<version>2.7.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
<properties>
<maven.compiler.source>8</maven.compiler.source>

View File

@ -1,49 +0,0 @@
package com.yovinchen.xlcs.payment.config;
import com.alipay.api.*;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* ClassName: AlipayClientConfig
* Package: com.yovinchen.xlcs.payment.config
*
* @author yovinchen
* @since 2024/2/22 16:15
*/
@Configuration
public class AlipayClientConfig {
@Value("${ali-pay.app-id}")
private String appId;
@Value("${ali-pay.merchant-private-key}")
private String merchantPrivateKey;
@Value("${ali-pay.ali-pay-public-key}")
private String aliPayPublicKey;
@Value("${ali-pay.content-key}")
private String contentKey;
@Value("${ali-pay.gateway-url}")
private String gatewayUrl;
@Bean
public AlipayClient alipayClient() throws AlipayApiException {
AlipayConfig alipayConfig = new AlipayConfig();
//设置appId
alipayConfig.setAppId(appId);
//设置商户私钥
alipayConfig.setPrivateKey(merchantPrivateKey);
//设置支付宝公钥
alipayConfig.setAlipayPublicKey(aliPayPublicKey);
//设置支付宝网关
alipayConfig.setServerUrl(gatewayUrl);
//设置请求格式,固定值json.
alipayConfig.setFormat(AlipayConstants.FORMAT_JSON);
//设置字符集
alipayConfig.setCharset(AlipayConstants.CHARSET_UTF8);
//设置签名类型
alipayConfig.setSignType(AlipayConstants.SIGN_TYPE_RSA2);
//构造client
return new DefaultAlipayClient(alipayConfig);
}
}

View File

@ -1,48 +0,0 @@
package com.yovinchen.xlcs.payment.controller;
import com.yovinchen.xlcs.common.result.Result;
import com.yovinchen.xlcs.payment.service.AlipayService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* ClassName: AlipayController
* Package: com.yovinchen.xlcs.payment.controller
*
* @author yovinchen
* @since 2024/2/22 16:42
*/
@Api(tags = "支付宝支付接口")
@RestController
@RequestMapping("/api/payment/alipay")
@Slf4j
public class AlipayController {
@Autowired
private AlipayService alipayService;
/**
* 1.统一收单下单并支付页面接口的调用
*/
@ApiOperation(value = "统一收单下单并支付页面接口的调用")
@GetMapping("/createPay/{orderNo}")
public Result createPay(@PathVariable("orderNo") String orderNo) {
Map<String, String> map = alipayService.createPay(orderNo);
return Result.ok(map);
}
/**
* 2.支付成功之后的异步通知
*/
@ApiOperation("支付成功之后的异步通知")
@PostMapping("/trade/notify")
public String tradeNotify(@RequestParam Map<String, String> params) {
return alipayService.tradeNotify(params);
}
}

View File

@ -47,7 +47,6 @@ public class WeiXinController {
public Result queryPayStatus(@PathVariable("orderNo") String orderNo) {
//1 调用微信支付系统接口查询订单支付状态
Map<String, String> resultMap = weixinService.queryPayStatus(orderNo);
resultMap.put("trade_state", "SUCCESS");
//2 微信支付系统返回值为null支付失败
if (resultMap == null) {

View File

@ -1,28 +0,0 @@
package com.yovinchen.xlcs.payment.service;
import java.util.Map;
/**
* ClassName: AlipayService
* Package: com.yovinchen.xlcs.payment.service
*
* @author yovinchen
* @since 2024/2/22 17:04
*/
public interface AlipayService {
/**
* 统一收单下单并支付页面接口的调用
*
* @param orderNo
* @return
*/
Map<String, String> createPay(String orderNo);
/**
* 支付成功之后的异步通知
*
* @param params
* @return
*/
String tradeNotify(Map<String, String> params);
}

View File

@ -1,186 +0,0 @@
package com.yovinchen.xlcs.payment.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.alipay.api.AlipayApiException;
import com.alipay.api.AlipayClient;
import com.alipay.api.AlipayConstants;
import com.alipay.api.internal.util.AlipaySignature;
import com.alipay.api.request.AlipayTradePagePayRequest;
import com.alipay.api.response.AlipayTradePagePayResponse;
import com.yovinchen.xlcs.client.order.OrderFeignClient;
import com.yovinchen.xlcs.model.order.OrderInfo;
import com.yovinchen.xlcs.model.order.PaymentInfo;
import com.yovinchen.xlcs.payment.service.AlipayService;
import com.yovinchen.xlcs.payment.service.PaymentInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
/**
* ClassName: AlipayServiceImpl
* Package: com.yovinchen.xlcs.payment.service.impl
*
* @author yovinchen
* @since 2024/2/22 17:04
*/
@Service
@Slf4j
public class AlipayServiceImpl implements AlipayService {
@Autowired
private PaymentInfoService paymentInfoService;
@Autowired
private RedisTemplate redisTemplate;
@Resource
private AlipayClient alipayClient;
@Autowired
private OrderFeignClient orderFeignClient;
@Resource
private Environment config;
@Transactional
@Override
public Map<String, String> createPay(String orderNo) {
try {
//1 向payment_info支付记录表添加记录目前支付状态正在支付中
PaymentInfo paymentInfo = paymentInfoService.getPaymentInfoByOrderNo(orderNo);
if (paymentInfo == null) {
paymentInfo = paymentInfoService.savePaymentInfo(orderNo);
}
//2 调用支付宝支付
AlipayTradePagePayRequest request = new AlipayTradePagePayRequest();
// AlipayTradePagePayModel bizModel=new AlipayTradePagePayModel();
// //异步接收地址仅支持http/https公网可访问
// request.setNotifyUrl("");
// //同步跳转地址仅支持http/https
// request.setReturnUrl("");
JSONObject bizContent = new JSONObject();
//商户订单号商家自定义保持唯一性
bizContent.put("out_trade_no", paymentInfo.getOrderNo());
// bizModel.setOutTradeNo(paymentInfo.getOrderNo());
//支付金额最小值0.01元
bizContent.put("total_amount", paymentInfo.getTotalAmount());
// bizModel.setTotalAmount(String.valueOf(paymentInfo.getTotalAmount()));
//订单标题不可使用特殊符号
bizContent.put("subject", paymentInfo.getSubject());
// bizModel.setOutTradeNo(paymentInfo.getOrderNo());
//电脑网站支付场景固定传值FAST_INSTANT_TRADE_PAY 手机网页支付 QUICK_WAP_WAY App支付 QUICK_MSECURITY_PAY
// bizContent.put("product_code", "FAST_INSTANT_TRADE_PAY");
bizContent.put("product_code", "QUICK_WAP_WAY");
// request.setBizModel(bizModel);
// TODO 跳转到成功页面
// request.setNotifyUrl(config.getClass());
request.setBizContent(bizContent.toString());
AlipayTradePagePayResponse response = alipayClient.pageExecute(request, "POST");
// 如果需要返回GET请求请使用
// AlipayTradePagePayResponse response = alipayClient.pageExecute(request,"GET");
String pageRedirectionData = response.getBody();
System.out.println(pageRedirectionData);
//执行请求调用支付宝接口
if (response.isSuccess()) {
log.info("调用成功,返回结果 ===> " + response.getBody());
Map<String, String> map = new HashMap();
map.put("formStr", response.getBody());
return map;
} else {
log.info("调用失败,返回码 ===> " + response.getCode() + ", 返回描述 ===> " + response.getMsg());
throw new RuntimeException("创建支付交易失败");
}
} catch (AlipayApiException e) {
e.printStackTrace();
throw new RuntimeException("创建支付宝支付交易失败");
}
}
@Override
public String tradeNotify(Map<String, String> params) {
log.info("支付通知正在执行");
log.info("通知参数 ===> {}", params);
String result = "failure";
try {
//异步通知验签
boolean signVerified = AlipaySignature.rsaCheckV1(params, config.getProperty("alipay.alipay-public-key"), AlipayConstants.CHARSET_UTF8, AlipayConstants.SIGN_TYPE_RSA2); //调用SDK验证签名
if (!signVerified) {
//验签失败则记录异常日志并在response中返回failure.
log.error("支付成功异步通知验签失败!");
return result;
}
// 验签成功后
log.info("支付成功异步通知验签成功!");
//按照支付结果异步通知中的描述对支付结果中的业务内容进行二次校验
//1 商户需要验证该通知数据中的 out_trade_no 是否为商户系统中创建的订单号
String outTradeNo = params.get("out_trade_no");
OrderInfo order = orderFeignClient.getOrderInfo(outTradeNo);
if (order == null) {
log.error("订单不存在");
return result;
}
//2 判断 total_amount 是否确实为该订单的实际金额即商户订单创建时的金额
String totalAmount = params.get("total_amount");
int totalAmountInt = new BigDecimal(totalAmount).multiply(new BigDecimal("100"))
.intValue();
int totalFeeInt = order.getTotalAmount()
.intValue();
if (totalAmountInt != totalFeeInt) {
log.error("金额校验失败");
return result;
}
//3 校验通知中的 seller_id或者 seller_email) 是否为 out_trade_no 这笔单据的对应的操作方
String sellerId = params.get("seller_id");
String sellerIdProperty = config.getProperty("alipay.seller-id");
if (!sellerId.equals(sellerIdProperty)) {
log.error("商家pid校验失败");
return result;
}
//4 验证 app_id 是否为该商户本身
String appId = params.get("app_id");
String appIdProperty = config.getProperty("alipay.app-id");
if (!appId.equals(appIdProperty)) {
log.error("appid校验失败");
return result;
}
//在支付宝的业务通知中只有交易通知状态为 TRADE_SUCCESS时
// 支付宝才会认定为买家付款成功
String tradeStatus = params.get("trade_status");
if (!"TRADE_SUCCESS".equals(tradeStatus)) {
log.error("支付未成功");
return result;
}
//处理业务 修改订单状态 记录支付日志
// aliPayService.processOrder(params);
paymentInfoService.paySuccess(outTradeNo, params);
//校验成功后在response中返回success并继续商户自身业务处理校验失败返回failure
result = "success";
} catch (AlipayApiException e) {
e.printStackTrace();
}
return result;
}
}

View File

@ -1,7 +1,5 @@
package com.yovinchen.xlcs.payment.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yovinchen.xlcs.client.order.OrderFeignClient;
import com.yovinchen.xlcs.common.exception.xlcsException;
import com.yovinchen.xlcs.common.result.ResultCodeEnum;
@ -13,6 +11,8 @@ import com.yovinchen.xlcs.mq.constant.MqConst;
import com.yovinchen.xlcs.mq.service.RabbitService;
import com.yovinchen.xlcs.payment.mapper.PaymentInfoMapper;
import com.yovinchen.xlcs.payment.service.PaymentInfoService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -90,7 +90,10 @@ public class PaymentInfoServiceImpl extends ServiceImpl<PaymentInfoMapper, Payme
@Override
public void paySuccess(String orderNo, Map<String, String> resultMap) {
//1 查询当前订单支付记录表状态是否是已经支付
PaymentInfo paymentInfo = baseMapper.selectOne(new LambdaQueryWrapper<PaymentInfo>().eq(PaymentInfo::getOrderNo, orderNo));
PaymentInfo paymentInfo = baseMapper.selectOne(
new LambdaQueryWrapper<PaymentInfo>()
.eq(PaymentInfo::getOrderNo, orderNo)
);
if (paymentInfo.getPaymentStatus() != PaymentStatus.UNPAID) {
return;
}
@ -102,6 +105,7 @@ public class PaymentInfoServiceImpl extends ServiceImpl<PaymentInfoMapper, Payme
baseMapper.updateById(paymentInfo);
//3 整合RabbitMQ实现 修改订单记录已经支付库存扣减
rabbitService.sendMessage(MqConst.EXCHANGE_PAY_DIRECT, MqConst.ROUTING_PAY_SUCCESS, orderNo);
rabbitService.sendMessage(MqConst.EXCHANGE_PAY_DIRECT,
MqConst.ROUTING_PAY_SUCCESS, orderNo);
}
}

View File

@ -11,7 +11,6 @@ import com.yovinchen.xlcs.vo.user.UserLoginVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import java.math.BigDecimal;
@ -42,7 +41,6 @@ public class WeXinServiceImpl implements WeixinService {
* @param orderNo
* @return
*/
@Transactional
@Override
public Map<String, String> createJsapi(String orderNo) {
//1 向payment_info支付记录表添加记录目前支付状态正在支付中
@ -101,13 +99,11 @@ public class WeXinServiceImpl implements WeixinService {
result.put("signType", "MD5");
result.put("paySign", sign);
result.put("package", packages);
result.put("out_trade_no", paymentInfo.getOrderNo());
//6 返回结果
return result;
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("创建微信支付交易失败");
throw new RuntimeException(e);
}
}

View File

@ -13,24 +13,3 @@ spring:
password: nacos
application:
version: v1.0.0
ali-pay:
#接下来两个用来标识用户
#商户id
pid: 9021000134674270
#应用appid(和商户id绑定过)
app-id: 2088721030577347
#接下来三个用来确保SSL
#商户私钥
merchant-private-key: MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDjEwOkkuVP+MkTmAdtw8HzsYFvkXe1k/NK9FOje4ywZrHqy5szqpAJGZU5onHprDQg0+ozWESBKfoqEifDsfjWNuVVMfK1eluLYBEzTCGsXHjI4nJPDCBC24k51LCJuDbakYZCiV9tNfvBcRyYT4exPelT2jiNiGL8halGgPV2Mw3ySbzhMeCzFlKvYzj4xVxVkFKVsKnkxvjEO/e2sSMWxW4Ll5uTFV9sdvk4D+B08sd9aG9ThMKCYTsYrX0b5oxPHwDv4xjM7q8xzZ7x+a7tkwb5kk2X3bxJa0DmSIVli4B/hPD5LpLzH7WqmWi/LPKrdMoGZ7aPPHTqtEo/UcNVAgMBAAECggEAf3pVOTcedV79w3o98WlMoTqtp6zKv61nkFTJ/6WEviNpDp9vafn/EpzCIbEIsl5yhVtyx5BuJPUj9CptGHf5cokvBj0cPLWMXxp3jYzX+qOPS3eVJLtyARauW0EEOsyoPtwju4bTg8Qiqd6OZxN+4goXy3Ne/FXs/EctWN9c7hV8gkqrx2wK60EG/kNKiikl5bRS3fRg2MdcPirYOYqW0DWH2saD5CLfRoVKSg8ygDnMD/gTa961jhRYy1WxljHNO+b6UpoaoXXsvs9aGW3pNf7QaLFAbzTUfyDeAAvOhtupfwT82cU13j3yv2FNLxdwVUeG373eTzA1aNZvx94qAQKBgQD6FR0skjs03We0iPf/YYjL5DYs3YEkr+vmeSn0Xz33Bbqn4UQKdyerrD9VQhcLnSc7gA0f8FAC//GWYEgbLczN2OFb0+8lcZzCiz7Q+dzEUVd9HoHKnWgl+dGuwF7c+YqX6QyaoKcxmfegUxkfg0DibnZRlLhrsTrTgQJ/baOCsQKBgQDocobrlVMOwUgRjAvBUWhtYdytFEJ0XCc9rEQ7wTFDXtScv72d1nfWTwUluAHfepVMzGYkG+KiJCCp5jfe3ovxd2FkzlN9YRrwyuDKrffTXwBvI+rf7zvy6KOqhc9IcCnDfyhD37kXSm9FZg6Wfkwk21wf4ya0tJo63zsOWgRL5QKBgQDLWWPRnE58XBQ5nq5ZgMulTzomHS8nz8y4KYnN5awTMxtl6yxSfjVJyNPu1cC7dtwx65vAfr3w0oF1T3ESeJlyQIpvCtQI1GstXeCEOMgk8id729SaFohbaNnxiQcaE+d4Qs425a9OC+5o9WkWULnv5PZcu9uB5ij5VovbZiFw4QKBgBobqv3Q8thIa1DVOwjGnQUUJdYm3WP2ac3qiGtxwpe/kf/dJW4SBbnDfF+FMGiqexR6LMrHewgdKLIMkp/svSks8HqDFiuR+ZWsI91/9sL9+62ACkSGuWQKLz/a8bJALuCvapVdDowIJ0FTOjY7D1BgdxN5zwIi+uO76QUupSblAoGBAOVn1k5AZSjgzJt6xANP9TI08kp0qSO90PepRzo5o0KxbsyEz8rQRlwqfVFBSv5S4JkuTJo/2EqMMbaLW3uDZ2DorIqClGLD3UH6OueH3Ek48WNntoCJy79ovMmsa3AKOaMirARdytrU3AnmlBstBGTaoi7ARAoAJLeTxxUJHjJB
#支付宝公钥
ali-pay-public-key: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkDBcupxSOK3Qd2vjRXtUTglrPF+ijQ64Gf8plOiIFfr9U9dkClBvU4V7jLgmBhI2i1fwuGuGhI2ZhySFkFazPqrBTvL7RXWCYjbkjh/89ZOLwbm6Pz5Vm11mkdv1eqvsp2H/g3nIkVjBeDit1JqJ/jo0Fs30D6o9BjYDMJHmzDwmfH5EJiHSIrtLuUsUZCErpmQX8Uz9TVmTE+XVwIl0Npt1MV5czKIE+apkJPelktHuNhYRpJQ81t67v3euMFQOwaZO6Fk7YsUUZRX8W+Uui6lWJnCkCPUnT/GdBTomaxBq0ZocZtYmnvc9BlZBCkPPzcrOobKUQp1KkyhSZDc//QIDAQAB
##对称加密密钥
content-key: p+XVGRdcShpQE4faeI6VfQ==
#接下来三个是相关地址
#支付宝网关
gateway-url: https://openapi.alipaydev.com/gateway.do
#接收结果通知地址
notify-url: http://localhost:8080/#/success
#页面跳转同步通知页面路径
return-url: https://a863-180-174-204-169.ngrok.io/api/ali-pay/trade/notify

View File

@ -7,7 +7,7 @@ ARG WORK_PATH="/skywalking"
ENV JAR_FILE=${JAR_FILE}
ENV SW_AGENT_NAME=${APP_NAME}
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="192.168.31.50:11800"
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="10.211.55.50:11800"
RUN rm /skywalking/agent/plugins/apm-cxf-* \
/skywalking/agent/plugins/apm-dubbo-* \

View File

@ -1,13 +1,13 @@
package com.yovinchen.xlcs.product.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yovinchen.xlcs.common.result.Result;
import com.yovinchen.xlcs.model.product.SkuInfo;
import com.yovinchen.xlcs.product.service.SkuInfoService;
import com.yovinchen.xlcs.vo.product.SkuInfoQueryVo;
import com.yovinchen.xlcs.vo.product.SkuInfoVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -26,6 +26,7 @@ import java.util.List;
*/
@Api(value = "SkuInfo管理", tags = "商品Sku管理")
@RestController
@RequestMapping(value = "/admin/product/skuInfo")
public class SkuInfoController {

View File

@ -1,8 +1,7 @@
package com.yovinchen.xlcs.product.service.impl;
import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;
import com.yovinchen.xlcs.product.service.FileUploadService;
import io.minio.MinioClient;
import org.joda.time.DateTime;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@ -35,12 +34,12 @@ public class FileUploadServiceImpl implements FileUploadService {
public String fileUpload(MultipartFile file) throws Exception {
try {
// 创建OSSClient实例
OSS ossClient = new OSSClientBuilder().build(endPoint, accessKey, secreKey);
// MinioClient minioClient =
// MinioClient.builder()
// .endpoint("https://play.min.io")
// .credentials("Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG")
// .build();
// OSS ossClient = new OSSClientBuilder().build(endPoint, accessKey, secreKey);
MinioClient minioClient =
MinioClient.builder()
.endpoint("https://play.min.io")
.credentials("Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG")
.build();
// 上传文件流
InputStream inputStream = file.getInputStream();
String fileName = file.getOriginalFilename();
@ -55,9 +54,9 @@ public class FileUploadServiceImpl implements FileUploadService {
String timeUrl = new DateTime().toString("yyyy/MM/dd");
fileName = timeUrl + "/" + fileName;
//调用方法实现上传
ossClient.putObject(bucketName, fileName, inputStream);
// ossClient.putObject(bucketName, fileName, inputStream);
// 关闭OSSClient
ossClient.shutdown();
// ossClient.shutdown();
//上传之后文件路径
String url = "https://" + bucketName + "." + endPoint + "/" + fileName;
//返回

View File

@ -1,9 +1,5 @@
package com.yovinchen.xlcs.product.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yovinchen.xlcs.common.constant.RedisConst;
import com.yovinchen.xlcs.common.exception.xlcsException;
import com.yovinchen.xlcs.common.result.ResultCodeEnum;
@ -21,6 +17,10 @@ import com.yovinchen.xlcs.product.service.SkuPosterService;
import com.yovinchen.xlcs.vo.product.SkuInfoQueryVo;
import com.yovinchen.xlcs.vo.product.SkuInfoVo;
import com.yovinchen.xlcs.vo.product.SkuStockLockVo;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;
import org.springframework.beans.BeanUtils;
@ -74,11 +74,15 @@ public class SkuInfoServiceImpl extends ServiceImpl<SkuInfoMapper, SkuInfo> impl
Long categoryId = skuInfoQueryVo.getCategoryId();
//封装条件
LambdaQueryWrapper<SkuInfo> wrapper = new LambdaQueryWrapper<>();
// 动态添加条件
wrapper.like(!StringUtils.isEmpty(keyword), SkuInfo::getSkuName, keyword)
.eq(!StringUtils.isEmpty(skuType), SkuInfo::getSkuType, skuType)
.eq(!StringUtils.isEmpty(categoryId), SkuInfo::getCategoryId, categoryId);
if (!StringUtils.isEmpty(keyword)) {
wrapper.like(SkuInfo::getSkuName, keyword);
}
if (!StringUtils.isEmpty(skuType)) {
wrapper.eq(SkuInfo::getSkuType, skuType);
}
if (!StringUtils.isEmpty(categoryId)) {
wrapper.eq(SkuInfo::getCategoryId, categoryId);
}
//调用方法查询
return baseMapper.selectPage(pageParam, wrapper);
}

View File

@ -7,7 +7,7 @@ ARG WORK_PATH="/skywalking"
ENV JAR_FILE=${JAR_FILE}
ENV SW_AGENT_NAME=${APP_NAME}
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="192.168.31.50:11800"
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="10.211.55.50:11800"
RUN rm /skywalking/agent/plugins/apm-cxf-* \
/skywalking/agent/plugins/apm-dubbo-* \

View File

@ -155,7 +155,9 @@ public class SkuServiceImpl implements SkuService {
Map<Long, List<String>> skuIdToRuleListMap = activityFeignClient.findActivity(skuIdList);
//封装获取数据到skuEs里面 ruleList属性里面
if (skuIdToRuleListMap != null) {
skuEsList.forEach(skuEs -> skuEs.setRuleList(skuIdToRuleListMap.get(skuEs.getId())));
skuEsList.forEach(skuEs -> {
skuEs.setRuleList(skuIdToRuleListMap.get(skuEs.getId()));
});
}
}
return pageModel;

View File

@ -7,7 +7,7 @@ ARG WORK_PATH="/skywalking"
ENV JAR_FILE=${JAR_FILE}
ENV SW_AGENT_NAME=${APP_NAME}
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="192.168.31.50:11800"
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="10.211.55.50:11800"
RUN rm /skywalking/agent/plugins/apm-cxf-* \
/skywalking/agent/plugins/apm-dubbo-* \

View File

@ -41,16 +41,5 @@ public class RegionController {
throw new RuntimeException("根据区域关键字查询区域列表信息异常", e);
}
}
@ApiOperation("根据父级ID查询区域列表信息")
@GetMapping("findByParentId/{parentId}")
public Result findByParentId(@PathVariable("parentId") String parentId) {
try {
List<Region> list = regionService.getRegionByParentId(parentId);
return Result.ok(list);
} catch (Exception e) {
throw new RuntimeException("根据父级ID查询区域列表信息异常", e);
}
}
}

View File

@ -1,8 +1,8 @@
package com.yovinchen.xlcs.sys.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yovinchen.xlcs.model.sys.Region;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
@ -16,19 +16,5 @@ import java.util.List;
*/
public interface RegionService extends IService<Region> {
/**
* 根据区域关键字查询区域列表信息
*
* @param keyword
* @return
*/
List<Region> getRegionByKeyword(String keyword);
/**
* 根据父级ID查询区域列表信息
*
* @param parentId
* @return
*/
List<Region> getRegionByParentId(String parentId);
}

View File

@ -1,11 +1,11 @@
package com.yovinchen.xlcs.sys.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yovinchen.xlcs.model.sys.Region;
import com.yovinchen.xlcs.sys.mapper.RegionMapper;
import com.yovinchen.xlcs.sys.service.RegionService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
@ -21,25 +21,8 @@ import java.util.List;
@Service
public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> implements RegionService {
/**
* 根据区域关键字查询区域列表信息
*
* @param keyword
* @return
*/
@Override
public List<Region> getRegionByKeyword(String keyword) {
return baseMapper.selectList(new LambdaQueryWrapper<Region>().like(Region::getName, keyword));
}
/**
* 根据父级ID查询区域列表信息
*
* @param parentId
* @return
*/
@Override
public List<Region> getRegionByParentId(String parentId) {
return baseMapper.selectList(new LambdaQueryWrapper<Region>().eq(Region::getParentId, parentId));
}
}

View File

@ -1,15 +1,15 @@
package com.yovinchen.xlcs.sys.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yovinchen.xlcs.common.exception.xlcsException;
import com.yovinchen.xlcs.common.result.ResultCodeEnum;
import com.yovinchen.xlcs.model.sys.RegionWare;
import com.yovinchen.xlcs.sys.mapper.RegionWareMapper;
import com.yovinchen.xlcs.sys.service.RegionWareService;
import com.yovinchen.xlcs.vo.sys.RegionWareQueryVo;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
@ -35,7 +35,8 @@ public class RegionWareServiceImpl extends ServiceImpl<RegionWareMapper, RegionW
String keyword = regionWareQueryVo.getKeyword();
LambdaQueryWrapper<RegionWare> wrapper = new LambdaQueryWrapper<>();
if (!StringUtils.isEmpty(keyword)) {
wrapper.like(RegionWare::getRegionName, keyword)
wrapper
.like(RegionWare::getRegionName, keyword)
.or()
.like(RegionWare::getWareName, keyword);
}

View File

@ -7,7 +7,7 @@ ARG WORK_PATH="/skywalking"
ENV JAR_FILE=${JAR_FILE}
ENV SW_AGENT_NAME=${APP_NAME}
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="192.168.31.50:11800"
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="10.211.55.50:11800"
RUN rm /skywalking/agent/plugins/apm-cxf-* \
/skywalking/agent/plugins/apm-dubbo-* \

View File

@ -16,11 +16,5 @@
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -26,7 +26,7 @@ public class LeaderAddressController {
@Resource
private UserService userService;
@ApiOperation("配送点地址信息")
@ApiOperation("提货点地址信息")
@GetMapping("inner/getUserAddressByUserId/{userId}")
public LeaderAddressVo getUserAddressByUserId(@PathVariable("userId") Long userId) {
return userService.getLeaderAddressByUserId(userId);

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.user.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 仓库表 前端控制器
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
@RestController
@RequestMapping("/user/driver")
public class DriverController {
}

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.user.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 团长账户 前端控制器
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
@RestController
@RequestMapping("/user/leader-account")
public class LeaderAccountController {
}

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.user.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 团长银行卡表 前端控制器
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
@RestController
@RequestMapping("/user/leader-bank")
public class LeaderBankController {
}

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.user.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 交易账单表 前端控制器
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
@RestController
@RequestMapping("/user/leader-bill")
public class LeaderBillController {
}

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