Compare commits
32 Commits
Author | SHA1 | Date | |
---|---|---|---|
7ddc42f2c4 | |||
afed333294 | |||
423ae62e51 | |||
1e0827b60a | |||
ed6081789f | |||
dc88a39cef | |||
4e0bc6d3c2 | |||
025450a631 | |||
d70a8e3340 | |||
ef6cd8f4e6 | |||
06b494b438 | |||
ab338be7a9 | |||
ae2a2cdab6 | |||
249558d93a | |||
443ac4d569 | |||
53c62fb3f1 | |||
6d73b4a1d3 | |||
db26869350 | |||
c791f0d187 | |||
2d6808e63c | |||
40224177e5 | |||
89a69f1e89 | |||
05ad119a16 | |||
53b66a63d0 | |||
47f0262a25 | |||
ecfc4546d9 | |||
c01d765e90 | |||
2f2b0a740e | |||
4245cf60a1 | |||
c0a7ff7b45 | |||
9744001b36 | |||
b160edca01 |
17
.idea/ApifoxUploaderProjectSetting.xml
generated
Normal file
17
.idea/ApifoxUploaderProjectSetting.xml
generated
Normal file
File diff suppressed because one or more lines are too long
4
.idea/compiler.xml
generated
4
.idea/compiler.xml
generated
@@ -30,6 +30,9 @@
|
||||
<module name="service-payment" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
<bytecodeTargetLevel>
|
||||
<module name="service-doc" target="1.8" />
|
||||
</bytecodeTargetLevel>
|
||||
</component>
|
||||
<component name="JavacSettings">
|
||||
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
||||
@@ -41,6 +44,7 @@
|
||||
<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" />
|
||||
|
101
.idea/dataSources.xml
generated
Normal file
101
.idea/dataSources.xml
generated
Normal file
@@ -0,0 +1,101 @@
|
||||
<?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>
|
1
.idea/encodings.xml
generated
1
.idea/encodings.xml
generated
@@ -15,6 +15,7 @@
|
||||
<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" />
|
||||
|
5
.idea/jarRepositories.xml
generated
5
.idea/jarRepositories.xml
generated
@@ -26,11 +26,6 @@
|
||||
<option name="name" value="Nexus aliyun" />
|
||||
<option name="url" value="https://maven.aliyun.com/repository/public" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="alimaven" />
|
||||
<option name="name" value="aliyun maven" />
|
||||
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="spring" />
|
||||
<option name="name" value="spring" />
|
||||
|
12
.idea/misc.xml
generated
12
.idea/misc.xml
generated
@@ -1,11 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<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="FindBugsConfigurable">
|
||||
<option name="make" value="true" />
|
||||
<option name="effort" value="default" />
|
||||
<option name="priority" value="Medium" />
|
||||
<option name="excludeFilter" value="" />
|
||||
</component>
|
||||
<component name="JavaDocConfiguration">
|
||||
<GENERAL>
|
||||
<MODE>UPDATE</MODE>
|
||||
@@ -213,7 +214,6 @@
|
||||
<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" />
|
||||
|
465
.idea/qaplug_profiles.xml
generated
Normal file
465
.idea/qaplug_profiles.xml
generated
Normal file
@@ -0,0 +1,465 @@
|
||||
<?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>
|
@@ -3,9 +3,8 @@
|
||||
<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=Acl -Dskywalking.collector.backend_service=10.211.55.50:11800" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
</component>
|
@@ -3,9 +3,8 @@
|
||||
<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=Activity -Dskywalking.collector.backend_service=10.211.55.50:11800" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
</component>
|
@@ -2,9 +2,8 @@
|
||||
<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=Gateway -Dskywalking.collector.backend_service=10.211.55.50:11800" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
</component>
|
@@ -3,9 +3,8 @@
|
||||
<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=Payment -Dskywalking.collector.backend_service=10.211.55.50:11800" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
</component>
|
@@ -3,9 +3,8 @@
|
||||
<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=User -Dskywalking.collector.backend_service=10.211.55.50:11800" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
</component>
|
124
.idea/uiDesigner.xml
generated
Normal file
124
.idea/uiDesigner.xml
generated
Normal file
@@ -0,0 +1,124 @@
|
||||
<?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>
|
103
README.md
103
README.md
@@ -1,5 +1,7 @@
|
||||
# 小鹿超市项目
|
||||
|
||||

