Initial commit
This commit is contained in:
commit
599356c6d4
38
.gitignore
vendored
Normal file
38
.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
|
11
.idea/$PROJECT_FILE$
Normal file
11
.idea/$PROJECT_FILE$
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?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="SuppressionsComponent">
|
||||||
|
<option name="suppComments" value="[]" />
|
||||||
|
</component>
|
||||||
|
</project>
|
10
.idea/.gitignore
vendored
Normal file
10
.idea/.gitignore
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# 默认忽略的文件
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# 基于编辑器的 HTTP 客户端请求
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
||||||
|
# Zeppelin 忽略的文件
|
||||||
|
/ZeppelinRemoteNotebooks/
|
17
.idea/encodings.xml
Normal file
17
.idea/encodings.xml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Encoding">
|
||||||
|
<file url="file://$PROJECT_DIR$/common/common-util/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/common/common-util/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/common/service-util/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/common/service-util/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/common/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/common/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/model/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/model/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/service-oa/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/service-oa/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||||
|
</component>
|
||||||
|
</project>
|
9
.idea/inspectionProfiles/Project_Default.xml
Normal file
9
.idea/inspectionProfiles/Project_Default.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="JavadocDeclaration" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ADDITIONAL_TAGS" value="Create,date" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="RawUseOfParameterizedType" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
</profile>
|
||||||
|
</component>
|
204
.idea/intellij-javadocs-4.0.1.xml
Normal file
204
.idea/intellij-javadocs-4.0.1.xml
Normal file
@ -0,0 +1,204 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="JavaDocConfiguration">
|
||||||
|
<GENERAL>
|
||||||
|
<MODE>UPDATE</MODE>
|
||||||
|
<OVERRIDDEN_METHODS>false</OVERRIDDEN_METHODS>
|
||||||
|
<SPLITTED_CLASS_NAME>true</SPLITTED_CLASS_NAME>
|
||||||
|
<LEVELS>
|
||||||
|
<LEVEL>FIELD</LEVEL>
|
||||||
|
<LEVEL>TYPE</LEVEL>
|
||||||
|
<LEVEL>METHOD</LEVEL>
|
||||||
|
</LEVELS>
|
||||||
|
<VISIBILITIES>
|
||||||
|
<VISIBILITY>PROTECTED</VISIBILITY>
|
||||||
|
<VISIBILITY>PUBLIC</VISIBILITY>
|
||||||
|
<VISIBILITY>DEFAULT</VISIBILITY>
|
||||||
|
</VISIBILITIES>
|
||||||
|
</GENERAL>
|
||||||
|
<TEMPLATES>
|
||||||
|
<CLASSES>
|
||||||
|
<CLASS>
|
||||||
|
<KEY>^.*(public|protected|private)*.+interface\s+\w+.*</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
* The interface ${name}.\n
|
||||||
|
<#if element.typeParameters?has_content> * \n
|
||||||
|
</#if>
|
||||||
|
<#list element.typeParameters as typeParameter>
|
||||||
|
* @param <${typeParameter.name}> the type parameter\n
|
||||||
|
</#list>
|
||||||
|
*/</VALUE>
|
||||||
|
</CLASS>
|
||||||
|
<CLASS>
|
||||||
|
<KEY>^.*(public|protected|private)*.+enum\s+\w+.*</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
* The enum ${name}.\n
|
||||||
|
*/</VALUE>
|
||||||
|
</CLASS>
|
||||||
|
<CLASS>
|
||||||
|
<KEY>^.*(public|protected|private)*.+class\s+\w+.*</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
* The type ${name}.\n
|
||||||
|
<#if element.typeParameters?has_content> * \n
|
||||||
|
</#if>
|
||||||
|
<#list element.typeParameters as typeParameter>
|
||||||
|
* @param <${typeParameter.name}> the type parameter\n
|
||||||
|
</#list>
|
||||||
|
*/</VALUE>
|
||||||
|
</CLASS>
|
||||||
|
<CLASS>
|
||||||
|
<KEY>.+</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
* The type ${name}.\n
|
||||||
|
*/</VALUE>
|
||||||
|
</CLASS>
|
||||||
|
</CLASSES>
|
||||||
|
<CONSTRUCTORS>
|
||||||
|
<CONSTRUCTOR>
|
||||||
|
<KEY>.+</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
* Instantiates a new ${name}.\n
|
||||||
|
<#if element.parameterList.parameters?has_content>
|
||||||
|
*\n
|
||||||
|
</#if>
|
||||||
|
<#list element.parameterList.parameters as parameter>
|
||||||
|
* @param ${parameter.name} the ${paramNames[parameter.name]}\n
|
||||||
|
</#list>
|
||||||
|
<#if element.throwsList.referenceElements?has_content>
|
||||||
|
*\n
|
||||||
|
</#if>
|
||||||
|
<#list element.throwsList.referenceElements as exception>
|
||||||
|
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
|
||||||
|
</#list>
|
||||||
|
*/</VALUE>
|
||||||
|
</CONSTRUCTOR>
|
||||||
|
</CONSTRUCTORS>
|
||||||
|
<METHODS>
|
||||||
|
<METHOD>
|
||||||
|
<KEY>^.*(public|protected|private)*\s*.*(\w(\s*<.+>)*)+\s+get\w+\s*\(.*\).+</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
* Gets ${partName}.\n
|
||||||
|
<#if element.typeParameters?has_content> * \n
|
||||||
|
</#if>
|
||||||
|
<#list element.typeParameters as typeParameter>
|
||||||
|
* @param <${typeParameter.name}> the type parameter\n
|
||||||
|
</#list>
|
||||||
|
<#if element.parameterList.parameters?has_content>
|
||||||
|
*\n
|
||||||
|
</#if>
|
||||||
|
<#list element.parameterList.parameters as parameter>
|
||||||
|
* @param ${parameter.name} the ${paramNames[parameter.name]}\n
|
||||||
|
</#list>
|
||||||
|
<#if isNotVoid>
|
||||||
|
*\n
|
||||||
|
* @return the ${partName}\n
|
||||||
|
</#if>
|
||||||
|
<#if element.throwsList.referenceElements?has_content>
|
||||||
|
*\n
|
||||||
|
</#if>
|
||||||
|
<#list element.throwsList.referenceElements as exception>
|
||||||
|
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
|
||||||
|
</#list>
|
||||||
|
*/</VALUE>
|
||||||
|
</METHOD>
|
||||||
|
<METHOD>
|
||||||
|
<KEY>^.*(public|protected|private)*\s*.*(void|\w(\s*<.+>)*)+\s+set\w+\s*\(.*\).+</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
* Sets ${partName}.\n
|
||||||
|
<#if element.typeParameters?has_content> * \n
|
||||||
|
</#if>
|
||||||
|
<#list element.typeParameters as typeParameter>
|
||||||
|
* @param <${typeParameter.name}> the type parameter\n
|
||||||
|
</#list>
|
||||||
|
<#if element.parameterList.parameters?has_content>
|
||||||
|
*\n
|
||||||
|
</#if>
|
||||||
|
<#list element.parameterList.parameters as parameter>
|
||||||
|
* @param ${parameter.name} the ${paramNames[parameter.name]}\n
|
||||||
|
</#list>
|
||||||
|
<#if isNotVoid>
|
||||||
|
*\n
|
||||||
|
* @return the ${partName}\n
|
||||||
|
</#if>
|
||||||
|
<#if element.throwsList.referenceElements?has_content>
|
||||||
|
*\n
|
||||||
|
</#if>
|
||||||
|
<#list element.throwsList.referenceElements as exception>
|
||||||
|
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
|
||||||
|
</#list>
|
||||||
|
*/</VALUE>
|
||||||
|
</METHOD>
|
||||||
|
<METHOD>
|
||||||
|
<KEY>^.*((public\s+static)|(static\s+public))\s+void\s+main\s*\(\s*String\s*(\[\s*\]|\.\.\.)\s+\w+\s*\).+</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
* The entry point of application.\n
|
||||||
|
|
||||||
|
<#if element.parameterList.parameters?has_content>
|
||||||
|
*\n
|
||||||
|
</#if>
|
||||||
|
* @param ${element.parameterList.parameters[0].name} the input arguments\n
|
||||||
|
<#if element.throwsList.referenceElements?has_content>
|
||||||
|
*\n
|
||||||
|
</#if>
|
||||||
|
<#list element.throwsList.referenceElements as exception>
|
||||||
|
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
|
||||||
|
</#list>
|
||||||
|
*/</VALUE>
|
||||||
|
</METHOD>
|
||||||
|
<METHOD>
|
||||||
|
<KEY>.+</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
* ${name}<#if isNotVoid> ${return}</#if>.\n
|
||||||
|
<#if element.typeParameters?has_content> * \n
|
||||||
|
</#if>
|
||||||
|
<#list element.typeParameters as typeParameter>
|
||||||
|
* @param <${typeParameter.name}> the type parameter\n
|
||||||
|
</#list>
|
||||||
|
<#if element.parameterList.parameters?has_content>
|
||||||
|
*\n
|
||||||
|
</#if>
|
||||||
|
<#list element.parameterList.parameters as parameter>
|
||||||
|
* @param ${parameter.name} the ${paramNames[parameter.name]}\n
|
||||||
|
</#list>
|
||||||
|
<#if isNotVoid>
|
||||||
|
*\n
|
||||||
|
* @return the ${return}\n
|
||||||
|
</#if>
|
||||||
|
<#if element.throwsList.referenceElements?has_content>
|
||||||
|
*\n
|
||||||
|
</#if>
|
||||||
|
<#list element.throwsList.referenceElements as exception>
|
||||||
|
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
|
||||||
|
</#list>
|
||||||
|
*/</VALUE>
|
||||||
|
</METHOD>
|
||||||
|
</METHODS>
|
||||||
|
<FIELDS>
|
||||||
|
<FIELD>
|
||||||
|
<KEY>^.*(public|protected|private)*.+static.*(\w\s\w)+.+</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
* The constant ${element.getName()}.\n
|
||||||
|
*/</VALUE>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD>
|
||||||
|
<KEY>^.*(public|protected|private)*.*(\w\s\w)+.+</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
<#if element.parent.isInterface()>
|
||||||
|
* The constant ${element.getName()}.\n
|
||||||
|
<#else>
|
||||||
|
* The ${name}.\n
|
||||||
|
</#if> */</VALUE>
|
||||||
|
</FIELD>
|
||||||
|
<FIELD>
|
||||||
|
<KEY>.+</KEY>
|
||||||
|
<VALUE>/**\n
|
||||||
|
<#if element.parent.isEnum()>
|
||||||
|
*${name} ${typeName}.\n
|
||||||
|
<#else>
|
||||||
|
* The ${name}.\n
|
||||||
|
</#if>*/</VALUE>
|
||||||
|
</FIELD>
|
||||||
|
</FIELDS>
|
||||||
|
</TEMPLATES>
|
||||||
|
</component>
|
||||||
|
</project>
|
6
.idea/jpa-buddy.xml
Normal file
6
.idea/jpa-buddy.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="JpaBuddyIdeaProjectConfig">
|
||||||
|
<option name="renamerInitialized" value="true" />
|
||||||
|
</component>
|
||||||
|
</project>
|
26
.idea/misc.xml
Normal file
26
.idea/misc.xml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
|
<component name="FindBugsConfigurable">
|
||||||
|
<option name="make" value="true" />
|
||||||
|
<option name="effort" value="default" />
|
||||||
|
<option name="priority" value="Medium" />
|
||||||
|
<option name="excludeFilter" value="" />
|
||||||
|
</component>
|
||||||
|
<component name="MavenProjectsManager">
|
||||||
|
<option name="originalFiles">
|
||||||
|
<list>
|
||||||
|
<option value="$PROJECT_DIR$/pom.xml" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="corretto-1.8" project-jdk-type="JavaSDK">
|
||||||
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectType">
|
||||||
|
<option name="id" value="jpab" />
|
||||||
|
</component>
|
||||||
|
<component name="SuppressionsComponent">
|
||||||
|
<option name="suppComments" value="[]" />
|
||||||
|
</component>
|
||||||
|
</project>
|
465
.idea/qaplug_profiles.xml
Normal file
465
.idea/qaplug_profiles.xml
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>
|
124
.idea/uiDesigner.xml
Normal file
124
.idea/uiDesigner.xml
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>
|
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
38
common/.gitignore
vendored
Normal file
38
common/.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
|
38
common/common-util/.gitignore
vendored
Normal file
38
common/common-util/.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
|
31
common/common-util/pom.xml
Normal file
31
common/common-util/pom.xml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.atguigu</groupId>
|
||||||
|
<artifactId>common</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
<artifactId>common-util</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
<scope>provided </scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.jsonwebtoken</groupId>
|
||||||
|
<artifactId>jjwt</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>fastjson</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
@ -0,0 +1,92 @@
|
|||||||
|
package com.atguigu.common.result;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClassName: Result
|
||||||
|
* Package: com.atguigu.common.result
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @Create 2023/6/6 17:30
|
||||||
|
* <p>
|
||||||
|
* 全局统一返回结果类
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class Result<T> {
|
||||||
|
|
||||||
|
//返回码
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
//返回消息
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
//返回数据
|
||||||
|
private T data;
|
||||||
|
|
||||||
|
public Result() {
|
||||||
|
}
|
||||||
|
|
||||||
|
// 返回数据
|
||||||
|
protected static <T> Result<T> build(T data) {
|
||||||
|
Result<T> result = new Result<T>();
|
||||||
|
if (data != null)
|
||||||
|
result.setData(data);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> Result<T> build(T body, Integer code, String message) {
|
||||||
|
Result<T> result = build(body);
|
||||||
|
result.setCode(code);
|
||||||
|
result.setMessage(message);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> Result<T> build(T body, ResultCodeEnum resultCodeEnum) {
|
||||||
|
Result<T> result = build(body);
|
||||||
|
result.setCode(resultCodeEnum.getCode());
|
||||||
|
result.setMessage(resultCodeEnum.getMessage());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> Result<T> ok() {
|
||||||
|
return Result.ok(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作成功
|
||||||
|
*
|
||||||
|
* @param data
|
||||||
|
* @param <T>
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static <T> Result<T> ok(T data) {
|
||||||
|
Result<T> result = build(data);
|
||||||
|
return build(data, ResultCodeEnum.SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> Result<T> fail() {
|
||||||
|
return Result.fail(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作失败
|
||||||
|
*
|
||||||
|
* @param data
|
||||||
|
* @param <T>
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static <T> Result<T> fail(T data) {
|
||||||
|
Result<T> result = build(data);
|
||||||
|
return build(data, ResultCodeEnum.FAIL);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Result<T> message(String msg) {
|
||||||
|
this.setMessage(msg);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Result<T> code(Integer code) {
|
||||||
|
this.setCode(code);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.atguigu.common.result;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClassName: result
|
||||||
|
* Package: com.atguigu.common
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @Create 2023/6/6 17:28
|
||||||
|
* <p>
|
||||||
|
* 统一返回结果状态信息类
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum ResultCodeEnum {
|
||||||
|
|
||||||
|
SUCCESS(200, "成功"),
|
||||||
|
FAIL(201, "失败"),
|
||||||
|
SERVICE_ERROR(2012, "服务异常"),
|
||||||
|
DATA_ERROR(204, "数据异常"),
|
||||||
|
|
||||||
|
LOGIN_AUTH(208, "未登陆"),
|
||||||
|
PERMISSION(209, "没有权限");
|
||||||
|
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
private ResultCodeEnum(Integer code, String message) {
|
||||||
|
this.code = code;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
}
|
17
common/pom.xml
Normal file
17
common/pom.xml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.atguigu</groupId>
|
||||||
|
<artifactId>guigu-oa-parent</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>common</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>common-util</module>
|
||||||
|
<module>service-util</module>
|
||||||
|
</modules>
|
||||||
|
</project>
|
38
common/service-util/.gitignore
vendored
Normal file
38
common/service-util/.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
|
38
common/service-util/pom.xml
Normal file
38
common/service-util/pom.xml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.atguigu</groupId>
|
||||||
|
<artifactId>common</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
<artifactId>service-util</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.atguigu</groupId>
|
||||||
|
<artifactId>common-util</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!--mysql-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!--knife4j-整合Swagger-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.xiaoymin</groupId>
|
||||||
|
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
</project>
|
@ -0,0 +1,70 @@
|
|||||||
|
package com.atguigu.common.config.knife4j;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import springfox.documentation.builders.ApiInfoBuilder;
|
||||||
|
import springfox.documentation.builders.ParameterBuilder;
|
||||||
|
import springfox.documentation.builders.PathSelectors;
|
||||||
|
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||||
|
import springfox.documentation.schema.ModelRef;
|
||||||
|
import springfox.documentation.service.ApiInfo;
|
||||||
|
import springfox.documentation.service.Contact;
|
||||||
|
import springfox.documentation.service.Parameter;
|
||||||
|
import springfox.documentation.spi.DocumentationType;
|
||||||
|
import springfox.documentation.spring.web.plugins.Docket;
|
||||||
|
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClassName: config
|
||||||
|
* Package: com.atguigu.common.config.knife4j
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @Create 2023/6/6 17:45
|
||||||
|
* <p>
|
||||||
|
* knife4j配置信息
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
@EnableSwagger2WebMvc
|
||||||
|
public class Knife4jConfig {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public Docket adminApiConfig() {
|
||||||
|
List<Parameter> pars = new ArrayList<>();
|
||||||
|
ParameterBuilder tokenPar = new ParameterBuilder();
|
||||||
|
tokenPar.name("token")
|
||||||
|
.description("用户token")
|
||||||
|
.defaultValue("")
|
||||||
|
.modelRef(new ModelRef("string"))
|
||||||
|
.parameterType("header")
|
||||||
|
.required(false)
|
||||||
|
.build();
|
||||||
|
pars.add(tokenPar.build());
|
||||||
|
//添加head参数end
|
||||||
|
|
||||||
|
Docket adminApi = new Docket(DocumentationType.SWAGGER_2)
|
||||||
|
.groupName("adminApi")
|
||||||
|
.apiInfo(adminApiInfo())
|
||||||
|
.select()
|
||||||
|
//只显示admin路径下的页面
|
||||||
|
.apis(RequestHandlerSelectors.basePackage("com.atguigu"))
|
||||||
|
.paths(PathSelectors.regex("/admin/.*"))
|
||||||
|
.build()
|
||||||
|
.globalOperationParameters(pars);
|
||||||
|
return adminApi;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ApiInfo adminApiInfo() {
|
||||||
|
|
||||||
|
return new ApiInfoBuilder()
|
||||||
|
.title("后台管理系统-API文档")
|
||||||
|
.description("本文档描述了后台管理系统微服务接口定义")
|
||||||
|
.version("1.0")
|
||||||
|
.contact(new Contact("atguigu", "http://atguigu.com", "atguigu@qq.com"))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
package com.atguigu.common.config.mp;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.DbType;
|
||||||
|
import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||||
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClassName: MybatisPlusConfig
|
||||||
|
* Package: com.atguigu.common.config.mp
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @Create 2023/6/6 17:58
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@MapperScan("com.atguigu.auth.mapper")
|
||||||
|
public class MybatisPlusConfig {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新的分页插件,一缓和二缓遵循mybatis的规则,需要设置
|
||||||
|
* MybatisConfiguration#useDeprecatedExecutor = false
|
||||||
|
* 避免缓存出现问题(该属性会在旧插件移除后一同移除)
|
||||||
|
*/
|
||||||
|
@Bean
|
||||||
|
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
||||||
|
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
||||||
|
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
|
||||||
|
return interceptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public ConfigurationCustomizer configurationCustomizer() {
|
||||||
|
return configuration -> configuration.setUseDeprecatedExecutor(false);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
package com.atguigu.common.execption;
|
||||||
|
|
||||||
|
import com.atguigu.common.result.Result;
|
||||||
|
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||||
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClassName: GlobalExceptionHandler
|
||||||
|
* Package: com.atguigu.common.handler
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @Create 2023/6/6 20:41
|
||||||
|
* <p>
|
||||||
|
* 全局异常处理类
|
||||||
|
*/
|
||||||
|
@ControllerAdvice
|
||||||
|
public class GlobalExceptionHandler {
|
||||||
|
|
||||||
|
@ExceptionHandler(Exception.class)
|
||||||
|
@ResponseBody
|
||||||
|
public Result error(Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return Result.fail();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ExceptionHandler(ArithmeticException.class)
|
||||||
|
@ResponseBody
|
||||||
|
public Result error(ArithmeticException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return Result.fail().message("执行了特定异常处理");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ExceptionHandler(GuiguException.class)
|
||||||
|
@ResponseBody
|
||||||
|
public Result error(GuiguException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return Result.fail().message(e.getMsg()).code(e.getCode());
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
package com.atguigu.common.execption;
|
||||||
|
|
||||||
|
import com.atguigu.common.result.ResultCodeEnum;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClassName: GuiguException
|
||||||
|
* Package: com.atguigu.common.execption
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @Create 2023/6/7 10:13
|
||||||
|
* <p>
|
||||||
|
* 自定义全局异常类
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class GuiguException extends RuntimeException {
|
||||||
|
|
||||||
|
private Integer code;//状态码
|
||||||
|
private String msg;//描述信息
|
||||||
|
|
||||||
|
public GuiguException(Integer code, String msg) {
|
||||||
|
super(msg);
|
||||||
|
this.code = code;
|
||||||
|
this.msg = msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接收枚举类型对象
|
||||||
|
*
|
||||||
|
* @param resultCodeEnum
|
||||||
|
*/
|
||||||
|
public GuiguException(ResultCodeEnum resultCodeEnum) {
|
||||||
|
super(resultCodeEnum.getMessage());
|
||||||
|
this.code = resultCodeEnum.getCode();
|
||||||
|
this.msg = resultCodeEnum.getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "GuliException{" +
|
||||||
|
"code=" + code +
|
||||||
|
", message=" + this.getMessage() +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
38
model/.gitignore
vendored
Normal file
38
model/.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
|
28
model/pom.xml
Normal file
28
model/pom.xml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.atguigu</groupId>
|
||||||
|
<artifactId>guigu-oa-parent</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
<artifactId>model</artifactId>
|
||||||
|
<dependencies>
|
||||||
|
<!--lombok用来简化实体类-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.xiaoymin</groupId>
|
||||||
|
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||||
|
<scope>provided </scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||||
|
<scope>provided </scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
32
model/src/main/java/com/atguigu/model/base/BaseEntity.java
Normal file
32
model/src/main/java/com/atguigu/model/base/BaseEntity.java
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
package com.atguigu.model.base;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BaseEntity implements Serializable {
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@TableField("create_time")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@TableField("update_time")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
@TableLogic
|
||||||
|
@TableField("is_deleted")
|
||||||
|
private Integer isDeleted;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Map<String,Object> param = new HashMap<>();
|
||||||
|
}
|
56
model/src/main/java/com/atguigu/model/process/Process.java
Normal file
56
model/src/main/java/com/atguigu/model/process/Process.java
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
package com.atguigu.model.process;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "Process")
|
||||||
|
@TableName("oa_process")
|
||||||
|
public class Process extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批code")
|
||||||
|
@TableField("process_code")
|
||||||
|
private String processCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户id")
|
||||||
|
@TableField("user_id")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批模板id")
|
||||||
|
@TableField("process_template_id")
|
||||||
|
private Long processTemplateId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批类型id")
|
||||||
|
@TableField("process_type_id")
|
||||||
|
private Long processTypeId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "标题")
|
||||||
|
@TableField("title")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "描述")
|
||||||
|
@TableField("description")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "表单值")
|
||||||
|
@TableField("form_values")
|
||||||
|
private String formValues;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "流程实例id")
|
||||||
|
@TableField("process_instance_id")
|
||||||
|
private String processInstanceId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "当前审批人")
|
||||||
|
@TableField("current_auditor")
|
||||||
|
private String currentAuditor;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态(0:默认 1:审批中 2:审批通过 -1:驳回)")
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
package com.atguigu.model.process;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "ProcessRecord")
|
||||||
|
@TableName("oa_process_record")
|
||||||
|
public class ProcessRecord extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批流程id")
|
||||||
|
@TableField("process_id")
|
||||||
|
private Long processId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批描述")
|
||||||
|
@TableField("description")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态")
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "操作用户id")
|
||||||
|
@TableField("operate_user_id")
|
||||||
|
private Long operateUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "操作用户")
|
||||||
|
@TableField("operate_user")
|
||||||
|
private String operateUser;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
package com.atguigu.model.process;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "ProcessTemplate")
|
||||||
|
@TableName("oa_process_template")
|
||||||
|
public class ProcessTemplate extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "模板名称")
|
||||||
|
@TableField("name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "图标路径")
|
||||||
|
@TableField("icon_url")
|
||||||
|
private String iconUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "processTypeId")
|
||||||
|
@TableField("process_type_id")
|
||||||
|
private Long processTypeId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "表单属性")
|
||||||
|
@TableField("form_props")
|
||||||
|
private String formProps;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "表单选项")
|
||||||
|
@TableField("form_options")
|
||||||
|
private String formOptions;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "描述")
|
||||||
|
@TableField("description")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "流程定义key")
|
||||||
|
@TableField("process_definition_key")
|
||||||
|
private String processDefinitionKey;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "流程定义上传路process_model_id")
|
||||||
|
@TableField("process_definition_path")
|
||||||
|
private String processDefinitionPath;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "流程定义模型id")
|
||||||
|
@TableField("process_model_id")
|
||||||
|
private String processModelId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态")
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String processTypeName;
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.atguigu.model.process;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "ProcessType")
|
||||||
|
@TableName("oa_process_type")
|
||||||
|
public class ProcessType extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "类型名称")
|
||||||
|
@TableField("name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "描述")
|
||||||
|
@TableField("description")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<ProcessTemplate> processTemplateList;
|
||||||
|
}
|
51
model/src/main/java/com/atguigu/model/system/SysDept.java
Normal file
51
model/src/main/java/com/atguigu/model/system/SysDept.java
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
package com.atguigu.model.system;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "部门")
|
||||||
|
@TableName("sys_dept")
|
||||||
|
public class SysDept extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "部门名称")
|
||||||
|
@TableField("name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "上级部门id")
|
||||||
|
@TableField("parent_id")
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "树结构")
|
||||||
|
@TableField("tree_path")
|
||||||
|
private String treePath;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序")
|
||||||
|
@TableField("sort_value")
|
||||||
|
private Integer sortValue;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "负责人")
|
||||||
|
@TableField("leader")
|
||||||
|
private String leader;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "电话")
|
||||||
|
@TableField("phone")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态(1正常 0停用)")
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "下级部门")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<SysDept> children;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
package com.atguigu.model.system;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "SysLoginLog")
|
||||||
|
@TableName("sys_login_log")
|
||||||
|
public class SysLoginLog extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户账号")
|
||||||
|
@TableField("username")
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "登录IP地址")
|
||||||
|
@TableField("ipaddr")
|
||||||
|
private String ipaddr;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "登录状态(0成功 1失败)")
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "提示信息")
|
||||||
|
@TableField("msg")
|
||||||
|
private String msg;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "访问时间")
|
||||||
|
@TableField("access_time")
|
||||||
|
private Date accessTime;
|
||||||
|
|
||||||
|
}
|
62
model/src/main/java/com/atguigu/model/system/SysMenu.java
Normal file
62
model/src/main/java/com/atguigu/model/system/SysMenu.java
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
package com.atguigu.model.system;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "菜单")
|
||||||
|
@TableName("sys_menu")
|
||||||
|
public class SysMenu extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "所属上级")
|
||||||
|
@TableField("parent_id")
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "名称")
|
||||||
|
@TableField("name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "类型(1:菜单,2:按钮)")
|
||||||
|
@TableField("type")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "路由地址")
|
||||||
|
@TableField("path")
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "组件路径")
|
||||||
|
@TableField("component")
|
||||||
|
private String component;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "权限标识")
|
||||||
|
@TableField("perms")
|
||||||
|
private String perms;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "图标")
|
||||||
|
@TableField("icon")
|
||||||
|
private String icon;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序")
|
||||||
|
@TableField("sort_value")
|
||||||
|
private Integer sortValue;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态(0:禁止,1:正常)")
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
// 下级列表
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<SysMenu> children;
|
||||||
|
//是否选中
|
||||||
|
@TableField(exist = false)
|
||||||
|
private boolean isSelect;
|
||||||
|
}
|
||||||
|
|
74
model/src/main/java/com/atguigu/model/system/SysOperLog.java
Normal file
74
model/src/main/java/com/atguigu/model/system/SysOperLog.java
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
package com.atguigu.model.system;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "SysOperLog")
|
||||||
|
@TableName("sys_oper_log")
|
||||||
|
public class SysOperLog extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "模块标题")
|
||||||
|
@TableField("title")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "业务类型(0其它 1新增 2修改 3删除)")
|
||||||
|
@TableField("business_type")
|
||||||
|
private String businessType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "方法名称")
|
||||||
|
@TableField("method")
|
||||||
|
private String method;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "请求方式")
|
||||||
|
@TableField("request_method")
|
||||||
|
private String requestMethod;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "操作类别(0其它 1后台用户 2手机端用户)")
|
||||||
|
@TableField("operator_type")
|
||||||
|
private String operatorType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "操作人员")
|
||||||
|
@TableField("oper_name")
|
||||||
|
private String operName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "部门名称")
|
||||||
|
@TableField("dept_name")
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "请求URL")
|
||||||
|
@TableField("oper_url")
|
||||||
|
private String operUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "主机地址")
|
||||||
|
@TableField("oper_ip")
|
||||||
|
private String operIp;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "请求参数")
|
||||||
|
@TableField("oper_param")
|
||||||
|
private String operParam;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "返回参数")
|
||||||
|
@TableField("json_result")
|
||||||
|
private String jsonResult;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "操作状态(0正常 1异常)")
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "错误消息")
|
||||||
|
@TableField("error_msg")
|
||||||
|
private String errorMsg;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "操作时间")
|
||||||
|
@TableField("oper_time")
|
||||||
|
private Date operTime;
|
||||||
|
|
||||||
|
}
|
33
model/src/main/java/com/atguigu/model/system/SysPost.java
Normal file
33
model/src/main/java/com/atguigu/model/system/SysPost.java
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
package com.atguigu.model.system;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "岗位")
|
||||||
|
@TableName("sys_post")
|
||||||
|
public class SysPost extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "岗位编码")
|
||||||
|
@TableField("post_code")
|
||||||
|
private String postCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "岗位名称")
|
||||||
|
@TableField("name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "显示顺序")
|
||||||
|
@TableField("description")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态(1正常 0停用)")
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
}
|
32
model/src/main/java/com/atguigu/model/system/SysRole.java
Normal file
32
model/src/main/java/com/atguigu/model/system/SysRole.java
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
package com.atguigu.model.system;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "角色")
|
||||||
|
@TableName("sys_role")
|
||||||
|
public class SysRole extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
//@NotBlank(message = "角色名称不能为空")
|
||||||
|
@ApiModelProperty(value = "角色名称")
|
||||||
|
@TableField("role_name")
|
||||||
|
private String roleName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "角色编码")
|
||||||
|
@TableField("role_code")
|
||||||
|
private String roleCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "描述")
|
||||||
|
@TableField("description")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.atguigu.model.system;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "角色菜单")
|
||||||
|
@TableName("sys_role_menu")
|
||||||
|
public class SysRoleMenu extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "角色id")
|
||||||
|
@TableField("role_id")
|
||||||
|
private Long roleId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "菜单id")
|
||||||
|
@TableField("menu_id")
|
||||||
|
private Long menuId;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
69
model/src/main/java/com/atguigu/model/system/SysUser.java
Normal file
69
model/src/main/java/com/atguigu/model/system/SysUser.java
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
package com.atguigu.model.system;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "用户")
|
||||||
|
@TableName("sys_user")
|
||||||
|
public class SysUser extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户名")
|
||||||
|
@TableField("username")
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "密码")
|
||||||
|
@TableField("password")
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "姓名")
|
||||||
|
@TableField("name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "手机")
|
||||||
|
@TableField("phone")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "头像地址")
|
||||||
|
@TableField("head_url")
|
||||||
|
private String headUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "部门id")
|
||||||
|
@TableField("dept_id")
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "岗位id")
|
||||||
|
@TableField("post_id")
|
||||||
|
private Long postId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "描述")
|
||||||
|
@TableField("description")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "openId")
|
||||||
|
@TableField("open_id")
|
||||||
|
private String openId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态(1:正常 0:停用)")
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<SysRole> roleList;
|
||||||
|
//岗位
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String postName;
|
||||||
|
//部门
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String deptName;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
|||||||
|
package com.atguigu.model.system;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "用户角色")
|
||||||
|
@TableName("sys_user_role")
|
||||||
|
public class SysUserRole extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "角色id")
|
||||||
|
@TableField("role_id")
|
||||||
|
private Long roleId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户id")
|
||||||
|
@TableField("user_id")
|
||||||
|
private Long userId;
|
||||||
|
}
|
||||||
|
|
34
model/src/main/java/com/atguigu/model/wechat/Menu.java
Normal file
34
model/src/main/java/com/atguigu/model/wechat/Menu.java
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
package com.atguigu.model.wechat;
|
||||||
|
|
||||||
|
import com.atguigu.model.base.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "菜单")
|
||||||
|
@TableName("wechat_menu")
|
||||||
|
public class Menu extends BaseEntity {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
@TableField("parent_id")
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "类型")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "网页 链接,用户点击菜单可打开链接")
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "菜单KEY值,用于消息接口推送")
|
||||||
|
@TableField("meun_key")
|
||||||
|
private String meunKey;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序")
|
||||||
|
private Integer sort;
|
||||||
|
}
|
18
model/src/main/java/com/atguigu/vo/process/ApprovalVo.java
Normal file
18
model/src/main/java/com/atguigu/vo/process/ApprovalVo.java
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
package com.atguigu.vo.process;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ApprovalVo {
|
||||||
|
|
||||||
|
private Long processId;
|
||||||
|
|
||||||
|
private String taskId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批描述")
|
||||||
|
private String description;
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.atguigu.vo.process;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "流程表单")
|
||||||
|
public class ProcessFormVo {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批模板id")
|
||||||
|
private Long processTemplateId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批类型id")
|
||||||
|
private Long processTypeId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "表单值")
|
||||||
|
private String formValues;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
package com.atguigu.vo.process;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "Process")
|
||||||
|
public class ProcessQueryVo {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "关键字")
|
||||||
|
private String keyword;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户id")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
@TableField("process_template_id")
|
||||||
|
private Long processTemplateId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批类型id")
|
||||||
|
private Long processTypeId;
|
||||||
|
|
||||||
|
private String createTimeBegin;
|
||||||
|
private String createTimeEnd;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态(0:默认 1:审批中 2:审批通过 -1:驳回)")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
59
model/src/main/java/com/atguigu/vo/process/ProcessVo.java
Normal file
59
model/src/main/java/com/atguigu/vo/process/ProcessVo.java
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
package com.atguigu.vo.process;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "Process")
|
||||||
|
public class ProcessVo {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批code")
|
||||||
|
private String processCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户id")
|
||||||
|
private Long userId;
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@TableField("process_template_id")
|
||||||
|
private Long processTemplateId;
|
||||||
|
private String processTemplateName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批类型id")
|
||||||
|
private Long processTypeId;
|
||||||
|
private String processTypeName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "表单属性")
|
||||||
|
private String formProps;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "表单选项")
|
||||||
|
private String formOptions;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "表单属性值")
|
||||||
|
private String formValues;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "流程实例id")
|
||||||
|
private String processInstanceId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "当前审批人")
|
||||||
|
private String currentAuditor;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态(0:默认 1:审批中 2:审批通过 -1:驳回)")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
private String taskId;
|
||||||
|
|
||||||
|
}
|
20
model/src/main/java/com/atguigu/vo/system/AssginMenuVo.java
Normal file
20
model/src/main/java/com/atguigu/vo/system/AssginMenuVo.java
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
package com.atguigu.vo.system;
|
||||||
|
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@ApiModel(description = "分配菜单")
|
||||||
|
@Data
|
||||||
|
public class AssginMenuVo {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "角色id")
|
||||||
|
private Long roleId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "菜单id列表")
|
||||||
|
private List<Long> menuIdList;
|
||||||
|
|
||||||
|
}
|
20
model/src/main/java/com/atguigu/vo/system/AssginRoleVo.java
Normal file
20
model/src/main/java/com/atguigu/vo/system/AssginRoleVo.java
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
package com.atguigu.vo.system;
|
||||||
|
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@ApiModel(description = "分配菜单")
|
||||||
|
@Data
|
||||||
|
public class AssginRoleVo {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户id")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "角色id列表")
|
||||||
|
private List<Long> roleIdList;
|
||||||
|
|
||||||
|
}
|
34
model/src/main/java/com/atguigu/vo/system/LoginVo.java
Normal file
34
model/src/main/java/com/atguigu/vo/system/LoginVo.java
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
package com.atguigu.vo.system;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录对象
|
||||||
|
*/
|
||||||
|
public class LoginVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机号
|
||||||
|
*/
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 密码
|
||||||
|
*/
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsername(String username) {
|
||||||
|
this.username = username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPassword() {
|
||||||
|
return password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPassword(String password) {
|
||||||
|
this.password = password;
|
||||||
|
}
|
||||||
|
}
|
33
model/src/main/java/com/atguigu/vo/system/MetaVo.java
Normal file
33
model/src/main/java/com/atguigu/vo/system/MetaVo.java
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
package com.atguigu.vo.system;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 路由显示信息
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MetaVo
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 设置该路由在侧边栏和面包屑中展示的名字
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置该路由的图标,对应路径src/assets/icons/svg
|
||||||
|
*/
|
||||||
|
private String icon;
|
||||||
|
|
||||||
|
public MetaVo()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public MetaVo(String title, String icon)
|
||||||
|
{
|
||||||
|
this.title = title;
|
||||||
|
this.icon = icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
50
model/src/main/java/com/atguigu/vo/system/RouterVo.java
Normal file
50
model/src/main/java/com/atguigu/vo/system/RouterVo.java
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
package com.atguigu.vo.system;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 路由配置信息
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RouterVo
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 路由名字
|
||||||
|
*/
|
||||||
|
//private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 路由地址
|
||||||
|
*/
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否隐藏路由,当设置 true 的时候该路由不会再侧边栏出现
|
||||||
|
*/
|
||||||
|
private boolean hidden;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组件地址
|
||||||
|
*/
|
||||||
|
private String component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式--如组件页面
|
||||||
|
*/
|
||||||
|
private Boolean alwaysShow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 其他元素
|
||||||
|
*/
|
||||||
|
private MetaVo meta;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子路由
|
||||||
|
*/
|
||||||
|
private List<RouterVo> children;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
package com.atguigu.vo.system;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SysLoginLogQueryVo {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户账号")
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
private String createTimeBegin;
|
||||||
|
private String createTimeEnd;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.atguigu.vo.system;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SysOperLogQueryVo {
|
||||||
|
|
||||||
|
private String title;
|
||||||
|
private String operName;
|
||||||
|
|
||||||
|
private String createTimeBegin;
|
||||||
|
private String createTimeEnd;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.atguigu.vo.system;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SysPostQueryVo {
|
||||||
|
|
||||||
|
//@ApiModelProperty(value = "岗位编码")
|
||||||
|
private String postCode;
|
||||||
|
|
||||||
|
//@ApiModelProperty(value = "岗位名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
//@ApiModelProperty(value = "状态(1正常 0停用)")
|
||||||
|
private Boolean status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
|||||||
|
//
|
||||||
|
//
|
||||||
|
package com.atguigu.vo.system;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 角色查询实体
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author qy
|
||||||
|
* @since 2019-11-08
|
||||||
|
*/
|
||||||
|
public class SysRoleQueryVo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private String roleName;
|
||||||
|
|
||||||
|
public String getRoleName() {
|
||||||
|
return roleName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoleName(String roleName) {
|
||||||
|
this.roleName = roleName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
|||||||
|
//
|
||||||
|
//
|
||||||
|
package com.atguigu.vo.system;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 用户查询实体
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SysUserQueryVo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private String keyword;
|
||||||
|
|
||||||
|
private String createTimeBegin;
|
||||||
|
private String createTimeEnd;
|
||||||
|
|
||||||
|
private Long roleId;
|
||||||
|
private Long postId;
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
15
model/src/main/java/com/atguigu/vo/wechat/BindPhoneVo.java
Normal file
15
model/src/main/java/com/atguigu/vo/wechat/BindPhoneVo.java
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
package com.atguigu.vo.wechat;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BindPhoneVo {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "手机")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "openId")
|
||||||
|
private String openId;
|
||||||
|
}
|
39
model/src/main/java/com/atguigu/vo/wechat/MenuVo.java
Normal file
39
model/src/main/java/com/atguigu/vo/wechat/MenuVo.java
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
package com.atguigu.vo.wechat;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(description = "菜单")
|
||||||
|
public class MenuVo {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "类型")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "url")
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "菜单key")
|
||||||
|
private String meunKey;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序")
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "下级")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<MenuVo> children;
|
||||||
|
|
||||||
|
}
|
81
pom.xml
Normal file
81
pom.xml
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
|
<version>2.3.6.RELEASE</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>com.atguigu</groupId>
|
||||||
|
<artifactId>guigu-oa-parent</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>common</module>
|
||||||
|
<module>model</module>
|
||||||
|
<module>service-oa</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<java.version>1.8</java.version>
|
||||||
|
<mybatis-plus.version>3.4.1</mybatis-plus.version>
|
||||||
|
<mysql.version>8.0.27</mysql.version>
|
||||||
|
<knife4j.version>3.0.3</knife4j.version>
|
||||||
|
<jwt.version>0.9.1</jwt.version>
|
||||||
|
<fastjson.version>2.0.21</fastjson.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<!--配置dependencyManagement锁定依赖的版本-->
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<!--mybatis-plus 持久层-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||||
|
<version>${mybatis-plus.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<!--mysql-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>${mysql.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<!--knife4j-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.xiaoymin</groupId>
|
||||||
|
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||||
|
<version>${knife4j.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<!--jjwt-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.jsonwebtoken</groupId>
|
||||||
|
<artifactId>jjwt</artifactId>
|
||||||
|
<version>${jwt.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<!--fastjson-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>fastjson</artifactId>
|
||||||
|
<version>${fastjson.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.1</version>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
38
service-oa/.gitignore
vendored
Normal file
38
service-oa/.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
|
53
service-oa/pom.xml
Normal file
53
service-oa/pom.xml
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.atguigu</groupId>
|
||||||
|
<artifactId>guigu-oa-parent</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
<artifactId>service-oa</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.atguigu</groupId>
|
||||||
|
<artifactId>model</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.atguigu</groupId>
|
||||||
|
<artifactId>service-util</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 代码生成器-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-generator</artifactId>
|
||||||
|
<version>3.4.1</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.velocity</groupId>
|
||||||
|
<artifactId>velocity-engine-core</artifactId>
|
||||||
|
<version>2.0</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.atguigu.auth;
|
||||||
|
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClassName: ServiceAuthApplication
|
||||||
|
* Package: com.atguigu.auth
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @Create 2023/6/1 23:03
|
||||||
|
*/
|
||||||
|
@SpringBootApplication
|
||||||
|
@ComponentScan("com.atguigu")
|
||||||
|
public class ServiceAuthApplication {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(ServiceAuthApplication.class, args);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,67 @@
|
|||||||
|
package com.atguigu.auth.controller;
|
||||||
|
|
||||||
|
import com.atguigu.common.result.Result;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClassName: IndexController
|
||||||
|
* Package: com.atguigu.auth.controller
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @Create 2023/6/8 20:32
|
||||||
|
* 后台登录登出
|
||||||
|
*/
|
||||||
|
@Api(tags = "后台登录管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/system/index")
|
||||||
|
public class IndexController {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation("登陆")
|
||||||
|
@PostMapping("login")
|
||||||
|
public Result login() {
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
map.put("token", "admin");
|
||||||
|
return Result.ok(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户信息
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取用户信息")
|
||||||
|
@GetMapping("info")
|
||||||
|
public Result info() {
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
map.put("roles", "[admin]");
|
||||||
|
map.put("name", "admin");
|
||||||
|
map.put("avatar", "https://oss.aliyuncs.com/aliyun_id_photo_bucket/default_handsome.jpg");
|
||||||
|
return Result.ok(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退出
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation("登出")
|
||||||
|
@PostMapping("logout")
|
||||||
|
public Result logout() {
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,185 @@
|
|||||||
|
package com.atguigu.auth.controller;
|
||||||
|
|
||||||
|
import com.atguigu.auth.service.SysRoleService;
|
||||||
|
import com.atguigu.common.result.Result;
|
||||||
|
import com.atguigu.model.system.SysRole;
|
||||||
|
import com.atguigu.vo.system.AssginRoleVo;
|
||||||
|
import com.atguigu.vo.system.SysRoleQueryVo;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClassName: SysRoleService
|
||||||
|
* Package: com.atguigu.auth.controller
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @Create 2023/6/6 17:19
|
||||||
|
*/
|
||||||
|
@Api(tags = "角色管理接口")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/system/sysRole")
|
||||||
|
public class SysRoleController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysRoleService sysRoleService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有角色和当前用户所属角色
|
||||||
|
*
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "根据用户获取角色数据")
|
||||||
|
@GetMapping("/toAssign/{userId}")
|
||||||
|
public Result toAssign(@PathVariable Long userId) {
|
||||||
|
Map<String, Object> roleMap = sysRoleService.findRoleByUserId(userId);
|
||||||
|
return Result.ok(roleMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 为用户分配角色
|
||||||
|
*
|
||||||
|
* @param assginRoleVo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "根据用户分配角色")
|
||||||
|
@PostMapping("/doAssign")
|
||||||
|
public Result doAssign(@RequestBody AssginRoleVo assginRoleVo) {
|
||||||
|
sysRoleService.doAssign(assginRoleVo);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有角色
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation("查询所有角色")
|
||||||
|
@GetMapping("findAll")
|
||||||
|
public Result findAll() {
|
||||||
|
return Result.ok(sysRoleService.list());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条件分页查询
|
||||||
|
* page 当前页
|
||||||
|
* limit 每页显示记录数
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation("条件分页查询")
|
||||||
|
@GetMapping("{page}/{limit}")
|
||||||
|
public Result pageQueryRole(@PathVariable Long page,
|
||||||
|
@PathVariable Long limit,
|
||||||
|
SysRoleQueryVo sysRoleQueryVo) {
|
||||||
|
//调用service的方法实现
|
||||||
|
//1 创建Page对象,传递分页相关参数
|
||||||
|
//page 当前页 limit 每页显示记录数
|
||||||
|
Page<SysRole> pageParam = new Page<>(page, limit);
|
||||||
|
|
||||||
|
//2 封装条件,判断条件是否为空,不为空进行封装
|
||||||
|
LambdaQueryWrapper<SysRole> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
String roleName = sysRoleQueryVo.getRoleName();
|
||||||
|
if (!StringUtils.isEmpty(roleName)) {
|
||||||
|
//封装 like模糊查询
|
||||||
|
wrapper.like(SysRole::getRoleName, roleName);
|
||||||
|
}
|
||||||
|
|
||||||
|
//3 调用方法实现
|
||||||
|
IPage<SysRole> pageModel = sysRoleService.page(pageParam, wrapper);
|
||||||
|
return Result.ok(pageModel);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加角色
|
||||||
|
*
|
||||||
|
* @param role
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation("添加角色")
|
||||||
|
@PostMapping("save")
|
||||||
|
public Result save(@RequestBody SysRole role) {
|
||||||
|
//调用service的方法
|
||||||
|
boolean is_success = sysRoleService.save(role);
|
||||||
|
if (is_success) {
|
||||||
|
return Result.ok();
|
||||||
|
} else {
|
||||||
|
return Result.fail();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改角色-根据id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation("根据id查询")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public Result get(@PathVariable Long id) {
|
||||||
|
SysRole sysRole = sysRoleService.getById(id);
|
||||||
|
return Result.ok(sysRole);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改角色-最终修改
|
||||||
|
*
|
||||||
|
* @param role
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation("修改角色")
|
||||||
|
@PutMapping("update")
|
||||||
|
public Result update(@RequestBody SysRole role) {
|
||||||
|
//调用service的方法
|
||||||
|
boolean is_success = sysRoleService.updateById(role);
|
||||||
|
if (is_success) {
|
||||||
|
return Result.ok();
|
||||||
|
} else {
|
||||||
|
return Result.fail();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation("根据id删除")
|
||||||
|
@DeleteMapping("remove/{id}")
|
||||||
|
public Result remove(@PathVariable Long id) {
|
||||||
|
boolean is_success = sysRoleService.removeById(id);
|
||||||
|
if (is_success) {
|
||||||
|
return Result.ok();
|
||||||
|
} else {
|
||||||
|
return Result.fail();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
* 前端数组 [1,2,3]
|
||||||
|
*
|
||||||
|
* @param idList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation("批量删除")
|
||||||
|
@DeleteMapping("batchRemove")
|
||||||
|
public Result batchRemove(@RequestBody List<Long> idList) {
|
||||||
|
boolean is_success = sysRoleService.removeByIds(idList);
|
||||||
|
if (is_success) {
|
||||||
|
return Result.ok();
|
||||||
|
} else {
|
||||||
|
return Result.fail();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,140 @@
|
|||||||
|
package com.atguigu.auth.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.atguigu.auth.service.SysUserService;
|
||||||
|
import com.atguigu.common.result.Result;
|
||||||
|
import com.atguigu.model.system.SysUser;
|
||||||
|
import com.atguigu.vo.system.SysUserQueryVo;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 用户表 前端控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @since 2023-06-09
|
||||||
|
*/
|
||||||
|
@Api(tags = "用户管理接口")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/system/sysUser")
|
||||||
|
public class SysUserController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysUserService sysUserService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新用户状态
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @param status
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "更新状态")
|
||||||
|
@GetMapping("updateStatus/{id}/{status}")
|
||||||
|
public Result updateStatus(@PathVariable Long id, @PathVariable Integer status) {
|
||||||
|
sysUserService.updateStatus(id, status);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户条件分页查询
|
||||||
|
*
|
||||||
|
* @param page
|
||||||
|
* @param limit
|
||||||
|
* @param sysUserQueryVo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation("用户条件分页查询")
|
||||||
|
@GetMapping("{page}/{limit}")
|
||||||
|
public Result index(@PathVariable Long page,
|
||||||
|
@PathVariable Long limit,
|
||||||
|
SysUserQueryVo sysUserQueryVo) {
|
||||||
|
//创建page对象
|
||||||
|
Page<SysUser> pageParam = new Page<>(page, limit);
|
||||||
|
|
||||||
|
//封装条件,判断条件值不为空
|
||||||
|
LambdaQueryWrapper<SysUser> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
//获取条件值
|
||||||
|
String username = sysUserQueryVo.getKeyword();
|
||||||
|
String createTimeBegin = sysUserQueryVo.getCreateTimeBegin();
|
||||||
|
String createTimeEnd = sysUserQueryVo.getCreateTimeEnd();
|
||||||
|
//判断条件值不为空
|
||||||
|
//like 模糊查询
|
||||||
|
if (!StringUtils.isEmpty(username)) {
|
||||||
|
wrapper.like(SysUser::getUsername, username);
|
||||||
|
}
|
||||||
|
//ge 大于等于
|
||||||
|
if (!StringUtils.isEmpty(createTimeBegin)) {
|
||||||
|
wrapper.ge(SysUser::getCreateTime, createTimeBegin);
|
||||||
|
}
|
||||||
|
//le 小于等于
|
||||||
|
if (!StringUtils.isEmpty(createTimeEnd)) {
|
||||||
|
wrapper.le(SysUser::getCreateTime, createTimeEnd);
|
||||||
|
}
|
||||||
|
|
||||||
|
//调用mp的方法实现条件分页查询
|
||||||
|
IPage<SysUser> pageModel = sysUserService.page(pageParam, wrapper);
|
||||||
|
return Result.ok(pageModel);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "获取用户")
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
public Result get(@PathVariable Long id) {
|
||||||
|
SysUser user = sysUserService.getById(id);
|
||||||
|
return Result.ok(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存用户
|
||||||
|
*
|
||||||
|
* @param user
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "保存用户")
|
||||||
|
@PostMapping("save")
|
||||||
|
public Result save(@RequestBody SysUser user) {
|
||||||
|
sysUserService.save(user);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新用户
|
||||||
|
*
|
||||||
|
* @param user
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "更新用户")
|
||||||
|
@PutMapping("update")
|
||||||
|
public Result updateById(@RequestBody SysUser user) {
|
||||||
|
sysUserService.updateById(user);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除用户
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "删除用户")
|
||||||
|
@DeleteMapping("remove/{id}")
|
||||||
|
public Result remove(@PathVariable Long id) {
|
||||||
|
sysUserService.removeById(id);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.atguigu.auth.mapper;
|
||||||
|
|
||||||
|
import com.atguigu.model.system.SysRole;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClassName: SysRoleMapper
|
||||||
|
* Package: com.atguigu.auth.mapper
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @Create 2023/6/1 23:01
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface SysRoleMapper extends BaseMapper<SysRole> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.atguigu.auth.mapper;
|
||||||
|
|
||||||
|
import com.atguigu.model.system.SysUser;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 用户表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @since 2023-06-09
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface SysUserMapper extends BaseMapper<SysUser> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.atguigu.auth.mapper;
|
||||||
|
|
||||||
|
import com.atguigu.model.system.SysUserRole;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 用户角色 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @since 2023-06-09
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
@Mapper
|
||||||
|
public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.atguigu.auth.mapper.SysUserMapper">
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.atguigu.auth.mapper.SysUserRoleMapper">
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.atguigu.auth.service;
|
||||||
|
|
||||||
|
import com.atguigu.model.system.SysRole;
|
||||||
|
import com.atguigu.vo.system.AssginRoleVo;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClassName: SysRoleService
|
||||||
|
* Package: com.atguigu.auth.service
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @Create 2023/6/1 23:03
|
||||||
|
*/
|
||||||
|
public interface SysRoleService extends IService<SysRole> {
|
||||||
|
|
||||||
|
//查询所有角色和当前用户所属角色
|
||||||
|
Map<String, Object> findRoleByUserId(Long userId);
|
||||||
|
|
||||||
|
//为用户分配角色
|
||||||
|
|
||||||
|
void doAssign(AssginRoleVo assginRoleVo);
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
package com.atguigu.auth.service;
|
||||||
|
|
||||||
|
import com.atguigu.model.system.SysUserRole;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 用户角色 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @since 2023-06-09
|
||||||
|
*/
|
||||||
|
public interface SysUserRoleService extends IService<SysUserRole> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
package com.atguigu.auth.service;
|
||||||
|
|
||||||
|
import com.atguigu.model.system.SysUser;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 用户表 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @since 2023-06-09
|
||||||
|
*/
|
||||||
|
public interface SysUserService extends IService<SysUser> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新用户状态
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @param status
|
||||||
|
*/
|
||||||
|
void updateStatus(Long id, Integer status);
|
||||||
|
}
|
@ -0,0 +1,81 @@
|
|||||||
|
package com.atguigu.auth.service.impl;
|
||||||
|
|
||||||
|
import com.atguigu.auth.mapper.SysRoleMapper;
|
||||||
|
import com.atguigu.auth.mapper.SysUserRoleMapper;
|
||||||
|
import com.atguigu.auth.service.SysRoleService;
|
||||||
|
import com.atguigu.model.system.SysRole;
|
||||||
|
import com.atguigu.model.system.SysUserRole;
|
||||||
|
import com.atguigu.vo.system.AssginRoleVo;
|
||||||
|
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;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClassName: SysRoleServiceImpl
|
||||||
|
* Package: com.atguigu.auth.service.impl
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @Create 2023/6/1 23:02
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements SysRoleService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysUserRoleMapper sysUserRoleMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> findRoleByUserId(Long userId) {
|
||||||
|
//查询所有的角色
|
||||||
|
List<SysRole> allRolesList = this.list();
|
||||||
|
|
||||||
|
//查询的角色id
|
||||||
|
List<SysUserRole> existUserRoleList = sysUserRoleMapper.selectList(new LambdaQueryWrapper<SysUserRole>().eq(SysUserRole::getUserId, userId).select(SysUserRole::getRoleId));
|
||||||
|
|
||||||
|
List<Long> existRoleIdList = existUserRoleList.stream().map(c -> c.getRoleId()).collect(Collectors.toList());
|
||||||
|
|
||||||
|
//对角色进行分类
|
||||||
|
List<SysRole> assginRoleList = new ArrayList<>();
|
||||||
|
for (SysRole role : allRolesList) {
|
||||||
|
//比较,已分配
|
||||||
|
if (existRoleIdList.contains(role.getId())) {
|
||||||
|
assginRoleList.add(role);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, Object> roleMap = new HashMap<>();
|
||||||
|
roleMap.put("assginRoleList", assginRoleList);
|
||||||
|
roleMap.put("allRolesList", allRolesList);
|
||||||
|
return roleMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 为用户分配角色
|
||||||
|
*
|
||||||
|
* @param assginRoleVo
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
@Override
|
||||||
|
public void doAssign(AssginRoleVo assginRoleVo) {
|
||||||
|
//删除用户的角色数据,在用户角色表 sys_user_role表中根据userid删除
|
||||||
|
sysUserRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>().eq(SysUserRole::getUserId, assginRoleVo.getUserId()));
|
||||||
|
//重新为用户分配角色
|
||||||
|
for (Long roleId : assginRoleVo.getRoleIdList()) {
|
||||||
|
//判空
|
||||||
|
if (StringUtils.isEmpty(roleId)) continue;
|
||||||
|
|
||||||
|
SysUserRole sysUserRole = new SysUserRole();
|
||||||
|
sysUserRole.setUserId(assginRoleVo.getUserId());
|
||||||
|
sysUserRole.setRoleId(roleId);
|
||||||
|
sysUserRoleMapper.insert(sysUserRole);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.atguigu.auth.service.impl;
|
||||||
|
|
||||||
|
import com.atguigu.auth.mapper.SysUserRoleMapper;
|
||||||
|
import com.atguigu.auth.service.SysUserRoleService;
|
||||||
|
import com.atguigu.model.system.SysUserRole;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 用户角色 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @since 2023-06-09
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUserRole> implements SysUserRoleService {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
package com.atguigu.auth.service.impl;
|
||||||
|
|
||||||
|
import com.atguigu.auth.mapper.SysUserMapper;
|
||||||
|
import com.atguigu.auth.service.SysUserService;
|
||||||
|
import com.atguigu.model.system.SysUser;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 用户表 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @since 2023-06-09
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新用户状态
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @param status
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
@Override
|
||||||
|
public void updateStatus(Long id, Integer status) {
|
||||||
|
//根据userid查询用户对象、
|
||||||
|
SysUser sysUser = baseMapper.selectById(id);
|
||||||
|
//设置修改状态值
|
||||||
|
if (status.intValue() == 1) {
|
||||||
|
sysUser.setStatus(status);
|
||||||
|
} else {
|
||||||
|
sysUser.setStatus(0);
|
||||||
|
}
|
||||||
|
baseMapper.updateById(sysUser);
|
||||||
|
}
|
||||||
|
}
|
16
service-oa/src/main/resources/application-dev.yml
Normal file
16
service-oa/src/main/resources/application-dev.yml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
server:
|
||||||
|
port: 8800
|
||||||
|
mybatis-plus:
|
||||||
|
configuration:
|
||||||
|
# 查看日志
|
||||||
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
type: com.zaxxer.hikari.HikariDataSource
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
url: jdbc:mysql://localhost:3306/guigu-oa?useSSL=false&useUnicode=true&characterEncoding=utf8&allowPublicKeyRetrieval=true
|
||||||
|
username: root
|
||||||
|
password: root
|
||||||
|
jackson:
|
||||||
|
date-format: yyyy-MM-dd HH:mm:ss
|
||||||
|
time-zone: GMT+8
|
5
service-oa/src/main/resources/application.yml
Normal file
5
service-oa/src/main/resources/application.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: service-oa
|
||||||
|
profiles:
|
||||||
|
active: dev
|
130
service-oa/src/test/java/com/atguigu/auth/TestMpDemo1.java
Normal file
130
service-oa/src/test/java/com/atguigu/auth/TestMpDemo1.java
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
package com.atguigu.auth;
|
||||||
|
|
||||||
|
import com.atguigu.auth.mapper.SysRoleMapper;
|
||||||
|
import com.atguigu.auth.service.SysRoleService;
|
||||||
|
import com.atguigu.model.system.SysRole;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClassName: TestMpDemo1
|
||||||
|
* Package: com.atguigu.auth
|
||||||
|
*
|
||||||
|
* @author yovinchen
|
||||||
|
* @Create 2023/6/1 23:04
|
||||||
|
*/
|
||||||
|
@SpringBootTest
|
||||||
|
public class TestMpDemo1 {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MyBatisPlus 对 service 层和 dao 层都做了很好的封装,直接调对应的CRUD方法就行
|
||||||
|
*/
|
||||||
|
@Autowired
|
||||||
|
private SysRoleMapper sysRoleMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysRoleService sysRoleService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 使用MP 封装的 service 来操作数据库,查询所有记录
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getAllByService() {
|
||||||
|
List<SysRole> list = sysRoleService.list();
|
||||||
|
list.forEach(System.out::println);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 使用MP 封装的 mapper查询所有记录
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getAllByMapper() {
|
||||||
|
List<SysRole> sysRoles = sysRoleMapper.selectList(null);
|
||||||
|
sysRoles.forEach(System.out::println);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加操作
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void insert() {
|
||||||
|
SysRole sysRole = new SysRole();
|
||||||
|
sysRole.setRoleName("角色管理员");
|
||||||
|
sysRole.setRoleCode("role");
|
||||||
|
sysRole.setDescription("角色管理员");
|
||||||
|
int result = sysRoleMapper.insert(sysRole);
|
||||||
|
|
||||||
|
System.out.println(result); //影响的行数
|
||||||
|
System.out.println(sysRole.getId()); //id自动回填
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改操作
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updateById() {
|
||||||
|
// 根据id查询
|
||||||
|
SysRole sysRole = sysRoleMapper.selectById(9);
|
||||||
|
// 设置修改值
|
||||||
|
sysRole.setRoleName("角色管理员1");
|
||||||
|
// 调用方法实现最终修改
|
||||||
|
int update = sysRoleMapper.updateById(sysRole);
|
||||||
|
// 受影响的行数
|
||||||
|
System.out.println("update = " + update);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id删除
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deleteById() {
|
||||||
|
int delete = sysRoleMapper.deleteById(9);
|
||||||
|
// 受影响的行数
|
||||||
|
System.out.println("delete = " + delete);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deleteBatchByIds() {
|
||||||
|
// 或者下面这种写法
|
||||||
|
int delete = sysRoleMapper.deleteBatchIds(Arrays.asList(8, 9));
|
||||||
|
// 受影响的行数
|
||||||
|
System.out.println("ids = " + delete);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条件查询
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testQueryWrapper1() {
|
||||||
|
|
||||||
|
QueryWrapper<SysRole> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("role_name", "系统管理员");
|
||||||
|
|
||||||
|
List<SysRole> list = sysRoleMapper.selectList(queryWrapper);
|
||||||
|
list.forEach(System.out::println);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条件查询
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testQueryWrapper2() {
|
||||||
|
|
||||||
|
LambdaQueryWrapper<SysRole> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
//java 8 中写法
|
||||||
|
queryWrapper.eq(SysRole::getRoleName, "系统管理员");
|
||||||
|
|
||||||
|
List<SysRole> list = sysRoleMapper.selectList(queryWrapper);
|
||||||
|
list.forEach(System.out::println);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
67
service-oa/src/test/java/com/atguigu/code/CodeGet.java
Normal file
67
service-oa/src/test/java/com/atguigu/code/CodeGet.java
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
package com.atguigu.code;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.DbType;
|
||||||
|
import com.baomidou.mybatisplus.generator.AutoGenerator;
|
||||||
|
import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
|
||||||
|
import com.baomidou.mybatisplus.generator.config.GlobalConfig;
|
||||||
|
import com.baomidou.mybatisplus.generator.config.PackageConfig;
|
||||||
|
import com.baomidou.mybatisplus.generator.config.StrategyConfig;
|
||||||
|
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
|
||||||
|
|
||||||
|
public class CodeGet {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
|
||||||
|
// 1、创建代码生成器
|
||||||
|
AutoGenerator mpg = new AutoGenerator();
|
||||||
|
|
||||||
|
// 2、全局配置
|
||||||
|
// 全局配置
|
||||||
|
GlobalConfig gc = new GlobalConfig();
|
||||||
|
gc.setOutputDir("/Users/yovinchen/project/Java/project/guigu-oa-parent/service-oa" + "/src/main/java");
|
||||||
|
|
||||||
|
gc.setServiceName("%sService"); //去掉Service接口的首字母I
|
||||||
|
gc.setAuthor("yovinchen");
|
||||||
|
gc.setOpen(false);
|
||||||
|
mpg.setGlobalConfig(gc);
|
||||||
|
|
||||||
|
// 3、数据源配置
|
||||||
|
DataSourceConfig dsc = new DataSourceConfig();
|
||||||
|
dsc.setUrl("jdbc:mysql://localhost:3306/guigu-oa?serverTimezone=UTC&useSSL=false");
|
||||||
|
dsc.setDriverName("com.mysql.cj.jdbc.Driver");
|
||||||
|
dsc.setUsername("root");
|
||||||
|
dsc.setPassword("root");
|
||||||
|
dsc.setDbType(DbType.MYSQL);
|
||||||
|
mpg.setDataSource(dsc);
|
||||||
|
|
||||||
|
// 4、包配置
|
||||||
|
PackageConfig pc = new PackageConfig();
|
||||||
|
pc.setParent("com.atguigu");
|
||||||
|
pc.setModuleName("auth"); //模块名
|
||||||
|
pc.setController("controller");
|
||||||
|
pc.setService("service");
|
||||||
|
pc.setMapper("mapper");
|
||||||
|
mpg.setPackageInfo(pc);
|
||||||
|
|
||||||
|
// 5、策略配置
|
||||||
|
StrategyConfig strategy = new StrategyConfig();
|
||||||
|
|
||||||
|
strategy.setInclude("sys_user_role");
|
||||||
|
//数据库表映射到实体的命名策略
|
||||||
|
strategy.setNaming(NamingStrategy.underline_to_camel);
|
||||||
|
//数据库表字段映射到实体的命名策略
|
||||||
|
strategy.setColumnNaming(NamingStrategy.underline_to_camel);
|
||||||
|
// lombok 模型 @Accessors(chain = true) setter链式操作
|
||||||
|
strategy.setEntityLombokModel(true);
|
||||||
|
//restful api风格控制器
|
||||||
|
strategy.setRestControllerStyle(true);
|
||||||
|
//url中驼峰转连字符¬
|
||||||
|
strategy.setControllerMappingHyphenStyle(true);
|
||||||
|
|
||||||
|
mpg.setStrategy(strategy);
|
||||||
|
|
||||||
|
// 6、执行
|
||||||
|
mpg.execute();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user