mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-17 18:46:36 +08:00
commit:VO支持以及bug修复
This commit is contained in:
20
orange-demo-multi-service-for-app/.idea/compiler.xml
generated
20
orange-demo-multi-service-for-app/.idea/compiler.xml
generated
@@ -6,19 +6,18 @@
|
|||||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||||
<outputRelativeToContentRoot value="true" />
|
<outputRelativeToContentRoot value="true" />
|
||||||
<module name="common-redis" />
|
|
||||||
<module name="stats-interface" />
|
|
||||||
<module name="application-common" />
|
|
||||||
<module name="gateway" />
|
|
||||||
<module name="common-swagger" />
|
|
||||||
<module name="common-sequence" />
|
|
||||||
<module name="course-class-service" />
|
|
||||||
<module name="common-core" />
|
|
||||||
<module name="upms-interface" />
|
|
||||||
<module name="admin-monitor" />
|
<module name="admin-monitor" />
|
||||||
|
<module name="gateway" />
|
||||||
|
<module name="common-core" />
|
||||||
|
<module name="course-class-service" />
|
||||||
<module name="stats-service" />
|
<module name="stats-service" />
|
||||||
<module name="course-class-interface" />
|
<module name="common-sequence" />
|
||||||
|
<module name="upms-interface" />
|
||||||
|
<module name="common-redis" />
|
||||||
<module name="upms-service" />
|
<module name="upms-service" />
|
||||||
|
<module name="application-common" />
|
||||||
|
<module name="course-class-interface" />
|
||||||
|
<module name="stats-interface" />
|
||||||
</profile>
|
</profile>
|
||||||
</annotationProcessing>
|
</annotationProcessing>
|
||||||
<bytecodeTargetLevel>
|
<bytecodeTargetLevel>
|
||||||
@@ -30,7 +29,6 @@
|
|||||||
<module name="common-core" target="1.8" />
|
<module name="common-core" target="1.8" />
|
||||||
<module name="common-redis" target="1.8" />
|
<module name="common-redis" target="1.8" />
|
||||||
<module name="common-sequence" target="1.8" />
|
<module name="common-sequence" target="1.8" />
|
||||||
<module name="common-swagger" target="1.8" />
|
|
||||||
<module name="course-class" target="1.8" />
|
<module name="course-class" target="1.8" />
|
||||||
<module name="course-class-interface" target="1.8" />
|
<module name="course-class-interface" target="1.8" />
|
||||||
<module name="course-class-service" target="1.8" />
|
<module name="course-class-service" target="1.8" />
|
||||||
|
|||||||
@@ -18,8 +18,6 @@
|
|||||||
<file url="file://$PROJECT_DIR$/common/common-redis/src/main/resources" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/common/common-redis/src/main/resources" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/common/common-sequence/src/main/java" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/common/common-sequence/src/main/java" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/common/common-sequence/src/main/resources" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/common/common-sequence/src/main/resources" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/common/common-swagger/src/main/java" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/common/common-swagger/src/main/resources" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/framework/admin-monitor/src/main/java" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/framework/admin-monitor/src/main/java" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/framework/admin-monitor/src/main/resources" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/framework/admin-monitor/src/main/resources" charset="UTF-8" />
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
@@ -14,57 +14,6 @@
|
|||||||
<inspection_tool class="CheckDtdRefs" enabled="false" level="ERROR" enabled_by_default="false" />
|
<inspection_tool class="CheckDtdRefs" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||||
<inspection_tool class="CheckTagEmptyBody" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="CheckTagEmptyBody" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="CheckXmlFileWithXercesValidator" enabled="false" level="ERROR" enabled_by_default="false" />
|
<inspection_tool class="CheckXmlFileWithXercesValidator" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||||
<inspection_tool class="CloudToolkitAbstractClassShouldStartWithAbstractNaming" enabled="false" level="CRITICAL" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitAbstractMethodOrInterfaceMethodMustUseJavadoc" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitAvoidApacheBeanUtilsCopy" enabled="false" level="BLOCKER" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitAvoidCallStaticSimpleDateFormat" enabled="false" level="CRITICAL" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitAvoidCommentBehindStatement" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitAvoidComplexCondition" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitAvoidConcurrentCompetitionRandom" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitAvoidDoubleOrFloatEqualCompare" enabled="false" level="CRITICAL" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitAvoidManuallyCreateThread" enabled="false" level="CRITICAL" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitAvoidMissUseOfMathRandom" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitAvoidNegationOperator" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitAvoidNewDateGetTime" enabled="false" level="BLOCKER" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitAvoidPatternCompileInMethod" enabled="false" level="BLOCKER" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitAvoidReturnInFinally" enabled="false" level="CRITICAL" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitAvoidStartWithDollarAndUnderLineNaming" enabled="false" level="CRITICAL" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitAvoidUseTimer" enabled="false" level="BLOCKER" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitBigDecimalAvoidDoubleConstructor" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitBooleanPropertyShouldNotStartWithIs" enabled="false" level="CRITICAL" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitClassCastExceptionWithSubListToArrayList" enabled="false" level="CRITICAL" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitClassCastExceptionWithToArray" enabled="false" level="CRITICAL" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitClassMustHaveAuthor" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitClassNamingShouldBeCamel" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitCollectionInitShouldAssignCapacity" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitCommentsMustBeJavadocFormat" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitConcurrentExceptionWithModifyOriginSubList" enabled="false" level="CRITICAL" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitConstantFieldShouldBeUpperCase" enabled="false" level="CRITICAL" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitCountDownShouldInFinally" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitDontModifyInForeachCircle" enabled="false" level="BLOCKER" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitEnumConstantsMustHaveComment" enabled="false" level="CRITICAL" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitExceptionClassShouldEndWithException" enabled="false" level="CRITICAL" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitIbatisMethodQueryForList" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitLowerCamelCaseVariableNaming" enabled="false" level="CRITICAL" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitMethodReturnWrapperType" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitMethodTooLong" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitPackageNaming" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitPojoMustOverrideToString" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitPojoMustUsePrimitiveField" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitPojoNoDefaultValue" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitRemoveCommentedCode" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitServiceOrDaoClassShouldEndWithImpl" enabled="false" level="CRITICAL" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitStringConcat" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitSwitchStatement" enabled="false" level="CRITICAL" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitTestClassShouldEndWithTestNaming" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitThreadLocalShouldRemove" enabled="false" level="CRITICAL" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitThreadPoolCreation" enabled="false" level="BLOCKER" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitThreadShouldSetName" enabled="false" level="CRITICAL" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitTransactionMustHaveRollback" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitUndefineMagicConstant" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitUnsupportedExceptionWithModifyAsList" enabled="false" level="CRITICAL" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitUseQuietReferenceNotation" enabled="false" level="MAJOR" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="CloudToolkitUseRightCaseForDateFormat" enabled="false" level="CRITICAL" enabled_by_default="false" />
|
|
||||||
<inspection_tool class="ConstantConditions" enabled="false" level="WARNING" enabled_by_default="false">
|
<inspection_tool class="ConstantConditions" enabled="false" level="WARNING" enabled_by_default="false">
|
||||||
<option name="SUGGEST_NULLABLE_ANNOTATIONS" value="false" />
|
<option name="SUGGEST_NULLABLE_ANNOTATIONS" value="false" />
|
||||||
<option name="DONT_REPORT_TRUE_ASSERT_STATEMENTS" value="false" />
|
<option name="DONT_REPORT_TRUE_ASSERT_STATEMENTS" value="false" />
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: com.github.xiaoymin:knife4j-annotations:2.0.5">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/xiaoymin/knife4j-annotations/2.0.5/knife4j-annotations-2.0.5.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/xiaoymin/knife4j-annotations/2.0.5/knife4j-annotations-2.0.5-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/xiaoymin/knife4j-annotations/2.0.5/knife4j-annotations-2.0.5-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: com.github.xiaoymin:knife4j-core:2.0.5">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/xiaoymin/knife4j-core/2.0.5/knife4j-core-2.0.5.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/xiaoymin/knife4j-core/2.0.5/knife4j-core-2.0.5-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/xiaoymin/knife4j-core/2.0.5/knife4j-core-2.0.5-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: com.github.xiaoymin:knife4j-micro-spring-boot-starter:2.0.5">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/xiaoymin/knife4j-micro-spring-boot-starter/2.0.5/knife4j-micro-spring-boot-starter-2.0.5.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/xiaoymin/knife4j-micro-spring-boot-starter/2.0.5/knife4j-micro-spring-boot-starter-2.0.5-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/xiaoymin/knife4j-micro-spring-boot-starter/2.0.5/knife4j-micro-spring-boot-starter-2.0.5-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: com.github.xiaoymin:knife4j-spring:2.0.5">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/xiaoymin/knife4j-spring/2.0.5/knife4j-spring-2.0.5.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/xiaoymin/knife4j-spring/2.0.5/knife4j-spring-2.0.5-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/xiaoymin/knife4j-spring/2.0.5/knife4j-spring-2.0.5-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: com.github.xiaoymin:knife4j-spring-boot-autoconfigure:2.0.5">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/xiaoymin/knife4j-spring-boot-autoconfigure/2.0.5/knife4j-spring-boot-autoconfigure-2.0.5.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/xiaoymin/knife4j-spring-boot-autoconfigure/2.0.5/knife4j-spring-boot-autoconfigure-2.0.5-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/xiaoymin/knife4j-spring-boot-autoconfigure/2.0.5/knife4j-spring-boot-autoconfigure-2.0.5-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: com.github.xiaoymin:knife4j-spring-ui:2.0.5">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/xiaoymin/knife4j-spring-ui/2.0.5/knife4j-spring-ui-2.0.5.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/xiaoymin/knife4j-spring-ui/2.0.5/knife4j-spring-ui-2.0.5-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/com/github/xiaoymin/knife4j-spring-ui/2.0.5/knife4j-spring-ui-2.0.5-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: io.springfox:springfox-bean-validators:2.9.2">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/springfox/springfox-bean-validators/2.9.2/springfox-bean-validators-2.9.2.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/springfox/springfox-bean-validators/2.9.2/springfox-bean-validators-2.9.2-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/springfox/springfox-bean-validators/2.9.2/springfox-bean-validators-2.9.2-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: io.springfox:springfox-core:2.9.2">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/springfox/springfox-core/2.9.2/springfox-core-2.9.2.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/springfox/springfox-core/2.9.2/springfox-core-2.9.2-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/springfox/springfox-core/2.9.2/springfox-core-2.9.2-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: io.springfox:springfox-schema:2.9.2">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/springfox/springfox-schema/2.9.2/springfox-schema-2.9.2.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/springfox/springfox-schema/2.9.2/springfox-schema-2.9.2-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/springfox/springfox-schema/2.9.2/springfox-schema-2.9.2-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: io.springfox:springfox-spi:2.9.2">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/springfox/springfox-spi/2.9.2/springfox-spi-2.9.2.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/springfox/springfox-spi/2.9.2/springfox-spi-2.9.2-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/springfox/springfox-spi/2.9.2/springfox-spi-2.9.2-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: io.springfox:springfox-spring-web:2.9.2">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/springfox/springfox-spring-web/2.9.2/springfox-spring-web-2.9.2.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/springfox/springfox-spring-web/2.9.2/springfox-spring-web-2.9.2-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/springfox/springfox-spring-web/2.9.2/springfox-spring-web-2.9.2-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: io.springfox:springfox-swagger2:2.9.2">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/springfox/springfox-swagger2/2.9.2/springfox-swagger2-2.9.2.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/springfox/springfox-swagger2/2.9.2/springfox-swagger2-2.9.2-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/springfox/springfox-swagger2/2.9.2/springfox-swagger2-2.9.2-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: io.springfox:springfox-swagger-common:2.9.2">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/springfox/springfox-swagger-common/2.9.2/springfox-swagger-common-2.9.2.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/springfox/springfox-swagger-common/2.9.2/springfox-swagger-common-2.9.2-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/springfox/springfox-swagger-common/2.9.2/springfox-swagger-common-2.9.2-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: io.swagger:swagger-annotations:1.5.20">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/swagger/swagger-annotations/1.5.20/swagger-annotations-1.5.20.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/swagger/swagger-annotations/1.5.20/swagger-annotations-1.5.20-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/swagger/swagger-annotations/1.5.20/swagger-annotations-1.5.20-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: io.swagger:swagger-annotations:1.5.22">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/swagger/swagger-annotations/1.5.22/swagger-annotations-1.5.22.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/swagger/swagger-annotations/1.5.22/swagger-annotations-1.5.22-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/swagger/swagger-annotations/1.5.22/swagger-annotations-1.5.22-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: io.swagger:swagger-models:1.5.21">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/swagger/swagger-models/1.5.21/swagger-models-1.5.21.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/swagger/swagger-models/1.5.21/swagger-models-1.5.21-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/swagger/swagger-models/1.5.21/swagger-models-1.5.21-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: io.swagger:swagger-models:1.5.22">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/swagger/swagger-models/1.5.22/swagger-models-1.5.22.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/swagger/swagger-models/1.5.22/swagger-models-1.5.22-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/io/swagger/swagger-models/1.5.22/swagger-models-1.5.22-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: org.javassist:javassist:3.25.0-GA">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/javassist/javassist/3.25.0-GA/javassist-3.25.0-GA.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/javassist/javassist/3.25.0-GA/javassist-3.25.0-GA-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/javassist/javassist/3.25.0-GA/javassist-3.25.0-GA-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/plugin/spring-plugin-core/1.2.0.RELEASE/spring-plugin-core-1.2.0.RELEASE.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/plugin/spring-plugin-core/1.2.0.RELEASE/spring-plugin-core-1.2.0.RELEASE-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/plugin/spring-plugin-core/1.2.0.RELEASE/spring-plugin-core-1.2.0.RELEASE-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/plugin/spring-plugin-metadata/1.2.0.RELEASE/spring-plugin-metadata-1.2.0.RELEASE.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/plugin/spring-plugin-metadata/1.2.0.RELEASE/spring-plugin-metadata-1.2.0.RELEASE-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$MAVEN_REPOSITORY$/org/springframework/plugin/spring-plugin-metadata/1.2.0.RELEASE/spring-plugin-metadata-1.2.0.RELEASE-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
||||||
@@ -10,7 +10,6 @@
|
|||||||
<module fileurl="file://$PROJECT_DIR$/common/common-core/common-core.iml" filepath="$PROJECT_DIR$/common/common-core/common-core.iml" />
|
<module fileurl="file://$PROJECT_DIR$/common/common-core/common-core.iml" filepath="$PROJECT_DIR$/common/common-core/common-core.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/common/common-redis/common-redis.iml" filepath="$PROJECT_DIR$/common/common-redis/common-redis.iml" />
|
<module fileurl="file://$PROJECT_DIR$/common/common-redis/common-redis.iml" filepath="$PROJECT_DIR$/common/common-redis/common-redis.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/common/common-sequence/common-sequence.iml" filepath="$PROJECT_DIR$/common/common-sequence/common-sequence.iml" />
|
<module fileurl="file://$PROJECT_DIR$/common/common-sequence/common-sequence.iml" filepath="$PROJECT_DIR$/common/common-sequence/common-sequence.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/common/common-swagger/common-swagger.iml" filepath="$PROJECT_DIR$/common/common-swagger/common-swagger.iml" />
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/application/course-class/course-class.iml" filepath="$PROJECT_DIR$/application/course-class/course-class.iml" />
|
<module fileurl="file://$PROJECT_DIR$/application/course-class/course-class.iml" filepath="$PROJECT_DIR$/application/course-class/course-class.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/application/course-class/course-class-interface/course-class-interface.iml" filepath="$PROJECT_DIR$/application/course-class/course-class-interface/course-class-interface.iml" />
|
<module fileurl="file://$PROJECT_DIR$/application/course-class/course-class-interface/course-class-interface.iml" filepath="$PROJECT_DIR$/application/course-class/course-class-interface/course-class-interface.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/application/course-class/course-class-service/course-class-service.iml" filepath="$PROJECT_DIR$/application/course-class/course-class-service/course-class-service.iml" />
|
<module fileurl="file://$PROJECT_DIR$/application/course-class/course-class-service/course-class-service.iml" filepath="$PROJECT_DIR$/application/course-class/course-class-service/course-class-service.iml" />
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="f71ed20c-0501-4c02-8940-3d4e2e7e6457" name="Default Changelist" comment="" />
|
<list default="true" id="2546802c-1b0b-4971-9f6c-08ccd8545f5e" name="Default Changelist" comment="" />
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<component name="ProjectCodeStyleSettingsMigration">
|
<component name="ProjectCodeStyleSettingsMigration">
|
||||||
<option name="version" value="1" />
|
<option name="version" value="1" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectId" id="1kYG2XZZQJ0JPOk2FNtlsZjeVqT" />
|
<component name="ProjectId" id="1lpjNJvR3t3VxuhsomgdAIE1Dyu" />
|
||||||
<component name="ProjectViewState">
|
<component name="ProjectViewState">
|
||||||
<option name="abbreviatePackageNames" value="true" />
|
<option name="abbreviatePackageNames" value="true" />
|
||||||
<option name="autoscrollFromSource" value="true" />
|
<option name="autoscrollFromSource" value="true" />
|
||||||
@@ -34,24 +34,9 @@
|
|||||||
<component name="RecentsManager">
|
<component name="RecentsManager">
|
||||||
<key name="CopyFile.RECENT_KEYS">
|
<key name="CopyFile.RECENT_KEYS">
|
||||||
<recent name="$PROJECT_DIR$/zz-resource/db-scripts" />
|
<recent name="$PROJECT_DIR$/zz-resource/db-scripts" />
|
||||||
<recent name="$PROJECT_DIR$/zz-resource/api-docs" />
|
|
||||||
</key>
|
</key>
|
||||||
</component>
|
</component>
|
||||||
<component name="RunManager" selected="Application.ExportDocApp">
|
<component name="RunManager" selected="Spring Boot.AdminMonitorApplication">
|
||||||
<configuration name="ExportApiApp" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
|
|
||||||
<option name="MAIN_CLASS_NAME" value="com.orange.demo.apidoc.tools.ExportApiApp" />
|
|
||||||
<module name="apidoc-tools" />
|
|
||||||
<method v="2">
|
|
||||||
<option name="Make" enabled="true" />
|
|
||||||
</method>
|
|
||||||
</configuration>
|
|
||||||
<configuration name="ExportDocApp" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
|
|
||||||
<option name="MAIN_CLASS_NAME" value="com.orange.demo.apidoc.tools.ExportDocApp" />
|
|
||||||
<module name="apidoc-tools" />
|
|
||||||
<method v="2">
|
|
||||||
<option name="Make" enabled="true" />
|
|
||||||
</method>
|
|
||||||
</configuration>
|
|
||||||
<configuration name="AdminMonitorApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
|
<configuration name="AdminMonitorApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
|
||||||
<module name="admin-monitor" />
|
<module name="admin-monitor" />
|
||||||
<option name="SPRING_BOOT_MAIN_CLASS" value="com.orange.demo.adminmonitor.AdminMonitorApplication" />
|
<option name="SPRING_BOOT_MAIN_CLASS" value="com.orange.demo.adminmonitor.AdminMonitorApplication" />
|
||||||
@@ -80,12 +65,6 @@
|
|||||||
<option name="Make" enabled="true" />
|
<option name="Make" enabled="true" />
|
||||||
</method>
|
</method>
|
||||||
</configuration>
|
</configuration>
|
||||||
<recent_temporary>
|
|
||||||
<list>
|
|
||||||
<item itemvalue="Application.ExportDocApp" />
|
|
||||||
<item itemvalue="Application.ExportApiApp" />
|
|
||||||
</list>
|
|
||||||
</recent_temporary>
|
|
||||||
</component>
|
</component>
|
||||||
<component name="ServiceViewManager">
|
<component name="ServiceViewManager">
|
||||||
<option name="viewStates">
|
<option name="viewStates">
|
||||||
@@ -104,54 +83,16 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="TaskManager">
|
<component name="TaskManager">
|
||||||
<task active="true" id="Default" summary="Default task">
|
<task active="true" id="Default" summary="Default task">
|
||||||
<changelist id="f71ed20c-0501-4c02-8940-3d4e2e7e6457" name="Default Changelist" comment="" />
|
<changelist id="2546802c-1b0b-4971-9f6c-08ccd8545f5e" name="Default Changelist" comment="" />
|
||||||
<created>1605869904849</created>
|
<created>1608300885867</created>
|
||||||
<option name="number" value="Default" />
|
<option name="number" value="Default" />
|
||||||
<option name="presentableId" value="Default" />
|
<option name="presentableId" value="Default" />
|
||||||
<updated>1605869904849</updated>
|
<updated>1608300885867</updated>
|
||||||
<workItem from="1605869906672" duration="424000" />
|
<workItem from="1608300887522" duration="274000" />
|
||||||
</task>
|
</task>
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="TypeScriptGeneratedFilesManager">
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
<option name="version" value="1" />
|
<option name="version" value="1" />
|
||||||
</component>
|
</component>
|
||||||
<component name="WindowStateProjectService">
|
|
||||||
<state width="1398" height="294" key="GridCell.Tab.0.bottom" timestamp="1605870331385">
|
|
||||||
<screen x="0" y="0" width="1440" height="900" />
|
|
||||||
</state>
|
|
||||||
<state width="1398" height="294" key="GridCell.Tab.0.bottom/0.0.1440.900@0.0.1440.900" timestamp="1605870331385" />
|
|
||||||
<state width="1398" height="294" key="GridCell.Tab.0.center" timestamp="1605870331383">
|
|
||||||
<screen x="0" y="0" width="1440" height="900" />
|
|
||||||
</state>
|
|
||||||
<state width="1398" height="294" key="GridCell.Tab.0.center/0.0.1440.900@0.0.1440.900" timestamp="1605870331383" />
|
|
||||||
<state width="1398" height="294" key="GridCell.Tab.0.left" timestamp="1605870331383">
|
|
||||||
<screen x="0" y="0" width="1440" height="900" />
|
|
||||||
</state>
|
|
||||||
<state width="1398" height="294" key="GridCell.Tab.0.left/0.0.1440.900@0.0.1440.900" timestamp="1605870331383" />
|
|
||||||
<state width="1398" height="294" key="GridCell.Tab.0.right" timestamp="1605870331384">
|
|
||||||
<screen x="0" y="0" width="1440" height="900" />
|
|
||||||
</state>
|
|
||||||
<state width="1398" height="294" key="GridCell.Tab.0.right/0.0.1440.900@0.0.1440.900" timestamp="1605870331384" />
|
|
||||||
<state width="1398" height="294" key="GridCell.Tab.1.bottom" timestamp="1605870331389">
|
|
||||||
<screen x="0" y="0" width="1440" height="900" />
|
|
||||||
</state>
|
|
||||||
<state width="1398" height="294" key="GridCell.Tab.1.bottom/0.0.1440.900@0.0.1440.900" timestamp="1605870331389" />
|
|
||||||
<state width="1398" height="294" key="GridCell.Tab.1.center" timestamp="1605870331386">
|
|
||||||
<screen x="0" y="0" width="1440" height="900" />
|
|
||||||
</state>
|
|
||||||
<state width="1398" height="294" key="GridCell.Tab.1.center/0.0.1440.900@0.0.1440.900" timestamp="1605870331386" />
|
|
||||||
<state width="1398" height="294" key="GridCell.Tab.1.left" timestamp="1605870331385">
|
|
||||||
<screen x="0" y="0" width="1440" height="900" />
|
|
||||||
</state>
|
|
||||||
<state width="1398" height="294" key="GridCell.Tab.1.left/0.0.1440.900@0.0.1440.900" timestamp="1605870331385" />
|
|
||||||
<state width="1398" height="294" key="GridCell.Tab.1.right" timestamp="1605870331388">
|
|
||||||
<screen x="0" y="0" width="1440" height="900" />
|
|
||||||
</state>
|
|
||||||
<state width="1398" height="294" key="GridCell.Tab.1.right/0.0.1440.900@0.0.1440.900" timestamp="1605870331388" />
|
|
||||||
<state x="378" y="212" width="683" height="476" key="find.popup" timestamp="1605870222913">
|
|
||||||
<screen x="0" y="0" width="1440" height="900" />
|
|
||||||
</state>
|
|
||||||
<state x="378" y="212" width="683" height="476" key="find.popup/0.0.1440.900@0.0.1440.900" timestamp="1605870222913" />
|
|
||||||
</component>
|
|
||||||
</project>
|
</project>
|
||||||
@@ -12,8 +12,6 @@
|
|||||||
最后,我们真诚的希望能够得到您的反馈,并持续改进我们的产品、文档、服务和操作流程。
|
最后,我们真诚的希望能够得到您的反馈,并持续改进我们的产品、文档、服务和操作流程。
|
||||||
### 服务接口文档
|
### 服务接口文档
|
||||||
---
|
---
|
||||||
- Knife4j
|
|
||||||
- 服务启动后,Knife4j的文档入口地址 [http://localhost:8082/doc.html#/plus](http://localhost:8082/doc.html#/plus)
|
|
||||||
- Postman
|
- Postman
|
||||||
- 无需启动服务,即可将当前工程的接口导出成Postman格式。在工程的common/common-tools/模块下,找到ExportApiApp文件,并执行main函数。
|
- 无需启动服务,即可将当前工程的接口导出成Postman格式。在工程的common/common-tools/模块下,找到ExportApiApp文件,并执行main函数。
|
||||||
|
|
||||||
|
|||||||
@@ -91,24 +91,6 @@
|
|||||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.13" level="project" />
|
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.13" level="project" />
|
||||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.11" level="project" />
|
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.11" level="project" />
|
||||||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:2.0" level="project" />
|
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:2.0" level="project" />
|
||||||
<orderEntry type="module" module-name="common-swagger" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-micro-spring-boot-starter:2.0.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring-boot-autoconfigure:2.0.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring:2.0.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-annotations:2.0.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-core:2.0.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.25.0-GA" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.22" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.22" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-bean-validators:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:2.2.1.RELEASE" level="project" />
|
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:2.2.1.RELEASE" level="project" />
|
||||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-client:1.2.1" level="project" />
|
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-client:1.2.1" level="project" />
|
||||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-common:1.2.1" level="project" />
|
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-common:1.2.1" level="project" />
|
||||||
@@ -265,7 +247,7 @@
|
|||||||
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.13.2" level="project" />
|
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.13.2" level="project" />
|
||||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.1" level="project" />
|
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.1" level="project" />
|
||||||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.1.0" level="project" />
|
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.1.0" level="project" />
|
||||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.8" level="project" />
|
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy:1.10.8" level="project" />
|
||||||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.8" level="project" />
|
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.8" level="project" />
|
||||||
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
|
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
|
||||||
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
|
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
|
||||||
|
|||||||
@@ -26,11 +26,5 @@
|
|||||||
<artifactId>common-core</artifactId>
|
<artifactId>common-core</artifactId>
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- knife4j 接口文档框架 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.orange.demo</groupId>
|
|
||||||
<artifactId>common-swagger</artifactId>
|
|
||||||
<version>1.0.0</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ package com.orange.demo.courseclassinterface.client;
|
|||||||
import com.orange.demo.common.core.base.client.BaseFallbackFactory;
|
import com.orange.demo.common.core.base.client.BaseFallbackFactory;
|
||||||
import com.orange.demo.common.core.base.client.BaseClient;
|
import com.orange.demo.common.core.base.client.BaseClient;
|
||||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||||
import com.orange.demo.common.core.object.MyQueryParam;
|
import com.orange.demo.common.core.object.*;
|
||||||
import com.orange.demo.common.core.object.ResponseResult;
|
|
||||||
import com.orange.demo.courseclassinterface.dto.AreaCodeDto;
|
import com.orange.demo.courseclassinterface.dto.AreaCodeDto;
|
||||||
|
import com.orange.demo.courseclassinterface.vo.AreaCodeVo;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -20,7 +20,7 @@ import java.util.*;
|
|||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@FeignClient(name = "system-service", fallbackFactory = AreaCodeClient.AreaCodeClientFallbackFactory.class)
|
@FeignClient(name = "system-service", fallbackFactory = AreaCodeClient.AreaCodeClientFallbackFactory.class)
|
||||||
public interface AreaCodeClient extends BaseClient<AreaCodeDto, Long> {
|
public interface AreaCodeClient extends BaseClient<AreaCodeDto, AreaCodeVo, Long> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据主键Id集合,返回给定的数据集合。
|
* 根据主键Id集合,返回给定的数据集合。
|
||||||
@@ -31,7 +31,7 @@ public interface AreaCodeClient extends BaseClient<AreaCodeDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/areaCode/listByIds")
|
@PostMapping("/areaCode/listByIds")
|
||||||
ResponseResult<List<AreaCodeDto>> listByIds(
|
ResponseResult<List<AreaCodeVo>> listByIds(
|
||||||
@RequestParam("areaCodeIds") Set<Long> areaCodeIds,
|
@RequestParam("areaCodeIds") Set<Long> areaCodeIds,
|
||||||
@RequestParam("withDict") Boolean withDict);
|
@RequestParam("withDict") Boolean withDict);
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ public interface AreaCodeClient extends BaseClient<AreaCodeDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@GetMapping("/areaCode/getById")
|
@GetMapping("/areaCode/getById")
|
||||||
ResponseResult<AreaCodeDto> getById(
|
ResponseResult<AreaCodeVo> getById(
|
||||||
@RequestParam("areaId") Long areaId,
|
@RequestParam("areaId") Long areaId,
|
||||||
@RequestParam("withDict") Boolean withDict);
|
@RequestParam("withDict") Boolean withDict);
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ public interface AreaCodeClient extends BaseClient<AreaCodeDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/areaCode/listBy")
|
@PostMapping("/areaCode/listBy")
|
||||||
ResponseResult<List<AreaCodeDto>> listBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<MyPageData<AreaCodeVo>> listBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取远程主对象中符合查询条件的单条数据对象。
|
* 获取远程主对象中符合查询条件的单条数据对象。
|
||||||
@@ -86,7 +86,7 @@ public interface AreaCodeClient extends BaseClient<AreaCodeDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/areaCode/getBy")
|
@PostMapping("/areaCode/getBy")
|
||||||
ResponseResult<AreaCodeDto> getBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<AreaCodeVo> getBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 以id、name的形式返回所有字典数据的列表。
|
* 以id、name的形式返回所有字典数据的列表。
|
||||||
@@ -108,7 +108,7 @@ public interface AreaCodeClient extends BaseClient<AreaCodeDto, Long> {
|
|||||||
@Component
|
@Component
|
||||||
@Slf4j
|
@Slf4j
|
||||||
class AreaCodeClientFallbackFactory
|
class AreaCodeClientFallbackFactory
|
||||||
extends BaseFallbackFactory<AreaCodeDto, Long, AreaCodeClient> implements AreaCodeClient {
|
extends BaseFallbackFactory<AreaCodeDto, AreaCodeVo, Long, AreaCodeClient> implements AreaCodeClient {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResponseResult<List<Map<String, Object>>> listDict() {
|
public ResponseResult<List<Map<String, Object>>> listDict() {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.orange.demo.common.core.config.FeignConfig;
|
|||||||
import com.orange.demo.common.core.base.client.BaseClient;
|
import com.orange.demo.common.core.base.client.BaseClient;
|
||||||
import com.orange.demo.common.core.object.*;
|
import com.orange.demo.common.core.object.*;
|
||||||
import com.orange.demo.courseclassinterface.dto.CourseDto;
|
import com.orange.demo.courseclassinterface.dto.CourseDto;
|
||||||
|
import com.orange.demo.courseclassinterface.vo.CourseVo;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -22,7 +23,7 @@ import java.util.*;
|
|||||||
name = "course-class",
|
name = "course-class",
|
||||||
configuration = FeignConfig.class,
|
configuration = FeignConfig.class,
|
||||||
fallbackFactory = CourseClient.CourseClientFallbackFactory.class)
|
fallbackFactory = CourseClient.CourseClientFallbackFactory.class)
|
||||||
public interface CourseClient extends BaseClient<CourseDto, Long> {
|
public interface CourseClient extends BaseClient<CourseDto, CourseVo, Long> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基于主键的(In-list)条件获取远程数据接口。
|
* 基于主键的(In-list)条件获取远程数据接口。
|
||||||
@@ -33,7 +34,7 @@ public interface CourseClient extends BaseClient<CourseDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/course/listByIds")
|
@PostMapping("/course/listByIds")
|
||||||
ResponseResult<List<CourseDto>> listByIds(
|
ResponseResult<List<CourseVo>> listByIds(
|
||||||
@RequestParam("courseIds") Set<Long> courseIds,
|
@RequestParam("courseIds") Set<Long> courseIds,
|
||||||
@RequestParam("withDict") Boolean withDict);
|
@RequestParam("withDict") Boolean withDict);
|
||||||
|
|
||||||
@@ -46,7 +47,7 @@ public interface CourseClient extends BaseClient<CourseDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/course/getById")
|
@PostMapping("/course/getById")
|
||||||
ResponseResult<CourseDto> getById(
|
ResponseResult<CourseVo> getById(
|
||||||
@RequestParam("courseId") Long courseId,
|
@RequestParam("courseId") Long courseId,
|
||||||
@RequestParam("withDict") Boolean withDict);
|
@RequestParam("withDict") Boolean withDict);
|
||||||
|
|
||||||
@@ -98,7 +99,7 @@ public interface CourseClient extends BaseClient<CourseDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/course/listBy")
|
@PostMapping("/course/listBy")
|
||||||
ResponseResult<List<CourseDto>> listBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<MyPageData<CourseVo>> listBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取远程主对象中符合查询条件的单条数据对象。
|
* 获取远程主对象中符合查询条件的单条数据对象。
|
||||||
@@ -108,7 +109,7 @@ public interface CourseClient extends BaseClient<CourseDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/course/getBy")
|
@PostMapping("/course/getBy")
|
||||||
ResponseResult<CourseDto> getBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<CourseVo> getBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取远程主对象中符合查询条件的数据列表。
|
* 获取远程主对象中符合查询条件的数据列表。
|
||||||
@@ -119,7 +120,7 @@ public interface CourseClient extends BaseClient<CourseDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/course/listMapBy")
|
@PostMapping("/course/listMapBy")
|
||||||
ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<MyPageData<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取远程主对象中符合查询条件的数据数量。
|
* 获取远程主对象中符合查询条件的数据数量。
|
||||||
@@ -144,7 +145,7 @@ public interface CourseClient extends BaseClient<CourseDto, Long> {
|
|||||||
@Component("CourseClassCourseClientFallbackFactory")
|
@Component("CourseClassCourseClientFallbackFactory")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
class CourseClientFallbackFactory
|
class CourseClientFallbackFactory
|
||||||
extends BaseFallbackFactory<CourseDto, Long, CourseClient> implements CourseClient {
|
extends BaseFallbackFactory<CourseDto, CourseVo, Long, CourseClient> implements CourseClient {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CourseClient create(Throwable throwable) {
|
public CourseClient create(Throwable throwable) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.orange.demo.common.core.config.FeignConfig;
|
|||||||
import com.orange.demo.common.core.base.client.BaseClient;
|
import com.orange.demo.common.core.base.client.BaseClient;
|
||||||
import com.orange.demo.common.core.object.*;
|
import com.orange.demo.common.core.object.*;
|
||||||
import com.orange.demo.courseclassinterface.dto.GradeDto;
|
import com.orange.demo.courseclassinterface.dto.GradeDto;
|
||||||
|
import com.orange.demo.courseclassinterface.vo.GradeVo;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -22,7 +23,7 @@ import java.util.*;
|
|||||||
name = "course-class",
|
name = "course-class",
|
||||||
configuration = FeignConfig.class,
|
configuration = FeignConfig.class,
|
||||||
fallbackFactory = GradeClient.GradeClientFallbackFactory.class)
|
fallbackFactory = GradeClient.GradeClientFallbackFactory.class)
|
||||||
public interface GradeClient extends BaseClient<GradeDto, Integer> {
|
public interface GradeClient extends BaseClient<GradeDto, GradeVo, Integer> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基于主键的(in list)条件获取远程数据接口。
|
* 基于主键的(in list)条件获取远程数据接口。
|
||||||
@@ -33,7 +34,7 @@ public interface GradeClient extends BaseClient<GradeDto, Integer> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/grade/listByIds")
|
@PostMapping("/grade/listByIds")
|
||||||
ResponseResult<List<GradeDto>> listByIds(
|
ResponseResult<List<GradeVo>> listByIds(
|
||||||
@RequestParam("gradeIds") Set<Integer> gradeIds,
|
@RequestParam("gradeIds") Set<Integer> gradeIds,
|
||||||
@RequestParam("withDict") Boolean withDict);
|
@RequestParam("withDict") Boolean withDict);
|
||||||
|
|
||||||
@@ -46,7 +47,7 @@ public interface GradeClient extends BaseClient<GradeDto, Integer> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/grade/getById")
|
@PostMapping("/grade/getById")
|
||||||
ResponseResult<GradeDto> getById(
|
ResponseResult<GradeVo> getById(
|
||||||
@RequestParam("gradeId") Integer gradeId,
|
@RequestParam("gradeId") Integer gradeId,
|
||||||
@RequestParam("withDict") Boolean withDict);
|
@RequestParam("withDict") Boolean withDict);
|
||||||
|
|
||||||
@@ -98,7 +99,7 @@ public interface GradeClient extends BaseClient<GradeDto, Integer> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/grade/listBy")
|
@PostMapping("/grade/listBy")
|
||||||
ResponseResult<List<GradeDto>> listBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<MyPageData<GradeVo>> listBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取远程主对象中符合查询条件的单条数据对象。
|
* 获取远程主对象中符合查询条件的单条数据对象。
|
||||||
@@ -108,12 +109,12 @@ public interface GradeClient extends BaseClient<GradeDto, Integer> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/grade/getBy")
|
@PostMapping("/grade/getBy")
|
||||||
ResponseResult<GradeDto> getBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<GradeVo> getBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
@Component("CourseClassGradeClientFallbackFactory")
|
@Component("CourseClassGradeClientFallbackFactory")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
class GradeClientFallbackFactory
|
class GradeClientFallbackFactory
|
||||||
extends BaseFallbackFactory<GradeDto, Integer, GradeClient> implements GradeClient {
|
extends BaseFallbackFactory<GradeDto, GradeVo, Integer, GradeClient> implements GradeClient {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public GradeClient create(Throwable throwable) {
|
public GradeClient create(Throwable throwable) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.orange.demo.common.core.config.FeignConfig;
|
|||||||
import com.orange.demo.common.core.base.client.BaseClient;
|
import com.orange.demo.common.core.base.client.BaseClient;
|
||||||
import com.orange.demo.common.core.object.*;
|
import com.orange.demo.common.core.object.*;
|
||||||
import com.orange.demo.courseclassinterface.dto.SchoolInfoDto;
|
import com.orange.demo.courseclassinterface.dto.SchoolInfoDto;
|
||||||
|
import com.orange.demo.courseclassinterface.vo.SchoolInfoVo;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -22,7 +23,7 @@ import java.util.*;
|
|||||||
name = "course-class",
|
name = "course-class",
|
||||||
configuration = FeignConfig.class,
|
configuration = FeignConfig.class,
|
||||||
fallbackFactory = SchoolInfoClient.SchoolInfoClientFallbackFactory.class)
|
fallbackFactory = SchoolInfoClient.SchoolInfoClientFallbackFactory.class)
|
||||||
public interface SchoolInfoClient extends BaseClient<SchoolInfoDto, Long> {
|
public interface SchoolInfoClient extends BaseClient<SchoolInfoDto, SchoolInfoVo, Long> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基于主键的(In-list)条件获取远程数据接口。
|
* 基于主键的(In-list)条件获取远程数据接口。
|
||||||
@@ -33,7 +34,7 @@ public interface SchoolInfoClient extends BaseClient<SchoolInfoDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/schoolInfo/listByIds")
|
@PostMapping("/schoolInfo/listByIds")
|
||||||
ResponseResult<List<SchoolInfoDto>> listByIds(
|
ResponseResult<List<SchoolInfoVo>> listByIds(
|
||||||
@RequestParam("schoolIds") Set<Long> schoolIds,
|
@RequestParam("schoolIds") Set<Long> schoolIds,
|
||||||
@RequestParam("withDict") Boolean withDict);
|
@RequestParam("withDict") Boolean withDict);
|
||||||
|
|
||||||
@@ -46,7 +47,7 @@ public interface SchoolInfoClient extends BaseClient<SchoolInfoDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/schoolInfo/getById")
|
@PostMapping("/schoolInfo/getById")
|
||||||
ResponseResult<SchoolInfoDto> getById(
|
ResponseResult<SchoolInfoVo> getById(
|
||||||
@RequestParam("schoolId") Long schoolId,
|
@RequestParam("schoolId") Long schoolId,
|
||||||
@RequestParam("withDict") Boolean withDict);
|
@RequestParam("withDict") Boolean withDict);
|
||||||
|
|
||||||
@@ -98,7 +99,7 @@ public interface SchoolInfoClient extends BaseClient<SchoolInfoDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/schoolInfo/listBy")
|
@PostMapping("/schoolInfo/listBy")
|
||||||
ResponseResult<List<SchoolInfoDto>> listBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<MyPageData<SchoolInfoVo>> listBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取远程主对象中符合查询条件的单条数据对象。
|
* 获取远程主对象中符合查询条件的单条数据对象。
|
||||||
@@ -108,7 +109,7 @@ public interface SchoolInfoClient extends BaseClient<SchoolInfoDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/schoolInfo/getBy")
|
@PostMapping("/schoolInfo/getBy")
|
||||||
ResponseResult<SchoolInfoDto> getBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<SchoolInfoVo> getBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取远程主对象中符合查询条件的数据列表。
|
* 获取远程主对象中符合查询条件的数据列表。
|
||||||
@@ -119,7 +120,7 @@ public interface SchoolInfoClient extends BaseClient<SchoolInfoDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/schoolInfo/listMapBy")
|
@PostMapping("/schoolInfo/listMapBy")
|
||||||
ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<MyPageData<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取远程主对象中符合查询条件的数据数量。
|
* 获取远程主对象中符合查询条件的数据数量。
|
||||||
@@ -144,7 +145,7 @@ public interface SchoolInfoClient extends BaseClient<SchoolInfoDto, Long> {
|
|||||||
@Component("CourseClassSchoolInfoClientFallbackFactory")
|
@Component("CourseClassSchoolInfoClientFallbackFactory")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
class SchoolInfoClientFallbackFactory
|
class SchoolInfoClientFallbackFactory
|
||||||
extends BaseFallbackFactory<SchoolInfoDto, Long, SchoolInfoClient> implements SchoolInfoClient {
|
extends BaseFallbackFactory<SchoolInfoDto, SchoolInfoVo, Long, SchoolInfoClient> implements SchoolInfoClient {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SchoolInfoClient create(Throwable throwable) {
|
public SchoolInfoClient create(Throwable throwable) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.orange.demo.common.core.config.FeignConfig;
|
|||||||
import com.orange.demo.common.core.base.client.BaseClient;
|
import com.orange.demo.common.core.base.client.BaseClient;
|
||||||
import com.orange.demo.common.core.object.*;
|
import com.orange.demo.common.core.object.*;
|
||||||
import com.orange.demo.courseclassinterface.dto.StudentClassDto;
|
import com.orange.demo.courseclassinterface.dto.StudentClassDto;
|
||||||
|
import com.orange.demo.courseclassinterface.vo.StudentClassVo;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -22,7 +23,7 @@ import java.util.*;
|
|||||||
name = "course-class",
|
name = "course-class",
|
||||||
configuration = FeignConfig.class,
|
configuration = FeignConfig.class,
|
||||||
fallbackFactory = StudentClassClient.StudentClassClientFallbackFactory.class)
|
fallbackFactory = StudentClassClient.StudentClassClientFallbackFactory.class)
|
||||||
public interface StudentClassClient extends BaseClient<StudentClassDto, Long> {
|
public interface StudentClassClient extends BaseClient<StudentClassDto, StudentClassVo, Long> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基于主键的(In-list)条件获取远程数据接口。
|
* 基于主键的(In-list)条件获取远程数据接口。
|
||||||
@@ -33,7 +34,7 @@ public interface StudentClassClient extends BaseClient<StudentClassDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/studentClass/listByIds")
|
@PostMapping("/studentClass/listByIds")
|
||||||
ResponseResult<List<StudentClassDto>> listByIds(
|
ResponseResult<List<StudentClassVo>> listByIds(
|
||||||
@RequestParam("classIds") Set<Long> classIds,
|
@RequestParam("classIds") Set<Long> classIds,
|
||||||
@RequestParam("withDict") Boolean withDict);
|
@RequestParam("withDict") Boolean withDict);
|
||||||
|
|
||||||
@@ -46,7 +47,7 @@ public interface StudentClassClient extends BaseClient<StudentClassDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/studentClass/getById")
|
@PostMapping("/studentClass/getById")
|
||||||
ResponseResult<StudentClassDto> getById(
|
ResponseResult<StudentClassVo> getById(
|
||||||
@RequestParam("classId") Long classId,
|
@RequestParam("classId") Long classId,
|
||||||
@RequestParam("withDict") Boolean withDict);
|
@RequestParam("withDict") Boolean withDict);
|
||||||
|
|
||||||
@@ -98,7 +99,7 @@ public interface StudentClassClient extends BaseClient<StudentClassDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/studentClass/listBy")
|
@PostMapping("/studentClass/listBy")
|
||||||
ResponseResult<List<StudentClassDto>> listBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<MyPageData<StudentClassVo>> listBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取远程主对象中符合查询条件的单条数据对象。
|
* 获取远程主对象中符合查询条件的单条数据对象。
|
||||||
@@ -108,7 +109,7 @@ public interface StudentClassClient extends BaseClient<StudentClassDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/studentClass/getBy")
|
@PostMapping("/studentClass/getBy")
|
||||||
ResponseResult<StudentClassDto> getBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<StudentClassVo> getBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取远程主对象中符合查询条件的数据列表。
|
* 获取远程主对象中符合查询条件的数据列表。
|
||||||
@@ -119,7 +120,7 @@ public interface StudentClassClient extends BaseClient<StudentClassDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/studentClass/listMapBy")
|
@PostMapping("/studentClass/listMapBy")
|
||||||
ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<MyPageData<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取远程主对象中符合查询条件的数据数量。
|
* 获取远程主对象中符合查询条件的数据数量。
|
||||||
@@ -144,7 +145,7 @@ public interface StudentClassClient extends BaseClient<StudentClassDto, Long> {
|
|||||||
@Component("CourseClassStudentClassClientFallbackFactory")
|
@Component("CourseClassStudentClassClientFallbackFactory")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
class StudentClassClientFallbackFactory
|
class StudentClassClientFallbackFactory
|
||||||
extends BaseFallbackFactory<StudentClassDto, Long, StudentClassClient> implements StudentClassClient {
|
extends BaseFallbackFactory<StudentClassDto, StudentClassVo, Long, StudentClassClient> implements StudentClassClient {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StudentClassClient create(Throwable throwable) {
|
public StudentClassClient create(Throwable throwable) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.orange.demo.common.core.config.FeignConfig;
|
|||||||
import com.orange.demo.common.core.base.client.BaseClient;
|
import com.orange.demo.common.core.base.client.BaseClient;
|
||||||
import com.orange.demo.common.core.object.*;
|
import com.orange.demo.common.core.object.*;
|
||||||
import com.orange.demo.courseclassinterface.dto.StudentDto;
|
import com.orange.demo.courseclassinterface.dto.StudentDto;
|
||||||
|
import com.orange.demo.courseclassinterface.vo.StudentVo;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -22,7 +23,7 @@ import java.util.*;
|
|||||||
name = "course-class",
|
name = "course-class",
|
||||||
configuration = FeignConfig.class,
|
configuration = FeignConfig.class,
|
||||||
fallbackFactory = StudentClient.StudentClientFallbackFactory.class)
|
fallbackFactory = StudentClient.StudentClientFallbackFactory.class)
|
||||||
public interface StudentClient extends BaseClient<StudentDto, Long> {
|
public interface StudentClient extends BaseClient<StudentDto, StudentVo, Long> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基于主键的(In-list)条件获取远程数据接口。
|
* 基于主键的(In-list)条件获取远程数据接口。
|
||||||
@@ -33,7 +34,7 @@ public interface StudentClient extends BaseClient<StudentDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/student/listByIds")
|
@PostMapping("/student/listByIds")
|
||||||
ResponseResult<List<StudentDto>> listByIds(
|
ResponseResult<List<StudentVo>> listByIds(
|
||||||
@RequestParam("studentIds") Set<Long> studentIds,
|
@RequestParam("studentIds") Set<Long> studentIds,
|
||||||
@RequestParam("withDict") Boolean withDict);
|
@RequestParam("withDict") Boolean withDict);
|
||||||
|
|
||||||
@@ -46,7 +47,7 @@ public interface StudentClient extends BaseClient<StudentDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/student/getById")
|
@PostMapping("/student/getById")
|
||||||
ResponseResult<StudentDto> getById(
|
ResponseResult<StudentVo> getById(
|
||||||
@RequestParam("studentId") Long studentId,
|
@RequestParam("studentId") Long studentId,
|
||||||
@RequestParam("withDict") Boolean withDict);
|
@RequestParam("withDict") Boolean withDict);
|
||||||
|
|
||||||
@@ -98,7 +99,7 @@ public interface StudentClient extends BaseClient<StudentDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/student/listBy")
|
@PostMapping("/student/listBy")
|
||||||
ResponseResult<List<StudentDto>> listBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<MyPageData<StudentVo>> listBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取远程主对象中符合查询条件的单条数据对象。
|
* 获取远程主对象中符合查询条件的单条数据对象。
|
||||||
@@ -108,7 +109,7 @@ public interface StudentClient extends BaseClient<StudentDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/student/getBy")
|
@PostMapping("/student/getBy")
|
||||||
ResponseResult<StudentDto> getBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<StudentVo> getBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取远程主对象中符合查询条件的数据列表。
|
* 获取远程主对象中符合查询条件的数据列表。
|
||||||
@@ -119,7 +120,7 @@ public interface StudentClient extends BaseClient<StudentDto, Long> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/student/listMapBy")
|
@PostMapping("/student/listMapBy")
|
||||||
ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<MyPageData<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取远程主对象中符合查询条件的数据数量。
|
* 获取远程主对象中符合查询条件的数据数量。
|
||||||
@@ -144,7 +145,7 @@ public interface StudentClient extends BaseClient<StudentDto, Long> {
|
|||||||
@Component("CourseClassStudentClientFallbackFactory")
|
@Component("CourseClassStudentClientFallbackFactory")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
class StudentClientFallbackFactory
|
class StudentClientFallbackFactory
|
||||||
extends BaseFallbackFactory<StudentDto, Long, StudentClient> implements StudentClient {
|
extends BaseFallbackFactory<StudentDto, StudentVo, Long, StudentClient> implements StudentClient {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StudentClient create(Throwable throwable) {
|
public StudentClient create(Throwable throwable) {
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package com.orange.demo.courseclassinterface.dto;
|
package com.orange.demo.courseclassinterface.dto;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -10,31 +8,26 @@ import lombok.Data;
|
|||||||
* @author Jerry
|
* @author Jerry
|
||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@ApiModel("行政区划实体对象")
|
|
||||||
@Data
|
@Data
|
||||||
public class AreaCodeDto {
|
public class AreaCodeDto {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 行政区划主键Id
|
* 行政区划主键Id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "行政区划主键Id", required = true)
|
|
||||||
private Long areaId;
|
private Long areaId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 行政区划名称
|
* 行政区划名称
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "行政区划名称")
|
|
||||||
private String areaName;
|
private String areaName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 行政区划级别 (1: 省级别 2: 市级别 3: 区级别)
|
* 行政区划级别 (1: 省级别 2: 市级别 3: 区级别)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "行政区划级别")
|
|
||||||
private Integer areaLevel;
|
private Integer areaLevel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 父级行政区划Id
|
* 父级行政区划Id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "父级行政区划Id")
|
|
||||||
private Long parentId;
|
private Long parentId;
|
||||||
}
|
}
|
||||||
@@ -5,15 +5,12 @@ import com.orange.demo.common.core.validator.ConstDictRef;
|
|||||||
import com.orange.demo.courseclassinterface.constant.CourseDifficult;
|
import com.orange.demo.courseclassinterface.constant.CourseDifficult;
|
||||||
import com.orange.demo.application.common.constant.Subject;
|
import com.orange.demo.application.common.constant.Subject;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CourseDto对象。
|
* CourseDto对象。
|
||||||
@@ -21,41 +18,35 @@ import java.util.Map;
|
|||||||
* @author Jerry
|
* @author Jerry
|
||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@ApiModel("CourseDto实体对象")
|
|
||||||
@Data
|
@Data
|
||||||
public class CourseDto {
|
public class CourseDto {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主键Id。
|
* 主键Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "主键Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||||
private Long courseId;
|
private Long courseId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 课程名称。
|
* 课程名称。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "课程名称", required = true)
|
|
||||||
@NotBlank(message = "数据验证失败,课程名称不能为空!")
|
@NotBlank(message = "数据验证失败,课程名称不能为空!")
|
||||||
private String courseName;
|
private String courseName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 课程价格。
|
* 课程价格。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "课程价格", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,课程价格不能为空!")
|
@NotNull(message = "数据验证失败,课程价格不能为空!")
|
||||||
private BigDecimal price;
|
private BigDecimal price;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 课程描述。
|
* 课程描述。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "课程描述")
|
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 课程难度(0: 容易 1: 普通 2: 很难)。
|
* 课程难度(0: 容易 1: 普通 2: 很难)。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "课程难度(0: 容易 1: 普通 2: 很难)", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,课程难度不能为空!")
|
@NotNull(message = "数据验证失败,课程难度不能为空!")
|
||||||
@ConstDictRef(constDictClass = CourseDifficult.class, message = "数据验证失败,课程难度为无效值!")
|
@ConstDictRef(constDictClass = CourseDifficult.class, message = "数据验证失败,课程难度为无效值!")
|
||||||
private Integer difficulty;
|
private Integer difficulty;
|
||||||
@@ -63,14 +54,12 @@ public class CourseDto {
|
|||||||
/**
|
/**
|
||||||
* 年级Id。
|
* 年级Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "年级Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,所属年级不能为空!")
|
@NotNull(message = "数据验证失败,所属年级不能为空!")
|
||||||
private Integer gradeId;
|
private Integer gradeId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 学科Id。
|
* 学科Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "学科Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,所属学科不能为空!")
|
@NotNull(message = "数据验证失败,所属学科不能为空!")
|
||||||
@ConstDictRef(constDictClass = Subject.class, message = "数据验证失败,所属学科为无效值!")
|
@ConstDictRef(constDictClass = Subject.class, message = "数据验证失败,所属学科为无效值!")
|
||||||
private Integer subjectId;
|
private Integer subjectId;
|
||||||
@@ -78,92 +67,57 @@ public class CourseDto {
|
|||||||
/**
|
/**
|
||||||
* 课时数量。
|
* 课时数量。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "课时数量", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,课时数量不能为空!")
|
@NotNull(message = "数据验证失败,课时数量不能为空!")
|
||||||
private Integer classHour;
|
private Integer classHour;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 多张课程图片地址。
|
* 多张课程图片地址。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "多张课程图片地址", required = true)
|
|
||||||
@NotBlank(message = "数据验证失败,课程图片不能为空!")
|
@NotBlank(message = "数据验证失败,课程图片不能为空!")
|
||||||
private String pictureUrl;
|
private String pictureUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建用户Id。
|
* 创建用户Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "创建用户Id")
|
|
||||||
private Long createUserId;
|
private Long createUserId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间。
|
* 创建时间。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "创建时间")
|
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 最后修改时间。
|
* 最后修改时间。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "最后修改时间")
|
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* price 范围过滤起始值(>=)。
|
* price 范围过滤起始值(>=)。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "price 范围过滤起始值(>=)")
|
|
||||||
private BigDecimal priceStart;
|
private BigDecimal priceStart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* price 范围过滤结束值(<=)。
|
* price 范围过滤结束值(<=)。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "price 范围过滤结束值(<=)")
|
|
||||||
private BigDecimal priceEnd;
|
private BigDecimal priceEnd;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* classHour 范围过滤起始值(>=)。
|
* classHour 范围过滤起始值(>=)。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "classHour 范围过滤起始值(>=)")
|
|
||||||
private Integer classHourStart;
|
private Integer classHourStart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* classHour 范围过滤结束值(<=)。
|
* classHour 范围过滤结束值(<=)。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "classHour 范围过滤结束值(<=)")
|
|
||||||
private Integer classHourEnd;
|
private Integer classHourEnd;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* updateTime 范围过滤起始值(>=)。
|
* updateTime 范围过滤起始值(>=)。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "updateTime 范围过滤起始值(>=)")
|
|
||||||
private String updateTimeStart;
|
private String updateTimeStart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* updateTime 范围过滤结束值(<=)。
|
* updateTime 范围过滤结束值(<=)。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "updateTime 范围过滤结束值(<=)")
|
|
||||||
private String updateTimeEnd;
|
private String updateTimeEnd;
|
||||||
|
|
||||||
/**
|
|
||||||
* courseId 的多对多关联表数据对象,数据对应类型为ClassCourseDto。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> classCourse;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gradeId 字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> gradeIdDictMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* difficulty 常量字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> difficultyDictMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* subjectId 常量字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> subjectIdDictMap;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ package com.orange.demo.courseclassinterface.dto;
|
|||||||
|
|
||||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
@@ -14,21 +12,18 @@ import javax.validation.constraints.*;
|
|||||||
* @author Jerry
|
* @author Jerry
|
||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@ApiModel("GradeDto实体对象")
|
|
||||||
@Data
|
@Data
|
||||||
public class GradeDto {
|
public class GradeDto {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主键Id。
|
* 主键Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "主键Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||||
private Integer gradeId;
|
private Integer gradeId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 年级名称。
|
* 年级名称。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "年级名称", required = true)
|
|
||||||
@NotBlank(message = "数据验证失败,年级名称不能为空!")
|
@NotBlank(message = "数据验证失败,年级名称不能为空!")
|
||||||
private String gradeName;
|
private String gradeName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,13 +2,10 @@ package com.orange.demo.courseclassinterface.dto;
|
|||||||
|
|
||||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SchoolInfoDto对象。
|
* SchoolInfoDto对象。
|
||||||
@@ -16,47 +13,30 @@ import java.util.Map;
|
|||||||
* @author Jerry
|
* @author Jerry
|
||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@ApiModel("SchoolInfoDto实体对象")
|
|
||||||
@Data
|
@Data
|
||||||
public class SchoolInfoDto {
|
public class SchoolInfoDto {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 学校Id。
|
* 学校Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "学校Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,学校Id不能为空!", groups = {UpdateGroup.class})
|
@NotNull(message = "数据验证失败,学校Id不能为空!", groups = {UpdateGroup.class})
|
||||||
private Long schoolId;
|
private Long schoolId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 学校名称。
|
* 学校名称。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "学校名称", required = true)
|
|
||||||
@NotBlank(message = "数据验证失败,学校名称不能为空!")
|
@NotBlank(message = "数据验证失败,学校名称不能为空!")
|
||||||
private String schoolName;
|
private String schoolName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所在省Id。
|
* 所在省Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "所在省Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,所在省份不能为空!")
|
@NotNull(message = "数据验证失败,所在省份不能为空!")
|
||||||
private Long provinceId;
|
private Long provinceId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所在城市Id。
|
* 所在城市Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "所在城市Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,所在城市不能为空!")
|
@NotNull(message = "数据验证失败,所在城市不能为空!")
|
||||||
private Long cityId;
|
private Long cityId;
|
||||||
|
|
||||||
/**
|
|
||||||
* provinceId 字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> provinceIdDictMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* cityId 字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> cityIdDictMap;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,14 +4,11 @@ import com.orange.demo.common.core.validator.UpdateGroup;
|
|||||||
import com.orange.demo.common.core.validator.ConstDictRef;
|
import com.orange.demo.common.core.validator.ConstDictRef;
|
||||||
import com.orange.demo.courseclassinterface.constant.ClassLevel;
|
import com.orange.demo.courseclassinterface.constant.ClassLevel;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* StudentClassDto对象。
|
* StudentClassDto对象。
|
||||||
@@ -19,49 +16,42 @@ import java.util.Map;
|
|||||||
* @author Jerry
|
* @author Jerry
|
||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@ApiModel("StudentClassDto实体对象")
|
|
||||||
@Data
|
@Data
|
||||||
public class StudentClassDto {
|
public class StudentClassDto {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 班级Id。
|
* 班级Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "班级Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,班级Id不能为空!", groups = {UpdateGroup.class})
|
@NotNull(message = "数据验证失败,班级Id不能为空!", groups = {UpdateGroup.class})
|
||||||
private Long classId;
|
private Long classId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 班级名称。
|
* 班级名称。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "班级名称", required = true)
|
|
||||||
@NotBlank(message = "数据验证失败,班级名称不能为空!")
|
@NotBlank(message = "数据验证失败,班级名称不能为空!")
|
||||||
private String className;
|
private String className;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 学校Id。
|
* 学校Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "学校Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,所属校区不能为空!")
|
@NotNull(message = "数据验证失败,所属校区不能为空!")
|
||||||
private Long schoolId;
|
private Long schoolId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 学生班长Id。
|
* 学生班长Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "学生班长Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,班长不能为空!")
|
@NotNull(message = "数据验证失败,班长不能为空!")
|
||||||
private Long leaderId;
|
private Long leaderId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 已完成课时数量。
|
* 已完成课时数量。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "已完成课时数量", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,已完成课时不能为空!")
|
@NotNull(message = "数据验证失败,已完成课时不能为空!")
|
||||||
private Integer finishClassHour;
|
private Integer finishClassHour;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 班级级别(0: 初级班 1: 培优班 2: 冲刺提分班 3: 竞赛班)。
|
* 班级级别(0: 初级班 1: 培优班 2: 冲刺提分班 3: 竞赛班)。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "班级级别(0: 初级班 1: 培优班 2: 冲刺提分班 3: 竞赛班)", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,班级级别不能为空!")
|
@NotNull(message = "数据验证失败,班级级别不能为空!")
|
||||||
@ConstDictRef(constDictClass = ClassLevel.class, message = "数据验证失败,班级级别为无效值!")
|
@ConstDictRef(constDictClass = ClassLevel.class, message = "数据验证失败,班级级别为无效值!")
|
||||||
private Integer classLevel;
|
private Integer classLevel;
|
||||||
@@ -69,30 +59,10 @@ public class StudentClassDto {
|
|||||||
/**
|
/**
|
||||||
* 创建用户。
|
* 创建用户。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "创建用户")
|
|
||||||
private Long createUserId;
|
private Long createUserId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 班级创建时间。
|
* 班级创建时间。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "班级创建时间")
|
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
/**
|
|
||||||
* schoolId 字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> schoolIdDictMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* leaderId 字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> leaderIdDictMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* classLevel 常量字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> classLevelDictMap;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,14 +6,11 @@ import com.orange.demo.application.common.constant.Gender;
|
|||||||
import com.orange.demo.application.common.constant.ExpLevel;
|
import com.orange.demo.application.common.constant.ExpLevel;
|
||||||
import com.orange.demo.application.common.constant.StudentStatus;
|
import com.orange.demo.application.common.constant.StudentStatus;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* StudentDto对象。
|
* StudentDto对象。
|
||||||
@@ -21,56 +18,48 @@ import java.util.Map;
|
|||||||
* @author Jerry
|
* @author Jerry
|
||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@ApiModel("StudentDto实体对象")
|
|
||||||
@Data
|
@Data
|
||||||
public class StudentDto {
|
public class StudentDto {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 学生Id。
|
* 学生Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "学生Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,学生Id不能为空!", groups = {UpdateGroup.class})
|
@NotNull(message = "数据验证失败,学生Id不能为空!", groups = {UpdateGroup.class})
|
||||||
private Long studentId;
|
private Long studentId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录手机。
|
* 登录手机。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "登录手机", required = true)
|
|
||||||
@NotBlank(message = "数据验证失败,手机号码不能为空!")
|
@NotBlank(message = "数据验证失败,手机号码不能为空!")
|
||||||
private String loginMobile;
|
private String loginMobile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 学生姓名。
|
* 学生姓名。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "学生姓名", required = true)
|
|
||||||
@NotBlank(message = "数据验证失败,姓名不能为空!")
|
@NotBlank(message = "数据验证失败,姓名不能为空!")
|
||||||
private String studentName;
|
private String studentName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所在省份Id。
|
* 所在省份Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "所在省份Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,所在省份不能为空!")
|
@NotNull(message = "数据验证失败,所在省份不能为空!")
|
||||||
private Long provinceId;
|
private Long provinceId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所在城市Id。
|
* 所在城市Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "所在城市Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,所在城市不能为空!")
|
@NotNull(message = "数据验证失败,所在城市不能为空!")
|
||||||
private Long cityId;
|
private Long cityId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 区县Id。
|
* 区县Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "区县Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,所在区县不能为空!")
|
@NotNull(message = "数据验证失败,所在区县不能为空!")
|
||||||
private Long districtId;
|
private Long districtId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 学生性别 (0: 女生 1: 男生)。
|
* 学生性别 (0: 女生 1: 男生)。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "学生性别 (0: 女生 1: 男生)", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,性别不能为空!")
|
@NotNull(message = "数据验证失败,性别不能为空!")
|
||||||
@ConstDictRef(constDictClass = Gender.class, message = "数据验证失败,性别为无效值!")
|
@ConstDictRef(constDictClass = Gender.class, message = "数据验证失败,性别为无效值!")
|
||||||
private Integer gender;
|
private Integer gender;
|
||||||
@@ -78,14 +67,12 @@ public class StudentDto {
|
|||||||
/**
|
/**
|
||||||
* 生日。
|
* 生日。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "生日", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,生日不能为空!")
|
@NotNull(message = "数据验证失败,生日不能为空!")
|
||||||
private Date birthday;
|
private Date birthday;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 经验等级 (0: 初级 1: 中级 2: 高级 3: 资深)。
|
* 经验等级 (0: 初级 1: 中级 2: 高级 3: 资深)。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "经验等级 (0: 初级 1: 中级 2: 高级 3: 资深)", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,经验等级不能为空!")
|
@NotNull(message = "数据验证失败,经验等级不能为空!")
|
||||||
@ConstDictRef(constDictClass = ExpLevel.class, message = "数据验证失败,经验等级为无效值!")
|
@ConstDictRef(constDictClass = ExpLevel.class, message = "数据验证失败,经验等级为无效值!")
|
||||||
private Integer experienceLevel;
|
private Integer experienceLevel;
|
||||||
@@ -93,41 +80,35 @@ public class StudentDto {
|
|||||||
/**
|
/**
|
||||||
* 总共充值学币数量。
|
* 总共充值学币数量。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "总共充值学币数量", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,充值学币不能为空!", groups = {UpdateGroup.class})
|
@NotNull(message = "数据验证失败,充值学币不能为空!", groups = {UpdateGroup.class})
|
||||||
private Integer totalCoin;
|
private Integer totalCoin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 可用学币数量。
|
* 可用学币数量。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "可用学币数量", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,剩余学币不能为空!", groups = {UpdateGroup.class})
|
@NotNull(message = "数据验证失败,剩余学币不能为空!", groups = {UpdateGroup.class})
|
||||||
private Integer leftCoin;
|
private Integer leftCoin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 年级Id。
|
* 年级Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "年级Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,年级不能为空!")
|
@NotNull(message = "数据验证失败,年级不能为空!")
|
||||||
private Integer gradeId;
|
private Integer gradeId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校区Id。
|
* 校区Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "校区Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,所属校区不能为空!")
|
@NotNull(message = "数据验证失败,所属校区不能为空!")
|
||||||
private Long schoolId;
|
private Long schoolId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 注册时间。
|
* 注册时间。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "注册时间")
|
|
||||||
private Date registerTime;
|
private Date registerTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 学生状态 (0: 正常 1: 锁定 2: 注销)。
|
* 学生状态 (0: 正常 1: 锁定 2: 注销)。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "学生状态 (0: 正常 1: 锁定 2: 注销)", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,状态 不能为空!", groups = {UpdateGroup.class})
|
@NotNull(message = "数据验证失败,状态 不能为空!", groups = {UpdateGroup.class})
|
||||||
@ConstDictRef(constDictClass = StudentStatus.class, message = "数据验证失败,状态 为无效值!")
|
@ConstDictRef(constDictClass = StudentStatus.class, message = "数据验证失败,状态 为无效值!")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
@@ -135,78 +116,25 @@ public class StudentDto {
|
|||||||
/**
|
/**
|
||||||
* birthday 范围过滤起始值(>=)。
|
* birthday 范围过滤起始值(>=)。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "birthday 范围过滤起始值(>=)")
|
|
||||||
private String birthdayStart;
|
private String birthdayStart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* birthday 范围过滤结束值(<=)。
|
* birthday 范围过滤结束值(<=)。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "birthday 范围过滤结束值(<=)")
|
|
||||||
private String birthdayEnd;
|
private String birthdayEnd;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* registerTime 范围过滤起始值(>=)。
|
* registerTime 范围过滤起始值(>=)。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "registerTime 范围过滤起始值(>=)")
|
|
||||||
private String registerTimeStart;
|
private String registerTimeStart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* registerTime 范围过滤结束值(<=)。
|
* registerTime 范围过滤结束值(<=)。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "registerTime 范围过滤结束值(<=)")
|
|
||||||
private String registerTimeEnd;
|
private String registerTimeEnd;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* true LIKE搜索字符串。
|
* true LIKE搜索字符串。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "LIKE模糊搜索字符串")
|
|
||||||
private String searchString;
|
private String searchString;
|
||||||
|
|
||||||
/**
|
|
||||||
* provinceId 字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> provinceIdDictMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* cityId 字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> cityIdDictMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* districtId 字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> districtIdDictMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gradeId 字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> gradeIdDictMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* schoolId 字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> schoolIdDictMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gender 常量字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> genderDictMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* experienceLevel 常量字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> experienceLevelDictMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* status 常量字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> statusDictMap;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.orange.demo.courseclassinterface.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行政区划VO。
|
||||||
|
*
|
||||||
|
* @author Jerry
|
||||||
|
* @date 2020-08-08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AreaCodeVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行政区划主键Id
|
||||||
|
*/
|
||||||
|
private Long areaId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行政区划名称
|
||||||
|
*/
|
||||||
|
private String areaName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行政区划级别 (1: 省级别 2: 市级别 3: 区级别)
|
||||||
|
*/
|
||||||
|
private Integer areaLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父级行政区划Id
|
||||||
|
*/
|
||||||
|
private Long parentId;
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.orange.demo.courseclassinterface.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClassCourseVO对象。
|
||||||
|
*
|
||||||
|
* @author Jerry
|
||||||
|
* @date 2020-08-08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ClassCourseVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级Id。
|
||||||
|
*/
|
||||||
|
private Long classId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 课程Id。
|
||||||
|
*/
|
||||||
|
private Long courseId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 课程顺序(数值越小越靠前)。
|
||||||
|
*/
|
||||||
|
private Integer courseOrder;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.orange.demo.courseclassinterface.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ClassStudentVO对象。
|
||||||
|
*
|
||||||
|
* @author Jerry
|
||||||
|
* @date 2020-08-08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ClassStudentVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级Id。
|
||||||
|
*/
|
||||||
|
private Long classId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学生Id。
|
||||||
|
*/
|
||||||
|
private Long studentId;
|
||||||
|
}
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
package com.orange.demo.courseclassinterface.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CourseVO对象。
|
||||||
|
*
|
||||||
|
* @author Jerry
|
||||||
|
* @date 2020-08-08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CourseVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键Id。
|
||||||
|
*/
|
||||||
|
private Long courseId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 课程名称。
|
||||||
|
*/
|
||||||
|
private String courseName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 课程价格。
|
||||||
|
*/
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 课程描述。
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 课程难度(0: 容易 1: 普通 2: 很难)。
|
||||||
|
*/
|
||||||
|
private Integer difficulty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年级Id。
|
||||||
|
*/
|
||||||
|
private Integer gradeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学科Id。
|
||||||
|
*/
|
||||||
|
private Integer subjectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 课时数量。
|
||||||
|
*/
|
||||||
|
private Integer classHour;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多张课程图片地址。
|
||||||
|
*/
|
||||||
|
private String pictureUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建用户Id。
|
||||||
|
*/
|
||||||
|
private Long createUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间。
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最后修改时间。
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* courseId 的多对多关联表数据对象,数据对应类型为ClassCourseVo。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> classCourse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gradeId 字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> gradeIdDictMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* difficulty 常量字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> difficultyDictMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* subjectId 常量字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> subjectIdDictMap;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.orange.demo.courseclassinterface.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GradeVO对象。
|
||||||
|
*
|
||||||
|
* @author Jerry
|
||||||
|
* @date 2020-08-08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class GradeVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键Id。
|
||||||
|
*/
|
||||||
|
private Integer gradeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年级名称。
|
||||||
|
*/
|
||||||
|
private String gradeName;
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package com.orange.demo.courseclassinterface.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SchoolInfoVO对象。
|
||||||
|
*
|
||||||
|
* @author Jerry
|
||||||
|
* @date 2020-08-08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SchoolInfoVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学校Id。
|
||||||
|
*/
|
||||||
|
private Long schoolId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学校名称。
|
||||||
|
*/
|
||||||
|
private String schoolName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所在省Id。
|
||||||
|
*/
|
||||||
|
private Long provinceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所在城市Id。
|
||||||
|
*/
|
||||||
|
private Long cityId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* provinceId 字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> provinceIdDictMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cityId 字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> cityIdDictMap;
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
package com.orange.demo.courseclassinterface.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* StudentClassVO对象。
|
||||||
|
*
|
||||||
|
* @author Jerry
|
||||||
|
* @date 2020-08-08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StudentClassVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级Id。
|
||||||
|
*/
|
||||||
|
private Long classId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级名称。
|
||||||
|
*/
|
||||||
|
private String className;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学校Id。
|
||||||
|
*/
|
||||||
|
private Long schoolId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学生班长Id。
|
||||||
|
*/
|
||||||
|
private Long leaderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已完成课时数量。
|
||||||
|
*/
|
||||||
|
private Integer finishClassHour;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级级别(0: 初级班 1: 培优班 2: 冲刺提分班 3: 竞赛班)。
|
||||||
|
*/
|
||||||
|
private Integer classLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建用户。
|
||||||
|
*/
|
||||||
|
private Long createUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级创建时间。
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* schoolId 字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> schoolIdDictMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* leaderId 字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> leaderIdDictMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* classLevel 常量字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> classLevelDictMap;
|
||||||
|
}
|
||||||
@@ -0,0 +1,131 @@
|
|||||||
|
package com.orange.demo.courseclassinterface.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* StudentVO对象。
|
||||||
|
*
|
||||||
|
* @author Jerry
|
||||||
|
* @date 2020-08-08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StudentVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学生Id。
|
||||||
|
*/
|
||||||
|
private Long studentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录手机。
|
||||||
|
*/
|
||||||
|
private String loginMobile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学生姓名。
|
||||||
|
*/
|
||||||
|
private String studentName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所在省份Id。
|
||||||
|
*/
|
||||||
|
private Long provinceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所在城市Id。
|
||||||
|
*/
|
||||||
|
private Long cityId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 区县Id。
|
||||||
|
*/
|
||||||
|
private Long districtId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学生性别 (0: 女生 1: 男生)。
|
||||||
|
*/
|
||||||
|
private Integer gender;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生日。
|
||||||
|
*/
|
||||||
|
private Date birthday;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经验等级 (0: 初级 1: 中级 2: 高级 3: 资深)。
|
||||||
|
*/
|
||||||
|
private Integer experienceLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总共充值学币数量。
|
||||||
|
*/
|
||||||
|
private Integer totalCoin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 可用学币数量。
|
||||||
|
*/
|
||||||
|
private Integer leftCoin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年级Id。
|
||||||
|
*/
|
||||||
|
private Integer gradeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校区Id。
|
||||||
|
*/
|
||||||
|
private Long schoolId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册时间。
|
||||||
|
*/
|
||||||
|
private Date registerTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学生状态 (0: 正常 1: 锁定 2: 注销)。
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* provinceId 字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> provinceIdDictMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cityId 字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> cityIdDictMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* districtId 字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> districtIdDictMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gradeId 字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> gradeIdDictMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* schoolId 字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> schoolIdDictMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gender 常量字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> genderDictMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* experienceLevel 常量字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> experienceLevelDictMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* status 常量字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> statusDictMap;
|
||||||
|
}
|
||||||
@@ -89,23 +89,6 @@
|
|||||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.13" level="project" />
|
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.13" level="project" />
|
||||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.11" level="project" />
|
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.11" level="project" />
|
||||||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:2.0" level="project" />
|
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:2.0" level="project" />
|
||||||
<orderEntry type="module" module-name="common-swagger" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-micro-spring-boot-starter:2.0.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring-boot-autoconfigure:2.0.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring:2.0.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-annotations:2.0.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-core:2.0.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.22" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.22" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-bean-validators:2.9.2" level="project" />
|
|
||||||
<orderEntry type="module" module-name="common-redis" />
|
<orderEntry type="module" module-name="common-redis" />
|
||||||
<orderEntry type="library" name="Maven: redis.clients:jedis:3.1.0" level="project" />
|
<orderEntry type="library" name="Maven: redis.clients:jedis:3.1.0" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.7.0" level="project" />
|
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.7.0" level="project" />
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
package com.orange.demo.courseclassservice.controller;
|
package com.orange.demo.courseclassservice.controller;
|
||||||
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import cn.jimmyshi.beanquery.BeanQuery;
|
import cn.jimmyshi.beanquery.BeanQuery;
|
||||||
import com.orange.demo.common.core.base.controller.BaseController;
|
import com.orange.demo.common.core.base.controller.BaseController;
|
||||||
import com.orange.demo.common.core.base.service.BaseService;
|
import com.orange.demo.common.core.base.service.BaseService;
|
||||||
import com.orange.demo.common.core.util.MyModelUtil;
|
import com.orange.demo.common.core.util.MyModelUtil;
|
||||||
import com.orange.demo.common.core.object.MyQueryParam;
|
import com.orange.demo.common.core.object.*;
|
||||||
import com.orange.demo.common.core.object.ResponseResult;
|
import com.orange.demo.courseclassinterface.vo.AreaCodeVo;
|
||||||
import com.orange.demo.courseclassinterface.dto.AreaCodeDto;
|
|
||||||
import com.orange.demo.courseclassservice.model.AreaCode;
|
import com.orange.demo.courseclassservice.model.AreaCode;
|
||||||
import com.orange.demo.courseclassservice.service.AreaCodeService;
|
import com.orange.demo.courseclassservice.service.AreaCodeService;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
@@ -22,16 +20,15 @@ import java.util.*;
|
|||||||
* @author Jerry
|
* @author Jerry
|
||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@Api(tags = "行政区划数据访问接口")
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/areaCode")
|
@RequestMapping("/areaCode")
|
||||||
public class AreaCodeController extends BaseController<AreaCode, AreaCodeDto, Long> {
|
public class AreaCodeController extends BaseController<AreaCode, AreaCodeVo, Long> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private AreaCodeService areaCodeService;
|
private AreaCodeService areaCodeService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BaseService<AreaCode, AreaCodeDto, Long> service() {
|
protected BaseService<AreaCode, Long> service() {
|
||||||
return areaCodeService;
|
return areaCodeService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,9 +67,9 @@ public class AreaCodeController extends BaseController<AreaCode, AreaCodeDto, Lo
|
|||||||
* @return 应答结果的Data对象中,将包含行政区划对象。
|
* @return 应答结果的Data对象中,将包含行政区划对象。
|
||||||
*/
|
*/
|
||||||
@GetMapping("/view")
|
@GetMapping("/view")
|
||||||
public ResponseResult<AreaCodeDto> view(@RequestParam Long areaId) {
|
public ResponseResult<AreaCodeVo> view(@RequestParam Long areaId) {
|
||||||
AreaCode areaCode = areaCodeService.getById(areaId);
|
AreaCode areaCode = areaCodeService.getById(areaId);
|
||||||
return ResponseResult.success(MyModelUtil.copyTo(areaCode, AreaCodeDto.class));
|
return ResponseResult.success(MyModelUtil.copyTo(areaCode, AreaCodeVo.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -83,7 +80,7 @@ public class AreaCodeController extends BaseController<AreaCode, AreaCodeDto, Lo
|
|||||||
* @return 符合主键(in list)的数据集合。
|
* @return 符合主键(in list)的数据集合。
|
||||||
*/
|
*/
|
||||||
@PostMapping("/listByIds")
|
@PostMapping("/listByIds")
|
||||||
public ResponseResult<List<AreaCodeDto>> listByIds(
|
public ResponseResult<List<AreaCodeVo>> listByIds(
|
||||||
@RequestParam Set<Long> areaCodeIds, @RequestParam Boolean withDict) {
|
@RequestParam Set<Long> areaCodeIds, @RequestParam Boolean withDict) {
|
||||||
return super.baseListByIds(areaCodeIds, withDict, null);
|
return super.baseListByIds(areaCodeIds, withDict, null);
|
||||||
}
|
}
|
||||||
@@ -96,7 +93,7 @@ public class AreaCodeController extends BaseController<AreaCode, AreaCodeDto, Lo
|
|||||||
* @return 应答结果对象,包含主对象数据。
|
* @return 应答结果对象,包含主对象数据。
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getById")
|
@GetMapping("/getById")
|
||||||
public ResponseResult<AreaCodeDto> getById(@RequestParam Long areaId, @RequestParam Boolean withDict) {
|
public ResponseResult<AreaCodeVo> getById(@RequestParam Long areaId, @RequestParam Boolean withDict) {
|
||||||
return super.baseGetById(areaId, withDict, null);
|
return super.baseGetById(areaId, withDict, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,7 +126,7 @@ public class AreaCodeController extends BaseController<AreaCode, AreaCodeDto, Lo
|
|||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||||
*/
|
*/
|
||||||
@PostMapping("/listBy")
|
@PostMapping("/listBy")
|
||||||
public ResponseResult<List<AreaCodeDto>> listBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<MyPageData<AreaCodeVo>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseListBy(queryParam, null);
|
return super.baseListBy(queryParam, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,7 +137,7 @@ public class AreaCodeController extends BaseController<AreaCode, AreaCodeDto, Lo
|
|||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||||
*/
|
*/
|
||||||
@PostMapping("/getBy")
|
@PostMapping("/getBy")
|
||||||
public ResponseResult<AreaCodeDto> getBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<AreaCodeVo> getBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseGetBy(queryParam, null);
|
return super.baseGetBy(queryParam, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ import com.orange.demo.common.core.upload.BaseUpDownloader;
|
|||||||
import com.orange.demo.common.core.upload.UpDownloaderFactory;
|
import com.orange.demo.common.core.upload.UpDownloaderFactory;
|
||||||
import com.orange.demo.common.core.upload.UploadResponseInfo;
|
import com.orange.demo.common.core.upload.UploadResponseInfo;
|
||||||
import com.orange.demo.common.core.upload.UploadStoreInfo;
|
import com.orange.demo.common.core.upload.UploadStoreInfo;
|
||||||
import com.github.pagehelper.Page;
|
|
||||||
import com.github.pagehelper.page.PageMethod;
|
import com.github.pagehelper.page.PageMethod;
|
||||||
import com.orange.demo.courseclassservice.model.*;
|
import com.orange.demo.courseclassservice.model.*;
|
||||||
import com.orange.demo.courseclassservice.service.*;
|
import com.orange.demo.courseclassservice.service.*;
|
||||||
import com.orange.demo.courseclassinterface.dto.*;
|
import com.orange.demo.courseclassinterface.dto.*;
|
||||||
|
import com.orange.demo.courseclassinterface.vo.*;
|
||||||
import com.orange.demo.common.core.object.*;
|
import com.orange.demo.common.core.object.*;
|
||||||
import com.orange.demo.common.core.util.*;
|
import com.orange.demo.common.core.util.*;
|
||||||
import com.orange.demo.common.core.constant.*;
|
import com.orange.demo.common.core.constant.*;
|
||||||
@@ -20,9 +20,6 @@ import com.orange.demo.common.core.annotation.MyRequestBody;
|
|||||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||||
import com.orange.demo.common.redis.cache.SessionCacheHelper;
|
import com.orange.demo.common.redis.cache.SessionCacheHelper;
|
||||||
import com.orange.demo.courseclassservice.config.ApplicationConfig;
|
import com.orange.demo.courseclassservice.config.ApplicationConfig;
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -38,11 +35,10 @@ import java.util.*;
|
|||||||
* @author Jerry
|
* @author Jerry
|
||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@Api(tags = "课程数据管理接口")
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/course")
|
@RequestMapping("/course")
|
||||||
public class CourseController extends BaseController<Course, CourseDto, Long> {
|
public class CourseController extends BaseController<Course, CourseVo, Long> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private CourseService courseService;
|
private CourseService courseService;
|
||||||
@@ -54,7 +50,7 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
|||||||
private UpDownloaderFactory upDownloaderFactory;
|
private UpDownloaderFactory upDownloaderFactory;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BaseService<Course, CourseDto, Long> service() {
|
protected BaseService<Course, Long> service() {
|
||||||
return courseService;
|
return courseService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,21 +60,13 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
|||||||
* @param courseDto 新增对象。
|
* @param courseDto 新增对象。
|
||||||
* @return 应答结果对象,包含新增对象主键Id。
|
* @return 应答结果对象,包含新增对象主键Id。
|
||||||
*/
|
*/
|
||||||
@ApiOperationSupport(ignoreParameters = {
|
|
||||||
"course.courseId",
|
|
||||||
"course.priceStart",
|
|
||||||
"course.priceEnd",
|
|
||||||
"course.classHourStart",
|
|
||||||
"course.classHourEnd",
|
|
||||||
"course.updateTimeStart",
|
|
||||||
"course.updateTimeEnd"})
|
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
public ResponseResult<Long> add(@MyRequestBody("course") CourseDto courseDto) {
|
public ResponseResult<Long> add(@MyRequestBody("course") CourseDto courseDto) {
|
||||||
String errorMessage = MyCommonUtil.getModelValidationError(courseDto);
|
String errorMessage = MyCommonUtil.getModelValidationError(courseDto);
|
||||||
if (errorMessage != null) {
|
if (errorMessage != null) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
||||||
}
|
}
|
||||||
Course course = Course.INSTANCE.toModel(courseDto);
|
Course course = MyModelUtil.copyTo(courseDto, Course.class);
|
||||||
// 验证关联Id的数据合法性
|
// 验证关联Id的数据合法性
|
||||||
CallResult callResult = courseService.verifyRelatedData(course, null);
|
CallResult callResult = courseService.verifyRelatedData(course, null);
|
||||||
if (!callResult.isSuccess()) {
|
if (!callResult.isSuccess()) {
|
||||||
@@ -95,20 +83,13 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
|||||||
* @param courseDto 更新对象。
|
* @param courseDto 更新对象。
|
||||||
* @return 应答结果对象。
|
* @return 应答结果对象。
|
||||||
*/
|
*/
|
||||||
@ApiOperationSupport(ignoreParameters = {
|
|
||||||
"course.priceStart",
|
|
||||||
"course.priceEnd",
|
|
||||||
"course.classHourStart",
|
|
||||||
"course.classHourEnd",
|
|
||||||
"course.updateTimeStart",
|
|
||||||
"course.updateTimeEnd"})
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
public ResponseResult<Void> update(@MyRequestBody("course") CourseDto courseDto) {
|
public ResponseResult<Void> update(@MyRequestBody("course") CourseDto courseDto) {
|
||||||
String errorMessage = MyCommonUtil.getModelValidationError(courseDto, Default.class, UpdateGroup.class);
|
String errorMessage = MyCommonUtil.getModelValidationError(courseDto, Default.class, UpdateGroup.class);
|
||||||
if (errorMessage != null) {
|
if (errorMessage != null) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
||||||
}
|
}
|
||||||
Course course = Course.INSTANCE.toModel(courseDto);
|
Course course = MyModelUtil.copyTo(courseDto, Course.class);
|
||||||
Course originalCourse = courseService.getById(course.getCourseId());
|
Course originalCourse = courseService.getById(course.getCourseId());
|
||||||
if (originalCourse == null) {
|
if (originalCourse == null) {
|
||||||
// NOTE: 修改下面方括号中的话述
|
// NOTE: 修改下面方括号中的话述
|
||||||
@@ -162,25 +143,18 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
|||||||
* @return 应答结果对象,包含查询结果集。
|
* @return 应答结果对象,包含查询结果集。
|
||||||
*/
|
*/
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
public ResponseResult<MyPageData<CourseDto>> list(
|
public ResponseResult<MyPageData<CourseVo>> list(
|
||||||
@MyRequestBody("courseFilter") CourseDto courseDtoFilter,
|
@MyRequestBody("courseFilter") CourseDto courseDtoFilter,
|
||||||
@MyRequestBody MyOrderParam orderParam,
|
@MyRequestBody MyOrderParam orderParam,
|
||||||
@MyRequestBody MyPageParam pageParam) {
|
@MyRequestBody MyPageParam pageParam) {
|
||||||
if (pageParam != null) {
|
if (pageParam != null) {
|
||||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||||
}
|
}
|
||||||
Course courseFilter = Course.INSTANCE.toModel(courseDtoFilter);
|
Course courseFilter = MyModelUtil.copyTo(courseDtoFilter, Course.class);
|
||||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, Course.class);
|
String orderBy = MyOrderParam.buildOrderBy(orderParam, Course.class);
|
||||||
List<Course> courseList =
|
List<Course> courseList =
|
||||||
courseService.getCourseListWithRelation(courseFilter, orderBy);
|
courseService.getCourseListWithRelation(courseFilter, orderBy);
|
||||||
long totalCount = 0L;
|
return ResponseResult.success(MyPageUtil.makeResponseData(courseList, Course.INSTANCE));
|
||||||
if (courseList instanceof Page) {
|
|
||||||
totalCount = ((Page<Course>) courseList).getTotal();
|
|
||||||
}
|
|
||||||
// 分页连同对象数据转换copy工作,下面的方法一并完成。
|
|
||||||
Tuple2<List<CourseDto>, Long> responseData =
|
|
||||||
new Tuple2<>(Course.INSTANCE.fromModelList(courseList), totalCount);
|
|
||||||
return ResponseResult.success(MyPageUtil.makeResponseData(responseData));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -190,7 +164,7 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
|||||||
* @return 应答结果对象,包含对象详情。
|
* @return 应答结果对象,包含对象详情。
|
||||||
*/
|
*/
|
||||||
@GetMapping("/view")
|
@GetMapping("/view")
|
||||||
public ResponseResult<CourseDto> view(@RequestParam Long courseId) {
|
public ResponseResult<CourseVo> view(@RequestParam Long courseId) {
|
||||||
if (MyCommonUtil.existBlankArgument(courseId)) {
|
if (MyCommonUtil.existBlankArgument(courseId)) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||||
}
|
}
|
||||||
@@ -199,8 +173,8 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
|||||||
if (course == null) {
|
if (course == null) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||||
}
|
}
|
||||||
CourseDto courseDto = Course.INSTANCE.fromModel(course);
|
CourseVo courseVo = Course.INSTANCE.fromModel(course);
|
||||||
return ResponseResult.success(courseDto);
|
return ResponseResult.success(courseVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -317,9 +291,8 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
|||||||
* @param withDict 是否包含字典关联。
|
* @param withDict 是否包含字典关联。
|
||||||
* @return 应答结果对象,包含主对象集合。
|
* @return 应答结果对象,包含主对象集合。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "listByIds")
|
|
||||||
@PostMapping("/listByIds")
|
@PostMapping("/listByIds")
|
||||||
public ResponseResult<List<CourseDto>> listByIds(
|
public ResponseResult<List<CourseVo>> listByIds(
|
||||||
@RequestParam Set<Long> courseIds, @RequestParam Boolean withDict) {
|
@RequestParam Set<Long> courseIds, @RequestParam Boolean withDict) {
|
||||||
return super.baseListByIds(courseIds, withDict, Course.INSTANCE);
|
return super.baseListByIds(courseIds, withDict, Course.INSTANCE);
|
||||||
}
|
}
|
||||||
@@ -331,9 +304,8 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
|||||||
* @param withDict 是否包含字典关联。
|
* @param withDict 是否包含字典关联。
|
||||||
* @return 应答结果对象,包含主对象数据。
|
* @return 应答结果对象,包含主对象数据。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "getById")
|
|
||||||
@PostMapping("/getById")
|
@PostMapping("/getById")
|
||||||
public ResponseResult<CourseDto> getById(
|
public ResponseResult<CourseVo> getById(
|
||||||
@RequestParam Long courseId, @RequestParam Boolean withDict) {
|
@RequestParam Long courseId, @RequestParam Boolean withDict) {
|
||||||
return super.baseGetById(courseId, withDict, Course.INSTANCE);
|
return super.baseGetById(courseId, withDict, Course.INSTANCE);
|
||||||
}
|
}
|
||||||
@@ -344,7 +316,6 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
|||||||
* @param courseIds 主键Id集合。
|
* @param courseIds 主键Id集合。
|
||||||
* @return 应答结果对象,包含true全部存在,否则false。
|
* @return 应答结果对象,包含true全部存在,否则false。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "existIds")
|
|
||||||
@PostMapping("/existIds")
|
@PostMapping("/existIds")
|
||||||
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> courseIds) {
|
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> courseIds) {
|
||||||
return super.baseExistIds(courseIds);
|
return super.baseExistIds(courseIds);
|
||||||
@@ -356,7 +327,6 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
|||||||
* @param courseId 主键Id。
|
* @param courseId 主键Id。
|
||||||
* @return 应答结果对象,包含true表示存在,否则false。
|
* @return 应答结果对象,包含true表示存在,否则false。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "existId")
|
|
||||||
@PostMapping("/existId")
|
@PostMapping("/existId")
|
||||||
public ResponseResult<Boolean> existId(@RequestParam Long courseId) {
|
public ResponseResult<Boolean> existId(@RequestParam Long courseId) {
|
||||||
return super.baseExistId(courseId);
|
return super.baseExistId(courseId);
|
||||||
@@ -368,33 +338,30 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
|||||||
* @param filter 过滤对象。
|
* @param filter 过滤对象。
|
||||||
* @return 删除数量。
|
* @return 删除数量。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "deleteBy")
|
|
||||||
@PostMapping("/deleteBy")
|
@PostMapping("/deleteBy")
|
||||||
public ResponseResult<Integer> deleteBy(@RequestBody CourseDto filter) throws Exception {
|
public ResponseResult<Integer> deleteBy(@RequestBody CourseDto filter) throws Exception {
|
||||||
return super.baseDeleteBy(filter, Course.INSTANCE);
|
return super.baseDeleteBy(MyModelUtil.copyTo(filter, Course.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分页和排序等。主要用于微服务间远程过程调用。
|
||||||
*
|
*
|
||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空,则不会执行分页操作,只是基于MyPageData对象返回数据结果。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "listBy")
|
|
||||||
@PostMapping("/listBy")
|
@PostMapping("/listBy")
|
||||||
public ResponseResult<List<CourseDto>> listBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<MyPageData<CourseVo>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseListBy(queryParam, Course.INSTANCE);
|
return super.baseListBy(queryParam, Course.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分页和排序等。主要用于微服务间远程过程调用。
|
||||||
*
|
*
|
||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空,则不会执行分页操作,只是基于MyPageData对象返回数据结果。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "listMapBy")
|
|
||||||
@PostMapping("/listMapBy")
|
@PostMapping("/listMapBy")
|
||||||
public ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<MyPageData<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseListMapBy(queryParam, Course.INSTANCE);
|
return super.baseListMapBy(queryParam, Course.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -404,9 +371,8 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
|||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "getBy")
|
|
||||||
@PostMapping("/getBy")
|
@PostMapping("/getBy")
|
||||||
public ResponseResult<CourseDto> getBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<CourseVo> getBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseGetBy(queryParam, Course.INSTANCE);
|
return super.baseGetBy(queryParam, Course.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -416,7 +382,6 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
|||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含结果数量。
|
* @return 应答结果对象,包含结果数量。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "countBy")
|
|
||||||
@PostMapping("/countBy")
|
@PostMapping("/countBy")
|
||||||
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseCountBy(queryParam);
|
return super.baseCountBy(queryParam);
|
||||||
@@ -428,7 +393,6 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
|||||||
* @param aggregationParam 聚合参数。
|
* @param aggregationParam 聚合参数。
|
||||||
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "aggregateBy")
|
|
||||||
@PostMapping("/aggregateBy")
|
@PostMapping("/aggregateBy")
|
||||||
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
|
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
|
||||||
return super.baseAggregateBy(aggregationParam);
|
return super.baseAggregateBy(aggregationParam);
|
||||||
|
|||||||
@@ -1,20 +1,17 @@
|
|||||||
package com.orange.demo.courseclassservice.controller;
|
package com.orange.demo.courseclassservice.controller;
|
||||||
|
|
||||||
import cn.jimmyshi.beanquery.BeanQuery;
|
import cn.jimmyshi.beanquery.BeanQuery;
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import com.orange.demo.common.core.base.controller.BaseController;
|
import com.orange.demo.common.core.base.controller.BaseController;
|
||||||
import com.orange.demo.common.core.base.service.BaseDictService;
|
import com.orange.demo.common.core.base.service.BaseDictService;
|
||||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||||
import com.orange.demo.common.core.object.MyQueryParam;
|
import com.orange.demo.common.core.object.*;
|
||||||
import com.orange.demo.common.core.object.ResponseResult;
|
|
||||||
import com.orange.demo.common.core.util.MyModelUtil;
|
import com.orange.demo.common.core.util.MyModelUtil;
|
||||||
import com.orange.demo.common.core.util.MyCommonUtil;
|
import com.orange.demo.common.core.util.MyCommonUtil;
|
||||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||||
import com.orange.demo.courseclassinterface.dto.GradeDto;
|
import com.orange.demo.courseclassinterface.dto.GradeDto;
|
||||||
|
import com.orange.demo.courseclassinterface.vo.GradeVo;
|
||||||
import com.orange.demo.courseclassservice.model.Grade;
|
import com.orange.demo.courseclassservice.model.Grade;
|
||||||
import com.orange.demo.courseclassservice.service.GradeService;
|
import com.orange.demo.courseclassservice.service.GradeService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -29,17 +26,16 @@ import java.util.*;
|
|||||||
* @author Jerry
|
* @author Jerry
|
||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@Api(tags = "年级管理接口")
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/grade")
|
@RequestMapping("/grade")
|
||||||
public class GradeController extends BaseController<Grade, GradeDto, Integer> {
|
public class GradeController extends BaseController<Grade, GradeVo, Integer> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private GradeService gradeService;
|
private GradeService gradeService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BaseDictService<Grade, GradeDto, Integer> service() {
|
protected BaseDictService<Grade, Integer> service() {
|
||||||
return gradeService;
|
return gradeService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,7 +45,6 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
|
|||||||
* @param gradeDto 新增对象。
|
* @param gradeDto 新增对象。
|
||||||
* @return 应答结果对象,包含新增对象主键Id。
|
* @return 应答结果对象,包含新增对象主键Id。
|
||||||
*/
|
*/
|
||||||
@ApiOperationSupport(ignoreParameters = {"grade.gradeId"})
|
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
public ResponseResult<Integer> add(@MyRequestBody("grade") GradeDto gradeDto) {
|
public ResponseResult<Integer> add(@MyRequestBody("grade") GradeDto gradeDto) {
|
||||||
String errorMessage = MyCommonUtil.getModelValidationError(gradeDto);
|
String errorMessage = MyCommonUtil.getModelValidationError(gradeDto);
|
||||||
@@ -108,7 +103,7 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
|
|||||||
* @return 应答结果对象,包含对象详情。
|
* @return 应答结果对象,包含对象详情。
|
||||||
*/
|
*/
|
||||||
@GetMapping("/view")
|
@GetMapping("/view")
|
||||||
public ResponseResult<GradeDto> view(@RequestParam Integer gradeId) {
|
public ResponseResult<GradeVo> view(@RequestParam Integer gradeId) {
|
||||||
if (MyCommonUtil.existBlankArgument(gradeId)) {
|
if (MyCommonUtil.existBlankArgument(gradeId)) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||||
}
|
}
|
||||||
@@ -116,8 +111,8 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
|
|||||||
if (grade == null) {
|
if (grade == null) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||||
}
|
}
|
||||||
GradeDto gradeDto = MyModelUtil.copyTo(grade, GradeDto.class);
|
GradeVo gradeVo = MyModelUtil.copyTo(grade, GradeVo.class);
|
||||||
return ResponseResult.success(gradeDto);
|
return ResponseResult.success(gradeVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -140,9 +135,8 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
|
|||||||
* @param withDict 是否包含字典关联。
|
* @param withDict 是否包含字典关联。
|
||||||
* @return 应答结果对象,包含主对象集合。
|
* @return 应答结果对象,包含主对象集合。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "listByIds")
|
|
||||||
@PostMapping("/listByIds")
|
@PostMapping("/listByIds")
|
||||||
public ResponseResult<List<GradeDto>> listByIds(
|
public ResponseResult<List<GradeVo>> listByIds(
|
||||||
@RequestParam Set<Integer> gradeIds, @RequestParam Boolean withDict) {
|
@RequestParam Set<Integer> gradeIds, @RequestParam Boolean withDict) {
|
||||||
return super.baseListByIds(gradeIds, withDict, null);
|
return super.baseListByIds(gradeIds, withDict, null);
|
||||||
}
|
}
|
||||||
@@ -154,9 +148,8 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
|
|||||||
* @param withDict 是否包含字典关联。
|
* @param withDict 是否包含字典关联。
|
||||||
* @return 应答结果对象,包含主对象数据。
|
* @return 应答结果对象,包含主对象数据。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "getById")
|
|
||||||
@PostMapping("/getById")
|
@PostMapping("/getById")
|
||||||
public ResponseResult<GradeDto> getById(
|
public ResponseResult<GradeVo> getById(
|
||||||
@RequestParam Integer gradeId, @RequestParam Boolean withDict) {
|
@RequestParam Integer gradeId, @RequestParam Boolean withDict) {
|
||||||
return super.baseGetById(gradeId, withDict, null);
|
return super.baseGetById(gradeId, withDict, null);
|
||||||
}
|
}
|
||||||
@@ -167,7 +160,6 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
|
|||||||
* @param gradeIds 主键Id集合。
|
* @param gradeIds 主键Id集合。
|
||||||
* @return 应答结果对象,包含true全部存在,否则false。
|
* @return 应答结果对象,包含true全部存在,否则false。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "existIds")
|
|
||||||
@PostMapping("/existIds")
|
@PostMapping("/existIds")
|
||||||
public ResponseResult<Boolean> existIds(@RequestParam Set<Integer> gradeIds) {
|
public ResponseResult<Boolean> existIds(@RequestParam Set<Integer> gradeIds) {
|
||||||
return super.baseExistIds(gradeIds);
|
return super.baseExistIds(gradeIds);
|
||||||
@@ -179,7 +171,6 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
|
|||||||
* @param gradeId 主键Id。
|
* @param gradeId 主键Id。
|
||||||
* @return 应答结果对象,包含true全部存在,否则false。
|
* @return 应答结果对象,包含true全部存在,否则false。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "existId")
|
|
||||||
@PostMapping("/existId")
|
@PostMapping("/existId")
|
||||||
public ResponseResult<Boolean> existId(@RequestParam Integer gradeId) {
|
public ResponseResult<Boolean> existId(@RequestParam Integer gradeId) {
|
||||||
return super.baseExistId(gradeId);
|
return super.baseExistId(gradeId);
|
||||||
@@ -191,10 +182,9 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
|
|||||||
* @param filter 过滤对象。
|
* @param filter 过滤对象。
|
||||||
* @return 删除数量。
|
* @return 删除数量。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "deleteBy")
|
|
||||||
@PostMapping("/deleteBy")
|
@PostMapping("/deleteBy")
|
||||||
public ResponseResult<Integer> deleteBy(@RequestBody GradeDto filter) throws Exception {
|
public ResponseResult<Integer> deleteBy(@RequestBody GradeDto filter) throws Exception {
|
||||||
return super.baseDeleteBy(filter, null);
|
return super.baseDeleteBy(MyModelUtil.copyTo(filter, Grade.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -203,9 +193,8 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
|
|||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "listBy")
|
|
||||||
@PostMapping("/listBy")
|
@PostMapping("/listBy")
|
||||||
public ResponseResult<List<GradeDto>> listBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<MyPageData<GradeVo>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseListBy(queryParam, null);
|
return super.baseListBy(queryParam, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,9 +204,8 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
|
|||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "getBy")
|
|
||||||
@PostMapping("/getBy")
|
@PostMapping("/getBy")
|
||||||
public ResponseResult<GradeDto> getBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<GradeVo> getBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseGetBy(queryParam, null);
|
return super.baseGetBy(queryParam, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package com.orange.demo.courseclassservice.controller;
|
package com.orange.demo.courseclassservice.controller;
|
||||||
|
|
||||||
import cn.jimmyshi.beanquery.BeanQuery;
|
import cn.jimmyshi.beanquery.BeanQuery;
|
||||||
import com.github.pagehelper.Page;
|
|
||||||
import com.github.pagehelper.page.PageMethod;
|
import com.github.pagehelper.page.PageMethod;
|
||||||
import com.orange.demo.courseclassservice.model.*;
|
import com.orange.demo.courseclassservice.model.*;
|
||||||
import com.orange.demo.courseclassservice.service.*;
|
import com.orange.demo.courseclassservice.service.*;
|
||||||
import com.orange.demo.courseclassinterface.dto.*;
|
import com.orange.demo.courseclassinterface.dto.*;
|
||||||
|
import com.orange.demo.courseclassinterface.vo.*;
|
||||||
import com.orange.demo.common.core.object.*;
|
import com.orange.demo.common.core.object.*;
|
||||||
import com.orange.demo.common.core.util.*;
|
import com.orange.demo.common.core.util.*;
|
||||||
import com.orange.demo.common.core.constant.*;
|
import com.orange.demo.common.core.constant.*;
|
||||||
@@ -13,9 +13,6 @@ import com.orange.demo.common.core.base.controller.BaseController;
|
|||||||
import com.orange.demo.common.core.base.service.BaseService;
|
import com.orange.demo.common.core.base.service.BaseService;
|
||||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -29,17 +26,16 @@ import java.util.*;
|
|||||||
* @author Jerry
|
* @author Jerry
|
||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@Api(tags = "校区数据管理接口")
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/schoolInfo")
|
@RequestMapping("/schoolInfo")
|
||||||
public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoDto, Long> {
|
public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoVo, Long> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SchoolInfoService schoolInfoService;
|
private SchoolInfoService schoolInfoService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BaseService<SchoolInfo, SchoolInfoDto, Long> service() {
|
protected BaseService<SchoolInfo, Long> service() {
|
||||||
return schoolInfoService;
|
return schoolInfoService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,14 +45,13 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
|
|||||||
* @param schoolInfoDto 新增对象。
|
* @param schoolInfoDto 新增对象。
|
||||||
* @return 应答结果对象,包含新增对象主键Id。
|
* @return 应答结果对象,包含新增对象主键Id。
|
||||||
*/
|
*/
|
||||||
@ApiOperationSupport(ignoreParameters = {"schoolInfo.userId"})
|
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
public ResponseResult<Long> add(@MyRequestBody("schoolInfo") SchoolInfoDto schoolInfoDto) {
|
public ResponseResult<Long> add(@MyRequestBody("schoolInfo") SchoolInfoDto schoolInfoDto) {
|
||||||
String errorMessage = MyCommonUtil.getModelValidationError(schoolInfoDto);
|
String errorMessage = MyCommonUtil.getModelValidationError(schoolInfoDto);
|
||||||
if (errorMessage != null) {
|
if (errorMessage != null) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
||||||
}
|
}
|
||||||
SchoolInfo schoolInfo = SchoolInfo.INSTANCE.toModel(schoolInfoDto);
|
SchoolInfo schoolInfo = MyModelUtil.copyTo(schoolInfoDto, SchoolInfo.class);
|
||||||
// 验证关联Id的数据合法性
|
// 验证关联Id的数据合法性
|
||||||
CallResult callResult = schoolInfoService.verifyRelatedData(schoolInfo, null);
|
CallResult callResult = schoolInfoService.verifyRelatedData(schoolInfo, null);
|
||||||
if (!callResult.isSuccess()) {
|
if (!callResult.isSuccess()) {
|
||||||
@@ -79,7 +74,7 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
|
|||||||
if (errorMessage != null) {
|
if (errorMessage != null) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
||||||
}
|
}
|
||||||
SchoolInfo schoolInfo = SchoolInfo.INSTANCE.toModel(schoolInfoDto);
|
SchoolInfo schoolInfo = MyModelUtil.copyTo(schoolInfoDto, SchoolInfo.class);
|
||||||
SchoolInfo originalSchoolInfo = schoolInfoService.getById(schoolInfo.getSchoolId());
|
SchoolInfo originalSchoolInfo = schoolInfoService.getById(schoolInfo.getSchoolId());
|
||||||
if (originalSchoolInfo == null) {
|
if (originalSchoolInfo == null) {
|
||||||
// NOTE: 修改下面方括号中的话述
|
// NOTE: 修改下面方括号中的话述
|
||||||
@@ -133,25 +128,18 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
|
|||||||
* @return 应答结果对象,包含查询结果集。
|
* @return 应答结果对象,包含查询结果集。
|
||||||
*/
|
*/
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
public ResponseResult<MyPageData<SchoolInfoDto>> list(
|
public ResponseResult<MyPageData<SchoolInfoVo>> list(
|
||||||
@MyRequestBody("schoolInfoFilter") SchoolInfoDto schoolInfoDtoFilter,
|
@MyRequestBody("schoolInfoFilter") SchoolInfoDto schoolInfoDtoFilter,
|
||||||
@MyRequestBody MyOrderParam orderParam,
|
@MyRequestBody MyOrderParam orderParam,
|
||||||
@MyRequestBody MyPageParam pageParam) {
|
@MyRequestBody MyPageParam pageParam) {
|
||||||
if (pageParam != null) {
|
if (pageParam != null) {
|
||||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||||
}
|
}
|
||||||
SchoolInfo schoolInfoFilter = SchoolInfo.INSTANCE.toModel(schoolInfoDtoFilter);
|
SchoolInfo schoolInfoFilter = MyModelUtil.copyTo(schoolInfoDtoFilter, SchoolInfo.class);
|
||||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, SchoolInfo.class);
|
String orderBy = MyOrderParam.buildOrderBy(orderParam, SchoolInfo.class);
|
||||||
List<SchoolInfo> schoolInfoList =
|
List<SchoolInfo> schoolInfoList =
|
||||||
schoolInfoService.getSchoolInfoListWithRelation(schoolInfoFilter, orderBy);
|
schoolInfoService.getSchoolInfoListWithRelation(schoolInfoFilter, orderBy);
|
||||||
long totalCount = 0L;
|
return ResponseResult.success(MyPageUtil.makeResponseData(schoolInfoList, SchoolInfo.INSTANCE));
|
||||||
if (schoolInfoList instanceof Page) {
|
|
||||||
totalCount = ((Page<SchoolInfo>) schoolInfoList).getTotal();
|
|
||||||
}
|
|
||||||
// 分页连同对象数据转换copy工作,下面的方法一并完成。
|
|
||||||
Tuple2<List<SchoolInfoDto>, Long> responseData =
|
|
||||||
new Tuple2<>(SchoolInfo.INSTANCE.fromModelList(schoolInfoList), totalCount);
|
|
||||||
return ResponseResult.success(MyPageUtil.makeResponseData(responseData));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -161,7 +149,7 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
|
|||||||
* @return 应答结果对象,包含对象详情。
|
* @return 应答结果对象,包含对象详情。
|
||||||
*/
|
*/
|
||||||
@GetMapping("/view")
|
@GetMapping("/view")
|
||||||
public ResponseResult<SchoolInfoDto> view(@RequestParam Long schoolId) {
|
public ResponseResult<SchoolInfoVo> view(@RequestParam Long schoolId) {
|
||||||
if (MyCommonUtil.existBlankArgument(schoolId)) {
|
if (MyCommonUtil.existBlankArgument(schoolId)) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||||
}
|
}
|
||||||
@@ -170,8 +158,8 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
|
|||||||
if (schoolInfo == null) {
|
if (schoolInfo == null) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||||
}
|
}
|
||||||
SchoolInfoDto schoolInfoDto = SchoolInfo.INSTANCE.fromModel(schoolInfo);
|
SchoolInfoVo schoolInfoVo = SchoolInfo.INSTANCE.fromModel(schoolInfo);
|
||||||
return ResponseResult.success(schoolInfoDto);
|
return ResponseResult.success(schoolInfoVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -195,9 +183,8 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
|
|||||||
* @param withDict 是否包含字典关联。
|
* @param withDict 是否包含字典关联。
|
||||||
* @return 应答结果对象,包含主对象集合。
|
* @return 应答结果对象,包含主对象集合。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "listByIds")
|
|
||||||
@PostMapping("/listByIds")
|
@PostMapping("/listByIds")
|
||||||
public ResponseResult<List<SchoolInfoDto>> listByIds(
|
public ResponseResult<List<SchoolInfoVo>> listByIds(
|
||||||
@RequestParam Set<Long> schoolIds, @RequestParam Boolean withDict) {
|
@RequestParam Set<Long> schoolIds, @RequestParam Boolean withDict) {
|
||||||
return super.baseListByIds(schoolIds, withDict, SchoolInfo.INSTANCE);
|
return super.baseListByIds(schoolIds, withDict, SchoolInfo.INSTANCE);
|
||||||
}
|
}
|
||||||
@@ -209,9 +196,8 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
|
|||||||
* @param withDict 是否包含字典关联。
|
* @param withDict 是否包含字典关联。
|
||||||
* @return 应答结果对象,包含主对象数据。
|
* @return 应答结果对象,包含主对象数据。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "getById")
|
|
||||||
@PostMapping("/getById")
|
@PostMapping("/getById")
|
||||||
public ResponseResult<SchoolInfoDto> getById(
|
public ResponseResult<SchoolInfoVo> getById(
|
||||||
@RequestParam Long schoolId, @RequestParam Boolean withDict) {
|
@RequestParam Long schoolId, @RequestParam Boolean withDict) {
|
||||||
return super.baseGetById(schoolId, withDict, SchoolInfo.INSTANCE);
|
return super.baseGetById(schoolId, withDict, SchoolInfo.INSTANCE);
|
||||||
}
|
}
|
||||||
@@ -222,7 +208,6 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
|
|||||||
* @param schoolIds 主键Id集合。
|
* @param schoolIds 主键Id集合。
|
||||||
* @return 应答结果对象,包含true全部存在,否则false。
|
* @return 应答结果对象,包含true全部存在,否则false。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "existIds")
|
|
||||||
@PostMapping("/existIds")
|
@PostMapping("/existIds")
|
||||||
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> schoolIds) {
|
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> schoolIds) {
|
||||||
return super.baseExistIds(schoolIds);
|
return super.baseExistIds(schoolIds);
|
||||||
@@ -234,7 +219,6 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
|
|||||||
* @param schoolId 主键Id。
|
* @param schoolId 主键Id。
|
||||||
* @return 应答结果对象,包含true表示存在,否则false。
|
* @return 应答结果对象,包含true表示存在,否则false。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "existId")
|
|
||||||
@PostMapping("/existId")
|
@PostMapping("/existId")
|
||||||
public ResponseResult<Boolean> existId(@RequestParam Long schoolId) {
|
public ResponseResult<Boolean> existId(@RequestParam Long schoolId) {
|
||||||
return super.baseExistId(schoolId);
|
return super.baseExistId(schoolId);
|
||||||
@@ -246,33 +230,30 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
|
|||||||
* @param filter 过滤对象。
|
* @param filter 过滤对象。
|
||||||
* @return 删除数量。
|
* @return 删除数量。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "deleteBy")
|
|
||||||
@PostMapping("/deleteBy")
|
@PostMapping("/deleteBy")
|
||||||
public ResponseResult<Integer> deleteBy(@RequestBody SchoolInfoDto filter) throws Exception {
|
public ResponseResult<Integer> deleteBy(@RequestBody SchoolInfoDto filter) throws Exception {
|
||||||
return super.baseDeleteBy(filter, SchoolInfo.INSTANCE);
|
return super.baseDeleteBy(MyModelUtil.copyTo(filter, SchoolInfo.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分页和排序等。主要用于微服务间远程过程调用。
|
||||||
*
|
*
|
||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空,则不会执行分页操作,只是基于MyPageData对象返回数据结果。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "listBy")
|
|
||||||
@PostMapping("/listBy")
|
@PostMapping("/listBy")
|
||||||
public ResponseResult<List<SchoolInfoDto>> listBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<MyPageData<SchoolInfoVo>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseListBy(queryParam, SchoolInfo.INSTANCE);
|
return super.baseListBy(queryParam, SchoolInfo.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分页和排序等。主要用于微服务间远程过程调用。
|
||||||
*
|
*
|
||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空,则不会执行分页操作,只是基于MyPageData对象返回数据结果。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "listMapBy")
|
|
||||||
@PostMapping("/listMapBy")
|
@PostMapping("/listMapBy")
|
||||||
public ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<MyPageData<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseListMapBy(queryParam, SchoolInfo.INSTANCE);
|
return super.baseListMapBy(queryParam, SchoolInfo.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -282,9 +263,8 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
|
|||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "getBy")
|
|
||||||
@PostMapping("/getBy")
|
@PostMapping("/getBy")
|
||||||
public ResponseResult<SchoolInfoDto> getBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<SchoolInfoVo> getBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseGetBy(queryParam, SchoolInfo.INSTANCE);
|
return super.baseGetBy(queryParam, SchoolInfo.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -294,7 +274,6 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
|
|||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含结果数量。
|
* @return 应答结果对象,包含结果数量。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "countBy")
|
|
||||||
@PostMapping("/countBy")
|
@PostMapping("/countBy")
|
||||||
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseCountBy(queryParam);
|
return super.baseCountBy(queryParam);
|
||||||
@@ -306,7 +285,6 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
|
|||||||
* @param aggregationParam 聚合参数。
|
* @param aggregationParam 聚合参数。
|
||||||
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "aggregateBy")
|
|
||||||
@PostMapping("/aggregateBy")
|
@PostMapping("/aggregateBy")
|
||||||
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
|
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
|
||||||
return super.baseAggregateBy(aggregationParam);
|
return super.baseAggregateBy(aggregationParam);
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.orange.demo.courseclassservice.controller;
|
package com.orange.demo.courseclassservice.controller;
|
||||||
|
|
||||||
import com.github.pagehelper.Page;
|
|
||||||
import com.github.pagehelper.page.PageMethod;
|
import com.github.pagehelper.page.PageMethod;
|
||||||
import com.orange.demo.courseclassservice.model.*;
|
import com.orange.demo.courseclassservice.model.*;
|
||||||
import com.orange.demo.courseclassservice.service.*;
|
import com.orange.demo.courseclassservice.service.*;
|
||||||
import com.orange.demo.courseclassinterface.dto.*;
|
import com.orange.demo.courseclassinterface.dto.*;
|
||||||
|
import com.orange.demo.courseclassinterface.vo.*;
|
||||||
import com.orange.demo.common.core.object.*;
|
import com.orange.demo.common.core.object.*;
|
||||||
import com.orange.demo.common.core.util.*;
|
import com.orange.demo.common.core.util.*;
|
||||||
import com.orange.demo.common.core.constant.*;
|
import com.orange.demo.common.core.constant.*;
|
||||||
@@ -12,9 +12,6 @@ import com.orange.demo.common.core.base.controller.BaseController;
|
|||||||
import com.orange.demo.common.core.base.service.BaseService;
|
import com.orange.demo.common.core.base.service.BaseService;
|
||||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -29,11 +26,10 @@ import java.util.stream.Collectors;
|
|||||||
* @author Jerry
|
* @author Jerry
|
||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@Api(tags = "班级数据管理接口")
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/studentClass")
|
@RequestMapping("/studentClass")
|
||||||
public class StudentClassController extends BaseController<StudentClass, StudentClassDto, Long> {
|
public class StudentClassController extends BaseController<StudentClass, StudentClassVo, Long> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private StudentClassService studentClassService;
|
private StudentClassService studentClassService;
|
||||||
@@ -43,7 +39,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
private StudentService studentService;
|
private StudentService studentService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BaseService<StudentClass, StudentClassDto, Long> service() {
|
protected BaseService<StudentClass, Long> service() {
|
||||||
return studentClassService;
|
return studentClassService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,14 +49,13 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
* @param studentClassDto 新增对象。
|
* @param studentClassDto 新增对象。
|
||||||
* @return 应答结果对象,包含新增对象主键Id。
|
* @return 应答结果对象,包含新增对象主键Id。
|
||||||
*/
|
*/
|
||||||
@ApiOperationSupport(ignoreParameters = {"studentClass.userId"})
|
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
public ResponseResult<Long> add(@MyRequestBody("studentClass") StudentClassDto studentClassDto) {
|
public ResponseResult<Long> add(@MyRequestBody("studentClass") StudentClassDto studentClassDto) {
|
||||||
String errorMessage = MyCommonUtil.getModelValidationError(studentClassDto);
|
String errorMessage = MyCommonUtil.getModelValidationError(studentClassDto);
|
||||||
if (errorMessage != null) {
|
if (errorMessage != null) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
||||||
}
|
}
|
||||||
StudentClass studentClass = StudentClass.INSTANCE.toModel(studentClassDto);
|
StudentClass studentClass = MyModelUtil.copyTo(studentClassDto, StudentClass.class);
|
||||||
// 验证关联Id的数据合法性
|
// 验证关联Id的数据合法性
|
||||||
CallResult callResult = studentClassService.verifyRelatedData(studentClass, null);
|
CallResult callResult = studentClassService.verifyRelatedData(studentClass, null);
|
||||||
if (!callResult.isSuccess()) {
|
if (!callResult.isSuccess()) {
|
||||||
@@ -83,7 +78,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
if (errorMessage != null) {
|
if (errorMessage != null) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
||||||
}
|
}
|
||||||
StudentClass studentClass = StudentClass.INSTANCE.toModel(studentClassDto);
|
StudentClass studentClass = MyModelUtil.copyTo(studentClassDto, StudentClass.class);
|
||||||
StudentClass originalStudentClass = studentClassService.getById(studentClass.getClassId());
|
StudentClass originalStudentClass = studentClassService.getById(studentClass.getClassId());
|
||||||
if (originalStudentClass == null) {
|
if (originalStudentClass == null) {
|
||||||
// NOTE: 修改下面方括号中的话述
|
// NOTE: 修改下面方括号中的话述
|
||||||
@@ -137,25 +132,18 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
* @return 应答结果对象,包含查询结果集。
|
* @return 应答结果对象,包含查询结果集。
|
||||||
*/
|
*/
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
public ResponseResult<MyPageData<StudentClassDto>> list(
|
public ResponseResult<MyPageData<StudentClassVo>> list(
|
||||||
@MyRequestBody("studentClassFilter") StudentClassDto studentClassDtoFilter,
|
@MyRequestBody("studentClassFilter") StudentClassDto studentClassDtoFilter,
|
||||||
@MyRequestBody MyOrderParam orderParam,
|
@MyRequestBody MyOrderParam orderParam,
|
||||||
@MyRequestBody MyPageParam pageParam) {
|
@MyRequestBody MyPageParam pageParam) {
|
||||||
if (pageParam != null) {
|
if (pageParam != null) {
|
||||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||||
}
|
}
|
||||||
StudentClass studentClassFilter = StudentClass.INSTANCE.toModel(studentClassDtoFilter);
|
StudentClass studentClassFilter = MyModelUtil.copyTo(studentClassDtoFilter, StudentClass.class);
|
||||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, StudentClass.class);
|
String orderBy = MyOrderParam.buildOrderBy(orderParam, StudentClass.class);
|
||||||
List<StudentClass> studentClassList =
|
List<StudentClass> studentClassList =
|
||||||
studentClassService.getStudentClassListWithRelation(studentClassFilter, orderBy);
|
studentClassService.getStudentClassListWithRelation(studentClassFilter, orderBy);
|
||||||
long totalCount = 0L;
|
return ResponseResult.success(MyPageUtil.makeResponseData(studentClassList, StudentClass.INSTANCE));
|
||||||
if (studentClassList instanceof Page) {
|
|
||||||
totalCount = ((Page<StudentClass>) studentClassList).getTotal();
|
|
||||||
}
|
|
||||||
// 分页连同对象数据转换copy工作,下面的方法一并完成。
|
|
||||||
Tuple2<List<StudentClassDto>, Long> responseData =
|
|
||||||
new Tuple2<>(StudentClass.INSTANCE.fromModelList(studentClassList), totalCount);
|
|
||||||
return ResponseResult.success(MyPageUtil.makeResponseData(responseData));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -165,7 +153,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
* @return 应答结果对象,包含对象详情。
|
* @return 应答结果对象,包含对象详情。
|
||||||
*/
|
*/
|
||||||
@GetMapping("/view")
|
@GetMapping("/view")
|
||||||
public ResponseResult<StudentClassDto> view(@RequestParam Long classId) {
|
public ResponseResult<StudentClassVo> view(@RequestParam Long classId) {
|
||||||
if (MyCommonUtil.existBlankArgument(classId)) {
|
if (MyCommonUtil.existBlankArgument(classId)) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||||
}
|
}
|
||||||
@@ -174,8 +162,8 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
if (studentClass == null) {
|
if (studentClass == null) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||||
}
|
}
|
||||||
StudentClassDto studentClassDto = StudentClass.INSTANCE.fromModel(studentClass);
|
StudentClassVo studentClassVo = StudentClass.INSTANCE.fromModel(studentClass);
|
||||||
return ResponseResult.success(studentClassDto);
|
return ResponseResult.success(studentClassVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -189,7 +177,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
* @return 应答结果对象,返回符合条件的数据列表。
|
* @return 应答结果对象,返回符合条件的数据列表。
|
||||||
*/
|
*/
|
||||||
@PostMapping("/listNotInClassCourse")
|
@PostMapping("/listNotInClassCourse")
|
||||||
public ResponseResult<MyPageData<CourseDto>> listNotInClassCourse(
|
public ResponseResult<MyPageData<CourseVo>> listNotInClassCourse(
|
||||||
@MyRequestBody Long classId,
|
@MyRequestBody Long classId,
|
||||||
@MyRequestBody("courseFilter") CourseDto courseDtoFilter,
|
@MyRequestBody("courseFilter") CourseDto courseDtoFilter,
|
||||||
@MyRequestBody MyOrderParam orderParam,
|
@MyRequestBody MyOrderParam orderParam,
|
||||||
@@ -203,7 +191,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
if (pageParam != null) {
|
if (pageParam != null) {
|
||||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||||
}
|
}
|
||||||
Course filter = Course.INSTANCE.toModel(courseDtoFilter);
|
Course filter = MyModelUtil.copyTo(courseDtoFilter, Course.class);
|
||||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, Course.class);
|
String orderBy = MyOrderParam.buildOrderBy(orderParam, Course.class);
|
||||||
List<Course> courseList =
|
List<Course> courseList =
|
||||||
courseService.getNotInCourseListByClassId(classId, filter, orderBy);
|
courseService.getNotInCourseListByClassId(classId, filter, orderBy);
|
||||||
@@ -220,7 +208,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
* @return 应答结果对象,返回符合条件的数据列表。
|
* @return 应答结果对象,返回符合条件的数据列表。
|
||||||
*/
|
*/
|
||||||
@PostMapping("/listClassCourse")
|
@PostMapping("/listClassCourse")
|
||||||
public ResponseResult<MyPageData<CourseDto>> listClassCourse(
|
public ResponseResult<MyPageData<CourseVo>> listClassCourse(
|
||||||
@MyRequestBody Long classId,
|
@MyRequestBody Long classId,
|
||||||
@MyRequestBody("courseFilter") CourseDto courseDtoFilter,
|
@MyRequestBody("courseFilter") CourseDto courseDtoFilter,
|
||||||
@MyRequestBody MyOrderParam orderParam,
|
@MyRequestBody MyOrderParam orderParam,
|
||||||
@@ -234,7 +222,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
if (pageParam != null) {
|
if (pageParam != null) {
|
||||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||||
}
|
}
|
||||||
Course filter = Course.INSTANCE.toModel(courseDtoFilter);
|
Course filter = MyModelUtil.copyTo(courseDtoFilter, Course.class);
|
||||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, Course.class);
|
String orderBy = MyOrderParam.buildOrderBy(orderParam, Course.class);
|
||||||
List<Course> courseList =
|
List<Course> courseList =
|
||||||
courseService.getCourseListByClassId(classId, filter, orderBy);
|
courseService.getCourseListByClassId(classId, filter, orderBy);
|
||||||
@@ -301,7 +289,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
* @return 应答结果对象,包括中间表详情。
|
* @return 应答结果对象,包括中间表详情。
|
||||||
*/
|
*/
|
||||||
@GetMapping("/viewClassCourse")
|
@GetMapping("/viewClassCourse")
|
||||||
public ResponseResult<ClassCourseDto> viewClassCourse(
|
public ResponseResult<ClassCourseVo> viewClassCourse(
|
||||||
@RequestParam Long classId, @RequestParam Long courseId) {
|
@RequestParam Long classId, @RequestParam Long courseId) {
|
||||||
if (MyCommonUtil.existBlankArgument(classId, courseId)) {
|
if (MyCommonUtil.existBlankArgument(classId, courseId)) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||||
@@ -310,8 +298,8 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
if (classCourse == null) {
|
if (classCourse == null) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||||
}
|
}
|
||||||
ClassCourseDto classCourseDto = MyModelUtil.copyTo(classCourse, ClassCourseDto.class);
|
ClassCourseVo classCourseVo = MyModelUtil.copyTo(classCourse, ClassCourseVo.class);
|
||||||
return ResponseResult.success(classCourseDto);
|
return ResponseResult.success(classCourseVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -344,7 +332,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
* @return 应答结果对象,返回符合条件的数据列表。
|
* @return 应答结果对象,返回符合条件的数据列表。
|
||||||
*/
|
*/
|
||||||
@PostMapping("/listNotInClassStudent")
|
@PostMapping("/listNotInClassStudent")
|
||||||
public ResponseResult<MyPageData<StudentDto>> listNotInClassStudent(
|
public ResponseResult<MyPageData<StudentVo>> listNotInClassStudent(
|
||||||
@MyRequestBody Long classId,
|
@MyRequestBody Long classId,
|
||||||
@MyRequestBody("studentFilter") StudentDto studentDtoFilter,
|
@MyRequestBody("studentFilter") StudentDto studentDtoFilter,
|
||||||
@MyRequestBody MyOrderParam orderParam,
|
@MyRequestBody MyOrderParam orderParam,
|
||||||
@@ -358,7 +346,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
if (pageParam != null) {
|
if (pageParam != null) {
|
||||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||||
}
|
}
|
||||||
Student filter = Student.INSTANCE.toModel(studentDtoFilter);
|
Student filter = MyModelUtil.copyTo(studentDtoFilter, Student.class);
|
||||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, Student.class);
|
String orderBy = MyOrderParam.buildOrderBy(orderParam, Student.class);
|
||||||
List<Student> studentList =
|
List<Student> studentList =
|
||||||
studentService.getNotInStudentListByClassId(classId, filter, orderBy);
|
studentService.getNotInStudentListByClassId(classId, filter, orderBy);
|
||||||
@@ -375,7 +363,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
* @return 应答结果对象,返回符合条件的数据列表。
|
* @return 应答结果对象,返回符合条件的数据列表。
|
||||||
*/
|
*/
|
||||||
@PostMapping("/listClassStudent")
|
@PostMapping("/listClassStudent")
|
||||||
public ResponseResult<MyPageData<StudentDto>> listClassStudent(
|
public ResponseResult<MyPageData<StudentVo>> listClassStudent(
|
||||||
@MyRequestBody Long classId,
|
@MyRequestBody Long classId,
|
||||||
@MyRequestBody("studentFilter") StudentDto studentDtoFilter,
|
@MyRequestBody("studentFilter") StudentDto studentDtoFilter,
|
||||||
@MyRequestBody MyOrderParam orderParam,
|
@MyRequestBody MyOrderParam orderParam,
|
||||||
@@ -389,7 +377,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
if (pageParam != null) {
|
if (pageParam != null) {
|
||||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||||
}
|
}
|
||||||
Student filter = Student.INSTANCE.toModel(studentDtoFilter);
|
Student filter = MyModelUtil.copyTo(studentDtoFilter, Student.class);
|
||||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, Student.class);
|
String orderBy = MyOrderParam.buildOrderBy(orderParam, Student.class);
|
||||||
List<Student> studentList =
|
List<Student> studentList =
|
||||||
studentService.getStudentListByClassId(classId, filter, orderBy);
|
studentService.getStudentListByClassId(classId, filter, orderBy);
|
||||||
@@ -454,9 +442,8 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
* @param withDict 是否包含字典关联。
|
* @param withDict 是否包含字典关联。
|
||||||
* @return 应答结果对象,包含主对象集合。
|
* @return 应答结果对象,包含主对象集合。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "listByIds")
|
|
||||||
@PostMapping("/listByIds")
|
@PostMapping("/listByIds")
|
||||||
public ResponseResult<List<StudentClassDto>> listByIds(
|
public ResponseResult<List<StudentClassVo>> listByIds(
|
||||||
@RequestParam Set<Long> classIds, @RequestParam Boolean withDict) {
|
@RequestParam Set<Long> classIds, @RequestParam Boolean withDict) {
|
||||||
return super.baseListByIds(classIds, withDict, StudentClass.INSTANCE);
|
return super.baseListByIds(classIds, withDict, StudentClass.INSTANCE);
|
||||||
}
|
}
|
||||||
@@ -468,9 +455,8 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
* @param withDict 是否包含字典关联。
|
* @param withDict 是否包含字典关联。
|
||||||
* @return 应答结果对象,包含主对象数据。
|
* @return 应答结果对象,包含主对象数据。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "getById")
|
|
||||||
@PostMapping("/getById")
|
@PostMapping("/getById")
|
||||||
public ResponseResult<StudentClassDto> getById(
|
public ResponseResult<StudentClassVo> getById(
|
||||||
@RequestParam Long classId, @RequestParam Boolean withDict) {
|
@RequestParam Long classId, @RequestParam Boolean withDict) {
|
||||||
return super.baseGetById(classId, withDict, StudentClass.INSTANCE);
|
return super.baseGetById(classId, withDict, StudentClass.INSTANCE);
|
||||||
}
|
}
|
||||||
@@ -481,7 +467,6 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
* @param classIds 主键Id集合。
|
* @param classIds 主键Id集合。
|
||||||
* @return 应答结果对象,包含true全部存在,否则false。
|
* @return 应答结果对象,包含true全部存在,否则false。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "existIds")
|
|
||||||
@PostMapping("/existIds")
|
@PostMapping("/existIds")
|
||||||
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> classIds) {
|
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> classIds) {
|
||||||
return super.baseExistIds(classIds);
|
return super.baseExistIds(classIds);
|
||||||
@@ -493,7 +478,6 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
* @param classId 主键Id。
|
* @param classId 主键Id。
|
||||||
* @return 应答结果对象,包含true表示存在,否则false。
|
* @return 应答结果对象,包含true表示存在,否则false。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "existId")
|
|
||||||
@PostMapping("/existId")
|
@PostMapping("/existId")
|
||||||
public ResponseResult<Boolean> existId(@RequestParam Long classId) {
|
public ResponseResult<Boolean> existId(@RequestParam Long classId) {
|
||||||
return super.baseExistId(classId);
|
return super.baseExistId(classId);
|
||||||
@@ -505,33 +489,30 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
* @param filter 过滤对象。
|
* @param filter 过滤对象。
|
||||||
* @return 删除数量。
|
* @return 删除数量。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "deleteBy")
|
|
||||||
@PostMapping("/deleteBy")
|
@PostMapping("/deleteBy")
|
||||||
public ResponseResult<Integer> deleteBy(@RequestBody StudentClassDto filter) throws Exception {
|
public ResponseResult<Integer> deleteBy(@RequestBody StudentClassDto filter) throws Exception {
|
||||||
return super.baseDeleteBy(filter, StudentClass.INSTANCE);
|
return super.baseDeleteBy(MyModelUtil.copyTo(filter, StudentClass.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分页和排序等。主要用于微服务间远程过程调用。
|
||||||
*
|
*
|
||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空,则不会执行分页操作,只是基于MyPageData对象返回数据结果。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "listBy")
|
|
||||||
@PostMapping("/listBy")
|
@PostMapping("/listBy")
|
||||||
public ResponseResult<List<StudentClassDto>> listBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<MyPageData<StudentClassVo>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseListBy(queryParam, StudentClass.INSTANCE);
|
return super.baseListBy(queryParam, StudentClass.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分页和排序等。主要用于微服务间远程过程调用。
|
||||||
*
|
*
|
||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空,则不会执行分页操作,只是基于MyPageData对象返回数据结果。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "listMapBy")
|
|
||||||
@PostMapping("/listMapBy")
|
@PostMapping("/listMapBy")
|
||||||
public ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<MyPageData<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseListMapBy(queryParam, StudentClass.INSTANCE);
|
return super.baseListMapBy(queryParam, StudentClass.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -541,9 +522,8 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "getBy")
|
|
||||||
@PostMapping("/getBy")
|
@PostMapping("/getBy")
|
||||||
public ResponseResult<StudentClassDto> getBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<StudentClassVo> getBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseGetBy(queryParam, StudentClass.INSTANCE);
|
return super.baseGetBy(queryParam, StudentClass.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -553,7 +533,6 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含结果数量。
|
* @return 应答结果对象,包含结果数量。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "countBy")
|
|
||||||
@PostMapping("/countBy")
|
@PostMapping("/countBy")
|
||||||
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseCountBy(queryParam);
|
return super.baseCountBy(queryParam);
|
||||||
@@ -565,7 +544,6 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
|||||||
* @param aggregationParam 聚合参数。
|
* @param aggregationParam 聚合参数。
|
||||||
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "aggregateBy")
|
|
||||||
@PostMapping("/aggregateBy")
|
@PostMapping("/aggregateBy")
|
||||||
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
|
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
|
||||||
return super.baseAggregateBy(aggregationParam);
|
return super.baseAggregateBy(aggregationParam);
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package com.orange.demo.courseclassservice.controller;
|
package com.orange.demo.courseclassservice.controller;
|
||||||
|
|
||||||
import cn.jimmyshi.beanquery.BeanQuery;
|
import cn.jimmyshi.beanquery.BeanQuery;
|
||||||
import com.github.pagehelper.Page;
|
|
||||||
import com.github.pagehelper.page.PageMethod;
|
import com.github.pagehelper.page.PageMethod;
|
||||||
import com.orange.demo.courseclassservice.model.*;
|
import com.orange.demo.courseclassservice.model.*;
|
||||||
import com.orange.demo.courseclassservice.service.*;
|
import com.orange.demo.courseclassservice.service.*;
|
||||||
import com.orange.demo.courseclassinterface.dto.*;
|
import com.orange.demo.courseclassinterface.dto.*;
|
||||||
|
import com.orange.demo.courseclassinterface.vo.*;
|
||||||
import com.orange.demo.common.core.object.*;
|
import com.orange.demo.common.core.object.*;
|
||||||
import com.orange.demo.common.core.util.*;
|
import com.orange.demo.common.core.util.*;
|
||||||
import com.orange.demo.common.core.constant.*;
|
import com.orange.demo.common.core.constant.*;
|
||||||
@@ -13,9 +13,6 @@ import com.orange.demo.common.core.base.controller.BaseController;
|
|||||||
import com.orange.demo.common.core.base.service.BaseService;
|
import com.orange.demo.common.core.base.service.BaseService;
|
||||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -29,17 +26,16 @@ import java.util.*;
|
|||||||
* @author Jerry
|
* @author Jerry
|
||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@Api(tags = "学生数据管理接口")
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/student")
|
@RequestMapping("/student")
|
||||||
public class StudentController extends BaseController<Student, StudentDto, Long> {
|
public class StudentController extends BaseController<Student, StudentVo, Long> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private StudentService studentService;
|
private StudentService studentService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BaseService<Student, StudentDto, Long> service() {
|
protected BaseService<Student, Long> service() {
|
||||||
return studentService;
|
return studentService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,20 +45,13 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
|
|||||||
* @param studentDto 新增对象。
|
* @param studentDto 新增对象。
|
||||||
* @return 应答结果对象,包含新增对象主键Id。
|
* @return 应答结果对象,包含新增对象主键Id。
|
||||||
*/
|
*/
|
||||||
@ApiOperationSupport(ignoreParameters = {
|
|
||||||
"student.studentId",
|
|
||||||
"student.searchString",
|
|
||||||
"student.birthdayStart",
|
|
||||||
"student.birthdayEnd",
|
|
||||||
"student.registerTimeStart",
|
|
||||||
"student.registerTimeEnd"})
|
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
public ResponseResult<Long> add(@MyRequestBody("student") StudentDto studentDto) {
|
public ResponseResult<Long> add(@MyRequestBody("student") StudentDto studentDto) {
|
||||||
String errorMessage = MyCommonUtil.getModelValidationError(studentDto);
|
String errorMessage = MyCommonUtil.getModelValidationError(studentDto);
|
||||||
if (errorMessage != null) {
|
if (errorMessage != null) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
||||||
}
|
}
|
||||||
Student student = Student.INSTANCE.toModel(studentDto);
|
Student student = MyModelUtil.copyTo(studentDto, Student.class);
|
||||||
// 验证关联Id的数据合法性
|
// 验证关联Id的数据合法性
|
||||||
CallResult callResult = studentService.verifyRelatedData(student, null);
|
CallResult callResult = studentService.verifyRelatedData(student, null);
|
||||||
if (!callResult.isSuccess()) {
|
if (!callResult.isSuccess()) {
|
||||||
@@ -79,19 +68,13 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
|
|||||||
* @param studentDto 更新对象。
|
* @param studentDto 更新对象。
|
||||||
* @return 应答结果对象。
|
* @return 应答结果对象。
|
||||||
*/
|
*/
|
||||||
@ApiOperationSupport(ignoreParameters = {
|
|
||||||
"student.searchString",
|
|
||||||
"student.birthdayStart",
|
|
||||||
"student.birthdayEnd",
|
|
||||||
"student.registerTimeStart",
|
|
||||||
"student.registerTimeEnd"})
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
public ResponseResult<Void> update(@MyRequestBody("student") StudentDto studentDto) {
|
public ResponseResult<Void> update(@MyRequestBody("student") StudentDto studentDto) {
|
||||||
String errorMessage = MyCommonUtil.getModelValidationError(studentDto, Default.class, UpdateGroup.class);
|
String errorMessage = MyCommonUtil.getModelValidationError(studentDto, Default.class, UpdateGroup.class);
|
||||||
if (errorMessage != null) {
|
if (errorMessage != null) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
||||||
}
|
}
|
||||||
Student student = Student.INSTANCE.toModel(studentDto);
|
Student student = MyModelUtil.copyTo(studentDto, Student.class);
|
||||||
Student originalStudent = studentService.getById(student.getStudentId());
|
Student originalStudent = studentService.getById(student.getStudentId());
|
||||||
if (originalStudent == null) {
|
if (originalStudent == null) {
|
||||||
// NOTE: 修改下面方括号中的话述
|
// NOTE: 修改下面方括号中的话述
|
||||||
@@ -145,25 +128,18 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
|
|||||||
* @return 应答结果对象,包含查询结果集。
|
* @return 应答结果对象,包含查询结果集。
|
||||||
*/
|
*/
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
public ResponseResult<MyPageData<StudentDto>> list(
|
public ResponseResult<MyPageData<StudentVo>> list(
|
||||||
@MyRequestBody("studentFilter") StudentDto studentDtoFilter,
|
@MyRequestBody("studentFilter") StudentDto studentDtoFilter,
|
||||||
@MyRequestBody MyOrderParam orderParam,
|
@MyRequestBody MyOrderParam orderParam,
|
||||||
@MyRequestBody MyPageParam pageParam) {
|
@MyRequestBody MyPageParam pageParam) {
|
||||||
if (pageParam != null) {
|
if (pageParam != null) {
|
||||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||||
}
|
}
|
||||||
Student studentFilter = Student.INSTANCE.toModel(studentDtoFilter);
|
Student studentFilter = MyModelUtil.copyTo(studentDtoFilter, Student.class);
|
||||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, Student.class);
|
String orderBy = MyOrderParam.buildOrderBy(orderParam, Student.class);
|
||||||
List<Student> studentList =
|
List<Student> studentList =
|
||||||
studentService.getStudentListWithRelation(studentFilter, orderBy);
|
studentService.getStudentListWithRelation(studentFilter, orderBy);
|
||||||
long totalCount = 0L;
|
return ResponseResult.success(MyPageUtil.makeResponseData(studentList, Student.INSTANCE));
|
||||||
if (studentList instanceof Page) {
|
|
||||||
totalCount = ((Page<Student>) studentList).getTotal();
|
|
||||||
}
|
|
||||||
// 分页连同对象数据转换copy工作,下面的方法一并完成。
|
|
||||||
Tuple2<List<StudentDto>, Long> responseData =
|
|
||||||
new Tuple2<>(Student.INSTANCE.fromModelList(studentList), totalCount);
|
|
||||||
return ResponseResult.success(MyPageUtil.makeResponseData(responseData));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -173,7 +149,7 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
|
|||||||
* @return 应答结果对象,包含对象详情。
|
* @return 应答结果对象,包含对象详情。
|
||||||
*/
|
*/
|
||||||
@GetMapping("/view")
|
@GetMapping("/view")
|
||||||
public ResponseResult<StudentDto> view(@RequestParam Long studentId) {
|
public ResponseResult<StudentVo> view(@RequestParam Long studentId) {
|
||||||
if (MyCommonUtil.existBlankArgument(studentId)) {
|
if (MyCommonUtil.existBlankArgument(studentId)) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||||
}
|
}
|
||||||
@@ -182,8 +158,8 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
|
|||||||
if (student == null) {
|
if (student == null) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||||
}
|
}
|
||||||
StudentDto studentDto = Student.INSTANCE.fromModel(student);
|
StudentVo studentVo = Student.INSTANCE.fromModel(student);
|
||||||
return ResponseResult.success(studentDto);
|
return ResponseResult.success(studentVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -207,9 +183,8 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
|
|||||||
* @param withDict 是否包含字典关联。
|
* @param withDict 是否包含字典关联。
|
||||||
* @return 应答结果对象,包含主对象集合。
|
* @return 应答结果对象,包含主对象集合。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "listByIds")
|
|
||||||
@PostMapping("/listByIds")
|
@PostMapping("/listByIds")
|
||||||
public ResponseResult<List<StudentDto>> listByIds(
|
public ResponseResult<List<StudentVo>> listByIds(
|
||||||
@RequestParam Set<Long> studentIds, @RequestParam Boolean withDict) {
|
@RequestParam Set<Long> studentIds, @RequestParam Boolean withDict) {
|
||||||
return super.baseListByIds(studentIds, withDict, Student.INSTANCE);
|
return super.baseListByIds(studentIds, withDict, Student.INSTANCE);
|
||||||
}
|
}
|
||||||
@@ -221,9 +196,8 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
|
|||||||
* @param withDict 是否包含字典关联。
|
* @param withDict 是否包含字典关联。
|
||||||
* @return 应答结果对象,包含主对象数据。
|
* @return 应答结果对象,包含主对象数据。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "getById")
|
|
||||||
@PostMapping("/getById")
|
@PostMapping("/getById")
|
||||||
public ResponseResult<StudentDto> getById(
|
public ResponseResult<StudentVo> getById(
|
||||||
@RequestParam Long studentId, @RequestParam Boolean withDict) {
|
@RequestParam Long studentId, @RequestParam Boolean withDict) {
|
||||||
return super.baseGetById(studentId, withDict, Student.INSTANCE);
|
return super.baseGetById(studentId, withDict, Student.INSTANCE);
|
||||||
}
|
}
|
||||||
@@ -234,7 +208,6 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
|
|||||||
* @param studentIds 主键Id集合。
|
* @param studentIds 主键Id集合。
|
||||||
* @return 应答结果对象,包含true全部存在,否则false。
|
* @return 应答结果对象,包含true全部存在,否则false。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "existIds")
|
|
||||||
@PostMapping("/existIds")
|
@PostMapping("/existIds")
|
||||||
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> studentIds) {
|
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> studentIds) {
|
||||||
return super.baseExistIds(studentIds);
|
return super.baseExistIds(studentIds);
|
||||||
@@ -246,7 +219,6 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
|
|||||||
* @param studentId 主键Id。
|
* @param studentId 主键Id。
|
||||||
* @return 应答结果对象,包含true表示存在,否则false。
|
* @return 应答结果对象,包含true表示存在,否则false。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "existId")
|
|
||||||
@PostMapping("/existId")
|
@PostMapping("/existId")
|
||||||
public ResponseResult<Boolean> existId(@RequestParam Long studentId) {
|
public ResponseResult<Boolean> existId(@RequestParam Long studentId) {
|
||||||
return super.baseExistId(studentId);
|
return super.baseExistId(studentId);
|
||||||
@@ -258,33 +230,30 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
|
|||||||
* @param filter 过滤对象。
|
* @param filter 过滤对象。
|
||||||
* @return 删除数量。
|
* @return 删除数量。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "deleteBy")
|
|
||||||
@PostMapping("/deleteBy")
|
@PostMapping("/deleteBy")
|
||||||
public ResponseResult<Integer> deleteBy(@RequestBody StudentDto filter) throws Exception {
|
public ResponseResult<Integer> deleteBy(@RequestBody StudentDto filter) throws Exception {
|
||||||
return super.baseDeleteBy(filter, Student.INSTANCE);
|
return super.baseDeleteBy(MyModelUtil.copyTo(filter, Student.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分页和排序等。主要用于微服务间远程过程调用。
|
||||||
*
|
*
|
||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空,则不会执行分页操作,只是基于MyPageData对象返回数据结果。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "listBy")
|
|
||||||
@PostMapping("/listBy")
|
@PostMapping("/listBy")
|
||||||
public ResponseResult<List<StudentDto>> listBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<MyPageData<StudentVo>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseListBy(queryParam, Student.INSTANCE);
|
return super.baseListBy(queryParam, Student.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分页和排序等。主要用于微服务间远程过程调用。
|
||||||
*
|
*
|
||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空,则不会执行分页操作,只是基于MyPageData对象返回数据结果。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "listMapBy")
|
|
||||||
@PostMapping("/listMapBy")
|
@PostMapping("/listMapBy")
|
||||||
public ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<MyPageData<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseListMapBy(queryParam, Student.INSTANCE);
|
return super.baseListMapBy(queryParam, Student.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -294,9 +263,8 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
|
|||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "getBy")
|
|
||||||
@PostMapping("/getBy")
|
@PostMapping("/getBy")
|
||||||
public ResponseResult<StudentDto> getBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<StudentVo> getBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseGetBy(queryParam, Student.INSTANCE);
|
return super.baseGetBy(queryParam, Student.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -306,7 +274,6 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
|
|||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含结果数量。
|
* @return 应答结果对象,包含结果数量。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "countBy")
|
|
||||||
@PostMapping("/countBy")
|
@PostMapping("/countBy")
|
||||||
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseCountBy(queryParam);
|
return super.baseCountBy(queryParam);
|
||||||
@@ -318,7 +285,6 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
|
|||||||
* @param aggregationParam 聚合参数。
|
* @param aggregationParam 聚合参数。
|
||||||
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "aggregateBy")
|
|
||||||
@PostMapping("/aggregateBy")
|
@PostMapping("/aggregateBy")
|
||||||
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
|
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
|
||||||
return super.baseAggregateBy(aggregationParam);
|
return super.baseAggregateBy(aggregationParam);
|
||||||
|
|||||||
@@ -20,8 +20,13 @@
|
|||||||
<association property="classCourse" column="course_id" foreignColumn="course_id"
|
<association property="classCourse" column="course_id" foreignColumn="course_id"
|
||||||
notNullColumn="course_id" resultMap="com.orange.demo.courseclassservice.dao.ClassCourseMapper.BaseResultMap" />
|
notNullColumn="course_id" resultMap="com.orange.demo.courseclassservice.dao.ClassCourseMapper.BaseResultMap" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
<!-- 如果有逻辑删除字段过滤,请写到这里 -->
|
||||||
<sql id="filterRef">
|
<sql id="filterRef">
|
||||||
|
<!-- 这里必须加上全包名,否则当filterRef被其他Mapper.xml包含引用的时候,就会调用Mapper.xml中的该SQL片段 -->
|
||||||
|
<include refid="com.orange.demo.courseclassservice.dao.CourseMapper.inputFilterRef"/>
|
||||||
|
</sql>
|
||||||
|
<!-- 这里仅包含调用接口输入的主表过滤条件 -->
|
||||||
|
<sql id="inputFilterRef">
|
||||||
<if test="courseFilter != null">
|
<if test="courseFilter != null">
|
||||||
<if test="courseFilter.courseName != null and courseFilter.courseName != ''">
|
<if test="courseFilter.courseName != null and courseFilter.courseName != ''">
|
||||||
<bind name = "safeCourseName" value = "'%' + courseFilter.courseName + '%'" />
|
<bind name = "safeCourseName" value = "'%' + courseFilter.courseName + '%'" />
|
||||||
|
|||||||
@@ -7,8 +7,13 @@
|
|||||||
<result column="province_id" jdbcType="BIGINT" property="provinceId"/>
|
<result column="province_id" jdbcType="BIGINT" property="provinceId"/>
|
||||||
<result column="city_id" jdbcType="BIGINT" property="cityId"/>
|
<result column="city_id" jdbcType="BIGINT" property="cityId"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
<!-- 如果有逻辑删除字段过滤,请写到这里 -->
|
||||||
<sql id="filterRef">
|
<sql id="filterRef">
|
||||||
|
<!-- 这里必须加上全包名,否则当filterRef被其他Mapper.xml包含引用的时候,就会调用Mapper.xml中的该SQL片段 -->
|
||||||
|
<include refid="com.orange.demo.courseclassservice.dao.SchoolInfoMapper.inputFilterRef"/>
|
||||||
|
</sql>
|
||||||
|
<!-- 这里仅包含调用接口输入的主表过滤条件 -->
|
||||||
|
<sql id="inputFilterRef">
|
||||||
<if test="schoolInfoFilter != null">
|
<if test="schoolInfoFilter != null">
|
||||||
<if test="schoolInfoFilter.schoolName != null and schoolInfoFilter.schoolName != ''">
|
<if test="schoolInfoFilter.schoolName != null and schoolInfoFilter.schoolName != ''">
|
||||||
<bind name = "safeSchoolName" value = "'%' + schoolInfoFilter.schoolName + '%'" />
|
<bind name = "safeSchoolName" value = "'%' + schoolInfoFilter.schoolName + '%'" />
|
||||||
|
|||||||
@@ -12,8 +12,14 @@
|
|||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
<result column="status" jdbcType="TINYINT" property="status"/>
|
<result column="status" jdbcType="TINYINT" property="status"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
<!-- 如果有逻辑删除字段过滤,请写到这里 -->
|
||||||
<sql id="filterRef">
|
<sql id="filterRef">
|
||||||
|
<!-- 这里必须加上全包名,否则当filterRef被其他Mapper.xml包含引用的时候,就会调用Mapper.xml中的该SQL片段 -->
|
||||||
|
<include refid="com.orange.demo.courseclassservice.dao.StudentClassMapper.inputFilterRef"/>
|
||||||
|
AND zz_class.status = ${@com.orange.demo.common.core.constant.GlobalDeletedFlag@NORMAL}
|
||||||
|
</sql>
|
||||||
|
<!-- 这里仅包含调用接口输入的主表过滤条件 -->
|
||||||
|
<sql id="inputFilterRef">
|
||||||
<if test="studentClassFilter != null">
|
<if test="studentClassFilter != null">
|
||||||
<if test="studentClassFilter.className != null and studentClassFilter.className != ''">
|
<if test="studentClassFilter.className != null and studentClassFilter.className != ''">
|
||||||
AND zz_class.class_name = #{studentClassFilter.className}
|
AND zz_class.class_name = #{studentClassFilter.className}
|
||||||
|
|||||||
@@ -18,8 +18,13 @@
|
|||||||
<result column="register_time" jdbcType="TIMESTAMP" property="registerTime"/>
|
<result column="register_time" jdbcType="TIMESTAMP" property="registerTime"/>
|
||||||
<result column="status" jdbcType="TINYINT" property="status"/>
|
<result column="status" jdbcType="TINYINT" property="status"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
<!-- 如果有逻辑删除字段过滤,请写到这里 -->
|
||||||
<sql id="filterRef">
|
<sql id="filterRef">
|
||||||
|
<!-- 这里必须加上全包名,否则当filterRef被其他Mapper.xml包含引用的时候,就会调用Mapper.xml中的该SQL片段 -->
|
||||||
|
<include refid="com.orange.demo.courseclassservice.dao.StudentMapper.inputFilterRef"/>
|
||||||
|
</sql>
|
||||||
|
<!-- 这里仅包含调用接口输入的主表过滤条件 -->
|
||||||
|
<sql id="inputFilterRef">
|
||||||
<if test="studentFilter != null">
|
<if test="studentFilter != null">
|
||||||
<if test="studentFilter.provinceId != null">
|
<if test="studentFilter.provinceId != null">
|
||||||
AND zz_student.province_id = #{studentFilter.provinceId}
|
AND zz_student.province_id = #{studentFilter.provinceId}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import com.orange.demo.common.core.annotation.RelationDict;
|
|||||||
import com.orange.demo.common.core.annotation.RelationConstDict;
|
import com.orange.demo.common.core.annotation.RelationConstDict;
|
||||||
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
||||||
import com.orange.demo.common.core.validator.ConstDictRef;
|
import com.orange.demo.common.core.validator.ConstDictRef;
|
||||||
import com.orange.demo.courseclassinterface.dto.CourseDto;
|
import com.orange.demo.courseclassinterface.vo.CourseVo;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.mapstruct.*;
|
import org.mapstruct.*;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
@@ -174,25 +174,25 @@ public class Course {
|
|||||||
private Map<String, Object> subjectIdDictMap;
|
private Map<String, Object> subjectIdDictMap;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface CourseModelMapper extends BaseModelMapper<CourseDto, Course> {
|
public interface CourseModelMapper extends BaseModelMapper<CourseVo, Course> {
|
||||||
/**
|
/**
|
||||||
* 转换Dto对象到实体对象。
|
* 转换Vo对象到实体对象。
|
||||||
*
|
*
|
||||||
* @param courseDto 域对象。
|
* @param courseVo 域对象。
|
||||||
* @return 实体对象。
|
* @return 实体对象。
|
||||||
*/
|
*/
|
||||||
@Mapping(target = "classCourse", expression = "java(mapToBean(courseDto.getClassCourse(), com.orange.demo.courseclassservice.model.ClassCourse.class))")
|
@Mapping(target = "classCourse", expression = "java(mapToBean(courseVo.getClassCourse(), com.orange.demo.courseclassservice.model.ClassCourse.class))")
|
||||||
@Override
|
@Override
|
||||||
Course toModel(CourseDto courseDto);
|
Course toModel(CourseVo courseVo);
|
||||||
/**
|
/**
|
||||||
* 转换实体对象到Dto对象。
|
* 转换实体对象到VO对象。
|
||||||
*
|
*
|
||||||
* @param course 实体对象。
|
* @param course 实体对象。
|
||||||
* @return 域对象。
|
* @return 域对象。
|
||||||
*/
|
*/
|
||||||
@Mapping(target = "classCourse", expression = "java(beanToMap(course.getClassCourse(), false))")
|
@Mapping(target = "classCourse", expression = "java(beanToMap(course.getClassCourse(), false))")
|
||||||
@Override
|
@Override
|
||||||
CourseDto fromModel(Course course);
|
CourseVo fromModel(Course course);
|
||||||
}
|
}
|
||||||
public static final CourseModelMapper INSTANCE = Mappers.getMapper(CourseModelMapper.class);
|
public static final CourseModelMapper INSTANCE = Mappers.getMapper(CourseModelMapper.class);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package com.orange.demo.courseclassservice.model;
|
|||||||
|
|
||||||
import com.orange.demo.common.core.annotation.RelationDict;
|
import com.orange.demo.common.core.annotation.RelationDict;
|
||||||
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
||||||
import com.orange.demo.courseclassinterface.dto.SchoolInfoDto;
|
import com.orange.demo.courseclassinterface.vo.SchoolInfoVo;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.mapstruct.*;
|
import org.mapstruct.*;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
@@ -69,23 +69,23 @@ public class SchoolInfo {
|
|||||||
private Map<String, Object> cityIdDictMap;
|
private Map<String, Object> cityIdDictMap;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface SchoolInfoModelMapper extends BaseModelMapper<SchoolInfoDto, SchoolInfo> {
|
public interface SchoolInfoModelMapper extends BaseModelMapper<SchoolInfoVo, SchoolInfo> {
|
||||||
/**
|
/**
|
||||||
* 转换Dto对象到实体对象。
|
* 转换Vo对象到实体对象。
|
||||||
*
|
*
|
||||||
* @param schoolInfoDto 域对象。
|
* @param schoolInfoVo 域对象。
|
||||||
* @return 实体对象。
|
* @return 实体对象。
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
SchoolInfo toModel(SchoolInfoDto schoolInfoDto);
|
SchoolInfo toModel(SchoolInfoVo schoolInfoVo);
|
||||||
/**
|
/**
|
||||||
* 转换实体对象到Dto对象。
|
* 转换实体对象到VO对象。
|
||||||
*
|
*
|
||||||
* @param schoolInfo 实体对象。
|
* @param schoolInfo 实体对象。
|
||||||
* @return 域对象。
|
* @return 域对象。
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
SchoolInfoDto fromModel(SchoolInfo schoolInfo);
|
SchoolInfoVo fromModel(SchoolInfo schoolInfo);
|
||||||
}
|
}
|
||||||
public static final SchoolInfoModelMapper INSTANCE = Mappers.getMapper(SchoolInfoModelMapper.class);
|
public static final SchoolInfoModelMapper INSTANCE = Mappers.getMapper(SchoolInfoModelMapper.class);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import com.orange.demo.common.core.annotation.RelationDict;
|
|||||||
import com.orange.demo.common.core.annotation.RelationConstDict;
|
import com.orange.demo.common.core.annotation.RelationConstDict;
|
||||||
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
||||||
import com.orange.demo.common.core.validator.ConstDictRef;
|
import com.orange.demo.common.core.validator.ConstDictRef;
|
||||||
import com.orange.demo.courseclassinterface.dto.StudentDto;
|
import com.orange.demo.courseclassinterface.vo.StudentVo;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.mapstruct.*;
|
import org.mapstruct.*;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
@@ -226,23 +226,23 @@ public class Student {
|
|||||||
private Map<String, Object> statusDictMap;
|
private Map<String, Object> statusDictMap;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface StudentModelMapper extends BaseModelMapper<StudentDto, Student> {
|
public interface StudentModelMapper extends BaseModelMapper<StudentVo, Student> {
|
||||||
/**
|
/**
|
||||||
* 转换Dto对象到实体对象。
|
* 转换Vo对象到实体对象。
|
||||||
*
|
*
|
||||||
* @param studentDto 域对象。
|
* @param studentVo 域对象。
|
||||||
* @return 实体对象。
|
* @return 实体对象。
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
Student toModel(StudentDto studentDto);
|
Student toModel(StudentVo studentVo);
|
||||||
/**
|
/**
|
||||||
* 转换实体对象到Dto对象。
|
* 转换实体对象到VO对象。
|
||||||
*
|
*
|
||||||
* @param student 实体对象。
|
* @param student 实体对象。
|
||||||
* @return 域对象。
|
* @return 域对象。
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
StudentDto fromModel(Student student);
|
StudentVo fromModel(Student student);
|
||||||
}
|
}
|
||||||
public static final StudentModelMapper INSTANCE = Mappers.getMapper(StudentModelMapper.class);
|
public static final StudentModelMapper INSTANCE = Mappers.getMapper(StudentModelMapper.class);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import com.orange.demo.common.core.annotation.RelationConstDict;
|
|||||||
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
||||||
import com.orange.demo.common.core.annotation.DeletedFlagColumn;
|
import com.orange.demo.common.core.annotation.DeletedFlagColumn;
|
||||||
import com.orange.demo.common.core.validator.ConstDictRef;
|
import com.orange.demo.common.core.validator.ConstDictRef;
|
||||||
import com.orange.demo.courseclassinterface.dto.StudentClassDto;
|
import com.orange.demo.courseclassinterface.vo.StudentClassVo;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.mapstruct.*;
|
import org.mapstruct.*;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
@@ -115,23 +115,23 @@ public class StudentClass {
|
|||||||
private Map<String, Object> classLevelDictMap;
|
private Map<String, Object> classLevelDictMap;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface StudentClassModelMapper extends BaseModelMapper<StudentClassDto, StudentClass> {
|
public interface StudentClassModelMapper extends BaseModelMapper<StudentClassVo, StudentClass> {
|
||||||
/**
|
/**
|
||||||
* 转换Dto对象到实体对象。
|
* 转换Vo对象到实体对象。
|
||||||
*
|
*
|
||||||
* @param studentClassDto 域对象。
|
* @param studentClassVo 域对象。
|
||||||
* @return 实体对象。
|
* @return 实体对象。
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
StudentClass toModel(StudentClassDto studentClassDto);
|
StudentClass toModel(StudentClassVo studentClassVo);
|
||||||
/**
|
/**
|
||||||
* 转换实体对象到Dto对象。
|
* 转换实体对象到VO对象。
|
||||||
*
|
*
|
||||||
* @param studentClass 实体对象。
|
* @param studentClass 实体对象。
|
||||||
* @return 域对象。
|
* @return 域对象。
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
StudentClassDto fromModel(StudentClass studentClass);
|
StudentClassVo fromModel(StudentClass studentClass);
|
||||||
}
|
}
|
||||||
public static final StudentClassModelMapper INSTANCE = Mappers.getMapper(StudentClassModelMapper.class);
|
public static final StudentClassModelMapper INSTANCE = Mappers.getMapper(StudentClassModelMapper.class);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.orange.demo.courseclassservice.service;
|
package com.orange.demo.courseclassservice.service;
|
||||||
|
|
||||||
import com.orange.demo.courseclassinterface.dto.AreaCodeDto;
|
|
||||||
import com.orange.demo.courseclassservice.dao.AreaCodeMapper;
|
import com.orange.demo.courseclassservice.dao.AreaCodeMapper;
|
||||||
import com.orange.demo.courseclassservice.model.AreaCode;
|
import com.orange.demo.courseclassservice.model.AreaCode;
|
||||||
import com.orange.demo.common.core.cache.MapTreeDictionaryCache;
|
import com.orange.demo.common.core.cache.MapTreeDictionaryCache;
|
||||||
@@ -20,7 +19,7 @@ import java.util.List;
|
|||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class AreaCodeService extends BaseDictService<AreaCode, AreaCodeDto, Long> {
|
public class AreaCodeService extends BaseDictService<AreaCode, Long> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private AreaCodeMapper areaCodeMapper;
|
private AreaCodeMapper areaCodeMapper;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.orange.demo.courseclassservice.service;
|
|||||||
|
|
||||||
import com.orange.demo.courseclassservice.dao.*;
|
import com.orange.demo.courseclassservice.dao.*;
|
||||||
import com.orange.demo.courseclassservice.model.*;
|
import com.orange.demo.courseclassservice.model.*;
|
||||||
import com.orange.demo.courseclassinterface.dto.*;
|
|
||||||
import com.orange.demo.common.core.util.*;
|
import com.orange.demo.common.core.util.*;
|
||||||
import com.orange.demo.common.core.object.MyRelationParam;
|
import com.orange.demo.common.core.object.MyRelationParam;
|
||||||
import com.orange.demo.common.core.object.CallResult;
|
import com.orange.demo.common.core.object.CallResult;
|
||||||
@@ -24,7 +23,7 @@ import java.util.*;
|
|||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class CourseService extends BaseService<Course, CourseDto, Long> {
|
public class CourseService extends BaseService<Course, Long> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private CourseMapper courseMapper;
|
private CourseMapper courseMapper;
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import com.orange.demo.common.core.base.dao.BaseDaoMapper;
|
|||||||
import com.orange.demo.common.core.constant.GlobalDeletedFlag;
|
import com.orange.demo.common.core.constant.GlobalDeletedFlag;
|
||||||
import com.orange.demo.courseclassservice.dao.GradeMapper;
|
import com.orange.demo.courseclassservice.dao.GradeMapper;
|
||||||
import com.orange.demo.courseclassservice.model.Grade;
|
import com.orange.demo.courseclassservice.model.Grade;
|
||||||
import com.orange.demo.courseclassinterface.dto.GradeDto;
|
|
||||||
import org.redisson.api.RedissonClient;
|
import org.redisson.api.RedissonClient;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -21,7 +20,7 @@ import javax.annotation.PostConstruct;
|
|||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class GradeService extends BaseDictService<Grade, GradeDto, Integer> {
|
public class GradeService extends BaseDictService<Grade, Integer> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private GradeMapper gradeMapper;
|
private GradeMapper gradeMapper;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.orange.demo.courseclassservice.service;
|
|||||||
|
|
||||||
import com.orange.demo.courseclassservice.dao.*;
|
import com.orange.demo.courseclassservice.dao.*;
|
||||||
import com.orange.demo.courseclassservice.model.*;
|
import com.orange.demo.courseclassservice.model.*;
|
||||||
import com.orange.demo.courseclassinterface.dto.*;
|
|
||||||
import com.orange.demo.common.core.util.*;
|
import com.orange.demo.common.core.util.*;
|
||||||
import com.orange.demo.common.core.object.MyRelationParam;
|
import com.orange.demo.common.core.object.MyRelationParam;
|
||||||
import com.orange.demo.common.core.object.CallResult;
|
import com.orange.demo.common.core.object.CallResult;
|
||||||
@@ -23,7 +22,7 @@ import java.util.*;
|
|||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class SchoolInfoService extends BaseService<SchoolInfo, SchoolInfoDto, Long> {
|
public class SchoolInfoService extends BaseService<SchoolInfo, Long> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SchoolInfoMapper schoolInfoMapper;
|
private SchoolInfoMapper schoolInfoMapper;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.orange.demo.courseclassservice.service;
|
|||||||
|
|
||||||
import com.orange.demo.courseclassservice.dao.*;
|
import com.orange.demo.courseclassservice.dao.*;
|
||||||
import com.orange.demo.courseclassservice.model.*;
|
import com.orange.demo.courseclassservice.model.*;
|
||||||
import com.orange.demo.courseclassinterface.dto.*;
|
|
||||||
import com.orange.demo.common.core.util.*;
|
import com.orange.demo.common.core.util.*;
|
||||||
import com.orange.demo.common.core.object.MyRelationParam;
|
import com.orange.demo.common.core.object.MyRelationParam;
|
||||||
import com.orange.demo.common.core.object.CallResult;
|
import com.orange.demo.common.core.object.CallResult;
|
||||||
@@ -26,7 +25,7 @@ import java.util.*;
|
|||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class StudentClassService extends BaseService<StudentClass, StudentClassDto, Long> {
|
public class StudentClassService extends BaseService<StudentClass, Long> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private StudentClassMapper studentClassMapper;
|
private StudentClassMapper studentClassMapper;
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package com.orange.demo.courseclassservice.service;
|
|||||||
import com.orange.demo.application.common.constant.StudentStatus;
|
import com.orange.demo.application.common.constant.StudentStatus;
|
||||||
import com.orange.demo.courseclassservice.dao.*;
|
import com.orange.demo.courseclassservice.dao.*;
|
||||||
import com.orange.demo.courseclassservice.model.*;
|
import com.orange.demo.courseclassservice.model.*;
|
||||||
import com.orange.demo.courseclassinterface.dto.*;
|
|
||||||
import com.orange.demo.common.core.util.*;
|
import com.orange.demo.common.core.util.*;
|
||||||
import com.orange.demo.common.core.object.MyRelationParam;
|
import com.orange.demo.common.core.object.MyRelationParam;
|
||||||
import com.orange.demo.common.core.object.CallResult;
|
import com.orange.demo.common.core.object.CallResult;
|
||||||
@@ -24,7 +23,7 @@ import java.util.*;
|
|||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class StudentService extends BaseService<Student, StudentDto, Long> {
|
public class StudentService extends BaseService<Student, Long> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private StudentMapper studentMapper;
|
private StudentMapper studentMapper;
|
||||||
|
|||||||
@@ -59,9 +59,6 @@
|
|||||||
<Root level="${OUTPUT_LOG_LEVEL}">
|
<Root level="${OUTPUT_LOG_LEVEL}">
|
||||||
<AppenderRef ref="console"/>
|
<AppenderRef ref="console"/>
|
||||||
</Root>
|
</Root>
|
||||||
<Logger name="springfox.documentation" additivity="false" level="error">
|
|
||||||
<AppenderRef ref="console"/>
|
|
||||||
</Logger>
|
|
||||||
<!-- AsyncLogger 是基于Disruptor的全量异步队列,性能极高,队列默认大小4096。-->
|
<!-- AsyncLogger 是基于Disruptor的全量异步队列,性能极高,队列默认大小4096。-->
|
||||||
<!-- 队列默认值可通过JVM参数设置,参考博客:https://www.jianshu.com/p/82469047acbf -->
|
<!-- 队列默认值可通过JVM参数设置,参考博客:https://www.jianshu.com/p/82469047acbf -->
|
||||||
<AsyncLogger name="com.orange.demo" additivity="false" level="info">
|
<AsyncLogger name="com.orange.demo" additivity="false" level="info">
|
||||||
|
|||||||
@@ -15,31 +15,6 @@
|
|||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring-ui:2.0.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.20" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.google.guava:guava:28.2-android" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.google.guava:failureaccess:1.0.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.checkerframework:checker-compat-qual:2.5.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.3.4" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.3" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.4.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.4.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.4.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.21" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-bean-validators:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-gateway:2.2.2.RELEASE" level="project" />
|
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-gateway:2.2.2.RELEASE" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.2.2.RELEASE" level="project" />
|
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.2.2.RELEASE" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.9.RELEASE" level="project" />
|
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.9.RELEASE" level="project" />
|
||||||
@@ -64,6 +39,7 @@
|
|||||||
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
|
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.18.Final" level="project" />
|
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.18.Final" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
|
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.springframework:spring-webflux:5.2.4.RELEASE" level="project" />
|
<orderEntry type="library" name="Maven: org.springframework:spring-webflux:5.2.4.RELEASE" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.synchronoss.cloud:nio-multipart-parser:1.1.0" level="project" />
|
<orderEntry type="library" name="Maven: org.synchronoss.cloud:nio-multipart-parser:1.1.0" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.synchronoss.cloud:nio-stream-storage:1.1.3" level="project" />
|
<orderEntry type="library" name="Maven: org.synchronoss.cloud:nio-stream-storage:1.1.3" level="project" />
|
||||||
@@ -96,6 +72,13 @@
|
|||||||
<orderEntry type="library" name="Maven: org.jodd:jodd-bean:5.0.13" level="project" />
|
<orderEntry type="library" name="Maven: org.jodd:jodd-bean:5.0.13" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.jodd:jodd-core:5.0.13" level="project" />
|
<orderEntry type="library" name="Maven: org.jodd:jodd-core:5.0.13" level="project" />
|
||||||
<orderEntry type="module" module-name="common-core" />
|
<orderEntry type="module" module-name="common-core" />
|
||||||
|
<orderEntry type="library" name="Maven: com.google.guava:guava:28.2-android" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.google.guava:failureaccess:1.0.1" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.checkerframework:checker-compat-qual:2.5.5" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.3.4" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.3" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.9" level="project" />
|
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.9" level="project" />
|
||||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.13" level="project" />
|
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.13" level="project" />
|
||||||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.6" level="project" />
|
<orderEntry type="library" name="Maven: commons-io:commons-io:2.6" level="project" />
|
||||||
@@ -182,6 +165,7 @@
|
|||||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-client-default:1.7.1" level="project" />
|
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-client-default:1.7.1" level="project" />
|
||||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-alibaba-sentinel-datasource:2.2.1.RELEASE" level="project" />
|
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-alibaba-sentinel-datasource:2.2.1.RELEASE" level="project" />
|
||||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.10.2" level="project" />
|
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.10.2" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.2" level="project" />
|
||||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.10.2" level="project" />
|
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.10.2" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:4.2" level="project" />
|
<orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:4.2" level="project" />
|
||||||
<orderEntry type="library" name="Maven: com.fasterxml.woodstox:woodstox-core:5.0.3" level="project" />
|
<orderEntry type="library" name="Maven: com.fasterxml.woodstox:woodstox-core:5.0.3" level="project" />
|
||||||
@@ -194,6 +178,9 @@
|
|||||||
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
|
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.29" level="project" />
|
<orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.29" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.4.RELEASE" level="project" />
|
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.4.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.4.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.4.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.4.RELEASE" level="project" />
|
||||||
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
|
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-log4j2:2.2.5.RELEASE" level="project" />
|
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-log4j2:2.2.5.RELEASE" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-slf4j-impl:2.12.1" level="project" />
|
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-slf4j-impl:2.12.1" level="project" />
|
||||||
@@ -254,6 +241,7 @@
|
|||||||
<orderEntry type="library" name="Maven: com.github.luben:zstd-jni:1.4.3-1" level="project" />
|
<orderEntry type="library" name="Maven: com.github.luben:zstd-jni:1.4.3-1" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.lz4:lz4-java:1.6.0" level="project" />
|
<orderEntry type="library" name="Maven: org.lz4:lz4-java:1.6.0" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.xerial.snappy:snappy-java:1.1.7.3" level="project" />
|
<orderEntry type="library" name="Maven: org.xerial.snappy:snappy-java:1.1.7.3" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.scala-lang:scala-library:2.12.10" level="project" />
|
<orderEntry type="library" name="Maven: org.scala-lang:scala-library:2.12.10" level="project" />
|
||||||
<orderEntry type="library" name="Maven: com.lmax:disruptor:3.4.2" level="project" />
|
<orderEntry type="library" name="Maven: com.lmax:disruptor:3.4.2" level="project" />
|
||||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.2.5.RELEASE" level="project" />
|
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.2.5.RELEASE" level="project" />
|
||||||
|
|||||||
@@ -14,33 +14,6 @@
|
|||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- swagger和knife4j相关集成-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.xiaoymin</groupId>
|
|
||||||
<artifactId>knife4j-spring-ui</artifactId>
|
|
||||||
<version>${knife4j.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.springfox</groupId>
|
|
||||||
<artifactId>springfox-swagger2</artifactId>
|
|
||||||
<version>${springfox.version}</version>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>io.swagger</groupId>
|
|
||||||
<artifactId>swagger-models</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.swagger</groupId>
|
|
||||||
<artifactId>swagger-models</artifactId>
|
|
||||||
<version>${swagger.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.springfox</groupId>
|
|
||||||
<artifactId>springfox-bean-validators</artifactId>
|
|
||||||
<version>${springfox.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- 网关服务 -->
|
<!-- 网关服务 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
|
|||||||
@@ -1,52 +0,0 @@
|
|||||||
package com.orange.demo.gateway.config;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.cloud.gateway.config.GatewayProperties;
|
|
||||||
import org.springframework.cloud.gateway.route.RouteLocator;
|
|
||||||
import org.springframework.cloud.gateway.support.NameUtils;
|
|
||||||
import org.springframework.context.annotation.Primary;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
import springfox.documentation.swagger.web.SwaggerResource;
|
|
||||||
import springfox.documentation.swagger.web.SwaggerResourcesProvider;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/***
|
|
||||||
* 返回Swagger UI需要读取的资源数据,这里是微服务的路由数据。
|
|
||||||
*
|
|
||||||
* @author Knife4j Team。
|
|
||||||
* @date 2020-08-08
|
|
||||||
*/
|
|
||||||
@Slf4j
|
|
||||||
@Component
|
|
||||||
@Primary
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class SwaggerResourceConfig implements SwaggerResourcesProvider {
|
|
||||||
|
|
||||||
private final RouteLocator routeLocator;
|
|
||||||
private final GatewayProperties gatewayProperties;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<SwaggerResource> get() {
|
|
||||||
List<SwaggerResource> resources = new ArrayList<>();
|
|
||||||
List<String> routes = new ArrayList<>();
|
|
||||||
routeLocator.getRoutes().subscribe(route -> routes.add(route.getId()));
|
|
||||||
gatewayProperties.getRoutes().stream().filter(routeDefinition -> routes.contains(routeDefinition.getId()))
|
|
||||||
.forEach(route -> route.getPredicates().stream()
|
|
||||||
.filter(predicateDefinition -> ("Path").equalsIgnoreCase(predicateDefinition.getName()))
|
|
||||||
.forEach(predicateDefinition -> resources.add(swaggerResource(route.getId(),
|
|
||||||
predicateDefinition.getArgs().get(NameUtils.GENERATED_NAME_PREFIX + "0")
|
|
||||||
.replace("**", "v2/api-docs")))));
|
|
||||||
return resources;
|
|
||||||
}
|
|
||||||
|
|
||||||
private SwaggerResource swaggerResource(String name, String location) {
|
|
||||||
SwaggerResource swaggerResource = new SwaggerResource();
|
|
||||||
swaggerResource.setName(name);
|
|
||||||
swaggerResource.setLocation(location);
|
|
||||||
swaggerResource.setSwaggerVersion("2.0");
|
|
||||||
return swaggerResource;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -148,10 +148,6 @@ public class AuthenticationPreFilter implements GlobalFilter, Ordered {
|
|||||||
* @return 是返回true,否则false。
|
* @return 是返回true,否则false。
|
||||||
*/
|
*/
|
||||||
private boolean shouldNotFilter(String url) {
|
private boolean shouldNotFilter(String url) {
|
||||||
// 这里过滤和swagger相关的url
|
|
||||||
if (url.endsWith("/v2/api-docs") || url.endsWith("/v2/api-docs-ext")) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (url.equals(GatewayConstant.ADMIN_LOGIN_URL)) {
|
if (url.equals(GatewayConstant.ADMIN_LOGIN_URL)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,53 +0,0 @@
|
|||||||
package com.orange.demo.gateway.handler;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.http.HttpStatus;
|
|
||||||
import org.springframework.http.ResponseEntity;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import reactor.core.publisher.Mono;
|
|
||||||
import springfox.documentation.swagger.web.*;
|
|
||||||
|
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Swagger的资源请求处理器。
|
|
||||||
*
|
|
||||||
* @author Knife4j Team。
|
|
||||||
* @date 2020-08-08
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
public class SwaggerHandler {
|
|
||||||
|
|
||||||
@Autowired(required = false)
|
|
||||||
private SecurityConfiguration securityConfiguration;
|
|
||||||
|
|
||||||
@Autowired(required = false)
|
|
||||||
private UiConfiguration uiConfiguration;
|
|
||||||
|
|
||||||
private final SwaggerResourcesProvider swaggerResources;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public SwaggerHandler(SwaggerResourcesProvider swaggerResources) {
|
|
||||||
this.swaggerResources = swaggerResources;
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/swagger-resources/configuration/security")
|
|
||||||
public Mono<ResponseEntity<SecurityConfiguration>> securityConfiguration() {
|
|
||||||
return Mono.just(new ResponseEntity<>(
|
|
||||||
Optional.ofNullable(securityConfiguration)
|
|
||||||
.orElse(SecurityConfigurationBuilder.builder().build()), HttpStatus.OK));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/swagger-resources/configuration/ui")
|
|
||||||
public Mono<ResponseEntity<UiConfiguration>> uiConfiguration() {
|
|
||||||
return Mono.just(new ResponseEntity<>(
|
|
||||||
Optional.ofNullable(uiConfiguration)
|
|
||||||
.orElse(UiConfigurationBuilder.builder().build()), HttpStatus.OK));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/swagger-resources")
|
|
||||||
public Mono<ResponseEntity> swaggerResources() {
|
|
||||||
return Mono.just((new ResponseEntity<>(swaggerResources.get(), HttpStatus.OK)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -59,9 +59,6 @@
|
|||||||
<Root level="${OUTPUT_LOG_LEVEL}">
|
<Root level="${OUTPUT_LOG_LEVEL}">
|
||||||
<AppenderRef ref="console"/>
|
<AppenderRef ref="console"/>
|
||||||
</Root>
|
</Root>
|
||||||
<Logger name="springfox.documentation" additivity="false" level="error">
|
|
||||||
<AppenderRef ref="console"/>
|
|
||||||
</Logger>
|
|
||||||
<!-- AsyncLogger 是基于Disruptor的全量异步队列,性能极高,队列默认大小4096。-->
|
<!-- AsyncLogger 是基于Disruptor的全量异步队列,性能极高,队列默认大小4096。-->
|
||||||
<!-- 队列默认值可通过JVM参数设置,参考博客:https://www.jianshu.com/p/82469047acbf -->
|
<!-- 队列默认值可通过JVM参数设置,参考博客:https://www.jianshu.com/p/82469047acbf -->
|
||||||
<AsyncLogger name="com.orange.demo" additivity="false" level="info">
|
<AsyncLogger name="com.orange.demo" additivity="false" level="info">
|
||||||
|
|||||||
@@ -26,11 +26,5 @@
|
|||||||
<artifactId>common-core</artifactId>
|
<artifactId>common-core</artifactId>
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- knife4j 接口文档框架 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.orange.demo</groupId>
|
|
||||||
<artifactId>common-swagger</artifactId>
|
|
||||||
<version>1.0.0</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.orange.demo.common.core.config.FeignConfig;
|
|||||||
import com.orange.demo.common.core.base.client.BaseClient;
|
import com.orange.demo.common.core.base.client.BaseClient;
|
||||||
import com.orange.demo.common.core.object.*;
|
import com.orange.demo.common.core.object.*;
|
||||||
import com.orange.demo.statsinterface.dto.CourseTransStatsDto;
|
import com.orange.demo.statsinterface.dto.CourseTransStatsDto;
|
||||||
|
import com.orange.demo.statsinterface.vo.CourseTransStatsVo;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -22,7 +23,7 @@ import java.util.*;
|
|||||||
name = "stats",
|
name = "stats",
|
||||||
configuration = FeignConfig.class,
|
configuration = FeignConfig.class,
|
||||||
fallbackFactory = CourseTransStatsClient.CourseTransStatsClientFallbackFactory.class)
|
fallbackFactory = CourseTransStatsClient.CourseTransStatsClientFallbackFactory.class)
|
||||||
public interface CourseTransStatsClient extends BaseClient<CourseTransStatsDto, Long> {
|
public interface CourseTransStatsClient extends BaseClient<CourseTransStatsDto, CourseTransStatsVo, Long> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基于主键的(In-list)条件获取远程数据接口。
|
* 基于主键的(In-list)条件获取远程数据接口。
|
||||||
@@ -33,7 +34,7 @@ public interface CourseTransStatsClient extends BaseClient<CourseTransStatsDto,
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/courseTransStats/listByIds")
|
@PostMapping("/courseTransStats/listByIds")
|
||||||
ResponseResult<List<CourseTransStatsDto>> listByIds(
|
ResponseResult<List<CourseTransStatsVo>> listByIds(
|
||||||
@RequestParam("statsIds") Set<Long> statsIds,
|
@RequestParam("statsIds") Set<Long> statsIds,
|
||||||
@RequestParam("withDict") Boolean withDict);
|
@RequestParam("withDict") Boolean withDict);
|
||||||
|
|
||||||
@@ -46,7 +47,7 @@ public interface CourseTransStatsClient extends BaseClient<CourseTransStatsDto,
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/courseTransStats/getById")
|
@PostMapping("/courseTransStats/getById")
|
||||||
ResponseResult<CourseTransStatsDto> getById(
|
ResponseResult<CourseTransStatsVo> getById(
|
||||||
@RequestParam("statsId") Long statsId,
|
@RequestParam("statsId") Long statsId,
|
||||||
@RequestParam("withDict") Boolean withDict);
|
@RequestParam("withDict") Boolean withDict);
|
||||||
|
|
||||||
@@ -98,7 +99,7 @@ public interface CourseTransStatsClient extends BaseClient<CourseTransStatsDto,
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/courseTransStats/listBy")
|
@PostMapping("/courseTransStats/listBy")
|
||||||
ResponseResult<List<CourseTransStatsDto>> listBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<MyPageData<CourseTransStatsVo>> listBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取远程主对象中符合查询条件的单条数据对象。
|
* 获取远程主对象中符合查询条件的单条数据对象。
|
||||||
@@ -108,7 +109,7 @@ public interface CourseTransStatsClient extends BaseClient<CourseTransStatsDto,
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/courseTransStats/getBy")
|
@PostMapping("/courseTransStats/getBy")
|
||||||
ResponseResult<CourseTransStatsDto> getBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<CourseTransStatsVo> getBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取远程主对象中符合查询条件的数据列表。
|
* 获取远程主对象中符合查询条件的数据列表。
|
||||||
@@ -119,7 +120,7 @@ public interface CourseTransStatsClient extends BaseClient<CourseTransStatsDto,
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/courseTransStats/listMapBy")
|
@PostMapping("/courseTransStats/listMapBy")
|
||||||
ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<MyPageData<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取远程主对象中符合查询条件的数据数量。
|
* 获取远程主对象中符合查询条件的数据数量。
|
||||||
@@ -144,7 +145,7 @@ public interface CourseTransStatsClient extends BaseClient<CourseTransStatsDto,
|
|||||||
@Component("StatsCourseTransStatsClientFallbackFactory")
|
@Component("StatsCourseTransStatsClientFallbackFactory")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
class CourseTransStatsClientFallbackFactory
|
class CourseTransStatsClientFallbackFactory
|
||||||
extends BaseFallbackFactory<CourseTransStatsDto, Long, CourseTransStatsClient> implements CourseTransStatsClient {
|
extends BaseFallbackFactory<CourseTransStatsDto, CourseTransStatsVo, Long, CourseTransStatsClient> implements CourseTransStatsClient {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CourseTransStatsClient create(Throwable throwable) {
|
public CourseTransStatsClient create(Throwable throwable) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.orange.demo.common.core.config.FeignConfig;
|
|||||||
import com.orange.demo.common.core.base.client.BaseClient;
|
import com.orange.demo.common.core.base.client.BaseClient;
|
||||||
import com.orange.demo.common.core.object.*;
|
import com.orange.demo.common.core.object.*;
|
||||||
import com.orange.demo.statsinterface.dto.StudentActionStatsDto;
|
import com.orange.demo.statsinterface.dto.StudentActionStatsDto;
|
||||||
|
import com.orange.demo.statsinterface.vo.StudentActionStatsVo;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -22,7 +23,7 @@ import java.util.*;
|
|||||||
name = "stats",
|
name = "stats",
|
||||||
configuration = FeignConfig.class,
|
configuration = FeignConfig.class,
|
||||||
fallbackFactory = StudentActionStatsClient.StudentActionStatsClientFallbackFactory.class)
|
fallbackFactory = StudentActionStatsClient.StudentActionStatsClientFallbackFactory.class)
|
||||||
public interface StudentActionStatsClient extends BaseClient<StudentActionStatsDto, Long> {
|
public interface StudentActionStatsClient extends BaseClient<StudentActionStatsDto, StudentActionStatsVo, Long> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基于主键的(In-list)条件获取远程数据接口。
|
* 基于主键的(In-list)条件获取远程数据接口。
|
||||||
@@ -33,7 +34,7 @@ public interface StudentActionStatsClient extends BaseClient<StudentActionStatsD
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/studentActionStats/listByIds")
|
@PostMapping("/studentActionStats/listByIds")
|
||||||
ResponseResult<List<StudentActionStatsDto>> listByIds(
|
ResponseResult<List<StudentActionStatsVo>> listByIds(
|
||||||
@RequestParam("statsIds") Set<Long> statsIds,
|
@RequestParam("statsIds") Set<Long> statsIds,
|
||||||
@RequestParam("withDict") Boolean withDict);
|
@RequestParam("withDict") Boolean withDict);
|
||||||
|
|
||||||
@@ -46,7 +47,7 @@ public interface StudentActionStatsClient extends BaseClient<StudentActionStatsD
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/studentActionStats/getById")
|
@PostMapping("/studentActionStats/getById")
|
||||||
ResponseResult<StudentActionStatsDto> getById(
|
ResponseResult<StudentActionStatsVo> getById(
|
||||||
@RequestParam("statsId") Long statsId,
|
@RequestParam("statsId") Long statsId,
|
||||||
@RequestParam("withDict") Boolean withDict);
|
@RequestParam("withDict") Boolean withDict);
|
||||||
|
|
||||||
@@ -98,7 +99,7 @@ public interface StudentActionStatsClient extends BaseClient<StudentActionStatsD
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/studentActionStats/listBy")
|
@PostMapping("/studentActionStats/listBy")
|
||||||
ResponseResult<List<StudentActionStatsDto>> listBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<MyPageData<StudentActionStatsVo>> listBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取远程主对象中符合查询条件的单条数据对象。
|
* 获取远程主对象中符合查询条件的单条数据对象。
|
||||||
@@ -108,7 +109,7 @@ public interface StudentActionStatsClient extends BaseClient<StudentActionStatsD
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/studentActionStats/getBy")
|
@PostMapping("/studentActionStats/getBy")
|
||||||
ResponseResult<StudentActionStatsDto> getBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<StudentActionStatsVo> getBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取远程主对象中符合查询条件的数据列表。
|
* 获取远程主对象中符合查询条件的数据列表。
|
||||||
@@ -119,7 +120,7 @@ public interface StudentActionStatsClient extends BaseClient<StudentActionStatsD
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/studentActionStats/listMapBy")
|
@PostMapping("/studentActionStats/listMapBy")
|
||||||
ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<MyPageData<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取远程主对象中符合查询条件的数据数量。
|
* 获取远程主对象中符合查询条件的数据数量。
|
||||||
@@ -144,7 +145,7 @@ public interface StudentActionStatsClient extends BaseClient<StudentActionStatsD
|
|||||||
@Component("StatsStudentActionStatsClientFallbackFactory")
|
@Component("StatsStudentActionStatsClientFallbackFactory")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
class StudentActionStatsClientFallbackFactory
|
class StudentActionStatsClientFallbackFactory
|
||||||
extends BaseFallbackFactory<StudentActionStatsDto, Long, StudentActionStatsClient> implements StudentActionStatsClient {
|
extends BaseFallbackFactory<StudentActionStatsDto, StudentActionStatsVo, Long, StudentActionStatsClient> implements StudentActionStatsClient {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StudentActionStatsClient create(Throwable throwable) {
|
public StudentActionStatsClient create(Throwable throwable) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.orange.demo.common.core.config.FeignConfig;
|
|||||||
import com.orange.demo.common.core.base.client.BaseClient;
|
import com.orange.demo.common.core.base.client.BaseClient;
|
||||||
import com.orange.demo.common.core.object.*;
|
import com.orange.demo.common.core.object.*;
|
||||||
import com.orange.demo.statsinterface.dto.StudentActionTransDto;
|
import com.orange.demo.statsinterface.dto.StudentActionTransDto;
|
||||||
|
import com.orange.demo.statsinterface.vo.StudentActionTransVo;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -22,7 +23,7 @@ import java.util.*;
|
|||||||
name = "stats",
|
name = "stats",
|
||||||
configuration = FeignConfig.class,
|
configuration = FeignConfig.class,
|
||||||
fallbackFactory = StudentActionTransClient.StudentActionTransClientFallbackFactory.class)
|
fallbackFactory = StudentActionTransClient.StudentActionTransClientFallbackFactory.class)
|
||||||
public interface StudentActionTransClient extends BaseClient<StudentActionTransDto, Long> {
|
public interface StudentActionTransClient extends BaseClient<StudentActionTransDto, StudentActionTransVo, Long> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基于主键的(In-list)条件获取远程数据接口。
|
* 基于主键的(In-list)条件获取远程数据接口。
|
||||||
@@ -33,7 +34,7 @@ public interface StudentActionTransClient extends BaseClient<StudentActionTransD
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/studentActionTrans/listByIds")
|
@PostMapping("/studentActionTrans/listByIds")
|
||||||
ResponseResult<List<StudentActionTransDto>> listByIds(
|
ResponseResult<List<StudentActionTransVo>> listByIds(
|
||||||
@RequestParam("transIds") Set<Long> transIds,
|
@RequestParam("transIds") Set<Long> transIds,
|
||||||
@RequestParam("withDict") Boolean withDict);
|
@RequestParam("withDict") Boolean withDict);
|
||||||
|
|
||||||
@@ -46,7 +47,7 @@ public interface StudentActionTransClient extends BaseClient<StudentActionTransD
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/studentActionTrans/getById")
|
@PostMapping("/studentActionTrans/getById")
|
||||||
ResponseResult<StudentActionTransDto> getById(
|
ResponseResult<StudentActionTransVo> getById(
|
||||||
@RequestParam("transId") Long transId,
|
@RequestParam("transId") Long transId,
|
||||||
@RequestParam("withDict") Boolean withDict);
|
@RequestParam("withDict") Boolean withDict);
|
||||||
|
|
||||||
@@ -98,7 +99,7 @@ public interface StudentActionTransClient extends BaseClient<StudentActionTransD
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/studentActionTrans/listBy")
|
@PostMapping("/studentActionTrans/listBy")
|
||||||
ResponseResult<List<StudentActionTransDto>> listBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<MyPageData<StudentActionTransVo>> listBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取远程主对象中符合查询条件的单条数据对象。
|
* 获取远程主对象中符合查询条件的单条数据对象。
|
||||||
@@ -108,7 +109,7 @@ public interface StudentActionTransClient extends BaseClient<StudentActionTransD
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/studentActionTrans/getBy")
|
@PostMapping("/studentActionTrans/getBy")
|
||||||
ResponseResult<StudentActionTransDto> getBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<StudentActionTransVo> getBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取远程主对象中符合查询条件的数据列表。
|
* 获取远程主对象中符合查询条件的数据列表。
|
||||||
@@ -119,7 +120,7 @@ public interface StudentActionTransClient extends BaseClient<StudentActionTransD
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@PostMapping("/studentActionTrans/listMapBy")
|
@PostMapping("/studentActionTrans/listMapBy")
|
||||||
ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
ResponseResult<MyPageData<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取远程主对象中符合查询条件的数据数量。
|
* 获取远程主对象中符合查询条件的数据数量。
|
||||||
@@ -144,7 +145,7 @@ public interface StudentActionTransClient extends BaseClient<StudentActionTransD
|
|||||||
@Component("StatsStudentActionTransClientFallbackFactory")
|
@Component("StatsStudentActionTransClientFallbackFactory")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
class StudentActionTransClientFallbackFactory
|
class StudentActionTransClientFallbackFactory
|
||||||
extends BaseFallbackFactory<StudentActionTransDto, Long, StudentActionTransClient> implements StudentActionTransClient {
|
extends BaseFallbackFactory<StudentActionTransDto, StudentActionTransVo, Long, StudentActionTransClient> implements StudentActionTransClient {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StudentActionTransClient create(Throwable throwable) {
|
public StudentActionTransClient create(Throwable throwable) {
|
||||||
|
|||||||
@@ -4,14 +4,11 @@ import com.orange.demo.common.core.validator.UpdateGroup;
|
|||||||
import com.orange.demo.common.core.validator.ConstDictRef;
|
import com.orange.demo.common.core.validator.ConstDictRef;
|
||||||
import com.orange.demo.application.common.constant.Subject;
|
import com.orange.demo.application.common.constant.Subject;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CourseTransStatsDto对象。
|
* CourseTransStatsDto对象。
|
||||||
@@ -19,28 +16,24 @@ import java.util.Map;
|
|||||||
* @author Jerry
|
* @author Jerry
|
||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@ApiModel("CourseTransStatsDto实体对象")
|
|
||||||
@Data
|
@Data
|
||||||
public class CourseTransStatsDto {
|
public class CourseTransStatsDto {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主键Id。
|
* 主键Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "主键Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||||
private Long statsId;
|
private Long statsId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 统计日期。
|
* 统计日期。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "统计日期", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,统计日期不能为空!")
|
@NotNull(message = "数据验证失败,统计日期不能为空!")
|
||||||
private Date statsDate;
|
private Date statsDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 科目Id。
|
* 科目Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "科目Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,所属科目不能为空!")
|
@NotNull(message = "数据验证失败,所属科目不能为空!")
|
||||||
@ConstDictRef(constDictClass = Subject.class, message = "数据验证失败,所属科目为无效值!")
|
@ConstDictRef(constDictClass = Subject.class, message = "数据验证失败,所属科目为无效值!")
|
||||||
private Integer subjectId;
|
private Integer subjectId;
|
||||||
@@ -48,77 +41,50 @@ public class CourseTransStatsDto {
|
|||||||
/**
|
/**
|
||||||
* 年级Id。
|
* 年级Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "年级Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,所属年级不能为空!")
|
@NotNull(message = "数据验证失败,所属年级不能为空!")
|
||||||
private Integer gradeId;
|
private Integer gradeId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 年级名称。
|
* 年级名称。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "年级名称")
|
|
||||||
private String gradeName;
|
private String gradeName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 课程Id。
|
* 课程Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "课程Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,课程ID不能为空!")
|
@NotNull(message = "数据验证失败,课程ID不能为空!")
|
||||||
private Long courseId;
|
private Long courseId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 课程名称。
|
* 课程名称。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "课程名称")
|
|
||||||
private String courseName;
|
private String courseName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 学生上课次数。
|
* 学生上课次数。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "学生上课次数", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,上课次数不能为空!")
|
@NotNull(message = "数据验证失败,上课次数不能为空!")
|
||||||
private Integer studentAttendCount;
|
private Integer studentAttendCount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 学生献花数量。
|
* 学生献花数量。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "学生献花数量", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,献花数量不能为空!")
|
@NotNull(message = "数据验证失败,献花数量不能为空!")
|
||||||
private Integer studentFlowerAmount;
|
private Integer studentFlowerAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 学生献花次数。
|
* 学生献花次数。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "学生献花次数", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,献花次数不能为空!")
|
@NotNull(message = "数据验证失败,献花次数不能为空!")
|
||||||
private Integer studentFlowerCount;
|
private Integer studentFlowerCount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* statsDate 范围过滤起始值(>=)。
|
* statsDate 范围过滤起始值(>=)。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "statsDate 范围过滤起始值(>=)")
|
|
||||||
private String statsDateStart;
|
private String statsDateStart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* statsDate 范围过滤结束值(<=)。
|
* statsDate 范围过滤结束值(<=)。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "statsDate 范围过滤结束值(<=)")
|
|
||||||
private String statsDateEnd;
|
private String statsDateEnd;
|
||||||
|
|
||||||
/**
|
|
||||||
* gradeId 字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> gradeIdDictMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* courseId 字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> courseIdDictMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* subjectId 常量字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> subjectIdDictMap;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,14 +2,11 @@ package com.orange.demo.statsinterface.dto;
|
|||||||
|
|
||||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* StudentActionStatsDto对象。
|
* StudentActionStatsDto对象。
|
||||||
@@ -17,183 +14,141 @@ import java.util.Map;
|
|||||||
* @author Jerry
|
* @author Jerry
|
||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@ApiModel("StudentActionStatsDto实体对象")
|
|
||||||
@Data
|
@Data
|
||||||
public class StudentActionStatsDto {
|
public class StudentActionStatsDto {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主键Id。
|
* 主键Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "主键Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||||
private Long statsId;
|
private Long statsId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 统计日期。
|
* 统计日期。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "统计日期", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,统计日期不能为空!")
|
@NotNull(message = "数据验证失败,统计日期不能为空!")
|
||||||
private Date statsDate;
|
private Date statsDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 统计小时。
|
* 统计小时。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "统计小时")
|
|
||||||
private Date statsMonth;
|
private Date statsMonth;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 年级Id。
|
* 年级Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "年级Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,所属年级不能为空!")
|
@NotNull(message = "数据验证失败,所属年级不能为空!")
|
||||||
private Integer gradeId;
|
private Integer gradeId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 学生所在省Id。
|
* 学生所在省Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "学生所在省Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,所在省份不能为空!")
|
@NotNull(message = "数据验证失败,所在省份不能为空!")
|
||||||
private Long provinceId;
|
private Long provinceId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 学生所在城市Id。
|
* 学生所在城市Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "学生所在城市Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,所在城市不能为空!")
|
@NotNull(message = "数据验证失败,所在城市不能为空!")
|
||||||
private Long cityId;
|
private Long cityId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 购课学币数量。
|
* 购课学币数量。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "购课学币数量", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,购课学币数量不能为空!")
|
@NotNull(message = "数据验证失败,购课学币数量不能为空!")
|
||||||
private Integer buyCourseAmount;
|
private Integer buyCourseAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 购买课程次数。
|
* 购买课程次数。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "购买课程次数", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,购买课程次数不能为空!")
|
@NotNull(message = "数据验证失败,购买课程次数不能为空!")
|
||||||
private Integer buyCourseCount;
|
private Integer buyCourseCount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 购买视频学币数量。
|
* 购买视频学币数量。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "购买视频学币数量", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,购买视频学币数量不能为空!")
|
@NotNull(message = "数据验证失败,购买视频学币数量不能为空!")
|
||||||
private Integer buyVideoAmount;
|
private Integer buyVideoAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 购买视频次数。
|
* 购买视频次数。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "购买视频次数", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,购买视频次数不能为空!")
|
@NotNull(message = "数据验证失败,购买视频次数不能为空!")
|
||||||
private Integer buyVideoCount;
|
private Integer buyVideoCount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 购买作业学币数量。
|
* 购买作业学币数量。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "购买作业学币数量", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,购买作业学币数量不能为空!")
|
@NotNull(message = "数据验证失败,购买作业学币数量不能为空!")
|
||||||
private Integer buyPaperAmount;
|
private Integer buyPaperAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 购买作业次数。
|
* 购买作业次数。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "购买作业次数", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,购买作业次数不能为空!")
|
@NotNull(message = "数据验证失败,购买作业次数不能为空!")
|
||||||
private Integer buyPaperCount;
|
private Integer buyPaperCount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 购买献花数量。
|
* 购买献花数量。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "购买献花数量", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,购买献花数量不能为空!")
|
@NotNull(message = "数据验证失败,购买献花数量不能为空!")
|
||||||
private Integer buyFlowerAmount;
|
private Integer buyFlowerAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 购买献花次数。
|
* 购买献花次数。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "购买献花次数", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,购买献花次数不能为空!")
|
@NotNull(message = "数据验证失败,购买献花次数不能为空!")
|
||||||
private Integer buyFlowerCount;
|
private Integer buyFlowerCount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 充值学币数量。
|
* 充值学币数量。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "充值学币数量", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,充值学币数量不能为空!")
|
@NotNull(message = "数据验证失败,充值学币数量不能为空!")
|
||||||
private Integer rechargeCoinAmount;
|
private Integer rechargeCoinAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 充值学币次数。
|
* 充值学币次数。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "充值学币次数", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,充值学币次数不能为空!")
|
@NotNull(message = "数据验证失败,充值学币次数不能为空!")
|
||||||
private Integer rechargeCoinCount;
|
private Integer rechargeCoinCount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 线下课程上课次数。
|
* 线下课程上课次数。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "线下课程上课次数", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,线下课程上课次数不能为空!")
|
@NotNull(message = "数据验证失败,线下课程上课次数不能为空!")
|
||||||
private Integer doCourseCount;
|
private Integer doCourseCount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 观看视频次数。
|
* 观看视频次数。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "观看视频次数", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,观看视频次数不能为空!")
|
@NotNull(message = "数据验证失败,观看视频次数不能为空!")
|
||||||
private Integer watchVideoCount;
|
private Integer watchVideoCount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 购买献花消费学币数量。
|
* 购买献花消费学币数量。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "购买献花消费学币数量", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,购买献花消费学币数量不能为空!")
|
@NotNull(message = "数据验证失败,购买献花消费学币数量不能为空!")
|
||||||
private Integer watchVideoTotalSecond;
|
private Integer watchVideoTotalSecond;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 做题数量。
|
* 做题数量。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "做题数量", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,做题数量不能为空!")
|
@NotNull(message = "数据验证失败,做题数量不能为空!")
|
||||||
private Integer doExerciseCount;
|
private Integer doExerciseCount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 做题正确的数量。
|
* 做题正确的数量。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "做题正确的数量", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,做题正确的数量不能为空!")
|
@NotNull(message = "数据验证失败,做题正确的数量不能为空!")
|
||||||
private Integer doExerciseCorrectCount;
|
private Integer doExerciseCorrectCount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* statsDate 范围过滤起始值(>=)。
|
* statsDate 范围过滤起始值(>=)。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "statsDate 范围过滤起始值(>=)")
|
|
||||||
private String statsDateStart;
|
private String statsDateStart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* statsDate 范围过滤结束值(<=)。
|
* statsDate 范围过滤结束值(<=)。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "statsDate 范围过滤结束值(<=)")
|
|
||||||
private String statsDateEnd;
|
private String statsDateEnd;
|
||||||
|
|
||||||
/**
|
|
||||||
* gradeId 字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> gradeIdDictMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* provinceId 字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> provinceIdDictMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* cityId 字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> cityIdDictMap;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,14 +5,11 @@ import com.orange.demo.common.core.validator.ConstDictRef;
|
|||||||
import com.orange.demo.application.common.constant.StudentActionType;
|
import com.orange.demo.application.common.constant.StudentActionType;
|
||||||
import com.orange.demo.application.common.constant.DeviceType;
|
import com.orange.demo.application.common.constant.DeviceType;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* StudentActionTransDto对象。
|
* StudentActionTransDto对象。
|
||||||
@@ -20,49 +17,42 @@ import java.util.Map;
|
|||||||
* @author Jerry
|
* @author Jerry
|
||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@ApiModel("StudentActionTransDto实体对象")
|
|
||||||
@Data
|
@Data
|
||||||
public class StudentActionTransDto {
|
public class StudentActionTransDto {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主键Id。
|
* 主键Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "主键Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||||
private Long transId;
|
private Long transId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 学生Id。
|
* 学生Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "学生Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,学生Id不能为空!")
|
@NotNull(message = "数据验证失败,学生Id不能为空!")
|
||||||
private Long studentId;
|
private Long studentId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 学生名称。
|
* 学生名称。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "学生名称", required = true)
|
|
||||||
@NotBlank(message = "数据验证失败,学生名称不能为空!")
|
@NotBlank(message = "数据验证失败,学生名称不能为空!")
|
||||||
private String studentName;
|
private String studentName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 学生校区。
|
* 学生校区。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "学生校区", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,学生校区不能为空!")
|
@NotNull(message = "数据验证失败,学生校区不能为空!")
|
||||||
private Long schoolId;
|
private Long schoolId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 年级Id。
|
* 年级Id。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "年级Id", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,所属年级不能为空!")
|
@NotNull(message = "数据验证失败,所属年级不能为空!")
|
||||||
private Integer gradeId;
|
private Integer gradeId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 行为类型(0: 充值 1: 购课 2: 上课签到 3: 上课签退 4: 看视频课 5: 做作业 6: 刷题 7: 献花)。
|
* 行为类型(0: 充值 1: 购课 2: 上课签到 3: 上课签退 4: 看视频课 5: 做作业 6: 刷题 7: 献花)。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "行为类型(0: 充值 1: 购课 2: 上课签到 3: 上课签退 4: 看视频课 5: 做作业 6: 刷题 7: 献花)", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,行为类型不能为空!")
|
@NotNull(message = "数据验证失败,行为类型不能为空!")
|
||||||
@ConstDictRef(constDictClass = StudentActionType.class, message = "数据验证失败,行为类型为无效值!")
|
@ConstDictRef(constDictClass = StudentActionType.class, message = "数据验证失败,行为类型为无效值!")
|
||||||
private Integer actionType;
|
private Integer actionType;
|
||||||
@@ -70,7 +60,6 @@ public class StudentActionTransDto {
|
|||||||
/**
|
/**
|
||||||
* 设备类型(0: iOS 1: Android 2: PC)。
|
* 设备类型(0: iOS 1: Android 2: PC)。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "设备类型(0: iOS 1: Android 2: PC)", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,设备类型不能为空!")
|
@NotNull(message = "数据验证失败,设备类型不能为空!")
|
||||||
@ConstDictRef(constDictClass = DeviceType.class, message = "数据验证失败,设备类型为无效值!")
|
@ConstDictRef(constDictClass = DeviceType.class, message = "数据验证失败,设备类型为无效值!")
|
||||||
private Integer deviceType;
|
private Integer deviceType;
|
||||||
@@ -78,85 +67,51 @@ public class StudentActionTransDto {
|
|||||||
/**
|
/**
|
||||||
* 看视频秒数。
|
* 看视频秒数。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "看视频秒数")
|
|
||||||
private Integer watchVideoSeconds;
|
private Integer watchVideoSeconds;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 购买献花数量。
|
* 购买献花数量。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "购买献花数量")
|
|
||||||
private Integer flowerCount;
|
private Integer flowerCount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 购买作业数量。
|
* 购买作业数量。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "购买作业数量")
|
|
||||||
private Integer paperCount;
|
private Integer paperCount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 购买视频数量。
|
* 购买视频数量。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "购买视频数量")
|
|
||||||
private Integer videoCount;
|
private Integer videoCount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 购买课程数量。
|
* 购买课程数量。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "购买课程数量")
|
|
||||||
private Integer courseCount;
|
private Integer courseCount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 充值学币数量。
|
* 充值学币数量。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "充值学币数量")
|
|
||||||
private Integer coinCount;
|
private Integer coinCount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 做题是否正确标记。
|
* 做题是否正确标记。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "做题是否正确标记")
|
|
||||||
private Integer exerciseCorrectFlag;
|
private Integer exerciseCorrectFlag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发生时间。
|
* 发生时间。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "发生时间", required = true)
|
|
||||||
@NotNull(message = "数据验证失败,发生时间不能为空!")
|
@NotNull(message = "数据验证失败,发生时间不能为空!")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* createTime 范围过滤起始值(>=)。
|
* createTime 范围过滤起始值(>=)。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "createTime 范围过滤起始值(>=)")
|
|
||||||
private String createTimeStart;
|
private String createTimeStart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* createTime 范围过滤结束值(<=)。
|
* createTime 范围过滤结束值(<=)。
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "createTime 范围过滤结束值(<=)")
|
|
||||||
private String createTimeEnd;
|
private String createTimeEnd;
|
||||||
|
|
||||||
/**
|
|
||||||
* schoolId 字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> schoolIdDictMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gradeId 字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> gradeIdDictMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* actionType 常量字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> actionTypeDictMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* deviceType 常量字典关联数据。
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(hidden = true)
|
|
||||||
private Map<String, Object> deviceTypeDictMap;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,81 @@
|
|||||||
|
package com.orange.demo.statsinterface.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CourseTransStatsVO对象。
|
||||||
|
*
|
||||||
|
* @author Jerry
|
||||||
|
* @date 2020-08-08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CourseTransStatsVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键Id。
|
||||||
|
*/
|
||||||
|
private Long statsId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计日期。
|
||||||
|
*/
|
||||||
|
private Date statsDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 科目Id。
|
||||||
|
*/
|
||||||
|
private Integer subjectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年级Id。
|
||||||
|
*/
|
||||||
|
private Integer gradeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年级名称。
|
||||||
|
*/
|
||||||
|
private String gradeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 课程Id。
|
||||||
|
*/
|
||||||
|
private Long courseId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 课程名称。
|
||||||
|
*/
|
||||||
|
private String courseName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学生上课次数。
|
||||||
|
*/
|
||||||
|
private Integer studentAttendCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学生献花数量。
|
||||||
|
*/
|
||||||
|
private Integer studentFlowerAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学生献花次数。
|
||||||
|
*/
|
||||||
|
private Integer studentFlowerCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gradeId 字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> gradeIdDictMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* courseId 字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> courseIdDictMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* subjectId 常量字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> subjectIdDictMap;
|
||||||
|
}
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
package com.orange.demo.statsinterface.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* StudentActionStatsVO对象。
|
||||||
|
*
|
||||||
|
* @author Jerry
|
||||||
|
* @date 2020-08-08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StudentActionStatsVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键Id。
|
||||||
|
*/
|
||||||
|
private Long statsId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计日期。
|
||||||
|
*/
|
||||||
|
private Date statsDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计小时。
|
||||||
|
*/
|
||||||
|
private Date statsMonth;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年级Id。
|
||||||
|
*/
|
||||||
|
private Integer gradeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学生所在省Id。
|
||||||
|
*/
|
||||||
|
private Long provinceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学生所在城市Id。
|
||||||
|
*/
|
||||||
|
private Long cityId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 购课学币数量。
|
||||||
|
*/
|
||||||
|
private Integer buyCourseAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 购买课程次数。
|
||||||
|
*/
|
||||||
|
private Integer buyCourseCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 购买视频学币数量。
|
||||||
|
*/
|
||||||
|
private Integer buyVideoAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 购买视频次数。
|
||||||
|
*/
|
||||||
|
private Integer buyVideoCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 购买作业学币数量。
|
||||||
|
*/
|
||||||
|
private Integer buyPaperAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 购买作业次数。
|
||||||
|
*/
|
||||||
|
private Integer buyPaperCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 购买献花数量。
|
||||||
|
*/
|
||||||
|
private Integer buyFlowerAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 购买献花次数。
|
||||||
|
*/
|
||||||
|
private Integer buyFlowerCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充值学币数量。
|
||||||
|
*/
|
||||||
|
private Integer rechargeCoinAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充值学币次数。
|
||||||
|
*/
|
||||||
|
private Integer rechargeCoinCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线下课程上课次数。
|
||||||
|
*/
|
||||||
|
private Integer doCourseCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 观看视频次数。
|
||||||
|
*/
|
||||||
|
private Integer watchVideoCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 购买献花消费学币数量。
|
||||||
|
*/
|
||||||
|
private Integer watchVideoTotalSecond;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 做题数量。
|
||||||
|
*/
|
||||||
|
private Integer doExerciseCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 做题正确的数量。
|
||||||
|
*/
|
||||||
|
private Integer doExerciseCorrectCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gradeId 字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> gradeIdDictMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* provinceId 字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> provinceIdDictMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cityId 字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> cityIdDictMap;
|
||||||
|
}
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
package com.orange.demo.statsinterface.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* StudentActionTransVO对象。
|
||||||
|
*
|
||||||
|
* @author Jerry
|
||||||
|
* @date 2020-08-08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StudentActionTransVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键Id。
|
||||||
|
*/
|
||||||
|
private Long transId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学生Id。
|
||||||
|
*/
|
||||||
|
private Long studentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学生名称。
|
||||||
|
*/
|
||||||
|
private String studentName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学生校区。
|
||||||
|
*/
|
||||||
|
private Long schoolId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年级Id。
|
||||||
|
*/
|
||||||
|
private Integer gradeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行为类型(0: 充值 1: 购课 2: 上课签到 3: 上课签退 4: 看视频课 5: 做作业 6: 刷题 7: 献花)。
|
||||||
|
*/
|
||||||
|
private Integer actionType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备类型(0: iOS 1: Android 2: PC)。
|
||||||
|
*/
|
||||||
|
private Integer deviceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 看视频秒数。
|
||||||
|
*/
|
||||||
|
private Integer watchVideoSeconds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 购买献花数量。
|
||||||
|
*/
|
||||||
|
private Integer flowerCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 购买作业数量。
|
||||||
|
*/
|
||||||
|
private Integer paperCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 购买视频数量。
|
||||||
|
*/
|
||||||
|
private Integer videoCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 购买课程数量。
|
||||||
|
*/
|
||||||
|
private Integer courseCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充值学币数量。
|
||||||
|
*/
|
||||||
|
private Integer coinCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 做题是否正确标记。
|
||||||
|
*/
|
||||||
|
private Integer exerciseCorrectFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发生时间。
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* schoolId 字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> schoolIdDictMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gradeId 字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> gradeIdDictMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* actionType 常量字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> actionTypeDictMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* deviceType 常量字典关联数据。
|
||||||
|
*/
|
||||||
|
private Map<String, Object> deviceTypeDictMap;
|
||||||
|
}
|
||||||
@@ -91,24 +91,6 @@
|
|||||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.13" level="project" />
|
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.13" level="project" />
|
||||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.11" level="project" />
|
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.11" level="project" />
|
||||||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:2.0" level="project" />
|
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:2.0" level="project" />
|
||||||
<orderEntry type="module" module-name="common-swagger" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-micro-spring-boot-starter:2.0.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring-boot-autoconfigure:2.0.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring:2.0.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-annotations:2.0.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-core:2.0.5" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.25.0-GA" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.22" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.22" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: io.springfox:springfox-bean-validators:2.9.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:2.2.1.RELEASE" level="project" />
|
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:2.2.1.RELEASE" level="project" />
|
||||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-client:1.2.1" level="project" />
|
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-client:1.2.1" level="project" />
|
||||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-common:1.2.1" level="project" />
|
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-common:1.2.1" level="project" />
|
||||||
@@ -265,7 +247,7 @@
|
|||||||
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.13.2" level="project" />
|
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.13.2" level="project" />
|
||||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.1" level="project" />
|
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.1" level="project" />
|
||||||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.1.0" level="project" />
|
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.1.0" level="project" />
|
||||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.8" level="project" />
|
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy:1.10.8" level="project" />
|
||||||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.8" level="project" />
|
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.8" level="project" />
|
||||||
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
|
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
|
||||||
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
|
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
|
||||||
|
|||||||
@@ -1,18 +1,16 @@
|
|||||||
package com.orange.demo.statsservice.controller;
|
package com.orange.demo.statsservice.controller;
|
||||||
|
|
||||||
import com.github.pagehelper.Page;
|
|
||||||
import com.github.pagehelper.page.PageMethod;
|
import com.github.pagehelper.page.PageMethod;
|
||||||
import com.orange.demo.statsservice.model.*;
|
import com.orange.demo.statsservice.model.*;
|
||||||
import com.orange.demo.statsservice.service.*;
|
import com.orange.demo.statsservice.service.*;
|
||||||
import com.orange.demo.statsinterface.dto.*;
|
import com.orange.demo.statsinterface.dto.*;
|
||||||
|
import com.orange.demo.statsinterface.vo.*;
|
||||||
import com.orange.demo.common.core.object.*;
|
import com.orange.demo.common.core.object.*;
|
||||||
import com.orange.demo.common.core.util.*;
|
import com.orange.demo.common.core.util.*;
|
||||||
import com.orange.demo.common.core.constant.*;
|
import com.orange.demo.common.core.constant.*;
|
||||||
import com.orange.demo.common.core.base.controller.BaseController;
|
import com.orange.demo.common.core.base.controller.BaseController;
|
||||||
import com.orange.demo.common.core.base.service.BaseService;
|
import com.orange.demo.common.core.base.service.BaseService;
|
||||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -25,17 +23,16 @@ import java.util.*;
|
|||||||
* @author Jerry
|
* @author Jerry
|
||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@Api(tags = "课程统计管理接口")
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/courseTransStats")
|
@RequestMapping("/courseTransStats")
|
||||||
public class CourseTransStatsController extends BaseController<CourseTransStats, CourseTransStatsDto, Long> {
|
public class CourseTransStatsController extends BaseController<CourseTransStats, CourseTransStatsVo, Long> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private CourseTransStatsService courseTransStatsService;
|
private CourseTransStatsService courseTransStatsService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BaseService<CourseTransStats, CourseTransStatsDto, Long> service() {
|
protected BaseService<CourseTransStats, Long> service() {
|
||||||
return courseTransStatsService;
|
return courseTransStatsService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,25 +45,18 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
|
|||||||
* @return 应答结果对象,包含查询结果集。
|
* @return 应答结果对象,包含查询结果集。
|
||||||
*/
|
*/
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
public ResponseResult<MyPageData<CourseTransStatsDto>> list(
|
public ResponseResult<MyPageData<CourseTransStatsVo>> list(
|
||||||
@MyRequestBody("courseTransStatsFilter") CourseTransStatsDto courseTransStatsDtoFilter,
|
@MyRequestBody("courseTransStatsFilter") CourseTransStatsDto courseTransStatsDtoFilter,
|
||||||
@MyRequestBody MyOrderParam orderParam,
|
@MyRequestBody MyOrderParam orderParam,
|
||||||
@MyRequestBody MyPageParam pageParam) {
|
@MyRequestBody MyPageParam pageParam) {
|
||||||
if (pageParam != null) {
|
if (pageParam != null) {
|
||||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||||
}
|
}
|
||||||
CourseTransStats courseTransStatsFilter = CourseTransStats.INSTANCE.toModel(courseTransStatsDtoFilter);
|
CourseTransStats courseTransStatsFilter = MyModelUtil.copyTo(courseTransStatsDtoFilter, CourseTransStats.class);
|
||||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, CourseTransStats.class);
|
String orderBy = MyOrderParam.buildOrderBy(orderParam, CourseTransStats.class);
|
||||||
List<CourseTransStats> courseTransStatsList =
|
List<CourseTransStats> courseTransStatsList =
|
||||||
courseTransStatsService.getCourseTransStatsListWithRelation(courseTransStatsFilter, orderBy);
|
courseTransStatsService.getCourseTransStatsListWithRelation(courseTransStatsFilter, orderBy);
|
||||||
long totalCount = 0L;
|
return ResponseResult.success(MyPageUtil.makeResponseData(courseTransStatsList, CourseTransStats.INSTANCE));
|
||||||
if (courseTransStatsList instanceof Page) {
|
|
||||||
totalCount = ((Page<CourseTransStats>) courseTransStatsList).getTotal();
|
|
||||||
}
|
|
||||||
// 分页连同对象数据转换copy工作,下面的方法一并完成。
|
|
||||||
Tuple2<List<CourseTransStatsDto>, Long> responseData =
|
|
||||||
new Tuple2<>(CourseTransStats.INSTANCE.fromModelList(courseTransStatsList), totalCount);
|
|
||||||
return ResponseResult.success(MyPageUtil.makeResponseData(responseData));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -79,7 +69,7 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
|
|||||||
* @return 应答结果对象,包含查询结果集。
|
* @return 应答结果对象,包含查询结果集。
|
||||||
*/
|
*/
|
||||||
@PostMapping("/listWithGroup")
|
@PostMapping("/listWithGroup")
|
||||||
public ResponseResult<MyPageData<CourseTransStatsDto>> listWithGroup(
|
public ResponseResult<MyPageData<CourseTransStatsVo>> listWithGroup(
|
||||||
@MyRequestBody("courseTransStatsFilter") CourseTransStatsDto courseTransStatsDtoFilter,
|
@MyRequestBody("courseTransStatsFilter") CourseTransStatsDto courseTransStatsDtoFilter,
|
||||||
@MyRequestBody(required = true) MyGroupParam groupParam,
|
@MyRequestBody(required = true) MyGroupParam groupParam,
|
||||||
@MyRequestBody MyOrderParam orderParam,
|
@MyRequestBody MyOrderParam orderParam,
|
||||||
@@ -93,7 +83,7 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
|
|||||||
if (pageParam != null) {
|
if (pageParam != null) {
|
||||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||||
}
|
}
|
||||||
CourseTransStats filter = CourseTransStats.INSTANCE.toModel(courseTransStatsDtoFilter);
|
CourseTransStats filter = MyModelUtil.copyTo(courseTransStatsDtoFilter, CourseTransStats.class);
|
||||||
MyGroupCriteria criteria = groupParam.getGroupCriteria();
|
MyGroupCriteria criteria = groupParam.getGroupCriteria();
|
||||||
List<CourseTransStats> resultList = courseTransStatsService.getGroupedCourseTransStatsListWithRelation(
|
List<CourseTransStats> resultList = courseTransStatsService.getGroupedCourseTransStatsListWithRelation(
|
||||||
filter, criteria.getGroupSelect(), criteria.getGroupBy(), orderBy);
|
filter, criteria.getGroupSelect(), criteria.getGroupBy(), orderBy);
|
||||||
@@ -108,7 +98,7 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
|
|||||||
* @return 应答结果对象,包含对象详情。
|
* @return 应答结果对象,包含对象详情。
|
||||||
*/
|
*/
|
||||||
@GetMapping("/view")
|
@GetMapping("/view")
|
||||||
public ResponseResult<CourseTransStatsDto> view(@RequestParam Long statsId) {
|
public ResponseResult<CourseTransStatsVo> view(@RequestParam Long statsId) {
|
||||||
if (MyCommonUtil.existBlankArgument(statsId)) {
|
if (MyCommonUtil.existBlankArgument(statsId)) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||||
}
|
}
|
||||||
@@ -117,8 +107,8 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
|
|||||||
if (courseTransStats == null) {
|
if (courseTransStats == null) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||||
}
|
}
|
||||||
CourseTransStatsDto courseTransStatsDto = CourseTransStats.INSTANCE.fromModel(courseTransStats);
|
CourseTransStatsVo courseTransStatsVo = CourseTransStats.INSTANCE.fromModel(courseTransStats);
|
||||||
return ResponseResult.success(courseTransStatsDto);
|
return ResponseResult.success(courseTransStatsVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -128,9 +118,8 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
|
|||||||
* @param withDict 是否包含字典关联。
|
* @param withDict 是否包含字典关联。
|
||||||
* @return 应答结果对象,包含主对象集合。
|
* @return 应答结果对象,包含主对象集合。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "listByIds")
|
|
||||||
@PostMapping("/listByIds")
|
@PostMapping("/listByIds")
|
||||||
public ResponseResult<List<CourseTransStatsDto>> listByIds(
|
public ResponseResult<List<CourseTransStatsVo>> listByIds(
|
||||||
@RequestParam Set<Long> statsIds, @RequestParam Boolean withDict) {
|
@RequestParam Set<Long> statsIds, @RequestParam Boolean withDict) {
|
||||||
return super.baseListByIds(statsIds, withDict, CourseTransStats.INSTANCE);
|
return super.baseListByIds(statsIds, withDict, CourseTransStats.INSTANCE);
|
||||||
}
|
}
|
||||||
@@ -142,9 +131,8 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
|
|||||||
* @param withDict 是否包含字典关联。
|
* @param withDict 是否包含字典关联。
|
||||||
* @return 应答结果对象,包含主对象数据。
|
* @return 应答结果对象,包含主对象数据。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "getById")
|
|
||||||
@PostMapping("/getById")
|
@PostMapping("/getById")
|
||||||
public ResponseResult<CourseTransStatsDto> getById(
|
public ResponseResult<CourseTransStatsVo> getById(
|
||||||
@RequestParam Long statsId, @RequestParam Boolean withDict) {
|
@RequestParam Long statsId, @RequestParam Boolean withDict) {
|
||||||
return super.baseGetById(statsId, withDict, CourseTransStats.INSTANCE);
|
return super.baseGetById(statsId, withDict, CourseTransStats.INSTANCE);
|
||||||
}
|
}
|
||||||
@@ -155,7 +143,6 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
|
|||||||
* @param statsIds 主键Id集合。
|
* @param statsIds 主键Id集合。
|
||||||
* @return 应答结果对象,包含true全部存在,否则false。
|
* @return 应答结果对象,包含true全部存在,否则false。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "existIds")
|
|
||||||
@PostMapping("/existIds")
|
@PostMapping("/existIds")
|
||||||
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> statsIds) {
|
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> statsIds) {
|
||||||
return super.baseExistIds(statsIds);
|
return super.baseExistIds(statsIds);
|
||||||
@@ -167,7 +154,6 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
|
|||||||
* @param statsId 主键Id。
|
* @param statsId 主键Id。
|
||||||
* @return 应答结果对象,包含true表示存在,否则false。
|
* @return 应答结果对象,包含true表示存在,否则false。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "existId")
|
|
||||||
@PostMapping("/existId")
|
@PostMapping("/existId")
|
||||||
public ResponseResult<Boolean> existId(@RequestParam Long statsId) {
|
public ResponseResult<Boolean> existId(@RequestParam Long statsId) {
|
||||||
return super.baseExistId(statsId);
|
return super.baseExistId(statsId);
|
||||||
@@ -179,33 +165,30 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
|
|||||||
* @param filter 过滤对象。
|
* @param filter 过滤对象。
|
||||||
* @return 删除数量。
|
* @return 删除数量。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "deleteBy")
|
|
||||||
@PostMapping("/deleteBy")
|
@PostMapping("/deleteBy")
|
||||||
public ResponseResult<Integer> deleteBy(@RequestBody CourseTransStatsDto filter) throws Exception {
|
public ResponseResult<Integer> deleteBy(@RequestBody CourseTransStatsDto filter) throws Exception {
|
||||||
return super.baseDeleteBy(filter, CourseTransStats.INSTANCE);
|
return super.baseDeleteBy(MyModelUtil.copyTo(filter, CourseTransStats.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分页和排序等。主要用于微服务间远程过程调用。
|
||||||
*
|
*
|
||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空,则不会执行分页操作,只是基于MyPageData对象返回数据结果。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "listBy")
|
|
||||||
@PostMapping("/listBy")
|
@PostMapping("/listBy")
|
||||||
public ResponseResult<List<CourseTransStatsDto>> listBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<MyPageData<CourseTransStatsVo>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseListBy(queryParam, CourseTransStats.INSTANCE);
|
return super.baseListBy(queryParam, CourseTransStats.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分页和排序等。主要用于微服务间远程过程调用。
|
||||||
*
|
*
|
||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空,则不会执行分页操作,只是基于MyPageData对象返回数据结果。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "listMapBy")
|
|
||||||
@PostMapping("/listMapBy")
|
@PostMapping("/listMapBy")
|
||||||
public ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<MyPageData<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseListMapBy(queryParam, CourseTransStats.INSTANCE);
|
return super.baseListMapBy(queryParam, CourseTransStats.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,9 +198,8 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
|
|||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "getBy")
|
|
||||||
@PostMapping("/getBy")
|
@PostMapping("/getBy")
|
||||||
public ResponseResult<CourseTransStatsDto> getBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<CourseTransStatsVo> getBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseGetBy(queryParam, CourseTransStats.INSTANCE);
|
return super.baseGetBy(queryParam, CourseTransStats.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -227,7 +209,6 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
|
|||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含结果数量。
|
* @return 应答结果对象,包含结果数量。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "countBy")
|
|
||||||
@PostMapping("/countBy")
|
@PostMapping("/countBy")
|
||||||
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseCountBy(queryParam);
|
return super.baseCountBy(queryParam);
|
||||||
@@ -239,7 +220,6 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
|
|||||||
* @param aggregationParam 聚合参数。
|
* @param aggregationParam 聚合参数。
|
||||||
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "aggregateBy")
|
|
||||||
@PostMapping("/aggregateBy")
|
@PostMapping("/aggregateBy")
|
||||||
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
|
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
|
||||||
return super.baseAggregateBy(aggregationParam);
|
return super.baseAggregateBy(aggregationParam);
|
||||||
|
|||||||
@@ -1,18 +1,16 @@
|
|||||||
package com.orange.demo.statsservice.controller;
|
package com.orange.demo.statsservice.controller;
|
||||||
|
|
||||||
import com.github.pagehelper.Page;
|
|
||||||
import com.github.pagehelper.page.PageMethod;
|
import com.github.pagehelper.page.PageMethod;
|
||||||
import com.orange.demo.statsservice.model.*;
|
import com.orange.demo.statsservice.model.*;
|
||||||
import com.orange.demo.statsservice.service.*;
|
import com.orange.demo.statsservice.service.*;
|
||||||
import com.orange.demo.statsinterface.dto.*;
|
import com.orange.demo.statsinterface.dto.*;
|
||||||
|
import com.orange.demo.statsinterface.vo.*;
|
||||||
import com.orange.demo.common.core.object.*;
|
import com.orange.demo.common.core.object.*;
|
||||||
import com.orange.demo.common.core.util.*;
|
import com.orange.demo.common.core.util.*;
|
||||||
import com.orange.demo.common.core.constant.*;
|
import com.orange.demo.common.core.constant.*;
|
||||||
import com.orange.demo.common.core.base.controller.BaseController;
|
import com.orange.demo.common.core.base.controller.BaseController;
|
||||||
import com.orange.demo.common.core.base.service.BaseService;
|
import com.orange.demo.common.core.base.service.BaseService;
|
||||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -25,17 +23,16 @@ import java.util.*;
|
|||||||
* @author Jerry
|
* @author Jerry
|
||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@Api(tags = "学生行为统计管理接口")
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/studentActionStats")
|
@RequestMapping("/studentActionStats")
|
||||||
public class StudentActionStatsController extends BaseController<StudentActionStats, StudentActionStatsDto, Long> {
|
public class StudentActionStatsController extends BaseController<StudentActionStats, StudentActionStatsVo, Long> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private StudentActionStatsService studentActionStatsService;
|
private StudentActionStatsService studentActionStatsService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BaseService<StudentActionStats, StudentActionStatsDto, Long> service() {
|
protected BaseService<StudentActionStats, Long> service() {
|
||||||
return studentActionStatsService;
|
return studentActionStatsService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,25 +45,18 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
|
|||||||
* @return 应答结果对象,包含查询结果集。
|
* @return 应答结果对象,包含查询结果集。
|
||||||
*/
|
*/
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
public ResponseResult<MyPageData<StudentActionStatsDto>> list(
|
public ResponseResult<MyPageData<StudentActionStatsVo>> list(
|
||||||
@MyRequestBody("studentActionStatsFilter") StudentActionStatsDto studentActionStatsDtoFilter,
|
@MyRequestBody("studentActionStatsFilter") StudentActionStatsDto studentActionStatsDtoFilter,
|
||||||
@MyRequestBody MyOrderParam orderParam,
|
@MyRequestBody MyOrderParam orderParam,
|
||||||
@MyRequestBody MyPageParam pageParam) {
|
@MyRequestBody MyPageParam pageParam) {
|
||||||
if (pageParam != null) {
|
if (pageParam != null) {
|
||||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||||
}
|
}
|
||||||
StudentActionStats studentActionStatsFilter = StudentActionStats.INSTANCE.toModel(studentActionStatsDtoFilter);
|
StudentActionStats studentActionStatsFilter = MyModelUtil.copyTo(studentActionStatsDtoFilter, StudentActionStats.class);
|
||||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, StudentActionStats.class);
|
String orderBy = MyOrderParam.buildOrderBy(orderParam, StudentActionStats.class);
|
||||||
List<StudentActionStats> studentActionStatsList =
|
List<StudentActionStats> studentActionStatsList =
|
||||||
studentActionStatsService.getStudentActionStatsListWithRelation(studentActionStatsFilter, orderBy);
|
studentActionStatsService.getStudentActionStatsListWithRelation(studentActionStatsFilter, orderBy);
|
||||||
long totalCount = 0L;
|
return ResponseResult.success(MyPageUtil.makeResponseData(studentActionStatsList, StudentActionStats.INSTANCE));
|
||||||
if (studentActionStatsList instanceof Page) {
|
|
||||||
totalCount = ((Page<StudentActionStats>) studentActionStatsList).getTotal();
|
|
||||||
}
|
|
||||||
// 分页连同对象数据转换copy工作,下面的方法一并完成。
|
|
||||||
Tuple2<List<StudentActionStatsDto>, Long> responseData =
|
|
||||||
new Tuple2<>(StudentActionStats.INSTANCE.fromModelList(studentActionStatsList), totalCount);
|
|
||||||
return ResponseResult.success(MyPageUtil.makeResponseData(responseData));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -79,7 +69,7 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
|
|||||||
* @return 应答结果对象,包含查询结果集。
|
* @return 应答结果对象,包含查询结果集。
|
||||||
*/
|
*/
|
||||||
@PostMapping("/listWithGroup")
|
@PostMapping("/listWithGroup")
|
||||||
public ResponseResult<MyPageData<StudentActionStatsDto>> listWithGroup(
|
public ResponseResult<MyPageData<StudentActionStatsVo>> listWithGroup(
|
||||||
@MyRequestBody("studentActionStatsFilter") StudentActionStatsDto studentActionStatsDtoFilter,
|
@MyRequestBody("studentActionStatsFilter") StudentActionStatsDto studentActionStatsDtoFilter,
|
||||||
@MyRequestBody(required = true) MyGroupParam groupParam,
|
@MyRequestBody(required = true) MyGroupParam groupParam,
|
||||||
@MyRequestBody MyOrderParam orderParam,
|
@MyRequestBody MyOrderParam orderParam,
|
||||||
@@ -93,7 +83,7 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
|
|||||||
if (pageParam != null) {
|
if (pageParam != null) {
|
||||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||||
}
|
}
|
||||||
StudentActionStats filter = StudentActionStats.INSTANCE.toModel(studentActionStatsDtoFilter);
|
StudentActionStats filter = MyModelUtil.copyTo(studentActionStatsDtoFilter, StudentActionStats.class);
|
||||||
MyGroupCriteria criteria = groupParam.getGroupCriteria();
|
MyGroupCriteria criteria = groupParam.getGroupCriteria();
|
||||||
List<StudentActionStats> resultList = studentActionStatsService.getGroupedStudentActionStatsListWithRelation(
|
List<StudentActionStats> resultList = studentActionStatsService.getGroupedStudentActionStatsListWithRelation(
|
||||||
filter, criteria.getGroupSelect(), criteria.getGroupBy(), orderBy);
|
filter, criteria.getGroupSelect(), criteria.getGroupBy(), orderBy);
|
||||||
@@ -108,7 +98,7 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
|
|||||||
* @return 应答结果对象,包含对象详情。
|
* @return 应答结果对象,包含对象详情。
|
||||||
*/
|
*/
|
||||||
@GetMapping("/view")
|
@GetMapping("/view")
|
||||||
public ResponseResult<StudentActionStatsDto> view(@RequestParam Long statsId) {
|
public ResponseResult<StudentActionStatsVo> view(@RequestParam Long statsId) {
|
||||||
if (MyCommonUtil.existBlankArgument(statsId)) {
|
if (MyCommonUtil.existBlankArgument(statsId)) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||||
}
|
}
|
||||||
@@ -117,8 +107,8 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
|
|||||||
if (studentActionStats == null) {
|
if (studentActionStats == null) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||||
}
|
}
|
||||||
StudentActionStatsDto studentActionStatsDto = StudentActionStats.INSTANCE.fromModel(studentActionStats);
|
StudentActionStatsVo studentActionStatsVo = StudentActionStats.INSTANCE.fromModel(studentActionStats);
|
||||||
return ResponseResult.success(studentActionStatsDto);
|
return ResponseResult.success(studentActionStatsVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -128,9 +118,8 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
|
|||||||
* @param withDict 是否包含字典关联。
|
* @param withDict 是否包含字典关联。
|
||||||
* @return 应答结果对象,包含主对象集合。
|
* @return 应答结果对象,包含主对象集合。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "listByIds")
|
|
||||||
@PostMapping("/listByIds")
|
@PostMapping("/listByIds")
|
||||||
public ResponseResult<List<StudentActionStatsDto>> listByIds(
|
public ResponseResult<List<StudentActionStatsVo>> listByIds(
|
||||||
@RequestParam Set<Long> statsIds, @RequestParam Boolean withDict) {
|
@RequestParam Set<Long> statsIds, @RequestParam Boolean withDict) {
|
||||||
return super.baseListByIds(statsIds, withDict, StudentActionStats.INSTANCE);
|
return super.baseListByIds(statsIds, withDict, StudentActionStats.INSTANCE);
|
||||||
}
|
}
|
||||||
@@ -142,9 +131,8 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
|
|||||||
* @param withDict 是否包含字典关联。
|
* @param withDict 是否包含字典关联。
|
||||||
* @return 应答结果对象,包含主对象数据。
|
* @return 应答结果对象,包含主对象数据。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "getById")
|
|
||||||
@PostMapping("/getById")
|
@PostMapping("/getById")
|
||||||
public ResponseResult<StudentActionStatsDto> getById(
|
public ResponseResult<StudentActionStatsVo> getById(
|
||||||
@RequestParam Long statsId, @RequestParam Boolean withDict) {
|
@RequestParam Long statsId, @RequestParam Boolean withDict) {
|
||||||
return super.baseGetById(statsId, withDict, StudentActionStats.INSTANCE);
|
return super.baseGetById(statsId, withDict, StudentActionStats.INSTANCE);
|
||||||
}
|
}
|
||||||
@@ -155,7 +143,6 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
|
|||||||
* @param statsIds 主键Id集合。
|
* @param statsIds 主键Id集合。
|
||||||
* @return 应答结果对象,包含true全部存在,否则false。
|
* @return 应答结果对象,包含true全部存在,否则false。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "existIds")
|
|
||||||
@PostMapping("/existIds")
|
@PostMapping("/existIds")
|
||||||
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> statsIds) {
|
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> statsIds) {
|
||||||
return super.baseExistIds(statsIds);
|
return super.baseExistIds(statsIds);
|
||||||
@@ -167,7 +154,6 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
|
|||||||
* @param statsId 主键Id。
|
* @param statsId 主键Id。
|
||||||
* @return 应答结果对象,包含true表示存在,否则false。
|
* @return 应答结果对象,包含true表示存在,否则false。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "existId")
|
|
||||||
@PostMapping("/existId")
|
@PostMapping("/existId")
|
||||||
public ResponseResult<Boolean> existId(@RequestParam Long statsId) {
|
public ResponseResult<Boolean> existId(@RequestParam Long statsId) {
|
||||||
return super.baseExistId(statsId);
|
return super.baseExistId(statsId);
|
||||||
@@ -179,33 +165,30 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
|
|||||||
* @param filter 过滤对象。
|
* @param filter 过滤对象。
|
||||||
* @return 删除数量。
|
* @return 删除数量。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "deleteBy")
|
|
||||||
@PostMapping("/deleteBy")
|
@PostMapping("/deleteBy")
|
||||||
public ResponseResult<Integer> deleteBy(@RequestBody StudentActionStatsDto filter) throws Exception {
|
public ResponseResult<Integer> deleteBy(@RequestBody StudentActionStatsDto filter) throws Exception {
|
||||||
return super.baseDeleteBy(filter, StudentActionStats.INSTANCE);
|
return super.baseDeleteBy(MyModelUtil.copyTo(filter, StudentActionStats.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分页和排序等。主要用于微服务间远程过程调用。
|
||||||
*
|
*
|
||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空,则不会执行分页操作,只是基于MyPageData对象返回数据结果。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "listBy")
|
|
||||||
@PostMapping("/listBy")
|
@PostMapping("/listBy")
|
||||||
public ResponseResult<List<StudentActionStatsDto>> listBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<MyPageData<StudentActionStatsVo>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseListBy(queryParam, StudentActionStats.INSTANCE);
|
return super.baseListBy(queryParam, StudentActionStats.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分页和排序等。主要用于微服务间远程过程调用。
|
||||||
*
|
*
|
||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空,则不会执行分页操作,只是基于MyPageData对象返回数据结果。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "listMapBy")
|
|
||||||
@PostMapping("/listMapBy")
|
@PostMapping("/listMapBy")
|
||||||
public ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<MyPageData<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseListMapBy(queryParam, StudentActionStats.INSTANCE);
|
return super.baseListMapBy(queryParam, StudentActionStats.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,9 +198,8 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
|
|||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "getBy")
|
|
||||||
@PostMapping("/getBy")
|
@PostMapping("/getBy")
|
||||||
public ResponseResult<StudentActionStatsDto> getBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<StudentActionStatsVo> getBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseGetBy(queryParam, StudentActionStats.INSTANCE);
|
return super.baseGetBy(queryParam, StudentActionStats.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -227,7 +209,6 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
|
|||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含结果数量。
|
* @return 应答结果对象,包含结果数量。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "countBy")
|
|
||||||
@PostMapping("/countBy")
|
@PostMapping("/countBy")
|
||||||
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseCountBy(queryParam);
|
return super.baseCountBy(queryParam);
|
||||||
@@ -239,7 +220,6 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
|
|||||||
* @param aggregationParam 聚合参数。
|
* @param aggregationParam 聚合参数。
|
||||||
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "aggregateBy")
|
|
||||||
@PostMapping("/aggregateBy")
|
@PostMapping("/aggregateBy")
|
||||||
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
|
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
|
||||||
return super.baseAggregateBy(aggregationParam);
|
return super.baseAggregateBy(aggregationParam);
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.orange.demo.statsservice.controller;
|
package com.orange.demo.statsservice.controller;
|
||||||
|
|
||||||
import com.github.pagehelper.Page;
|
|
||||||
import com.github.pagehelper.page.PageMethod;
|
import com.github.pagehelper.page.PageMethod;
|
||||||
import com.orange.demo.statsservice.model.*;
|
import com.orange.demo.statsservice.model.*;
|
||||||
import com.orange.demo.statsservice.service.*;
|
import com.orange.demo.statsservice.service.*;
|
||||||
import com.orange.demo.statsinterface.dto.*;
|
import com.orange.demo.statsinterface.dto.*;
|
||||||
|
import com.orange.demo.statsinterface.vo.*;
|
||||||
import com.orange.demo.common.core.object.*;
|
import com.orange.demo.common.core.object.*;
|
||||||
import com.orange.demo.common.core.util.*;
|
import com.orange.demo.common.core.util.*;
|
||||||
import com.orange.demo.common.core.constant.*;
|
import com.orange.demo.common.core.constant.*;
|
||||||
@@ -12,9 +12,6 @@ import com.orange.demo.common.core.base.controller.BaseController;
|
|||||||
import com.orange.demo.common.core.base.service.BaseService;
|
import com.orange.demo.common.core.base.service.BaseService;
|
||||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -28,17 +25,16 @@ import java.util.*;
|
|||||||
* @author Jerry
|
* @author Jerry
|
||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@Api(tags = "学生行为流水管理接口")
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/studentActionTrans")
|
@RequestMapping("/studentActionTrans")
|
||||||
public class StudentActionTransController extends BaseController<StudentActionTrans, StudentActionTransDto, Long> {
|
public class StudentActionTransController extends BaseController<StudentActionTrans, StudentActionTransVo, Long> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private StudentActionTransService studentActionTransService;
|
private StudentActionTransService studentActionTransService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BaseService<StudentActionTrans, StudentActionTransDto, Long> service() {
|
protected BaseService<StudentActionTrans, Long> service() {
|
||||||
return studentActionTransService;
|
return studentActionTransService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,17 +44,13 @@ public class StudentActionTransController extends BaseController<StudentActionTr
|
|||||||
* @param studentActionTransDto 新增对象。
|
* @param studentActionTransDto 新增对象。
|
||||||
* @return 应答结果对象,包含新增对象主键Id。
|
* @return 应答结果对象,包含新增对象主键Id。
|
||||||
*/
|
*/
|
||||||
@ApiOperationSupport(ignoreParameters = {
|
|
||||||
"studentActionTrans.transId",
|
|
||||||
"studentActionTrans.createTimeStart",
|
|
||||||
"studentActionTrans.createTimeEnd"})
|
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
public ResponseResult<Long> add(@MyRequestBody("studentActionTrans") StudentActionTransDto studentActionTransDto) {
|
public ResponseResult<Long> add(@MyRequestBody("studentActionTrans") StudentActionTransDto studentActionTransDto) {
|
||||||
String errorMessage = MyCommonUtil.getModelValidationError(studentActionTransDto);
|
String errorMessage = MyCommonUtil.getModelValidationError(studentActionTransDto);
|
||||||
if (errorMessage != null) {
|
if (errorMessage != null) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
||||||
}
|
}
|
||||||
StudentActionTrans studentActionTrans = StudentActionTrans.INSTANCE.toModel(studentActionTransDto);
|
StudentActionTrans studentActionTrans = MyModelUtil.copyTo(studentActionTransDto, StudentActionTrans.class);
|
||||||
// 验证远程服务关联Id的数据合法性
|
// 验证远程服务关联Id的数据合法性
|
||||||
CallResult remoteCallResult = studentActionTransService.verifyRemoteRelatedData(studentActionTrans, null);
|
CallResult remoteCallResult = studentActionTransService.verifyRemoteRelatedData(studentActionTrans, null);
|
||||||
if (!remoteCallResult.isSuccess()) {
|
if (!remoteCallResult.isSuccess()) {
|
||||||
@@ -75,16 +67,13 @@ public class StudentActionTransController extends BaseController<StudentActionTr
|
|||||||
* @param studentActionTransDto 更新对象。
|
* @param studentActionTransDto 更新对象。
|
||||||
* @return 应答结果对象。
|
* @return 应答结果对象。
|
||||||
*/
|
*/
|
||||||
@ApiOperationSupport(ignoreParameters = {
|
|
||||||
"studentActionTrans.createTimeStart",
|
|
||||||
"studentActionTrans.createTimeEnd"})
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
public ResponseResult<Void> update(@MyRequestBody("studentActionTrans") StudentActionTransDto studentActionTransDto) {
|
public ResponseResult<Void> update(@MyRequestBody("studentActionTrans") StudentActionTransDto studentActionTransDto) {
|
||||||
String errorMessage = MyCommonUtil.getModelValidationError(studentActionTransDto, Default.class, UpdateGroup.class);
|
String errorMessage = MyCommonUtil.getModelValidationError(studentActionTransDto, Default.class, UpdateGroup.class);
|
||||||
if (errorMessage != null) {
|
if (errorMessage != null) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
||||||
}
|
}
|
||||||
StudentActionTrans studentActionTrans = StudentActionTrans.INSTANCE.toModel(studentActionTransDto);
|
StudentActionTrans studentActionTrans = MyModelUtil.copyTo(studentActionTransDto, StudentActionTrans.class);
|
||||||
StudentActionTrans originalStudentActionTrans = studentActionTransService.getById(studentActionTrans.getTransId());
|
StudentActionTrans originalStudentActionTrans = studentActionTransService.getById(studentActionTrans.getTransId());
|
||||||
if (originalStudentActionTrans == null) {
|
if (originalStudentActionTrans == null) {
|
||||||
// NOTE: 修改下面方括号中的话述
|
// NOTE: 修改下面方括号中的话述
|
||||||
@@ -138,25 +127,18 @@ public class StudentActionTransController extends BaseController<StudentActionTr
|
|||||||
* @return 应答结果对象,包含查询结果集。
|
* @return 应答结果对象,包含查询结果集。
|
||||||
*/
|
*/
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
public ResponseResult<MyPageData<StudentActionTransDto>> list(
|
public ResponseResult<MyPageData<StudentActionTransVo>> list(
|
||||||
@MyRequestBody("studentActionTransFilter") StudentActionTransDto studentActionTransDtoFilter,
|
@MyRequestBody("studentActionTransFilter") StudentActionTransDto studentActionTransDtoFilter,
|
||||||
@MyRequestBody MyOrderParam orderParam,
|
@MyRequestBody MyOrderParam orderParam,
|
||||||
@MyRequestBody MyPageParam pageParam) {
|
@MyRequestBody MyPageParam pageParam) {
|
||||||
if (pageParam != null) {
|
if (pageParam != null) {
|
||||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||||
}
|
}
|
||||||
StudentActionTrans studentActionTransFilter = StudentActionTrans.INSTANCE.toModel(studentActionTransDtoFilter);
|
StudentActionTrans studentActionTransFilter = MyModelUtil.copyTo(studentActionTransDtoFilter, StudentActionTrans.class);
|
||||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, StudentActionTrans.class);
|
String orderBy = MyOrderParam.buildOrderBy(orderParam, StudentActionTrans.class);
|
||||||
List<StudentActionTrans> studentActionTransList =
|
List<StudentActionTrans> studentActionTransList =
|
||||||
studentActionTransService.getStudentActionTransListWithRelation(studentActionTransFilter, orderBy);
|
studentActionTransService.getStudentActionTransListWithRelation(studentActionTransFilter, orderBy);
|
||||||
long totalCount = 0L;
|
return ResponseResult.success(MyPageUtil.makeResponseData(studentActionTransList, StudentActionTrans.INSTANCE));
|
||||||
if (studentActionTransList instanceof Page) {
|
|
||||||
totalCount = ((Page<StudentActionTrans>) studentActionTransList).getTotal();
|
|
||||||
}
|
|
||||||
// 分页连同对象数据转换copy工作,下面的方法一并完成。
|
|
||||||
Tuple2<List<StudentActionTransDto>, Long> responseData =
|
|
||||||
new Tuple2<>(StudentActionTrans.INSTANCE.fromModelList(studentActionTransList), totalCount);
|
|
||||||
return ResponseResult.success(MyPageUtil.makeResponseData(responseData));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -166,7 +148,7 @@ public class StudentActionTransController extends BaseController<StudentActionTr
|
|||||||
* @return 应答结果对象,包含对象详情。
|
* @return 应答结果对象,包含对象详情。
|
||||||
*/
|
*/
|
||||||
@GetMapping("/view")
|
@GetMapping("/view")
|
||||||
public ResponseResult<StudentActionTransDto> view(@RequestParam Long transId) {
|
public ResponseResult<StudentActionTransVo> view(@RequestParam Long transId) {
|
||||||
if (MyCommonUtil.existBlankArgument(transId)) {
|
if (MyCommonUtil.existBlankArgument(transId)) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||||
}
|
}
|
||||||
@@ -175,8 +157,8 @@ public class StudentActionTransController extends BaseController<StudentActionTr
|
|||||||
if (studentActionTrans == null) {
|
if (studentActionTrans == null) {
|
||||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||||
}
|
}
|
||||||
StudentActionTransDto studentActionTransDto = StudentActionTrans.INSTANCE.fromModel(studentActionTrans);
|
StudentActionTransVo studentActionTransVo = StudentActionTrans.INSTANCE.fromModel(studentActionTrans);
|
||||||
return ResponseResult.success(studentActionTransDto);
|
return ResponseResult.success(studentActionTransVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -186,9 +168,8 @@ public class StudentActionTransController extends BaseController<StudentActionTr
|
|||||||
* @param withDict 是否包含字典关联。
|
* @param withDict 是否包含字典关联。
|
||||||
* @return 应答结果对象,包含主对象集合。
|
* @return 应答结果对象,包含主对象集合。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "listByIds")
|
|
||||||
@PostMapping("/listByIds")
|
@PostMapping("/listByIds")
|
||||||
public ResponseResult<List<StudentActionTransDto>> listByIds(
|
public ResponseResult<List<StudentActionTransVo>> listByIds(
|
||||||
@RequestParam Set<Long> transIds, @RequestParam Boolean withDict) {
|
@RequestParam Set<Long> transIds, @RequestParam Boolean withDict) {
|
||||||
return super.baseListByIds(transIds, withDict, StudentActionTrans.INSTANCE);
|
return super.baseListByIds(transIds, withDict, StudentActionTrans.INSTANCE);
|
||||||
}
|
}
|
||||||
@@ -200,9 +181,8 @@ public class StudentActionTransController extends BaseController<StudentActionTr
|
|||||||
* @param withDict 是否包含字典关联。
|
* @param withDict 是否包含字典关联。
|
||||||
* @return 应答结果对象,包含主对象数据。
|
* @return 应答结果对象,包含主对象数据。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "getById")
|
|
||||||
@PostMapping("/getById")
|
@PostMapping("/getById")
|
||||||
public ResponseResult<StudentActionTransDto> getById(
|
public ResponseResult<StudentActionTransVo> getById(
|
||||||
@RequestParam Long transId, @RequestParam Boolean withDict) {
|
@RequestParam Long transId, @RequestParam Boolean withDict) {
|
||||||
return super.baseGetById(transId, withDict, StudentActionTrans.INSTANCE);
|
return super.baseGetById(transId, withDict, StudentActionTrans.INSTANCE);
|
||||||
}
|
}
|
||||||
@@ -213,7 +193,6 @@ public class StudentActionTransController extends BaseController<StudentActionTr
|
|||||||
* @param transIds 主键Id集合。
|
* @param transIds 主键Id集合。
|
||||||
* @return 应答结果对象,包含true全部存在,否则false。
|
* @return 应答结果对象,包含true全部存在,否则false。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "existIds")
|
|
||||||
@PostMapping("/existIds")
|
@PostMapping("/existIds")
|
||||||
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> transIds) {
|
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> transIds) {
|
||||||
return super.baseExistIds(transIds);
|
return super.baseExistIds(transIds);
|
||||||
@@ -225,7 +204,6 @@ public class StudentActionTransController extends BaseController<StudentActionTr
|
|||||||
* @param transId 主键Id。
|
* @param transId 主键Id。
|
||||||
* @return 应答结果对象,包含true表示存在,否则false。
|
* @return 应答结果对象,包含true表示存在,否则false。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "existId")
|
|
||||||
@PostMapping("/existId")
|
@PostMapping("/existId")
|
||||||
public ResponseResult<Boolean> existId(@RequestParam Long transId) {
|
public ResponseResult<Boolean> existId(@RequestParam Long transId) {
|
||||||
return super.baseExistId(transId);
|
return super.baseExistId(transId);
|
||||||
@@ -237,33 +215,30 @@ public class StudentActionTransController extends BaseController<StudentActionTr
|
|||||||
* @param filter 过滤对象。
|
* @param filter 过滤对象。
|
||||||
* @return 删除数量。
|
* @return 删除数量。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "deleteBy")
|
|
||||||
@PostMapping("/deleteBy")
|
@PostMapping("/deleteBy")
|
||||||
public ResponseResult<Integer> deleteBy(@RequestBody StudentActionTransDto filter) throws Exception {
|
public ResponseResult<Integer> deleteBy(@RequestBody StudentActionTransDto filter) throws Exception {
|
||||||
return super.baseDeleteBy(filter, StudentActionTrans.INSTANCE);
|
return super.baseDeleteBy(MyModelUtil.copyTo(filter, StudentActionTrans.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分页和排序等。主要用于微服务间远程过程调用。
|
||||||
*
|
*
|
||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空,则不会执行分页操作,只是基于MyPageData对象返回数据结果。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "listBy")
|
|
||||||
@PostMapping("/listBy")
|
@PostMapping("/listBy")
|
||||||
public ResponseResult<List<StudentActionTransDto>> listBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<MyPageData<StudentActionTransVo>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseListBy(queryParam, StudentActionTrans.INSTANCE);
|
return super.baseListBy(queryParam, StudentActionTrans.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分页和排序等。主要用于微服务间远程过程调用。
|
||||||
*
|
*
|
||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空,则不会执行分页操作,只是基于MyPageData对象返回数据结果。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "listMapBy")
|
|
||||||
@PostMapping("/listMapBy")
|
@PostMapping("/listMapBy")
|
||||||
public ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<MyPageData<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseListMapBy(queryParam, StudentActionTrans.INSTANCE);
|
return super.baseListMapBy(queryParam, StudentActionTrans.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -273,9 +248,8 @@ public class StudentActionTransController extends BaseController<StudentActionTr
|
|||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "getBy")
|
|
||||||
@PostMapping("/getBy")
|
@PostMapping("/getBy")
|
||||||
public ResponseResult<StudentActionTransDto> getBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<StudentActionTransVo> getBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseGetBy(queryParam, StudentActionTrans.INSTANCE);
|
return super.baseGetBy(queryParam, StudentActionTrans.INSTANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -285,7 +259,6 @@ public class StudentActionTransController extends BaseController<StudentActionTr
|
|||||||
* @param queryParam 查询参数。
|
* @param queryParam 查询参数。
|
||||||
* @return 应答结果对象,包含结果数量。
|
* @return 应答结果对象,包含结果数量。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "countBy")
|
|
||||||
@PostMapping("/countBy")
|
@PostMapping("/countBy")
|
||||||
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
|
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
|
||||||
return super.baseCountBy(queryParam);
|
return super.baseCountBy(queryParam);
|
||||||
@@ -297,7 +270,6 @@ public class StudentActionTransController extends BaseController<StudentActionTr
|
|||||||
* @param aggregationParam 聚合参数。
|
* @param aggregationParam 聚合参数。
|
||||||
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
||||||
*/
|
*/
|
||||||
@ApiOperation(hidden = true, value = "aggregateBy")
|
|
||||||
@PostMapping("/aggregateBy")
|
@PostMapping("/aggregateBy")
|
||||||
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
|
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
|
||||||
return super.baseAggregateBy(aggregationParam);
|
return super.baseAggregateBy(aggregationParam);
|
||||||
|
|||||||
@@ -13,8 +13,13 @@
|
|||||||
<result column="student_flower_amount" jdbcType="INTEGER" property="studentFlowerAmount"/>
|
<result column="student_flower_amount" jdbcType="INTEGER" property="studentFlowerAmount"/>
|
||||||
<result column="student_flower_count" jdbcType="INTEGER" property="studentFlowerCount"/>
|
<result column="student_flower_count" jdbcType="INTEGER" property="studentFlowerCount"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
<!-- 如果有逻辑删除字段过滤,请写到这里 -->
|
||||||
<sql id="filterRef">
|
<sql id="filterRef">
|
||||||
|
<!-- 这里必须加上全包名,否则当filterRef被其他Mapper.xml包含引用的时候,就会调用Mapper.xml中的该SQL片段 -->
|
||||||
|
<include refid="com.orange.demo.statsservice.dao.CourseTransStatsMapper.inputFilterRef"/>
|
||||||
|
</sql>
|
||||||
|
<!-- 这里仅包含调用接口输入的主表过滤条件 -->
|
||||||
|
<sql id="inputFilterRef">
|
||||||
<if test="courseTransStatsFilter != null">
|
<if test="courseTransStatsFilter != null">
|
||||||
<if test="courseTransStatsFilter.statsDateStart != null and courseTransStatsFilter.statsDateStart != ''">
|
<if test="courseTransStatsFilter.statsDateStart != null and courseTransStatsFilter.statsDateStart != ''">
|
||||||
AND zz_course_trans_stats.stats_date >= #{courseTransStatsFilter.statsDateStart}
|
AND zz_course_trans_stats.stats_date >= #{courseTransStatsFilter.statsDateStart}
|
||||||
|
|||||||
@@ -24,8 +24,13 @@
|
|||||||
<result column="do_exercise_count" jdbcType="INTEGER" property="doExerciseCount"/>
|
<result column="do_exercise_count" jdbcType="INTEGER" property="doExerciseCount"/>
|
||||||
<result column="do_exercise_correct_count" jdbcType="INTEGER" property="doExerciseCorrectCount"/>
|
<result column="do_exercise_correct_count" jdbcType="INTEGER" property="doExerciseCorrectCount"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
<!-- 如果有逻辑删除字段过滤,请写到这里 -->
|
||||||
<sql id="filterRef">
|
<sql id="filterRef">
|
||||||
|
<!-- 这里必须加上全包名,否则当filterRef被其他Mapper.xml包含引用的时候,就会调用Mapper.xml中的该SQL片段 -->
|
||||||
|
<include refid="com.orange.demo.statsservice.dao.StudentActionStatsMapper.inputFilterRef"/>
|
||||||
|
</sql>
|
||||||
|
<!-- 这里仅包含调用接口输入的主表过滤条件 -->
|
||||||
|
<sql id="inputFilterRef">
|
||||||
<if test="studentActionStatsFilter != null">
|
<if test="studentActionStatsFilter != null">
|
||||||
<if test="studentActionStatsFilter.statsDateStart != null and studentActionStatsFilter.statsDateStart != ''">
|
<if test="studentActionStatsFilter.statsDateStart != null and studentActionStatsFilter.statsDateStart != ''">
|
||||||
AND zz_student_action_stats.stats_date >= #{studentActionStatsFilter.statsDateStart}
|
AND zz_student_action_stats.stats_date >= #{studentActionStatsFilter.statsDateStart}
|
||||||
|
|||||||
@@ -18,8 +18,13 @@
|
|||||||
<result column="exercise_correct_flag" jdbcType="TINYINT" property="exerciseCorrectFlag"/>
|
<result column="exercise_correct_flag" jdbcType="TINYINT" property="exerciseCorrectFlag"/>
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
<!-- 如果有逻辑删除字段过滤,请写到这里 -->
|
||||||
<sql id="filterRef">
|
<sql id="filterRef">
|
||||||
|
<!-- 这里必须加上全包名,否则当filterRef被其他Mapper.xml包含引用的时候,就会调用Mapper.xml中的该SQL片段 -->
|
||||||
|
<include refid="com.orange.demo.statsservice.dao.StudentActionTransMapper.inputFilterRef"/>
|
||||||
|
</sql>
|
||||||
|
<!-- 这里仅包含调用接口输入的主表过滤条件 -->
|
||||||
|
<sql id="inputFilterRef">
|
||||||
<if test="studentActionTransFilter != null">
|
<if test="studentActionTransFilter != null">
|
||||||
<if test="studentActionTransFilter.studentId != null">
|
<if test="studentActionTransFilter.studentId != null">
|
||||||
AND zz_student_action_trans.student_id = #{studentActionTransFilter.studentId}
|
AND zz_student_action_trans.student_id = #{studentActionTransFilter.studentId}
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
package com.orange.demo.statsservice.model;
|
package com.orange.demo.statsservice.model;
|
||||||
|
|
||||||
import com.orange.demo.courseclassinterface.client.GradeClient;
|
import com.orange.demo.courseclassinterface.client.GradeClient;
|
||||||
import com.orange.demo.courseclassinterface.dto.GradeDto;
|
|
||||||
import com.orange.demo.courseclassinterface.client.CourseClient;
|
import com.orange.demo.courseclassinterface.client.CourseClient;
|
||||||
import com.orange.demo.courseclassinterface.dto.CourseDto;
|
import com.orange.demo.courseclassinterface.vo.CourseVo;
|
||||||
|
import com.orange.demo.courseclassinterface.vo.GradeVo;
|
||||||
import com.orange.demo.application.common.constant.Subject;
|
import com.orange.demo.application.common.constant.Subject;
|
||||||
import com.orange.demo.common.core.annotation.RelationDict;
|
import com.orange.demo.common.core.annotation.RelationDict;
|
||||||
import com.orange.demo.common.core.annotation.RelationConstDict;
|
import com.orange.demo.common.core.annotation.RelationConstDict;
|
||||||
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
||||||
import com.orange.demo.common.core.validator.ConstDictRef;
|
import com.orange.demo.common.core.validator.ConstDictRef;
|
||||||
import com.orange.demo.statsinterface.dto.CourseTransStatsDto;
|
import com.orange.demo.statsinterface.vo.CourseTransStatsVo;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.mapstruct.*;
|
import org.mapstruct.*;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
@@ -115,7 +115,7 @@ public class CourseTransStats {
|
|||||||
@RelationDict(
|
@RelationDict(
|
||||||
masterIdField = "gradeId",
|
masterIdField = "gradeId",
|
||||||
slaveClientClass = GradeClient.class,
|
slaveClientClass = GradeClient.class,
|
||||||
slaveModelClass = GradeDto.class,
|
slaveModelClass = GradeVo.class,
|
||||||
slaveIdField = "gradeId",
|
slaveIdField = "gradeId",
|
||||||
slaveNameField = "gradeName")
|
slaveNameField = "gradeName")
|
||||||
@Transient
|
@Transient
|
||||||
@@ -124,7 +124,7 @@ public class CourseTransStats {
|
|||||||
@RelationDict(
|
@RelationDict(
|
||||||
masterIdField = "courseId",
|
masterIdField = "courseId",
|
||||||
slaveClientClass = CourseClient.class,
|
slaveClientClass = CourseClient.class,
|
||||||
slaveModelClass = CourseDto.class,
|
slaveModelClass = CourseVo.class,
|
||||||
slaveIdField = "courseId",
|
slaveIdField = "courseId",
|
||||||
slaveNameField = "courseName")
|
slaveNameField = "courseName")
|
||||||
@Transient
|
@Transient
|
||||||
@@ -137,23 +137,23 @@ public class CourseTransStats {
|
|||||||
private Map<String, Object> subjectIdDictMap;
|
private Map<String, Object> subjectIdDictMap;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface CourseTransStatsModelMapper extends BaseModelMapper<CourseTransStatsDto, CourseTransStats> {
|
public interface CourseTransStatsModelMapper extends BaseModelMapper<CourseTransStatsVo, CourseTransStats> {
|
||||||
/**
|
/**
|
||||||
* 转换Dto对象到实体对象。
|
* 转换Vo对象到实体对象。
|
||||||
*
|
*
|
||||||
* @param courseTransStatsDto 域对象。
|
* @param courseTransStatsVo 域对象。
|
||||||
* @return 实体对象。
|
* @return 实体对象。
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
CourseTransStats toModel(CourseTransStatsDto courseTransStatsDto);
|
CourseTransStats toModel(CourseTransStatsVo courseTransStatsVo);
|
||||||
/**
|
/**
|
||||||
* 转换实体对象到Dto对象。
|
* 转换实体对象到VO对象。
|
||||||
*
|
*
|
||||||
* @param courseTransStats 实体对象。
|
* @param courseTransStats 实体对象。
|
||||||
* @return 域对象。
|
* @return 域对象。
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
CourseTransStatsDto fromModel(CourseTransStats courseTransStats);
|
CourseTransStatsVo fromModel(CourseTransStats courseTransStats);
|
||||||
}
|
}
|
||||||
public static final CourseTransStatsModelMapper INSTANCE = Mappers.getMapper(CourseTransStatsModelMapper.class);
|
public static final CourseTransStatsModelMapper INSTANCE = Mappers.getMapper(CourseTransStatsModelMapper.class);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package com.orange.demo.statsservice.model;
|
package com.orange.demo.statsservice.model;
|
||||||
|
|
||||||
|
import com.orange.demo.courseclassinterface.vo.AreaCodeVo;
|
||||||
import com.orange.demo.courseclassinterface.client.GradeClient;
|
import com.orange.demo.courseclassinterface.client.GradeClient;
|
||||||
import com.orange.demo.courseclassinterface.dto.GradeDto;
|
|
||||||
import com.orange.demo.courseclassinterface.client.AreaCodeClient;
|
import com.orange.demo.courseclassinterface.client.AreaCodeClient;
|
||||||
import com.orange.demo.courseclassinterface.dto.AreaCodeDto;
|
import com.orange.demo.courseclassinterface.vo.GradeVo;
|
||||||
import com.orange.demo.common.core.annotation.RelationDict;
|
import com.orange.demo.common.core.annotation.RelationDict;
|
||||||
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
||||||
import com.orange.demo.statsinterface.dto.StudentActionStatsDto;
|
import com.orange.demo.statsinterface.vo.StudentActionStatsVo;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.mapstruct.*;
|
import org.mapstruct.*;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
@@ -188,7 +188,7 @@ public class StudentActionStats {
|
|||||||
@RelationDict(
|
@RelationDict(
|
||||||
masterIdField = "gradeId",
|
masterIdField = "gradeId",
|
||||||
slaveClientClass = GradeClient.class,
|
slaveClientClass = GradeClient.class,
|
||||||
slaveModelClass = GradeDto.class,
|
slaveModelClass = GradeVo.class,
|
||||||
slaveIdField = "gradeId",
|
slaveIdField = "gradeId",
|
||||||
slaveNameField = "gradeName")
|
slaveNameField = "gradeName")
|
||||||
@Transient
|
@Transient
|
||||||
@@ -197,7 +197,7 @@ public class StudentActionStats {
|
|||||||
@RelationDict(
|
@RelationDict(
|
||||||
masterIdField = "provinceId",
|
masterIdField = "provinceId",
|
||||||
slaveClientClass = AreaCodeClient.class,
|
slaveClientClass = AreaCodeClient.class,
|
||||||
slaveModelClass = AreaCodeDto.class,
|
slaveModelClass = AreaCodeVo.class,
|
||||||
slaveIdField = "areaId",
|
slaveIdField = "areaId",
|
||||||
slaveNameField = "areaName")
|
slaveNameField = "areaName")
|
||||||
@Transient
|
@Transient
|
||||||
@@ -206,30 +206,30 @@ public class StudentActionStats {
|
|||||||
@RelationDict(
|
@RelationDict(
|
||||||
masterIdField = "cityId",
|
masterIdField = "cityId",
|
||||||
slaveClientClass = AreaCodeClient.class,
|
slaveClientClass = AreaCodeClient.class,
|
||||||
slaveModelClass = AreaCodeDto.class,
|
slaveModelClass = AreaCodeVo.class,
|
||||||
slaveIdField = "areaId",
|
slaveIdField = "areaId",
|
||||||
slaveNameField = "areaName")
|
slaveNameField = "areaName")
|
||||||
@Transient
|
@Transient
|
||||||
private Map<String, Object> cityIdDictMap;
|
private Map<String, Object> cityIdDictMap;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface StudentActionStatsModelMapper extends BaseModelMapper<StudentActionStatsDto, StudentActionStats> {
|
public interface StudentActionStatsModelMapper extends BaseModelMapper<StudentActionStatsVo, StudentActionStats> {
|
||||||
/**
|
/**
|
||||||
* 转换Dto对象到实体对象。
|
* 转换Vo对象到实体对象。
|
||||||
*
|
*
|
||||||
* @param studentActionStatsDto 域对象。
|
* @param studentActionStatsVo 域对象。
|
||||||
* @return 实体对象。
|
* @return 实体对象。
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
StudentActionStats toModel(StudentActionStatsDto studentActionStatsDto);
|
StudentActionStats toModel(StudentActionStatsVo studentActionStatsVo);
|
||||||
/**
|
/**
|
||||||
* 转换实体对象到Dto对象。
|
* 转换实体对象到VO对象。
|
||||||
*
|
*
|
||||||
* @param studentActionStats 实体对象。
|
* @param studentActionStats 实体对象。
|
||||||
* @return 域对象。
|
* @return 域对象。
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
StudentActionStatsDto fromModel(StudentActionStats studentActionStats);
|
StudentActionStatsVo fromModel(StudentActionStats studentActionStats);
|
||||||
}
|
}
|
||||||
public static final StudentActionStatsModelMapper INSTANCE = Mappers.getMapper(StudentActionStatsModelMapper.class);
|
public static final StudentActionStatsModelMapper INSTANCE = Mappers.getMapper(StudentActionStatsModelMapper.class);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
package com.orange.demo.statsservice.model;
|
package com.orange.demo.statsservice.model;
|
||||||
|
|
||||||
import com.orange.demo.courseclassinterface.dto.SchoolInfoDto;
|
|
||||||
import com.orange.demo.courseclassinterface.client.GradeClient;
|
import com.orange.demo.courseclassinterface.client.GradeClient;
|
||||||
import com.orange.demo.courseclassinterface.dto.GradeDto;
|
|
||||||
import com.orange.demo.courseclassinterface.client.SchoolInfoClient;
|
import com.orange.demo.courseclassinterface.client.SchoolInfoClient;
|
||||||
|
import com.orange.demo.courseclassinterface.vo.SchoolInfoVo;
|
||||||
|
import com.orange.demo.courseclassinterface.vo.GradeVo;
|
||||||
import com.orange.demo.application.common.constant.StudentActionType;
|
import com.orange.demo.application.common.constant.StudentActionType;
|
||||||
import com.orange.demo.application.common.constant.DeviceType;
|
import com.orange.demo.application.common.constant.DeviceType;
|
||||||
import com.orange.demo.common.core.annotation.RelationDict;
|
import com.orange.demo.common.core.annotation.RelationDict;
|
||||||
import com.orange.demo.common.core.annotation.RelationConstDict;
|
import com.orange.demo.common.core.annotation.RelationConstDict;
|
||||||
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
||||||
import com.orange.demo.common.core.validator.ConstDictRef;
|
import com.orange.demo.common.core.validator.ConstDictRef;
|
||||||
import com.orange.demo.statsinterface.dto.StudentActionTransDto;
|
import com.orange.demo.statsinterface.vo.StudentActionTransVo;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.mapstruct.*;
|
import org.mapstruct.*;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
@@ -146,7 +146,7 @@ public class StudentActionTrans {
|
|||||||
@RelationDict(
|
@RelationDict(
|
||||||
masterIdField = "schoolId",
|
masterIdField = "schoolId",
|
||||||
slaveClientClass = SchoolInfoClient.class,
|
slaveClientClass = SchoolInfoClient.class,
|
||||||
slaveModelClass = SchoolInfoDto.class,
|
slaveModelClass = SchoolInfoVo.class,
|
||||||
slaveIdField = "schoolId",
|
slaveIdField = "schoolId",
|
||||||
slaveNameField = "schoolName")
|
slaveNameField = "schoolName")
|
||||||
@Transient
|
@Transient
|
||||||
@@ -155,7 +155,7 @@ public class StudentActionTrans {
|
|||||||
@RelationDict(
|
@RelationDict(
|
||||||
masterIdField = "gradeId",
|
masterIdField = "gradeId",
|
||||||
slaveClientClass = GradeClient.class,
|
slaveClientClass = GradeClient.class,
|
||||||
slaveModelClass = GradeDto.class,
|
slaveModelClass = GradeVo.class,
|
||||||
slaveIdField = "gradeId",
|
slaveIdField = "gradeId",
|
||||||
slaveNameField = "gradeName")
|
slaveNameField = "gradeName")
|
||||||
@Transient
|
@Transient
|
||||||
@@ -174,23 +174,23 @@ public class StudentActionTrans {
|
|||||||
private Map<String, Object> deviceTypeDictMap;
|
private Map<String, Object> deviceTypeDictMap;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface StudentActionTransModelMapper extends BaseModelMapper<StudentActionTransDto, StudentActionTrans> {
|
public interface StudentActionTransModelMapper extends BaseModelMapper<StudentActionTransVo, StudentActionTrans> {
|
||||||
/**
|
/**
|
||||||
* 转换Dto对象到实体对象。
|
* 转换Vo对象到实体对象。
|
||||||
*
|
*
|
||||||
* @param studentActionTransDto 域对象。
|
* @param studentActionTransVo 域对象。
|
||||||
* @return 实体对象。
|
* @return 实体对象。
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
StudentActionTrans toModel(StudentActionTransDto studentActionTransDto);
|
StudentActionTrans toModel(StudentActionTransVo studentActionTransVo);
|
||||||
/**
|
/**
|
||||||
* 转换实体对象到Dto对象。
|
* 转换实体对象到VO对象。
|
||||||
*
|
*
|
||||||
* @param studentActionTrans 实体对象。
|
* @param studentActionTrans 实体对象。
|
||||||
* @return 域对象。
|
* @return 域对象。
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
StudentActionTransDto fromModel(StudentActionTrans studentActionTrans);
|
StudentActionTransVo fromModel(StudentActionTrans studentActionTrans);
|
||||||
}
|
}
|
||||||
public static final StudentActionTransModelMapper INSTANCE = Mappers.getMapper(StudentActionTransModelMapper.class);
|
public static final StudentActionTransModelMapper INSTANCE = Mappers.getMapper(StudentActionTransModelMapper.class);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.orange.demo.statsservice.service;
|
|||||||
|
|
||||||
import com.orange.demo.statsservice.dao.*;
|
import com.orange.demo.statsservice.dao.*;
|
||||||
import com.orange.demo.statsservice.model.*;
|
import com.orange.demo.statsservice.model.*;
|
||||||
import com.orange.demo.statsinterface.dto.*;
|
|
||||||
import com.orange.demo.common.core.util.*;
|
import com.orange.demo.common.core.util.*;
|
||||||
import com.orange.demo.common.core.object.MyRelationParam;
|
import com.orange.demo.common.core.object.MyRelationParam;
|
||||||
import com.orange.demo.common.core.object.MyWhereCriteria;
|
import com.orange.demo.common.core.object.MyWhereCriteria;
|
||||||
@@ -20,7 +19,7 @@ import java.util.*;
|
|||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class CourseTransStatsService extends BaseService<CourseTransStats, CourseTransStatsDto, Long> {
|
public class CourseTransStatsService extends BaseService<CourseTransStats, Long> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private CourseTransStatsMapper courseTransStatsMapper;
|
private CourseTransStatsMapper courseTransStatsMapper;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.orange.demo.statsservice.service;
|
|||||||
|
|
||||||
import com.orange.demo.statsservice.dao.*;
|
import com.orange.demo.statsservice.dao.*;
|
||||||
import com.orange.demo.statsservice.model.*;
|
import com.orange.demo.statsservice.model.*;
|
||||||
import com.orange.demo.statsinterface.dto.*;
|
|
||||||
import com.orange.demo.common.core.util.*;
|
import com.orange.demo.common.core.util.*;
|
||||||
import com.orange.demo.common.core.object.MyRelationParam;
|
import com.orange.demo.common.core.object.MyRelationParam;
|
||||||
import com.orange.demo.common.core.object.MyWhereCriteria;
|
import com.orange.demo.common.core.object.MyWhereCriteria;
|
||||||
@@ -20,7 +19,7 @@ import java.util.*;
|
|||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class StudentActionStatsService extends BaseService<StudentActionStats, StudentActionStatsDto, Long> {
|
public class StudentActionStatsService extends BaseService<StudentActionStats, Long> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private StudentActionStatsMapper studentActionStatsMapper;
|
private StudentActionStatsMapper studentActionStatsMapper;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.orange.demo.statsservice.service;
|
|||||||
|
|
||||||
import com.orange.demo.statsservice.dao.*;
|
import com.orange.demo.statsservice.dao.*;
|
||||||
import com.orange.demo.statsservice.model.*;
|
import com.orange.demo.statsservice.model.*;
|
||||||
import com.orange.demo.statsinterface.dto.*;
|
|
||||||
import com.orange.demo.courseclassinterface.client.*;
|
import com.orange.demo.courseclassinterface.client.*;
|
||||||
import com.orange.demo.common.core.util.*;
|
import com.orange.demo.common.core.util.*;
|
||||||
import com.orange.demo.common.core.object.MyRelationParam;
|
import com.orange.demo.common.core.object.MyRelationParam;
|
||||||
@@ -25,7 +24,7 @@ import java.util.*;
|
|||||||
* @date 2020-08-08
|
* @date 2020-08-08
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class StudentActionTransService extends BaseService<StudentActionTrans, StudentActionTransDto, Long> {
|
public class StudentActionTransService extends BaseService<StudentActionTrans, Long> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private StudentActionTransMapper studentActionTransMapper;
|
private StudentActionTransMapper studentActionTransMapper;
|
||||||
|
|||||||
@@ -59,9 +59,6 @@
|
|||||||
<Root level="${OUTPUT_LOG_LEVEL}">
|
<Root level="${OUTPUT_LOG_LEVEL}">
|
||||||
<AppenderRef ref="console"/>
|
<AppenderRef ref="console"/>
|
||||||
</Root>
|
</Root>
|
||||||
<Logger name="springfox.documentation" additivity="false" level="error">
|
|
||||||
<AppenderRef ref="console"/>
|
|
||||||
</Logger>
|
|
||||||
<!-- AsyncLogger 是基于Disruptor的全量异步队列,性能极高,队列默认大小4096。-->
|
<!-- AsyncLogger 是基于Disruptor的全量异步队列,性能极高,队列默认大小4096。-->
|
||||||
<!-- 队列默认值可通过JVM参数设置,参考博客:https://www.jianshu.com/p/82469047acbf -->
|
<!-- 队列默认值可通过JVM参数设置,参考博客:https://www.jianshu.com/p/82469047acbf -->
|
||||||
<AsyncLogger name="com.orange.demo" additivity="false" level="info">
|
<AsyncLogger name="com.orange.demo" additivity="false" level="info">
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user