|
||||
|
||||
## 配置信息
|
||||
|
||||
### 服务器硬件配置
|
||||
@@ -23,21 +25,21 @@
|
||||
|-----|---------|----|---------|------|
|
||||
| 腾讯云 | 2c2g3m | | 2024-06 | 北京 |
|
||||
| 腾讯云 | 4c4g8m | | 2024-06 | 北京 |
|
||||
| 华为云 | 2c4g1m | | 2024-02 | 北京 |
|
||||
| 华为云 | 2c4g1m | | 2024-06 | 北京 |
|
||||
| 阿里云 | 2c2g2m | | 2024-06 | 乌兰察布 |
|
||||
| 雨云 | 8c8g80m | | 2024-03 | 洛杉矶 |
|
||||
| | | | | |
|
||||
|
||||
### 服务器参数
|
||||
|
||||
| 指标 | 参数 |
|
||||
|-----------|------|
|
||||
| 核心 | 24 |
|
||||
| 线程 | 48 |
|
||||
| 内存 | 64 |
|
||||
| 固态硬盘 | 512G |
|
||||
| 机械硬盘(未购买) | |
|
||||
| | |
|
||||
| 指标 | 参数 |
|
||||
|------|------|
|
||||
| 核心 | 24 |
|
||||
| 线程 | 48 |
|
||||
| 内存 | 128 |
|
||||
| 固态硬盘 | 512G |
|
||||
| 机械硬盘 | 4T |
|
||||
| | |
|
||||
|
||||
### 环境配置需求
|
||||
|
||||
@@ -45,7 +47,7 @@
|
||||
|-------|-----------------|
|
||||
| 底层虚拟化 | Debian12 PVE |
|
||||
| 集群系统 | CentOS 8 Stream |
|
||||
| | |
|
||||
| 虚拟化系统 | CentOS 7.9 |
|
||||
|
||||
### 集群分配设置
|
||||
|
||||
@@ -77,66 +79,62 @@
|
||||
| Elasticsearch | 7.17.7 | | | | | | |
|
||||
| Kinbana | 7.17.7 | | | | | | |
|
||||
| Nacos | 2.2.3 | | | | | | |
|
||||
| | | | | | | | |
|
||||
| OSS | 阿里云/Minio | | | | | | |
|
||||
| SkyWalking | 9.7.0 | | | | | | |
|
||||
| DevOps | | | | | | | |
|
||||
| DevOps | Gitea+Jenkins+Kubernetes | | | | | | |
|
||||
| Gitea | 1.21.3 | | | | | | |
|
||||
| Nexus3 | 2023-12-27T07:29 | | | | | | |
|
||||
| HarBor | 2.8.0 | | | | | | |
|
||||
|
||||
## 技术栈
|
||||
|
||||
### 后端技术栈
|
||||
|
||||
| 核心技术 |
|
||||
| :----------------------------------------------------------- |
|
||||
| SpringBoot:简化新Spring应用的初始搭建以及开发过程 |
|
||||
| 核心技术 |
|
||||
|:---------------------------------------------------------------------------------------------------------------------------------|
|
||||
| SpringBoot:简化新Spring应用的初始搭建以及开发过程 |
|
||||
| SpringCloud:基于Spring Boot实现的云原生应用开发工具,SpringCloud使用的技术:(Spring Cloud Gateway、Spring Cloud OpenFeign、Spring Cloud Alibaba Nacos等) |
|
||||
| MyBatis-Plus:持久层框架 |
|
||||
| Redis:缓存数据库 |
|
||||
| Redisson:基于redis的Java驻内存数据网格,实现分布式锁 |
|
||||
| RabbitMQ:消息中间件 |
|
||||
| ElasticSearch + Kibana: 全文检索服务器 +可视化数据监控 |
|
||||
| ThreadPoolExecutor:线程池来实现异步操作,提高效率 |
|
||||
| OSS/MinIO:文件存储服务 |
|
||||
| Knife4j(Swagger):Api接口文档工具 |
|
||||
| Nginx:负载均衡 |
|
||||
| MySQL:关系型数据库 |
|
||||
| 微信支付 |
|
||||
| 微信小程序 |
|
||||
| Docker:容器技术 |
|
||||
| DockerFile:管理Docker镜像命令文本 |
|
||||
| SkyWalking:链路追踪、日志、监控框架 |
|
||||
| |
|
||||
| |
|
||||
| MyBatis-Plus:持久层框架 |
|
||||
| Redis:缓存数据库 |
|
||||
| Redisson:基于redis的Java驻内存数据网格,实现分布式锁 |
|
||||
| RabbitMQ:消息中间件 |
|
||||
| ElasticSearch + Kibana: 全文检索服务器 +可视化数据监控 |
|
||||
| ThreadPoolExecutor:线程池来实现异步操作,提高效率 |
|
||||
| OSS/MinIO:文件存储服务 |
|
||||
| Knife4j(Swagger):Api接口文档工具 |
|
||||
| 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 | 2023.3.2 |
|
||||
| DataGrip | 2023.3.2 |
|
||||
| WebStorm | 2023.3.2 |
|
||||
| 开发工具 | 版本 |
|
||||
|-------------------------------|----------------|
|
||||
| Intellil IDEA Ultimate | 2024.1.1 |
|
||||
| DataGrip | 2024.1.1 |
|
||||
| WebStorm | 2024.1.1 |
|
||||
| HBuilderx | 3.8.12 |
|
||||
| Google Chrome | 120.0.6099.216 |
|
||||
| Another Redis Desktop Manager | 1.6 |
|
||||
| Apifox | 2.3.19 |
|
||||
| Parallels Desktop | 18.1.1 |
|
||||
| Termius | 8.4.0 |
|
||||
| 微信开发者工具 | 1.06.2306020 |
|
||||
| 微信开发者工具 | 1.06.2306020 |
|
||||
|
||||
### 操作系统
|
||||
|
||||
@@ -337,10 +335,3 @@ services:
|
||||
start_period: 60s #⾸次检测延迟时间
|
||||
```
|
||||
|
||||
## 开发需求
|
||||
|
||||
| | | |
|
||||
|------|------|------|
|
||||
| | | |
|
||||
| | | |
|
||||
| | | |
|
||||
|
BIN
logo-back.png
Normal file
BIN
logo-back.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 74 KiB |
@@ -3,4 +3,4 @@ ENV = 'development'
|
||||
|
||||
# base api
|
||||
# VUE_APP_BASE_API = '/dev-api'
|
||||
VUE_APP_BASE_API = 'http://192.168.31.67:8200'
|
||||
VUE_APP_BASE_API = 'http://152.136.42.114:8200'
|
||||
|
@@ -3,5 +3,5 @@ ENV = 'production'
|
||||
|
||||
# base api
|
||||
#VUE_APP_BASE_API = '/prod-api'
|
||||
VUE_APP_BASE_API = 'http://192.168.31.67:8200'
|
||||
VUE_APP_BASE_API = 'http://152.136.42.114:8200'
|
||||
|
||||
|
@@ -24,9 +24,9 @@ if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
|
||||
)
|
||||
|
||||
app.listen(port, function () {
|
||||
console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
|
||||
console.log(chalk.green(`> Preview at http://152.136.42.114:${port}${publicPath}`))
|
||||
if (report) {
|
||||
console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
|
||||
console.log(chalk.green(`> Report at http://152.136.42.114:${port}${publicPath}report.html`))
|
||||
}
|
||||
|
||||
})
|
||||
|
@@ -20,5 +20,5 @@ module.exports = {
|
||||
'lcov',
|
||||
'text-summary'
|
||||
],
|
||||
testURL: 'http://localhost/'
|
||||
testURL: 'http://152.136.42.114/'
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name localhost;
|
||||
server_name 152.136.42.114;
|
||||
|
||||
access_log /var/log/nginx/host.access.log main;
|
||||
|
||||
|
@@ -13,7 +13,7 @@ export default {
|
||||
|
||||
getPageList(page, limit) {
|
||||
return request({
|
||||
url: `${api_name}/list/${page}/${limit}`,
|
||||
url: `${api_name}/getPageCheckList/${page}/${limit}`,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
|
@@ -1,11 +1,12 @@
|
||||
<template>
|
||||
<div class="dashboard-container">
|
||||
<div class="dashboard-text">name: {{ name }}</div>
|
||||
<div class="dashboard-text">欢迎您 {{ name }}</div>
|
||||
<img alt="Description of the image" src="https://lsky.hhdxw.top/imghub/2024/02/image-202402201708423080.png">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import {mapGetters} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'Dashboard',
|
||||
|
@@ -88,7 +88,7 @@ export default {
|
||||
return {
|
||||
loginForm: {
|
||||
username: 'admin',
|
||||
password: '111111'
|
||||
password: 'adminadmin'
|
||||
},
|
||||
loginRules: {
|
||||
username: [{ required: true, trigger: 'blur', validator: validateUsername }],
|
||||
|
@@ -97,10 +97,10 @@
|
||||
<el-input v-model="skuInfo.perLimit" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- <div style="background-color:#E0E0E0;width: 100%;padding: 0 10px;margin: 10px 0;"><h3>商品详情</h3></div>-->
|
||||
<!-- <el-form-item label="商品详情">-->
|
||||
<!-- <el-input v-model="skuInfo.skuDetail.detailHtml" type="textarea" :rows="10"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <div style="background-color:#E0E0E0;width: 100%;padding: 0 10px;margin: 10px 0;"><h3>商品详情</h3></div>-->
|
||||
<!-- <el-form-item label="商品详情">-->
|
||||
<!-- <el-input v-model="skuInfo.skuDetail.detailHtml" type="textarea" :rows="10"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<div style="background-color:#E0E0E0;width: 100%;padding: 0 10px;margin: 10px 0;"><h3>商品海报</h3></div>
|
||||
<el-form-item label="上传海报">
|
||||
<el-upload
|
||||
@@ -163,7 +163,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
// 接口API地址
|
||||
BASE_API: 'http://localhost:8203',
|
||||
BASE_API: 'http://152.136.42.114:8200',
|
||||
|
||||
skuInfo: defaultForm,
|
||||
saveBtnDisabled: false,
|
||||
@@ -328,13 +328,13 @@ export default {
|
||||
|
||||
// 图片回显
|
||||
this.skuInfo.skuImagesList.forEach(item => {
|
||||
const obj = new Object()
|
||||
const obj = {}
|
||||
obj.url = item.imgUrl
|
||||
this.fileList.push(obj)
|
||||
})
|
||||
|
||||
this.skuInfo.skuPosterList.forEach(item => {
|
||||
const obj = new Object()
|
||||
const obj = {}
|
||||
obj.url = item.imgUrl
|
||||
this.filePosterList.push(obj)
|
||||
})
|
||||
|
38
xlcs-parent/.gitignore
vendored
Normal file
38
xlcs-parent/.gitignore
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea/modules.xml
|
||||
.idea/jarRepositories.xml
|
||||
.idea/compiler.xml
|
||||
.idea/libraries/
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### Eclipse ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
### Mac OS ###
|
||||
.DS_Store
|
@@ -14,27 +14,26 @@ import java.util.Date;
|
||||
*/
|
||||
public class JwtHelper {
|
||||
|
||||
private static final long tokenExpiration = 365L * 24 * 60 * 60 * 1000;
|
||||
private static final long tokenExpiration = 7 * 60 * 60 * 1000;
|
||||
private static final String tokenSignKey = "xlcs";
|
||||
|
||||
public static String createToken(Long userId, String userName) {
|
||||
String token = Jwts.builder()
|
||||
.setSubject("xlcs-USER")
|
||||
.setExpiration(new Date(System.currentTimeMillis() + tokenExpiration))
|
||||
.claim("userId", userId)
|
||||
.claim("userName", userName)
|
||||
.signWith(SignatureAlgorithm.HS512, tokenSignKey)
|
||||
.compressWith(CompressionCodecs.GZIP)
|
||||
.compact();
|
||||
return token;
|
||||
return Jwts.builder()
|
||||
.setSubject("xlcs-USER")
|
||||
.setExpiration(new Date(System.currentTimeMillis() + tokenExpiration))
|
||||
.claim("userId", userId)
|
||||
.claim("userName", userName)
|
||||
.signWith(SignatureAlgorithm.HS512, tokenSignKey)
|
||||
.compressWith(CompressionCodecs.GZIP)
|
||||
.compact();
|
||||
}
|
||||
|
||||
public static Long getUserId(String token) {
|
||||
if (StringUtils.isEmpty(token)) return null;
|
||||
|
||||
Jws<Claims> claimsJws = Jwts.parser()
|
||||
.setSigningKey(tokenSignKey)
|
||||
.parseClaimsJws(token);
|
||||
.setSigningKey(tokenSignKey)
|
||||
.parseClaimsJws(token);
|
||||
Claims claims = claimsJws.getBody();
|
||||
Integer userId = (Integer) claims.get("userId");
|
||||
return userId.longValue();
|
||||
@@ -45,8 +44,8 @@ public class JwtHelper {
|
||||
if (StringUtils.isEmpty(token)) return "";
|
||||
|
||||
Jws<Claims> claimsJws = Jwts.parser()
|
||||
.setSigningKey(tokenSignKey)
|
||||
.parseClaimsJws(token);
|
||||
.setSigningKey(tokenSignKey)
|
||||
.parseClaimsJws(token);
|
||||
Claims claims = claimsJws.getBody();
|
||||
return (String) claims.get("userName");
|
||||
}
|
||||
|
@@ -3,6 +3,7 @@ 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;
|
||||
@@ -24,7 +25,15 @@ public class LoginMvcConfigurerAdapter extends WebMvcConfigurationSupport {
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
registry.addInterceptor(new UserLoginInterceptor(redisTemplate))
|
||||
.addPathPatterns("/api/**")
|
||||
.excludePathPatterns("/api/user/weixin/wxLogin/*");
|
||||
.excludePathPatterns("/api/user/weixin/wxLogin/*", "/api/user/h5/login/*");
|
||||
super.addInterceptors(registry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
registry.addResourceHandler("/**")
|
||||
.addResourceLocations("classpath:/META-INF/resources/");
|
||||
super.addResourceHandlers(registry);
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -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://yovinchen.com", "yovinchen"))
|
||||
.contact(new Contact("yovinchen", "http://xlcs.hhdxw.top", "gzh298255@gmail.com"))
|
||||
.build();
|
||||
}
|
||||
|
||||
private ApiInfo adminApiInfo() {
|
||||
return new ApiInfoBuilder()
|
||||
.title("后台管理系统-API文档")
|
||||
.description("本文档描述了尚上优选后台系统服务接口定义")
|
||||
.description("本文档描述了小鹿商城后台系统服务接口定义")
|
||||
.version("1.0")
|
||||
.contact(new Contact("yovinchen", "http://yovinchen.com", "yovinchen"))
|
||||
.contact(new Contact("yovinchen", "http://yovinchen.com", "gzh298255@gmail.com"))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
@@ -35,6 +35,11 @@ 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, "购买个数不能大于限购个数"),
|
||||
|
@@ -34,10 +34,10 @@ public class CodeGet {
|
||||
|
||||
// 3、数据源配置
|
||||
DataSourceConfig dsc = new DataSourceConfig();
|
||||
dsc.setUrl("jdbc:mysql://82.157.68.223:3306/shequ-user?serverTimezone=GMT%2B8&useSSL=false");
|
||||
dsc.setUrl("jdbc:mysql://82.157.68.223:3306/xlcs-user?serverTimezone=GMT%2B8&useSSL=false");
|
||||
dsc.setDriverName("com.mysql.cj.jdbc.Driver");
|
||||
dsc.setUsername("shequ-user");
|
||||
dsc.setPassword("shequ-user");
|
||||
dsc.setUsername("xlcs-user");
|
||||
dsc.setPassword("xlcs-user");
|
||||
dsc.setDbType(DbType.MYSQL);
|
||||
mpg.setDataSource(dsc);
|
||||
|
||||
|
@@ -1,9 +1,9 @@
|
||||
package com.yovinchen.xlcs.model.user;
|
||||
|
||||
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 com.yovinchen.xlcs.enums.UserType;
|
||||
import com.yovinchen.xlcs.model.base.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -26,6 +26,14 @@ 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;
|
||||
|
@@ -21,6 +21,12 @@ 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;
|
||||
|
||||
|
@@ -158,36 +158,5 @@
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>central</id>
|
||||
<url>https://repo.maven.apache.org/maven2</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<!-- <repositories>-->
|
||||
<!-- <repository>-->
|
||||
<!-- <id>spring</id>-->
|
||||
<!-- <url>https://maven.aliyun.com/repository/spring</url>-->
|
||||
<!-- <releases>-->
|
||||
<!-- <enabled>true</enabled>-->
|
||||
<!-- </releases>-->
|
||||
<!-- <snapshots>-->
|
||||
<!-- <enabled>true</enabled>-->
|
||||
<!-- </snapshots>-->
|
||||
<!-- </repository>-->
|
||||
<!-- </repositories>-->
|
||||
|
||||
<!-- <pluginRepositories>-->
|
||||
<!-- <pluginRepository>-->
|
||||
<!-- <id>alimaven</id>-->
|
||||
<!-- <name>aliyun maven</name>-->
|
||||
<!-- <url>http://maven.aliyun.com/nexus/content/groups/public/</url>-->
|
||||
<!-- <releases>-->
|
||||
<!-- <enabled>true</enabled>-->
|
||||
<!-- </releases>-->
|
||||
<!-- <snapshots>-->
|
||||
<!-- <enabled>false</enabled>-->
|
||||
<!-- </snapshots>-->
|
||||
<!-- </pluginRepository>-->
|
||||
<!-- </pluginRepositories>-->
|
||||
</project>
|
||||
|
@@ -8,4 +8,4 @@ spring:
|
||||
username: nacos
|
||||
password: nacos
|
||||
enabled: true
|
||||
file-extension: yml
|
||||
file-extension: yml
|
@@ -17,4 +17,11 @@
|
||||
<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>
|
||||
|
@@ -1,13 +1,11 @@
|
||||
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.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 org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -23,13 +21,18 @@ import java.util.Map;
|
||||
@RequestMapping("/admin/acl/index")
|
||||
public class IndexController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private AdminService adminService;
|
||||
|
||||
/**
|
||||
* 1、请求登陆的login
|
||||
*/
|
||||
@PostMapping("login")
|
||||
public Result login() {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("token", "admin-token");
|
||||
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);
|
||||
return Result.ok(map);
|
||||
}
|
||||
|
||||
@@ -37,10 +40,8 @@ public class IndexController {
|
||||
* 2 获取用户信息
|
||||
*/
|
||||
@GetMapping("info")
|
||||
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");
|
||||
public Result info(String token) {
|
||||
Map<String, Object> map = adminService.getInfo(token);
|
||||
return Result.ok(map);
|
||||
}
|
||||
|
||||
|
@@ -6,6 +6,8 @@ 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
|
||||
@@ -25,4 +27,19 @@ 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);
|
||||
}
|
||||
|
@@ -1,5 +1,6 @@
|
||||
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;
|
||||
@@ -7,13 +8,19 @@ 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
|
||||
@@ -32,6 +39,16 @@ 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());
|
||||
@@ -47,4 +64,42 @@ 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;
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,10 @@
|
||||
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;
|
||||
@@ -16,11 +21,6 @@ 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;
|
||||
@@ -70,10 +70,10 @@ public class ActivityInfoServiceImpl extends ServiceImpl<ActivityInfoMapper, Act
|
||||
|
||||
IPage<ActivityInfo> page = activityInfoMapper.selectPage(pageParam, queryWrapper);
|
||||
page.getRecords()
|
||||
.forEach(item -> {
|
||||
item.setActivityTypeString(item.getActivityType()
|
||||
.getComment());
|
||||
});
|
||||
.forEach(item -> {
|
||||
item.setActivityTypeString(item.getActivityType()
|
||||
.getComment());
|
||||
});
|
||||
return page;
|
||||
}
|
||||
|
||||
@@ -96,8 +96,8 @@ public class ActivityInfoServiceImpl extends ServiceImpl<ActivityInfoMapper, Act
|
||||
activitySkuQueryWrapper.eq(ActivitySku::getActivityId, activityId);
|
||||
List<ActivitySku> activitySkuList = activitySkuMapper.selectList(activitySkuQueryWrapper);
|
||||
List<Long> skuIdList = activitySkuList.stream()
|
||||
.map(ActivitySku::getSkuId)
|
||||
.collect(Collectors.toList());
|
||||
.map(ActivitySku::getSkuId)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
List<SkuInfo> skuInfoList = null;
|
||||
if (!skuIdList.isEmpty()) {
|
||||
@@ -159,8 +159,8 @@ public class ActivityInfoServiceImpl extends ServiceImpl<ActivityInfoMapper, Act
|
||||
|
||||
//从skuInfoList集合获取所有skuId
|
||||
List<Long> skuIdList = skuInfoList.stream()
|
||||
.map(SkuInfo::getId)
|
||||
.collect(Collectors.toList());
|
||||
.map(SkuInfo::getId)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
//第二步 判断添加商品之前是否参加过活动,
|
||||
// 如果之前参加过,活动正在进行中,排除商品
|
||||
@@ -436,22 +436,10 @@ 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);
|
||||
}
|
||||
@@ -483,22 +471,10 @@ 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);
|
||||
}
|
||||
|
@@ -153,7 +153,8 @@ 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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,7 +193,8 @@ 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;
|
||||
}
|
||||
@@ -234,7 +236,8 @@ 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);
|
||||
}
|
||||
@@ -253,7 +256,8 @@ 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);
|
||||
}
|
||||
@@ -270,9 +274,9 @@ public class CartInfoServiceImpl implements CartInfoService {
|
||||
BoundHashOperations<String, String, CartInfo> boundHashOperations = redisTemplate.boundHashOps(cartKey);
|
||||
List<CartInfo> cartInfoList = boundHashOperations.values();
|
||||
//isChecked = 1购物项选中
|
||||
return cartInfoList.stream().filter(cartInfo -> {
|
||||
return cartInfo.getIsChecked().intValue() == 1;
|
||||
}).collect(Collectors.toList());
|
||||
return cartInfoList != null ? cartInfoList.stream()
|
||||
.filter(cartInfo -> cartInfo.getIsChecked() == 1)
|
||||
.collect(Collectors.toList()) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -286,7 +290,9 @@ 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
|
||||
|
@@ -8,12 +8,13 @@ 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
|
||||
@@ -23,6 +24,7 @@ import java.util.Map;
|
||||
* @since 2023/9/25 12:12
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class HomeServiceImpl implements HomeService {
|
||||
|
||||
|
||||
@@ -43,30 +45,105 @@ public class HomeServiceImpl implements HomeService {
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> homeData(Long userId) {
|
||||
Map<String, Object> result = new ConcurrentHashMap<>();
|
||||
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
//1 根据userId获取当前登录用户提货地址信息
|
||||
// 远程调用service-user模块接口获取需要数据
|
||||
LeaderAddressVo leaderAddressVo = userFeignClient.getUserAddressByUserId(userId);
|
||||
result.put("leaderAddressVo", leaderAddressVo);
|
||||
ExecutorService executorService = Executors.newFixedThreadPool(4);
|
||||
ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(4);
|
||||
|
||||
//2 获取所有分类
|
||||
// 远程调用service-product模块接口
|
||||
List<Category> categoryList = productFeignClient.findAllCategoryList();
|
||||
result.put("categoryList", categoryList);
|
||||
// 1 根据userId获取当前登录用户地址信息
|
||||
CompletableFuture<Void> getAddressFuture = CompletableFuture.runAsync(() -> {
|
||||
try {
|
||||
LeaderAddressVo leaderAddressVo = userFeignClient.getUserAddressByUserId(userId);
|
||||
if (leaderAddressVo != null) {
|
||||
result.put("leaderAddressVo", leaderAddressVo);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("获取地址信息任务出错: {}", e.getMessage(), e);
|
||||
}
|
||||
}, executorService);
|
||||
|
||||
//3 获取新人专享商品
|
||||
// 远程调用service-product模块接口
|
||||
List<SkuInfo> newPersonSkuInfoList = productFeignClient.findNewPersonSkuInfoList();
|
||||
result.put("newPersonSkuInfoList", newPersonSkuInfoList);
|
||||
// 设置获取地址信息任务的超时
|
||||
scheduler.schedule(() -> {
|
||||
if (!getAddressFuture.isDone()) {
|
||||
getAddressFuture.complete(null);
|
||||
log.info("获取地址信息任务超时");
|
||||
}
|
||||
}, 1, TimeUnit.SECONDS);
|
||||
|
||||
//4 获取爆款商品
|
||||
// 远程调用service-search模块接口
|
||||
// hotscore 热门评分降序排序
|
||||
List<SkuEs> hotSkuList = skuFeignClient.findHotSkuList();
|
||||
result.put("hotSkuList", hotSkuList);
|
||||
// 2 获取所有分类
|
||||
CompletableFuture<Void> getCategoryFuture = CompletableFuture.runAsync(() -> {
|
||||
try {
|
||||
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 {
|
||||
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 {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -11,12 +11,18 @@
|
||||
|
||||
<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>
|
||||
@@ -29,6 +35,12 @@
|
||||
<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>
|
||||
|
@@ -0,0 +1,49 @@
|
||||
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);
|
||||
}
|
||||
}
|
@@ -0,0 +1,48 @@
|
||||
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);
|
||||
}
|
||||
}
|
@@ -47,7 +47,8 @@ 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) {
|
||||
return Result.build(null, ResultCodeEnum.PAYMENT_FAIL);
|
||||
|
@@ -0,0 +1,28 @@
|
||||
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);
|
||||
}
|
@@ -0,0 +1,186 @@
|
||||
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;
|
||||
}
|
||||
}
|
@@ -1,5 +1,7 @@
|
||||
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;
|
||||
@@ -11,8 +13,6 @@ 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,10 +90,7 @@ 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;
|
||||
}
|
||||
@@ -105,7 +102,6 @@ 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);
|
||||
}
|
||||
}
|
||||
|
@@ -11,6 +11,7 @@ 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;
|
||||
@@ -41,6 +42,7 @@ public class WeXinServiceImpl implements WeixinService {
|
||||
* @param orderNo
|
||||
* @return
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public Map<String, String> createJsapi(String orderNo) {
|
||||
//1 向payment_info支付记录表添加记录,目前支付状态:正在支付中
|
||||
@@ -99,11 +101,13 @@ 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) {
|
||||
throw new RuntimeException(e);
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException("创建微信支付交易失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -13,3 +13,24 @@ 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
|
||||
|
@@ -1,7 +1,8 @@
|
||||
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;
|
||||
@@ -34,12 +35,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();
|
||||
@@ -54,9 +55,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;
|
||||
//返回
|
||||
|
@@ -155,9 +155,7 @@ 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;
|
||||
|
@@ -41,5 +41,16 @@ 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package com.yovinchen.xlcs.sys.service;
|
||||
|
||||
|
||||
import com.yovinchen.xlcs.model.sys.Region;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yovinchen.xlcs.model.sys.Region;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -16,5 +16,19 @@ 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);
|
||||
}
|
||||
|
@@ -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,8 +21,25 @@ 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));
|
||||
}
|
||||
}
|
||||
|
@@ -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,8 +35,7 @@ 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);
|
||||
}
|
||||
|
@@ -16,5 +16,11 @@
|
||||
<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>
|
||||
|
@@ -4,9 +4,9 @@ package com.yovinchen.xlcs.user.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.user.Leader;
|
||||
import com.yovinchen.xlcs.user.service.LeaderService;
|
||||
import com.yovinchen.xlcs.vo.user.LeaderQueryVo;
|
||||
import com.yovinchen.xlcs.vo.user.LeaderVo;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 团长表 前端控制器
|
||||
* 配送员 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author yovinchen
|
||||
@@ -34,12 +34,12 @@ public class LeaderController {
|
||||
// getPageCheckList
|
||||
@ApiOperation(value = "获取页面列表")
|
||||
@GetMapping("getPageCheckList/{page}/{limit}")
|
||||
public Result<IPage<LeaderVo>> getPageCheckList(@ApiParam(name = "page", value = "当前页码", required = true) @PathVariable Long page,
|
||||
public Result getPageCheckList(@ApiParam(name = "page", value = "当前页码", required = true) @PathVariable Long page,
|
||||
@ApiParam(name = "limit", value = "每页记录数", required = true) @PathVariable Long limit,
|
||||
@ApiParam(name = "LeaderQueryVo", value = "查询对象", required = false) LeaderQueryVo leaderQueryVo) {
|
||||
try {
|
||||
Page<LeaderVo> pageParam = new Page<>(page, limit);
|
||||
IPage<LeaderVo> pageModel = leaderService.selectPage(pageParam, leaderQueryVo);
|
||||
Page<Leader> pageParam = new Page<>(page, limit);
|
||||
IPage<Leader> pageModel = leaderService.selectPage(pageParam, leaderQueryVo);
|
||||
return Result.ok(pageModel);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("获取sku分页列表异常", e);
|
||||
|
@@ -0,0 +1,62 @@
|
||||
package com.yovinchen.xlcs.user.controller;
|
||||
|
||||
import com.yovinchen.xlcs.common.exception.xlcsException;
|
||||
import com.yovinchen.xlcs.common.result.Result;
|
||||
import com.yovinchen.xlcs.common.result.ResultCodeEnum;
|
||||
import com.yovinchen.xlcs.model.user.User;
|
||||
import com.yovinchen.xlcs.user.service.LoginService;
|
||||
import com.yovinchen.xlcs.user.service.UserService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* ClassName: UserController
|
||||
* Package: com.yovinchen.xlcs.user.controller
|
||||
*
|
||||
* @author yovinchen
|
||||
* @since 2024/2/23 10:08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/user/h5")
|
||||
public class UserController {
|
||||
|
||||
@Autowired
|
||||
private LoginService loginService;
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@ApiOperation(value = "手机号密码登录")
|
||||
@PostMapping("login")
|
||||
public Result login(@RequestBody Map<String, String> loginRequest) {
|
||||
String phone = loginRequest.get("phone");
|
||||
String password = loginRequest.get("password");
|
||||
Map<String, Object> map = loginService.login(phone, password);
|
||||
return Result.ok(map);
|
||||
}
|
||||
|
||||
@PostMapping("auth/updateUser")
|
||||
@ApiOperation(value = "更新用户昵称与头像")
|
||||
public Result updateUser(@RequestBody User user) {
|
||||
userService.updateUser(user);
|
||||
return Result.ok(null);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "手机号密码注册")
|
||||
@PostMapping("register")
|
||||
public Result register(@RequestBody Map<String, String> loginRequest) {
|
||||
String phone = loginRequest.get("phone");
|
||||
String password = loginRequest.get("password");
|
||||
if (phone.isEmpty()) {
|
||||
throw new xlcsException(ResultCodeEnum.PHONE_NULL_ERROR);
|
||||
}
|
||||
Map<String, Object> map = userService.register(phone, password);
|
||||
return Result.ok(map);
|
||||
}
|
||||
}
|
@@ -5,11 +5,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yovinchen.xlcs.model.user.Leader;
|
||||
import com.yovinchen.xlcs.vo.user.LeaderQueryVo;
|
||||
import com.yovinchen.xlcs.vo.user.LeaderVo;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 团长表 服务类
|
||||
* 配送员 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author yovinchen
|
||||
@@ -17,5 +16,5 @@ import com.yovinchen.xlcs.vo.user.LeaderVo;
|
||||
*/
|
||||
public interface LeaderService extends IService<Leader> {
|
||||
|
||||
IPage<LeaderVo> selectPage(Page<LeaderVo> pageParam, LeaderQueryVo leaderQueryVo);
|
||||
IPage<Leader> selectPage(Page<Leader> pageParam, LeaderQueryVo leaderQueryVo);
|
||||
}
|
||||
|
@@ -0,0 +1,62 @@
|
||||
package com.yovinchen.xlcs.user.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.yovinchen.xlcs.common.constant.RedisConst;
|
||||
import com.yovinchen.xlcs.common.exception.xlcsException;
|
||||
import com.yovinchen.xlcs.common.result.ResultCodeEnum;
|
||||
import com.yovinchen.xlcs.common.utils.JwtHelper;
|
||||
import com.yovinchen.xlcs.common.utils.MD5;
|
||||
import com.yovinchen.xlcs.model.user.User;
|
||||
import com.yovinchen.xlcs.vo.user.LeaderAddressVo;
|
||||
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 java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* ClassName: LoginService
|
||||
* Package: com.yovinchen.xlcs.user.service
|
||||
*
|
||||
* @author yovinchen
|
||||
* @since 2024/2/23 10:09
|
||||
*/
|
||||
@Service
|
||||
public class LoginService {
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@Autowired
|
||||
private RedisTemplate redisTemplate;
|
||||
|
||||
public Map<String, Object> login(String phone, String password) {
|
||||
User user = userService.getOne(new LambdaQueryWrapper<User>().eq(User::getPhone, phone)
|
||||
.eq(User::getPassword, MD5.encrypt(password)));
|
||||
if (user == null) {
|
||||
throw new xlcsException(ResultCodeEnum.ACCOUNT_PASSWORD_ERROR);
|
||||
}
|
||||
// 根据userId查询配送点和配送员信息
|
||||
////配送点 user表 user_delivery表
|
||||
////配送员 leader表
|
||||
LeaderAddressVo leaderAddressVo = userService.getLeaderAddressByUserId(user.getId());
|
||||
|
||||
//6 使用JWT工具根据userId和userName生成token字符串
|
||||
String token = JwtHelper.createToken(user.getId(), user.getNickName());
|
||||
|
||||
//7 获取当前登录用户信息,放到Redis里面,设置有效时间
|
||||
UserLoginVo userLoginVo = userService.getUserLoginVo(user.getId());
|
||||
redisTemplate.opsForValue()
|
||||
.set(RedisConst.USER_LOGIN_KEY_PREFIX + user.getId(), userLoginVo, RedisConst.USERKEY_TIMEOUT, TimeUnit.DAYS);
|
||||
|
||||
//8 需要数据封装到map返回
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("user", user);
|
||||
map.put("token", token);
|
||||
map.put("leaderAddressVo", leaderAddressVo);
|
||||
return map;
|
||||
}
|
||||
}
|
@@ -5,6 +5,8 @@ import com.yovinchen.xlcs.model.user.User;
|
||||
import com.yovinchen.xlcs.vo.user.LeaderAddressVo;
|
||||
import com.yovinchen.xlcs.vo.user.UserLoginVo;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* ClassName: UserService
|
||||
* Package: com.yovinchen.xlcs.user.service
|
||||
@@ -43,4 +45,13 @@ public interface UserService extends IService<User> {
|
||||
* @param user
|
||||
*/
|
||||
void updateUser(User user);
|
||||
|
||||
/**
|
||||
* 手机号注册账号
|
||||
*
|
||||
* @param phone
|
||||
* @param password
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> register(String phone, String password);
|
||||
}
|
||||
|
@@ -1,5 +1,6 @@
|
||||
package com.yovinchen.xlcs.user.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;
|
||||
@@ -7,22 +8,38 @@ import com.yovinchen.xlcs.model.user.Leader;
|
||||
import com.yovinchen.xlcs.user.mapper.LeaderMapper;
|
||||
import com.yovinchen.xlcs.user.service.LeaderService;
|
||||
import com.yovinchen.xlcs.vo.user.LeaderQueryVo;
|
||||
import com.yovinchen.xlcs.vo.user.LeaderVo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 团长表 服务实现类
|
||||
* 配送员 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author yovinchen
|
||||
* @since 2024-01-30
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class LeaderServiceImpl extends ServiceImpl<LeaderMapper, Leader> implements LeaderService {
|
||||
|
||||
/**
|
||||
* 分页查询配送员
|
||||
*
|
||||
* @param pageParam
|
||||
* @param leaderQueryVo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public IPage<LeaderVo> selectPage(Page<LeaderVo> pageParam, LeaderQueryVo leaderQueryVo) {
|
||||
return null;
|
||||
public IPage<Leader> selectPage(Page<Leader> pageParam, LeaderQueryVo leaderQueryVo) {
|
||||
log.info("获取配送员分页列表入参{}", pageParam.toString() + leaderQueryVo.toString());
|
||||
LambdaQueryWrapper<Leader> wrapper = new LambdaQueryWrapper<>();
|
||||
String keyword = leaderQueryVo.getKeyword();
|
||||
if (!StringUtils.isEmpty(keyword)) {
|
||||
//封装条件
|
||||
wrapper.like(Leader::getName, keyword);
|
||||
}
|
||||
return baseMapper.selectPage(pageParam, wrapper);
|
||||
}
|
||||
}
|
||||
|
@@ -3,6 +3,10 @@ package com.yovinchen.xlcs.user.service.impl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yovinchen.xlcs.common.auth.AuthContextHolder;
|
||||
import com.yovinchen.xlcs.common.exception.xlcsException;
|
||||
import com.yovinchen.xlcs.common.result.ResultCodeEnum;
|
||||
import com.yovinchen.xlcs.common.utils.MD5;
|
||||
import com.yovinchen.xlcs.enums.UserType;
|
||||
import com.yovinchen.xlcs.model.user.Leader;
|
||||
import com.yovinchen.xlcs.model.user.User;
|
||||
import com.yovinchen.xlcs.model.user.UserDelivery;
|
||||
@@ -16,6 +20,10 @@ import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* ClassName: UserServiceImpl
|
||||
* Package: com.yovinchen.xlcs.user.service.impl
|
||||
@@ -31,19 +39,43 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
@Autowired
|
||||
private LeaderMapper leaderMapper;
|
||||
|
||||
//// 判断是否是第一次使用微信授权登录:如何判断?openId
|
||||
/**
|
||||
* 使用正则表达式验证手机号格式
|
||||
*
|
||||
* @param phoneNumber
|
||||
* @return
|
||||
*/
|
||||
public boolean isValidPhoneNumber(String phoneNumber) {
|
||||
// 使用正则表达式验证手机号格式
|
||||
String regex = "^1[3456789]\\d{9}$"; // 手机号的正则表达式
|
||||
Pattern pattern = Pattern.compile(regex);
|
||||
Matcher matcher = pattern.matcher(phoneNumber);
|
||||
return matcher.matches();
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否是第一次使用微信授权登录:如何判断?openId
|
||||
*
|
||||
* @param openid
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public User getUserByOpenId(String openid) {
|
||||
User user = baseMapper.selectOne(new LambdaQueryWrapper<User>().eq(User::getOpenId, openid));
|
||||
return user;
|
||||
}
|
||||
|
||||
//5 根据userId查询提货点和配送员信息
|
||||
/**
|
||||
* 根据userId查询提货点和配送员信息
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public LeaderAddressVo getLeaderAddressByUserId(Long userId) {
|
||||
//根据userId查询用户默认的配送员id
|
||||
UserDelivery userDelivery = userDeliveryMapper.selectOne(new LambdaQueryWrapper<UserDelivery>().eq(UserDelivery::getUserId, userId)
|
||||
.eq(UserDelivery::getIsDefault, 1));
|
||||
.eq(UserDelivery::getIsDefault, 1));
|
||||
if (userDelivery == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -61,7 +93,12 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
return leaderAddressVo;
|
||||
}
|
||||
|
||||
//7 获取当前登录用户信息,
|
||||
/**
|
||||
* 获取当前登录用户信息
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public UserLoginVo getUserLoginVo(Long id) {
|
||||
User user = baseMapper.selectById(id);
|
||||
@@ -73,7 +110,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
userLoginVo.setOpenId(user.getOpenId());
|
||||
|
||||
UserDelivery userDelivery = userDeliveryMapper.selectOne(new LambdaQueryWrapper<UserDelivery>().eq(UserDelivery::getUserId, id)
|
||||
.eq(UserDelivery::getIsDefault, 1));
|
||||
.eq(UserDelivery::getIsDefault, 1));
|
||||
if (userDelivery != null) {
|
||||
userLoginVo.setLeaderId(userDelivery.getLeaderId());
|
||||
userLoginVo.setWareId(userDelivery.getWareId());
|
||||
@@ -84,14 +121,57 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
return userLoginVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新用户信息
|
||||
*
|
||||
* @param user
|
||||
*/
|
||||
@Override
|
||||
public void updateUser(User user) {
|
||||
//获取当前登录用户id
|
||||
User user1 = baseMapper.selectById(AuthContextHolder.getUserId());
|
||||
//把昵称更新为微信用户
|
||||
user1.setNickName(user.getNickName()
|
||||
.replaceAll("[ue000-uefff]", "*"));
|
||||
.replaceAll("[ue000-uefff]", "*"));
|
||||
user1.setPhotoUrl(user.getPhotoUrl());
|
||||
baseMapper.updateById(user1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 手机号注册账号
|
||||
*
|
||||
* @param phone
|
||||
* @param password
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> register(String phone, String password) {
|
||||
|
||||
// 检测手机号格式
|
||||
if (!isValidPhoneNumber(phone)) {
|
||||
throw new xlcsException(ResultCodeEnum.PHONE_FORMAT_ERROR);
|
||||
}
|
||||
|
||||
User user = baseMapper.selectOne(new LambdaQueryWrapper<User>().eq(User::getPhone, phone));
|
||||
|
||||
// 查看用户信息是否存在
|
||||
if (user != null) {
|
||||
throw new xlcsException(ResultCodeEnum.PHONE_REGISTERED_ERROR);
|
||||
}
|
||||
|
||||
//TODO 短信验证
|
||||
|
||||
|
||||
//构建用户信息
|
||||
user = new User();
|
||||
user.setNickName(phone);
|
||||
user.setPhone(phone);
|
||||
user.setPhotoUrl("");
|
||||
user.setPassword(MD5.encrypt(password));
|
||||
user.setUserType(UserType.USER);
|
||||
user.setIsNew(1);
|
||||
baseMapper.insert(user);
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -4,16 +4,19 @@
|
||||
"version": "0.0",
|
||||
"configurations": [
|
||||
{
|
||||
"default": {
|
||||
"launchtype": "local"
|
||||
},
|
||||
"h5": {
|
||||
"launchtype": "local"
|
||||
},
|
||||
"mp-weixin": {
|
||||
"launchtype": "local"
|
||||
},
|
||||
"type": "uniCloud"
|
||||
"app-plus": {
|
||||
"launchtype": "local"
|
||||
},
|
||||
"default": {
|
||||
"launchtype": "local"
|
||||
},
|
||||
"h5": {
|
||||
"launchtype": "local"
|
||||
},
|
||||
"mp-weixin": {
|
||||
"launchtype": "local"
|
||||
},
|
||||
"type": "uniCloud"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -24,9 +24,16 @@ const post_submit_order = '/order/auth/submitOrder' // 生成订单
|
||||
const get_order_info = '/order/auth/getOrderInfoById' // 订单详情
|
||||
const get_wx_login = '/user/weixin/wxLogin' // 微信用户登陆
|
||||
const post_update_user = '/user/weixin/auth/updateUser' // 更新用户信息
|
||||
const get_weixin_payment = '/payment/weixin/createJsapi' // 获取微信支付信息
|
||||
const get_find_user_order = '/order/auth/findUserOrderPage' // 获取用户订单信息
|
||||
const get_weixin_payment = '/payment/weixin/createJsapi' // 获取微信支付信息
|
||||
const get_order_status = '/payment/weixin/queryPayStatus' // 获取订单状态
|
||||
const get_account_login = '/user/h5/login' // 用户登陆
|
||||
const post_register = '/user/h5/register' // 用户注册
|
||||
|
||||
// 后续需求
|
||||
const post_h5_update_user = '/user/h5/auth/updateUser' // 更新用户信息
|
||||
const get_alipay_payment = '/payment/alipay/createJsapi' // 获取支付宝支付信息
|
||||
const get_order_alipay_status = '/payment/alipay/queryPayStatus' // 获取订单状态
|
||||
|
||||
const install = (Vue, vm) => {
|
||||
const limit = 10;
|
||||
@@ -35,7 +42,7 @@ const install = (Vue, vm) => {
|
||||
// 获取首页数据
|
||||
const getHomeIndex = () => vm.$u.get(get_home_index);
|
||||
/*---------------------------------------------------------
|
||||
提货点模块
|
||||
提货点模块
|
||||
---------------------------------------------------------*/
|
||||
// 根据经纬度获取地址信息
|
||||
const getBaiduMapAddress = (o) => vm.$u.get(get_baidu_map_address + `${o.latitude},${o.longitude}`)
|
||||
@@ -53,7 +60,7 @@ const install = (Vue, vm) => {
|
||||
showLoading: false
|
||||
})
|
||||
/*---------------------------------------------------------
|
||||
商品模块
|
||||
商品模块
|
||||
---------------------------------------------------------*/
|
||||
// 获取分类
|
||||
const getCategories = () => vm.$u.get(get_categories, {
|
||||
@@ -68,14 +75,14 @@ const install = (Vue, vm) => {
|
||||
// 商品详情
|
||||
const getHomeItem = (o) => vm.$u.get(get_home_item + `/${o.skuId}`);
|
||||
/*---------------------------------------------------------
|
||||
秒杀模块
|
||||
秒杀模块
|
||||
---------------------------------------------------------*/
|
||||
// 从缓存中查询时间段列表
|
||||
const getFindAllSeckillTimeList = () => vm.$u.get(get_find_all_sec_kill_time_list);
|
||||
// 从缓存中读取秒杀sku
|
||||
const getFindSeckillSkuList = (o) => vm.$u.get(get_find_sec_kill_sku_list + `/${o.timeName}`);
|
||||
/*---------------------------------------------------------
|
||||
购物车模块
|
||||
购物车模块
|
||||
---------------------------------------------------------*/
|
||||
// 加入购物车
|
||||
const getAddToCart = (o) => vm.$u.get(get_add_to_cart + `/${o.skuId}/${o.skuNum}`, {
|
||||
@@ -111,17 +118,23 @@ const install = (Vue, vm) => {
|
||||
const getOrderInfo = (o) => vm.$u.get(get_order_info + `/${o.orderId}`)
|
||||
// 获取微信支付信息
|
||||
const getWxPayment = (o) => vm.$u.get(get_weixin_payment + `/${o.orderNo}`)
|
||||
// 获取支付宝支付信息
|
||||
const getAliPayment = (o) => vm.$u.get(get_alipay_payment + `/${o.orderNo}`)
|
||||
|
||||
// 获取订单状态信息
|
||||
const getOrderStatus = (o) => vm.$u.get(get_order_status + `/${o.orderNo}`)
|
||||
|
||||
/*---------------------------------------------------------
|
||||
用户登陆
|
||||
用户登陆
|
||||
---------------------------------------------------------*/
|
||||
// 微信用户登陆
|
||||
const getWxLogin = (o) => vm.$u.get(get_wx_login + `/${o.code}`, {
|
||||
showLoading: false
|
||||
})
|
||||
// 账号密码登登录
|
||||
const getAccountLogin = (o) => vm.$u.post(get_account_login, o)
|
||||
// 用户注册
|
||||
const postRegister = (o) => vm.$u.post(post_register, o)
|
||||
// 更新用户信息
|
||||
const postUpdateUser = (o) => vm.$u.post(post_update_user, {
|
||||
...o,
|
||||
@@ -155,7 +168,10 @@ const install = (Vue, vm) => {
|
||||
postSubmitOrder,
|
||||
getOrderInfo,
|
||||
getWxPayment,
|
||||
getAliPayment,
|
||||
getWxLogin,
|
||||
getAccountLogin,
|
||||
postRegister,
|
||||
postUpdateUser,
|
||||
getFindUserOrder,
|
||||
getOrderStatus
|
||||
|
@@ -1,6 +1,8 @@
|
||||
const install = (Vue, vm) => {
|
||||
Vue.prototype.$u.http.setConfig({
|
||||
baseUrl: 'http://127.0.0.1:8200/api',
|
||||
baseUrl: 'http://192.168.31.67:8200/api',
|
||||
// baseUrl: 'http://127.0.0.1:8206/api',
|
||||
// baseUrl: 'http://152.136.42.114:8200/api',
|
||||
loadingText: '请求中...', // 请求loading中的文字提示
|
||||
loadingTime: 800, // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
|
||||
loadingMask: true, // 展示loading的时候,是否给一个透明的蒙层,防止触摸穿透
|
||||
@@ -19,7 +21,7 @@ const install = (Vue, vm) => {
|
||||
} else if (res.code == 208) {
|
||||
// 未登陆,token过期
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
url: '/pages/loginh5/loginh5'
|
||||
})
|
||||
return false;
|
||||
} else {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name" : "xlcs-user",
|
||||
"name": "小鹿超市",
|
||||
"appid" : "__UNI__719160A",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
@@ -17,7 +17,9 @@
|
||||
"delay" : 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules" : {},
|
||||
"modules": {
|
||||
"Payment": {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
@@ -41,9 +43,57 @@
|
||||
]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {},
|
||||
"ios": {
|
||||
"dSYMs": false
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {}
|
||||
"sdkConfigs": {
|
||||
"ad": {},
|
||||
"oauth": {},
|
||||
"payment": {
|
||||
"alipay": {
|
||||
"__platform__": [
|
||||
"ios",
|
||||
"android"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"icons": {
|
||||
"android": {
|
||||
"hdpi": "unpackage/res/icons/72x72.png",
|
||||
"xhdpi": "unpackage/res/icons/96x96.png",
|
||||
"xxhdpi": "unpackage/res/icons/144x144.png",
|
||||
"xxxhdpi": "unpackage/res/icons/192x192.png"
|
||||
},
|
||||
"ios": {
|
||||
"appstore": "unpackage/res/icons/1024x1024.png",
|
||||
"ipad": {
|
||||
"app": "unpackage/res/icons/76x76.png",
|
||||
"app@2x": "unpackage/res/icons/152x152.png",
|
||||
"notification": "unpackage/res/icons/20x20.png",
|
||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||
"proapp@2x": "unpackage/res/icons/167x167.png",
|
||||
"settings": "unpackage/res/icons/29x29.png",
|
||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||
"spotlight": "unpackage/res/icons/40x40.png",
|
||||
"spotlight@2x": "unpackage/res/icons/80x80.png"
|
||||
},
|
||||
"iphone": {
|
||||
"app@2x": "unpackage/res/icons/120x120.png",
|
||||
"app@3x": "unpackage/res/icons/180x180.png",
|
||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||
"notification@3x": "unpackage/res/icons/60x60.png",
|
||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||
"settings@3x": "unpackage/res/icons/87x87.png",
|
||||
"spotlight@2x": "unpackage/res/icons/80x80.png",
|
||||
"spotlight@3x": "unpackage/res/icons/120x120.png"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"uniStatistics": {
|
||||
"enable": true
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
@@ -62,6 +112,9 @@
|
||||
"scope.userLocation" : {
|
||||
"desc" : "获取地理位置"
|
||||
}
|
||||
},
|
||||
"uniStatistics": {
|
||||
"enable": true
|
||||
}
|
||||
},
|
||||
"mp-alipay" : {
|
||||
@@ -74,7 +127,8 @@
|
||||
"usingComponents" : true
|
||||
},
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
"enable": false,
|
||||
"version": "2"
|
||||
},
|
||||
"vueVersion" : "2"
|
||||
}
|
||||
|
@@ -56,6 +56,20 @@
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/loginh5/loginh5",
|
||||
"style": {
|
||||
"navigationBarTitleText": "登录页",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/register/register",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
@@ -97,25 +111,24 @@
|
||||
]
|
||||
},
|
||||
"subPackages": [
|
||||
{
|
||||
"root": "pagesLocation",
|
||||
"pages": [
|
||||
{
|
||||
"path": "myPickUpLocation/myPickUpLocation",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的提货点",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "choosePickUpLocation/choosePickUpLocation",
|
||||
"style": {
|
||||
"navigationBarTitleText": "选择其它提货点",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// "root": "pagesLocation",
|
||||
// "pages": [{
|
||||
// "path": "myPickUpLocation/myPickUpLocation",
|
||||
// "style": {
|
||||
// "navigationBarTitleText": "我的提货点",
|
||||
// "enablePullDownRefresh": false
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// "path": "choosePickUpLocation/choosePickUpLocation",
|
||||
// "style": {
|
||||
// "navigationBarTitleText": "选择其它提货点",
|
||||
// "enablePullDownRefresh": false
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
"root": "pagesOrder",
|
||||
"pages": [
|
||||
|
@@ -14,36 +14,22 @@
|
||||
<view v-for="(cartInfoListItem, index) in getCartInfoList" :key="index">
|
||||
<u-card :border="false" :padding="10" :show-head="showMultiCheckbox(index)">
|
||||
<view slot="head" class="u-m-10">
|
||||
<u-checkbox
|
||||
:name="getMultiCheckedIds(index)"
|
||||
:value="getMultiCheckCart(index)"
|
||||
active-color="red"
|
||||
shape="circle"
|
||||
@change="changeMultiChecked"
|
||||
></u-checkbox>
|
||||
<u-checkbox :name="getMultiCheckedIds(index)" :value="getMultiCheckCart(index)"
|
||||
active-color="red" shape="circle" @change="changeMultiChecked"></u-checkbox>
|
||||
<text>{{ cartInfoListItem.activityRule.ruleDesc }}</text>
|
||||
</view>
|
||||
<view slot="body">
|
||||
<view v-for="(cartInfoItem, idx) in cartInfoListItem.cartInfoList" :key="idx">
|
||||
<!-- 动态class绑定是为了确保最后一条底部线条不显示 -->
|
||||
<view :class="{ 'u-border-bottom': idx !== cartInfoListItem.cartInfoList.length - 1 }"
|
||||
class="u-body-item u-flex u-col-between u-p-10">
|
||||
<u-checkbox
|
||||
v-model="cartInfoItem.isChecked"
|
||||
:name="cartInfoItem.skuId"
|
||||
active-color="red"
|
||||
shape="circle"
|
||||
@change="changeChecked"
|
||||
></u-checkbox>
|
||||
<ListImgItem
|
||||
:lazyLoad="false"
|
||||
:showBottom="cartInfoItem.skuType === 0 && cartInfoItem.isNewPerson === 1"
|
||||
:showLeft="cartInfoItem.skuType === 1"
|
||||
:showRight="false"
|
||||
:src="cartInfoItem.imgUrl"
|
||||
height="200rpx"
|
||||
width="200rpx"
|
||||
></ListImgItem>
|
||||
<view
|
||||
:class="{ 'u-border-bottom': idx !== cartInfoListItem.cartInfoList.length - 1 }"
|
||||
class="u-body-item u-flex u-col-between u-p-10">
|
||||
<u-checkbox v-model="cartInfoItem.isChecked" :name="cartInfoItem.skuId"
|
||||
active-color="red" shape="circle" @change="changeChecked"></u-checkbox>
|
||||
<ListImgItem :lazyLoad="false"
|
||||
:showBottom="cartInfoItem.skuType === 0 && cartInfoItem.isNewPerson === 1"
|
||||
:showLeft="cartInfoItem.skuType === 1" :showRight="false"
|
||||
:src="cartInfoItem.imgUrl" height="200rpx" width="200rpx"></ListImgItem>
|
||||
<view class="u-p-b-20 u-m-l-20" style="flex:1">
|
||||
<view class="u-font-lg">{{ cartInfoItem.skuName }}</view>
|
||||
<view class="u-flex u-row-between">
|
||||
@@ -51,7 +37,8 @@
|
||||
<text>¥</text>
|
||||
<text>{{ cartInfoItem.cartPrice }}</text>
|
||||
</view>
|
||||
<AddToCart :shopDetail="cartInfoItem" :skuId="cartInfoItem.skuId"></AddToCart>
|
||||
<AddToCart :shopDetail="cartInfoItem" :skuId="cartInfoItem.skuId">
|
||||
</AddToCart>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -79,7 +66,9 @@
|
||||
<view class="u-font-xs u-type-info">
|
||||
优惠券优惠:¥{{ getCartPriceInfo.couponReduceAmount }}
|
||||
<text class="u-font-xs u-m-l-20 u-type-info">原价:</text>
|
||||
<text class="u-font-xs u-type-info">¥{{ getCartPriceInfo.originalTotalAmount }}</text>
|
||||
<text
|
||||
class="u-font-xs u-type-info">¥{{ getCartPriceInfo.originalTotalAmount }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -95,8 +84,8 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<CouponInfoList :couponInfoList="getCartCouponInfoList"
|
||||
:showCouponInfoList.sync="showCouponInfoList"></CouponInfoList>
|
||||
<CouponInfoList :couponInfoList="getCartCouponInfoList" :showCouponInfoList.sync="showCouponInfoList">
|
||||
</CouponInfoList>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -122,7 +111,9 @@ export default {
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
...mapActions('cartModule', ['getActivityCartListAction', 'changeCheckCartAction', 'changeMultiCheckedCartAction', 'changeAllCheckCartAction']),
|
||||
...mapActions('cartModule', ['getActivityCartListAction', 'changeCheckCartAction',
|
||||
'changeMultiCheckedCartAction', 'changeAllCheckCartAction'
|
||||
]),
|
||||
...mapActions('cartModule', ['getCartListAction']),
|
||||
// 到分类页购买商品
|
||||
gotoCategory() {
|
||||
@@ -133,20 +124,31 @@ export default {
|
||||
// 修改单个商品选中状态
|
||||
changeChecked(detail) {
|
||||
let isChecked = 1;
|
||||
const {name: skuId, value} = detail;
|
||||
const {
|
||||
name: skuId,
|
||||
value
|
||||
} = detail;
|
||||
if (!value) isChecked = 0;
|
||||
this.changeCheckCartAction({skuId, isChecked});
|
||||
this.changeCheckCartAction({
|
||||
skuId,
|
||||
isChecked
|
||||
});
|
||||
},
|
||||
// 修改多个商品的选中状态
|
||||
changeMultiChecked(detail) {
|
||||
let skuIdList = [];
|
||||
skuIdList = detail.name.split(',');
|
||||
const isChecked = detail.value === true ? 1 : 0;
|
||||
this.changeMultiCheckedCartAction({skuIdList, isChecked});
|
||||
this.changeMultiCheckedCartAction({
|
||||
skuIdList,
|
||||
isChecked
|
||||
});
|
||||
},
|
||||
// 全部选中/返选
|
||||
changeAllSelected(detail) {
|
||||
this.changeAllCheckCartAction({isChecked: detail.value === true ? 1 : 0});
|
||||
this.changeAllCheckCartAction({
|
||||
isChecked: detail.value === true ? 1 : 0
|
||||
});
|
||||
},
|
||||
// 跳转至确认订单
|
||||
gotoConfirmOrder() {
|
||||
@@ -156,7 +158,9 @@ export default {
|
||||
// 思考:为什么需要将请求放置于onShow钩子函数中,
|
||||
// 主要考虑tabs切换后需要进行实时数据的获取
|
||||
onShow() {
|
||||
this.getActivityCartListAction({showLoading: true});
|
||||
this.getActivityCartListAction({
|
||||
showLoading: true
|
||||
});
|
||||
},
|
||||
mounted() {
|
||||
// 需要获取购物车数据列表,将最新获取的数据渲染到页面
|
||||
|
@@ -1,16 +1,16 @@
|
||||
<template>
|
||||
<view v-if="token" class="gg">
|
||||
<!-- 利用background-image设置导航的线形渐变色彩 -->
|
||||
<u-navbar :background="{ 'background-image': 'linear-gradient(to right, rgb(255,180,61), rgb(255, 101, 0))' }" :border-bottom="false"
|
||||
:is-back="false">
|
||||
<view class="gg-map-slot-wrap u-font-xs u-m-l-20 u-p-l-10 u-p-r-10 u-p-t-5 u-p-b-5" @click="pickUpLocation">
|
||||
<u-icon name="map" size="24"></u-icon>
|
||||
<text class="u-p-l-10 u-p-r-10">{{
|
||||
leaderAddressVo.takeName ? leaderAddressVo.takeName : '请设置提货点'
|
||||
}}
|
||||
</text>
|
||||
<u-icon name="arrow-right" size="20"></u-icon>
|
||||
</view>
|
||||
<u-navbar :background="{ 'background-image': 'linear-gradient(to right, rgb(255,180,61), rgb(255, 101, 0))' }"
|
||||
:border-bottom="false" :is-back="false">
|
||||
<!-- <view class="gg-map-slot-wrap u-font-xs u-m-l-20 u-p-l-10 u-p-r-10 u-p-t-5 u-p-b-5" @click="pickUpLocation">
|
||||
<u-icon name="map" size="24"></u-icon>
|
||||
<text class="u-p-l-10 u-p-r-10">{{
|
||||
leaderAddressVo.takeName ? leaderAddressVo.takeName : '请设置提货点'
|
||||
}}
|
||||
</text>
|
||||
<u-icon name="arrow-right" size="20"></u-icon>
|
||||
</view> -->
|
||||
</u-navbar>
|
||||
|
||||
<!-- 主内容区域-Begin -->
|
||||
@@ -25,18 +25,11 @@
|
||||
-->
|
||||
<view class="gg-notice-search-bar">
|
||||
<u-icon class="gg-notice-search-bar-left-icon" name="search"></u-icon>
|
||||
<u-notice-bar
|
||||
:border-radius="30"
|
||||
:is-circular="false"
|
||||
:list="list"
|
||||
:more-icon="false"
|
||||
:volume-icon="false"
|
||||
class="gg-notice-search-bar-u-notice-bar"
|
||||
mode="vertical"
|
||||
type="none"
|
||||
></u-notice-bar>
|
||||
<u-button :custom-style="ggNoticeSearchBarRightBtnCustomStyle" class="u-m-r-20" shape="square" size="mini"
|
||||
type="error">搜索
|
||||
<u-notice-bar :border-radius="30" :is-circular="false" :list="list" :more-icon="false"
|
||||
:volume-icon="false" class="gg-notice-search-bar-u-notice-bar" mode="vertical"
|
||||
type="none"></u-notice-bar>
|
||||
<u-button :custom-style="ggNoticeSearchBarRightBtnCustomStyle" class="u-m-r-20" shape="square"
|
||||
size="mini" type="error">搜索
|
||||
</u-button>
|
||||
</view>
|
||||
|
||||
@@ -45,16 +38,11 @@
|
||||
<view class="u-font-lg u-content-color">新人专享低价好物</view>
|
||||
<scroll-view class="gg-new-vip-sv" enable-flex scroll-x>
|
||||
<view class="u-flex u-m-t-10">
|
||||
<view v-for="(item, index) in newPersonSkuInfoList" :key="item.id" class="gg-new-vip-sv-item u-p-r-20"
|
||||
@click="gotoProductItem(item.id)">
|
||||
<ListImgItem
|
||||
:showBottom="item.skuType === 0 && item.isNewPerson === 1"
|
||||
:showLeft="item.skuType === 1"
|
||||
:showRight="false"
|
||||
:src="item.imgUrl"
|
||||
height="200rpx"
|
||||
width="200rpx"
|
||||
></ListImgItem>
|
||||
<view v-for="(item, index) in newPersonSkuInfoList" :key="item.id"
|
||||
class="gg-new-vip-sv-item u-p-r-20" @click="gotoProductItem(item.id)">
|
||||
<ListImgItem :showBottom="item.skuType === 0 && item.isNewPerson === 1"
|
||||
:showLeft="item.skuType === 1" :showRight="false" :src="item.imgUrl" height="200rpx"
|
||||
width="200rpx"></ListImgItem>
|
||||
<text class="u-type-error">¥ {{ item.price }}</text>
|
||||
<AddToCart :shopDetail="item" :skuId="item.id"></AddToCart>
|
||||
</view>
|
||||
@@ -67,7 +55,7 @@
|
||||
|
||||
<!-- 小鹿超市规则 -->
|
||||
<view class="u-flex u-row-between u-p-20 u-m-20 gg-border" @click="showRulePopup = true">
|
||||
<u-image height="30rpx" src="/static/logo.png" width="30rpx"></u-image>
|
||||
<!-- <u-image height="30rpx" src="/static/logo-back.png" width="30rpx"></u-image> -->
|
||||
<view>平台资质、法律条款、规则及投诉入口</view>
|
||||
</view>
|
||||
|
||||
@@ -107,10 +95,11 @@
|
||||
<scroll-view enable-flex scroll-x>
|
||||
<view class="u-flex u-p-r-20 u-p-t-20">
|
||||
<!-- 循环滚动内容 -->
|
||||
<view v-for="item in seckillSkuVoList" :key="item.skuId" class="u-p-l-20 u-p-r-20 u-text-center"
|
||||
@click="gotoProductItem(item.skuId)">
|
||||
<view v-for="item in seckillSkuVoList" :key="item.skuId"
|
||||
class="u-p-l-20 u-p-r-20 u-text-center" @click="gotoProductItem(item.skuId)">
|
||||
<text class="u-font-sm u-m-b-5">{{ item.timeName }}</text>
|
||||
<u-image :src="item.imgUrl" border-radius="30rpx" height="200rpx" width="200rpx"></u-image>
|
||||
<u-image :src="item.imgUrl" border-radius="30rpx" height="200rpx"
|
||||
width="200rpx"></u-image>
|
||||
<text class="u-font-sm u-m-t-5">{{ item.skuName }}</text>
|
||||
<AddToCart :shopDetail="item" :skuId="item.skuId"></AddToCart>
|
||||
</view>
|
||||
@@ -119,42 +108,21 @@
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!-- 如何购买商品 -->
|
||||
<view class="u-p-20 u-m-20 gg-border u-font-xs">
|
||||
<view class="u-m-b-20">如何在[小鹿超市]购买商品</view>
|
||||
<view class="u-flex">
|
||||
<view class="gg-number u-m-r-10">1</view>
|
||||
挑商品
|
||||
<u-icon name="arrow-right-double u-m-l-10 u-tips-color"></u-icon>
|
||||
<u-icon class="u-content-color" name="arrow-right-double"></u-icon>
|
||||
<view class="gg-number gg-number-gray u-m-r-10 u-m-l-10">2</view>
|
||||
选提货点
|
||||
<u-icon name="arrow-right-double u-m-l-10 u-tips-color"></u-icon>
|
||||
<u-icon class="u-content-color" name="arrow-right-double"></u-icon>
|
||||
<view class="gg-number gg-number-gray u-m-r-10 u-m-l-10">3</view>
|
||||
次日16点提货点取货
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 热销好货 -->
|
||||
<view class="u-font-xl u-type-error u-m-20">热销好货</view>
|
||||
<view v-for="(item, index) in hotSkuList" :key="item.id" class="u-p-20 u-m-20 gg-border"
|
||||
@click="gotoProductItem(item.id)">
|
||||
<view class="u-m-b-10 u-m-l-20 u-m-r-20 u-flex gg-product-item">
|
||||
<ListImgItem
|
||||
:showBottom="item.skuType === 0 && item.isNewPerson === 1"
|
||||
:showLeft="item.skuType === 1"
|
||||
:showRight="false"
|
||||
:src="item.imgUrl"
|
||||
height="250rpx"
|
||||
width="250rpx"
|
||||
></ListImgItem>
|
||||
<ListImgItem :showBottom="item.skuType === 0 && item.isNewPerson === 1"
|
||||
:showLeft="item.skuType === 1" :showRight="false" :src="item.imgUrl" height="250rpx"
|
||||
width="250rpx"></ListImgItem>
|
||||
<view class="gg-product-item-msg u-border-bottom u-p-b-20 u-m-l-20">
|
||||
<view class="gg-product-item-msg-title">
|
||||
<view class="u-font-lg">{{ item.title }}</view>
|
||||
<view class="u-type-info u-font-sm">已售{{ item.sale }}/剩余{{ item.stock }}</view>
|
||||
<block v-if="item.ruleList">
|
||||
<view v-for="(rule, ruleIndex) in item.ruleList" :key="ruleIndex" class="u-font-xs u-type-error-dark">
|
||||
<view v-for="(rule, ruleIndex) in item.ruleList" :key="ruleIndex"
|
||||
class="u-font-xs u-type-error-dark">
|
||||
{{ rule }}
|
||||
</view>
|
||||
</block>
|
||||
@@ -198,9 +166,9 @@
|
||||
<view class="u-m-20">
|
||||
<view class="u-font-xl u-m-b-10">
|
||||
<u-icon class="u-m-r-10" color="#dd6161" name="bag" size="28"></u-icon>
|
||||
次日自提
|
||||
极速上门
|
||||
</view>
|
||||
<view class="u-light-color u-font-xs">每日23点前下单,次日16点可到下单门店自提</view>
|
||||
<view class="u-light-color u-font-xs">每日23点前下单,半小时送上门</view>
|
||||
</view>
|
||||
|
||||
<view class="u-m-20">
|
||||
@@ -220,7 +188,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState, mapGetters, mapActions} from 'vuex';
|
||||
import {mapActions, mapGetters, mapState} from 'vuex';
|
||||
|
||||
let watchTimes = 0;
|
||||
export default {
|
||||
@@ -246,7 +214,9 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapState('indexModule', ['home']),
|
||||
...mapGetters('indexModule', ['categoryList', 'hotSkuList', 'newPersonSkuInfoList', 'seckillTime', 'seckillSkuVoList', 'leaderAddressVo'])
|
||||
...mapGetters('indexModule', ['categoryList', 'hotSkuList', 'newPersonSkuInfoList', 'seckillTime',
|
||||
'seckillSkuVoList', 'leaderAddressVo'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
...mapActions('indexModule', ['getHomeIndexAction']),
|
||||
@@ -262,12 +232,14 @@ export default {
|
||||
}, 100);
|
||||
},
|
||||
// 跳转至设置提货点
|
||||
pickUpLocation() {
|
||||
this.$u.route('/pagesLocation/myPickUpLocation/myPickUpLocation');
|
||||
},
|
||||
// pickUpLocation() {
|
||||
// this.$u.route('/pagesLocation/myPickUpLocation/myPickUpLocation');
|
||||
// },
|
||||
// 跳转至商品详情页
|
||||
gotoProductItem(skuId) {
|
||||
this.$u.route('/pages/homeItem/homeItem', {skuId});
|
||||
this.$u.route('/pages/homeItem/homeItem', {
|
||||
skuId
|
||||
});
|
||||
},
|
||||
// 跳转至秒杀页
|
||||
gotoSeckill() {
|
||||
@@ -312,16 +284,16 @@ export default {
|
||||
2.等mounted请求结束,数据设置完毕以后再进行数据变化的监控
|
||||
3.不需要进行监控次数的判断
|
||||
------------------------------------------------------------ */
|
||||
'leaderAddressVo.userId': {
|
||||
handler(newVal) {
|
||||
if (!newVal) {
|
||||
uni.redirectTo({
|
||||
url: '/pagesLocation/myPickUpLocation/myPickUpLocation'
|
||||
});
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
// 'leaderAddressVo.userId': {
|
||||
// handler(newVal) {
|
||||
// if (!newVal) {
|
||||
// uni.redirectTo({
|
||||
// url: '/pagesLocation/myPickUpLocation/myPickUpLocation'
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
// deep: true
|
||||
// }
|
||||
},
|
||||
onShow() {
|
||||
/*
|
||||
@@ -337,7 +309,7 @@ export default {
|
||||
const token = await uni.getStorageSync('token');
|
||||
if (this.$u.test.isEmpty(token)) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
url: '/pages/loginh5/loginh5'
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -353,6 +325,7 @@ export default {
|
||||
利用scss中&-的方式实现层级样式的拼接
|
||||
*/
|
||||
.gg {
|
||||
|
||||
/* navbar 导航中进行地图位置的获取设置 */
|
||||
&-map-slot-wrap {
|
||||
display: flex;
|
||||
@@ -368,9 +341,9 @@ export default {
|
||||
}
|
||||
|
||||
/*
|
||||
notice-bar头部滚动信息搜索区域
|
||||
利用background-image的linear-gradient保持与导航一致的线形渐变色彩
|
||||
*/
|
||||
notice-bar头部滚动信息搜索区域
|
||||
利用background-image的linear-gradient保持与导航一致的线形渐变色彩
|
||||
*/
|
||||
&-header {
|
||||
background-image: linear-gradient(to right, rgb(255, 180, 61), rgb(255, 101, 0));
|
||||
height: 500rpx;
|
||||
@@ -393,6 +366,7 @@ export default {
|
||||
/* 滚动信息搜索框中的字体设置 */
|
||||
&-u-notice-bar {
|
||||
flex: 1;
|
||||
|
||||
/* 深层穿透修改子组件字体颜色样式 */
|
||||
::v-deep .u-news-item {
|
||||
color: $u-light-color !important;
|
||||
@@ -427,7 +401,8 @@ export default {
|
||||
&-border {
|
||||
border-radius: 20rpx;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
box-shadow: 0px 1px 20px 0px rgba(0, 0, 0, 0.1); /*下边阴影 */
|
||||
box-shadow: 0px 1px 20px 0px rgba(0, 0, 0, 0.1);
|
||||
/*下边阴影 */
|
||||
}
|
||||
|
||||
/* 商品分类 */
|
||||
|
@@ -20,6 +20,12 @@
|
||||
<text class="link">小鹿超市用户协议、隐私政策,</text>
|
||||
并授权使用您的小鹿超市账号信息(如昵称、头像、收获地址)以便您统一管理
|
||||
</view>
|
||||
<view class="buttons">
|
||||
<button class="otherBtn" @click="goToRegister">注册</button>
|
||||
<!-- 添加空白间距 -->
|
||||
<div style="width: 20px; display: inline-block;"></div>
|
||||
<button class="otherBtn" @click="goToLogin">账号密码登录</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -45,13 +51,19 @@ export default {
|
||||
const photoUrl = res.userInfo.avatarUrl;
|
||||
const nickName = res.userInfo.nickName;
|
||||
const sex = res.userInfo.gender;
|
||||
uni.setStorageSync('userInfo', {photoUrl, nickName, sex});
|
||||
uni.setStorageSync('userInfo', {
|
||||
photoUrl,
|
||||
nickName,
|
||||
sex
|
||||
});
|
||||
// 进行微信登陆操作(具体查看小程序登陆wx.login流程图)
|
||||
// https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/login.html
|
||||
uni.login({
|
||||
success: async res => {
|
||||
// 利用小程序登陆,配合code码进行用户登陆操作,并返回用户的token值
|
||||
const result = await this.$u.api.getWxLogin({code: res.code});
|
||||
const result = await this.$u.api.getWxLogin({
|
||||
code: res.code
|
||||
});
|
||||
console.log(result, result.token, "<<<")
|
||||
// 将token值进行本地缓存存储
|
||||
uni.setStorage({
|
||||
@@ -81,12 +93,36 @@ export default {
|
||||
this.isLogin = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
goToRegister() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/register/register',
|
||||
});
|
||||
},
|
||||
goToLogin() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/loginh5/loginh5',
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.otherBtn {
|
||||
width: 240rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
text-align: center;
|
||||
background-color: #ccc;
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
border: none;
|
||||
border-radius: 10rpx;
|
||||
cursor: pointer;
|
||||
background-color: #1aad19; // 更改微信登录按钮的背景颜色
|
||||
}
|
||||
|
||||
.wrap {
|
||||
font-size: 28rpx;
|
||||
|
||||
|
166
xlcs-user/pages/loginh5/loginh5.vue
Normal file
166
xlcs-user/pages/loginh5/loginh5.vue
Normal file
@@ -0,0 +1,166 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<view class="content">
|
||||
<view class="title">欢迎登录小鹿超市</view>
|
||||
</view>
|
||||
<view class="buttom">
|
||||
<view class="loginType">
|
||||
<view class="accountLogin item">
|
||||
<input v-model="username" class="input" placeholder="请输入账号" type="text"/>
|
||||
<input v-model="password" class="input" placeholder="请输入密码" type="password"/>
|
||||
<button :disabled="isLogin" class="loginBtn" @click="loginWithAccount">
|
||||
账号密码登录
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="hint">
|
||||
登录代表同意
|
||||
<text class="link">小鹿超市用户协议、隐私政策,</text>
|
||||
并授权使用您的小鹿超市账号信息(如昵称、头像、收获地址)以便您统一管理
|
||||
</view>
|
||||
<view class="buttons">
|
||||
<button class="otherBtn" @click="goToRegister">注册</button>
|
||||
<!-- 添加空白间距 -->
|
||||
<div style="width: 20px; display: inline-block;"></div>
|
||||
<button class="otherBtn" @click="goToWechatLogin">微信登录</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isLogin: false,
|
||||
username: '',
|
||||
password: ''
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async loginWithAccount() {
|
||||
this.isLogin = true;
|
||||
// 做账号密码登录逻辑,替换以下代码为实际的登录操作
|
||||
try {
|
||||
// 假设这里进行了账号密码登录,并获取到了 token
|
||||
const result = await this.$u.api.getAccountLogin({
|
||||
phone: this.username,
|
||||
password: this.password
|
||||
});
|
||||
console.log(result, result.token, "<<<")
|
||||
// 将token值进行本地缓存存储
|
||||
uni.setStorage({
|
||||
key: 'token',
|
||||
data: result.token,
|
||||
success: async () => {
|
||||
// 更新用户信息
|
||||
// await this.$u.api.postUpdateUser({
|
||||
// sex,
|
||||
// photoUrl,
|
||||
// nickName
|
||||
// });
|
||||
// 路由跳转至首页
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
});
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('登录失败:', error);
|
||||
} finally {
|
||||
this.isLogin = false;
|
||||
}
|
||||
},
|
||||
goToRegister() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/register/register',
|
||||
});
|
||||
},
|
||||
goToWechatLogin() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login',
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 样式略有修改以适应账号密码登录的布局
|
||||
.wrap {
|
||||
font-size: 28rpx;
|
||||
|
||||
.content {
|
||||
width: 600rpx;
|
||||
margin: 80rpx auto 0;
|
||||
|
||||
.title {
|
||||
text-align: left;
|
||||
font-size: 60rpx;
|
||||
font-weight: 500;
|
||||
margin-bottom: 100rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.otherBtn {
|
||||
width: 240rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
text-align: center;
|
||||
background-color: #ccc;
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
border: none;
|
||||
border-radius: 10rpx;
|
||||
cursor: pointer;
|
||||
background-color: #1aad19; // 更改微信登录按钮的背景颜色
|
||||
}
|
||||
|
||||
.buttom {
|
||||
.loginType {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 20rpx;
|
||||
|
||||
.accountLogin {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.input {
|
||||
width: 400rpx;
|
||||
height: 80rpx;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 0 20rpx;
|
||||
font-size: 28rpx;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.loginBtn {
|
||||
width: 400rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
background-color: rgb(83, 194, 64);
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
border: none;
|
||||
border-radius: 10rpx;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hint {
|
||||
padding: 20rpx 40rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
|
||||
.link {
|
||||
color: rgb(83, 194, 64);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="gg">
|
||||
<u-navbar :background="{ 'background-image': 'linear-gradient(to right, rgb(255,180,61), rgb(255, 101, 0))' }" :border-bottom="false"
|
||||
:is-back="false"></u-navbar>
|
||||
<u-navbar :background="{ 'background-image': 'linear-gradient(to right, rgb(255,180,61), rgb(255, 101, 0))' }"
|
||||
:border-bottom="false" :is-back="false"></u-navbar>
|
||||
<view class="gg-content">
|
||||
<view class="gg-header u-p-l-20 u-p-r-20">
|
||||
<view class="u-flex u-m-l-20">
|
||||
@@ -108,9 +108,9 @@
|
||||
</view>
|
||||
</u-col>
|
||||
<u-col span="3">
|
||||
<view class="gg-order-item" @click="gotoMyPickUpLocation">
|
||||
<view class="gg-order-item" @click="logout">
|
||||
<view class="iconfont icon-dianpu"></view>
|
||||
<view class="u-font-xs">提货点管理</view>
|
||||
<view class="u-font-xs">退出登录</view>
|
||||
</view>
|
||||
</u-col>
|
||||
<u-col span="3">
|
||||
@@ -175,7 +175,7 @@
|
||||
// 将svg图形转成base64,然后再设置成js变量的形式引入使用
|
||||
// 需要注意将变量设置到data中
|
||||
// 强调:为什么不用iconfont呢?和上面的iconfont一样。因为彩色图标变黑了,色彩没起作用。
|
||||
import {fruit, recommend, invite, discount} from '@/common/svgIcon.js';
|
||||
import {discount, fruit, invite, recommend} from '@/common/svgIcon.js';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -185,11 +185,10 @@ export default {
|
||||
recommend,
|
||||
invite,
|
||||
discount,
|
||||
list: [
|
||||
{
|
||||
image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
||||
title: '昨夜星辰昨夜风,画楼西畔桂堂东'
|
||||
},
|
||||
list: [{
|
||||
image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
|
||||
title: '昨夜星辰昨夜风,画楼西畔桂堂东'
|
||||
},
|
||||
{
|
||||
image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
|
||||
title: '身无彩凤双飞翼,心有灵犀一点通'
|
||||
@@ -205,9 +204,10 @@ export default {
|
||||
gotoOrderList(index) {
|
||||
this.$u.route('/pagesOrder/orderList/orderList?current=' + index);
|
||||
},
|
||||
gotoMyPickUpLocation() {
|
||||
logout() {
|
||||
uni.removeStorageSync('token');
|
||||
uni.navigateTo({
|
||||
url: '/pagesLocation/myPickUpLocation/myPickUpLocation'
|
||||
url: '/pages/loginh5/loginh5'
|
||||
});
|
||||
}
|
||||
},
|
||||
|
151
xlcs-user/pages/register/register.vue
Normal file
151
xlcs-user/pages/register/register.vue
Normal file
@@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<view class="content">
|
||||
<view class="title">欢迎注册小鹿超市</view>
|
||||
</view>
|
||||
<view class="buttom">
|
||||
<view class="loginType">
|
||||
<view class="accountLogin item">
|
||||
<input v-model="username" class="input" placeholder="请输入手机号" type="text"/>
|
||||
<input v-model="password" class="input" placeholder="请输入密码" type="password"/>
|
||||
<button :disabled="isLogin" class="loginBtn" @click="register">
|
||||
注册
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="hint">
|
||||
注册代表同意
|
||||
<text class="link">小鹿超市用户协议、隐私政策,</text>
|
||||
并授权使用您的小鹿超市账号信息(如昵称、头像、收获地址)以便您统一管理
|
||||
</view>
|
||||
<view class="buttons">
|
||||
<button class="otherBtn" @click="goToLogin">账号密码登录</button>
|
||||
<!-- 添加空白间距 -->
|
||||
<div style="width: 20px; display: inline-block;"></div>
|
||||
<button class="otherBtn" @click="goToWechatLogin">微信登录</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isLogin: false,
|
||||
username: '',
|
||||
password: ''
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async register() {
|
||||
this.isLogin = true;
|
||||
try {
|
||||
const result = await this.$u.api.postRegister({
|
||||
phone: this.username,
|
||||
password: this.password
|
||||
});
|
||||
console.log('注册成功:', result);
|
||||
// 路由跳转至登录
|
||||
uni.reLaunch({
|
||||
url: '/pages/loginh5/loginh5',
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('登录失败:', error);
|
||||
} finally {
|
||||
this.isLogin = false;
|
||||
}
|
||||
},
|
||||
goToLogin() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/loginh5/loginh5',
|
||||
});
|
||||
},
|
||||
goToWechatLogin() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login',
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 样式略有修改以适应账号密码登录的布局
|
||||
.wrap {
|
||||
font-size: 28rpx;
|
||||
|
||||
.content {
|
||||
width: 600rpx;
|
||||
margin: 80rpx auto 0;
|
||||
|
||||
.title {
|
||||
text-align: left;
|
||||
font-size: 60rpx;
|
||||
font-weight: 500;
|
||||
margin-bottom: 100rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.otherBtn {
|
||||
width: 240rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
text-align: center;
|
||||
background-color: #ccc;
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
border: none;
|
||||
border-radius: 10rpx;
|
||||
cursor: pointer;
|
||||
background-color: #1aad19; // 更改微信登录按钮的背景颜色
|
||||
}
|
||||
|
||||
.buttom {
|
||||
.loginType {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 20rpx;
|
||||
|
||||
.accountLogin {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.input {
|
||||
width: 400rpx;
|
||||
height: 80rpx;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 0 20rpx;
|
||||
font-size: 28rpx;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.loginBtn {
|
||||
width: 400rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
background-color: rgb(83, 194, 64);
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
border: none;
|
||||
border-radius: 10rpx;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hint {
|
||||
padding: 20rpx 40rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
|
||||
.link {
|
||||
color: rgb(83, 194, 64);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@@ -9,15 +9,15 @@
|
||||
<view class="gg-content">
|
||||
<scroll-view v-if="getCartInfoList" class="gg-cart-sv-container" scroll-y="true">
|
||||
<!-- 提货点 -->
|
||||
<u-card :padding="10" :show-head="false">
|
||||
<view slot="body" class="u-m-10">提货点:{{ getLeaderAddressVo.takeName }}</view>
|
||||
</u-card>
|
||||
<!-- <u-card :padding="10" :show-head="false">
|
||||
<view slot="body" class="u-m-10">提货点:{{ getLeaderAddressVo.takeName }}</view>
|
||||
</u-card> -->
|
||||
|
||||
<u-card :padding="10" :show-head="true">
|
||||
<view slot="head" class="u-m-10">提货人联系方式</view>
|
||||
<view slot="head" class="u-m-10">联系方式</view>
|
||||
<view slot="body" class="u-m-10">
|
||||
<u-input v-model="sumbitOrderForm.receiverName" class="u-p-b-20" placeholder="请输入提货人姓名"/>
|
||||
<u-input v-model="sumbitOrderForm.receiverPhone" placeholder="请输入提货人电话" type="number"/>
|
||||
<u-input v-model="sumbitOrderForm.receiverName" class="u-p-b-20" placeholder="请输入姓名"/>
|
||||
<u-input v-model="sumbitOrderForm.receiverPhone" placeholder="请输入电话" type="number"/>
|
||||
</view>
|
||||
</u-card>
|
||||
|
||||
@@ -32,15 +32,10 @@
|
||||
<!-- 动态class绑定是为了确保最后一条底部线条不显示 -->
|
||||
<view :class="{ 'u-border-bottom': idx !== cartInfoListItem.cartInfoList.length - 1 }"
|
||||
class="u-body-item u-flex u-col-between u-p-10">
|
||||
<ListImgItem
|
||||
:lazyLoad="false"
|
||||
:showBottom="cartInfoItem.skuType === 0 && cartInfoItem.isNewPerson === 1"
|
||||
:showLeft="cartInfoItem.skuType === 1"
|
||||
:showRight="false"
|
||||
:src="cartInfoItem.imgUrl"
|
||||
height="200rpx"
|
||||
width="200rpx"
|
||||
></ListImgItem>
|
||||
<ListImgItem :lazyLoad="false"
|
||||
:showBottom="cartInfoItem.skuType === 0 && cartInfoItem.isNewPerson === 1"
|
||||
:showLeft="cartInfoItem.skuType === 1" :showRight="false"
|
||||
:src="cartInfoItem.imgUrl" height="200rpx" width="200rpx"></ListImgItem>
|
||||
<view class="u-p-b-20 u-m-l-20" style="flex:1">
|
||||
<view>{{ cartInfoItem.skuName }}</view>
|
||||
<view>购买数量:{{ cartInfoItem.skuNum }}</view>
|
||||
@@ -61,25 +56,25 @@
|
||||
<u-card v-if="getCartCouponInfoList.length > 0" :padding="10" :show-head="false">
|
||||
<view slot="body">
|
||||
<view class="coupon">
|
||||
<view
|
||||
v-for="couponInfoItem in getCartCouponInfoList"
|
||||
:key="couponInfoItem.id"
|
||||
:class="{ selected: couponInfoItem.selected }"
|
||||
class="content u-m-b-20"
|
||||
@click="switchCouponInfoItem(couponInfoItem)"
|
||||
>
|
||||
<view v-for="couponInfoItem in getCartCouponInfoList" :key="couponInfoItem.id"
|
||||
:class="{ selected: couponInfoItem.selected }" class="content u-m-b-20"
|
||||
@click="switchCouponInfoItem(couponInfoItem)">
|
||||
<view class="left">
|
||||
<view class="sum">
|
||||
¥
|
||||
<text class="num">{{ couponInfoItem.amount }}</text>
|
||||
</view>
|
||||
<view class="type">{{ couponInfoItem.couponType === 'FULL_REDUCTION' ? '满减券' : '现金券' }}</view>
|
||||
<view class="type">
|
||||
{{ couponInfoItem.couponType === 'FULL_REDUCTION' ? '满减券' : '现金券' }}
|
||||
</view>
|
||||
<view class="type">{{ getRangeType(couponInfoItem.rangeType) }}</view>
|
||||
</view>
|
||||
<view class="centre">
|
||||
<view class="title">{{ couponInfoItem.couponName }}</view>
|
||||
<view class="u-type-info">{{ couponInfoItem.rangeDesc }}</view>
|
||||
<view class="valid-date">过期时间:{{ dayjs(couponInfoItem.expireTime).format('YYYY-MM-DD') }}</view>
|
||||
<view class="valid-date">
|
||||
过期时间:{{ dayjs(couponInfoItem.expireTime).format('YYYY-MM-DD') }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<block v-if="couponInfoItem.isSelect === 1">
|
||||
@@ -111,7 +106,9 @@
|
||||
<view class="u-font-xs u-type-info">
|
||||
优惠券优惠:¥{{ getCartPriceInfo.couponReduceAmount }}
|
||||
<text class="u-font-xs u-m-l-20 u-type-info">原价:</text>
|
||||
<text class="u-font-xs u-type-info">¥{{ getCartPriceInfo.originalTotalAmount }}</text>
|
||||
<text
|
||||
class="u-font-xs u-type-info">¥{{ getCartPriceInfo.originalTotalAmount }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -126,7 +123,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState, mapGetters, mapActions} from 'vuex';
|
||||
import {mapActions, mapGetters, mapState} from 'vuex';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
export default {
|
||||
@@ -144,7 +141,9 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapState('orderModule', ['order']),
|
||||
...mapGetters('orderModule', ['getCartInfoList', 'getSelectedCount', 'getCartPriceInfo', 'getLeaderAddressVo', 'showMultiCheckbox', 'getCartCouponInfoList']),
|
||||
...mapGetters('orderModule', ['getCartInfoList', 'getSelectedCount', 'getCartPriceInfo', 'getLeaderAddressVo',
|
||||
'showMultiCheckbox', 'getCartCouponInfoList'
|
||||
]),
|
||||
getRangeType() {
|
||||
return function (rangeType) {
|
||||
switch (rangeType) {
|
||||
|
@@ -9,11 +9,11 @@
|
||||
<scroll-view class="gg-cart-sv-container" scroll-y="true">
|
||||
<!-- 提货点 -->
|
||||
<u-card :padding="10" :show-head="true">
|
||||
<view slot="head" class="u-m-10">提货人联系方式</view>
|
||||
<view slot="head" class="u-m-10">联系方式</view>
|
||||
<view slot="body" class="u-m-10">
|
||||
<view class="u-p-20">收货人员:{{ order.receiverName }}</view>
|
||||
<view class="u-p-20">姓名:{{ order.receiverName }}</view>
|
||||
<view class="u-p-20">联系方式:{{ order.receiverPhone }}</view>
|
||||
<view class="u-p-20">提货地点:{{ order.receiverAddress }}</view>
|
||||
<view class="u-p-20">地点:{{ order.receiverAddress }}</view>
|
||||
</view>
|
||||
</u-card>
|
||||
|
||||
@@ -28,8 +28,11 @@
|
||||
<view class="u-font-xl">{{ orderItem.skuName }}</view>
|
||||
<view>单价:¥{{ orderItem.skuPrice }}</view>
|
||||
<view>数量:{{ orderItem.skuNum }}</view>
|
||||
<view v-if="orderItem.splitActivityAmount > 0">活动金额:¥{{ orderItem.splitActivityAmount }}</view>
|
||||
<view v-if="orderItem.splitCouponAmount > 0">优惠券额:¥{{ orderItem.splitCouponAmount }}</view>
|
||||
<view v-if="orderItem.splitActivityAmount > 0">
|
||||
活动金额:¥{{ orderItem.splitActivityAmount }}
|
||||
</view>
|
||||
<view v-if="orderItem.splitCouponAmount > 0">优惠券额:¥{{ orderItem.splitCouponAmount }}
|
||||
</view>
|
||||
<view>
|
||||
小计:
|
||||
<text class="u-type-error">¥{{ orderItem.splitTotalAmount }}</text>
|
||||
@@ -69,7 +72,8 @@
|
||||
|
||||
<view class="gg-navigation">
|
||||
<view class="navigation">
|
||||
<view class="buy btn u-line-1" @click="payOrder">支付订单</view>
|
||||
<view class="buy btn u-line-1" @click="payWxOrder">微信支付订单</view>
|
||||
<view class="buy btn u-line-1" @click="payAliOrder">支付宝支付订单</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -91,7 +95,9 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async getOrderInfoById(orderId) {
|
||||
const result = await this.$u.api.getOrderInfo({orderId});
|
||||
const result = await this.$u.api.getOrderInfo({
|
||||
orderId
|
||||
});
|
||||
this.order = result;
|
||||
},
|
||||
copyOrderNo() {
|
||||
@@ -106,8 +112,10 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
async payOrder() {
|
||||
const result = await this.$u.api.getWxPayment({orderNo: this.order.orderNo});
|
||||
async payWxOrder() {
|
||||
const result = await this.$u.api.getWxPayment({
|
||||
orderNo: this.order.orderNo
|
||||
});
|
||||
wx.requestPayment({
|
||||
timeStamp: result.timeStamp,
|
||||
nonceStr: result.nonceStr,
|
||||
@@ -115,7 +123,9 @@ export default {
|
||||
signType: 'MD5',
|
||||
paySign: result.paySign,
|
||||
success: res => {
|
||||
this.$u.api.getOrderStatus({orderNo: this.order.orderNo});
|
||||
this.$u.api.getOrderStatus({
|
||||
orderNo: this.order.orderNo
|
||||
});
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
icon: 'none'
|
||||
@@ -131,7 +141,46 @@ export default {
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
async payAliOrder() {
|
||||
try {
|
||||
const result = await this.$u.api.getAliPayment({
|
||||
orderNo: this.order.orderNo
|
||||
});
|
||||
|
||||
my.tradePay({
|
||||
tradeNO: result.tradeNO,
|
||||
success: res => {
|
||||
if (res.resultCode === '9000') {
|
||||
this.$u.api.getOrderStatus({
|
||||
orderNo: this.order.orderNo
|
||||
});
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
icon: 'none'
|
||||
});
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
});
|
||||
} else {
|
||||
throw new Error('支付失败');
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: err.errorMessage || '支付失败'
|
||||
});
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: error.message || '支付失败'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.getOrderInfoById(this.orderId);
|
||||
|
@@ -36,7 +36,9 @@
|
||||
</view>
|
||||
<view class="total">
|
||||
<text class="total-price">
|
||||
<text class="decimal">现价:¥{{ res.totalAmount }} 原价:¥{{ res.originalTotalAmount }}</text>
|
||||
<text class="decimal">现价:¥{{ res.totalAmount }}
|
||||
原价:¥{{ res.originalTotalAmount }}
|
||||
</text>
|
||||
</text>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
@@ -45,6 +47,7 @@
|
||||
</view>
|
||||
<view class="logistics btn">查看物流</view>
|
||||
<view class="exchange btn">卖了换钱</view>
|
||||
<button class="evaluate btn" @click="getOrderInfo(res.id)">订单详情</button>
|
||||
<view class="evaluate btn">评价</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -63,14 +66,19 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
// 订单列表
|
||||
orderList: [[], [], [], [], []],
|
||||
orderList: [
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[]
|
||||
],
|
||||
// 订单类型、状态与数量
|
||||
list: [
|
||||
{
|
||||
name: '待付款',
|
||||
orderStatus: 'UNPAID',
|
||||
count: 0
|
||||
},
|
||||
list: [{
|
||||
name: '待付款',
|
||||
orderStatus: 'UNPAID',
|
||||
count: 0
|
||||
},
|
||||
{
|
||||
name: '待发货',
|
||||
orderStatus: 'WAITING_DELEVER',
|
||||
@@ -159,6 +167,9 @@ export default {
|
||||
this.loadStatus.splice(idx, 1, 'nomore');
|
||||
}
|
||||
},
|
||||
async getOrderInfo(id) {
|
||||
this.$u.route(`/pagesOrder/getOrderInfo/getOrderInfo?orderId=${id}`);
|
||||
},
|
||||
// tab栏切换
|
||||
change(index) {
|
||||
this.swiperCurrent = index;
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 50 KiB |
Reference in New Issue
Block a user