mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-17 18:46:36 +08:00
commit:1.5多应用版本
This commit is contained in:
@@ -20,8 +20,25 @@
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="course-class-interface" />
|
||||
<orderEntry type="module" module-name="course-class-api" />
|
||||
<orderEntry type="module" module-name="application-common" />
|
||||
<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-core" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.2.5.RELEASE" level="project" />
|
||||
@@ -37,6 +54,7 @@
|
||||
<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-webmvc: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: 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" />
|
||||
@@ -53,12 +71,14 @@
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-csv:1.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.4.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.jsonwebtoken:jjwt:0.9.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.74" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.ben-manes.caffeine:caffeine:2.8.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.checkerframework:checker-qual:3.1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.jimmyshi:bean-query:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-all:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:3.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi:3.17" level="project" />
|
||||
@@ -69,6 +89,7 @@
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: mysql:mysql-connector-java:8.0.19" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.22" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid:1.1.22" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-spring-boot-starter:2.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.2" level="project" />
|
||||
@@ -89,23 +110,6 @@
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:3.2" 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="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" />
|
||||
@@ -126,7 +130,6 @@
|
||||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.8" 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" />
|
||||
@@ -150,7 +153,6 @@
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
|
||||
@@ -186,13 +188,11 @@
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-freemarker:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.5.RELEASE" 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.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: 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" />
|
||||
|
||||
@@ -17,7 +17,12 @@
|
||||
<!-- 业务组件依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>course-class-interface</artifactId>
|
||||
<artifactId>course-class-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>common-core</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -18,7 +18,7 @@ import javax.sql.DataSource;
|
||||
*/
|
||||
@Configuration
|
||||
@EnableTransactionManagement
|
||||
@MapperScan(value = {"com.orange.demo.*.dao"})
|
||||
@MapperScan(value = {"com.orange.demo.*.dao", "com.orange.demo.common.*.dao"})
|
||||
public class DataSourceConfig {
|
||||
|
||||
@Bean(initMethod = "init", destroyMethod = "close")
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.orange.demo.common.core.base.controller.BaseController;
|
||||
import com.orange.demo.common.core.base.service.IBaseDictService;
|
||||
import com.orange.demo.common.core.util.MyModelUtil;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.courseclassinterface.vo.AreaCodeVo;
|
||||
import com.orange.demo.courseclassapi.vo.AreaCodeVo;
|
||||
import com.orange.demo.courseclassservice.model.AreaCode;
|
||||
import com.orange.demo.courseclassservice.service.AreaCodeService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
@@ -41,7 +41,7 @@ public class AreaCodeController extends BaseController<AreaCode, AreaCodeVo, Lon
|
||||
*/
|
||||
@GetMapping("/listDict")
|
||||
public ResponseResult<List<Map<String, Object>>> listDict() {
|
||||
List<AreaCode> resultList = areaCodeService.getAllList();
|
||||
List<AreaCode> resultList = areaCodeService.getAllListFromCache();
|
||||
return ResponseResult.success(BeanQuery.select(
|
||||
"parentId as parentId", "areaId as id", "areaName as name").executeFrom(resultList));
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ import com.orange.demo.common.core.upload.UploadStoreInfo;
|
||||
import com.github.pagehelper.page.PageMethod;
|
||||
import com.orange.demo.courseclassservice.model.*;
|
||||
import com.orange.demo.courseclassservice.service.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.courseclassinterface.vo.*;
|
||||
import com.orange.demo.courseclassapi.dto.*;
|
||||
import com.orange.demo.courseclassapi.vo.*;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.constant.*;
|
||||
@@ -277,7 +277,7 @@ public class CourseController extends BaseController<Course, CourseVo, Long> {
|
||||
}
|
||||
// 根据字段注解中的存储类型,通过工厂方法获取匹配的上传下载实现类,从而解耦。
|
||||
BaseUpDownloader upDownloader = upDownloaderFactory.get(storeInfo.getStoreType());
|
||||
UploadResponseInfo responseInfo = upDownloader.doUpload(appConfig.getServiceContextPath(),
|
||||
UploadResponseInfo responseInfo = upDownloader.doUpload(appConfig.getServiceContextPath(),
|
||||
appConfig.getUploadFileBaseDir(), Course.class.getSimpleName(), fieldName, asImage, uploadFile);
|
||||
if (responseInfo.getUploadFailed()) {
|
||||
ResponseResult.output(HttpServletResponse.SC_FORBIDDEN,
|
||||
@@ -354,6 +354,20 @@ public class CourseController extends BaseController<Course, CourseVo, Long> {
|
||||
return super.baseExistId(courseId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主键Id删除数据。
|
||||
*
|
||||
* @param courseId 主键Id。
|
||||
* @return 删除数量。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "deleteById")
|
||||
@PostMapping("/deleteById")
|
||||
public ResponseResult<Integer> deleteById(@RequestParam Long courseId) throws Exception {
|
||||
Course filter = new Course();
|
||||
filter.setCourseId(courseId);
|
||||
return super.baseDeleteBy(filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除符合过滤条件的数据。
|
||||
*
|
||||
|
||||
@@ -8,16 +8,17 @@ import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.orange.demo.common.core.base.controller.BaseController;
|
||||
import com.orange.demo.common.core.base.service.IBaseDictService;
|
||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||
import com.orange.demo.common.core.util.MyModelUtil;
|
||||
import com.orange.demo.common.core.util.MyCommonUtil;
|
||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||
import com.orange.demo.courseclassinterface.dto.GradeDto;
|
||||
import com.orange.demo.courseclassinterface.vo.GradeVo;
|
||||
import com.orange.demo.courseclassapi.dto.GradeDto;
|
||||
import com.orange.demo.courseclassapi.vo.GradeVo;
|
||||
import com.orange.demo.courseclassservice.model.Grade;
|
||||
import com.orange.demo.courseclassservice.service.GradeService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -130,6 +131,10 @@ public class GradeController extends BaseController<Grade, GradeVo, Integer> {
|
||||
@GetMapping("/listDict")
|
||||
public ResponseResult<List<Map<String, Object>>> listDict() {
|
||||
List<Grade> resultList = gradeService.getAllListFromCache();
|
||||
if (CollectionUtils.isEmpty(resultList)) {
|
||||
gradeService.reloadCachedData(true);
|
||||
resultList = gradeService.getAllList();
|
||||
}
|
||||
return ResponseResult.success(BeanQuery.select(
|
||||
"gradeId as id", "gradeName as name").executeFrom(resultList));
|
||||
}
|
||||
@@ -202,6 +207,20 @@ public class GradeController extends BaseController<Grade, GradeVo, Integer> {
|
||||
return super.baseExistId(gradeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主键Id删除数据。
|
||||
*
|
||||
* @param gradeId 主键Id。
|
||||
* @return 删除数量。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "deleteById")
|
||||
@PostMapping("/deleteById")
|
||||
public ResponseResult<Integer> deleteById(@RequestParam Integer gradeId) throws Exception {
|
||||
Grade filter = new Grade();
|
||||
filter.setGradeId(gradeId);
|
||||
return super.baseDeleteBy(filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除符合过滤条件的数据。
|
||||
*
|
||||
|
||||
@@ -4,8 +4,8 @@ import cn.jimmyshi.beanquery.BeanQuery;
|
||||
import com.github.pagehelper.page.PageMethod;
|
||||
import com.orange.demo.courseclassservice.model.*;
|
||||
import com.orange.demo.courseclassservice.service.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.courseclassinterface.vo.*;
|
||||
import com.orange.demo.courseclassapi.dto.*;
|
||||
import com.orange.demo.courseclassapi.vo.*;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.constant.*;
|
||||
@@ -232,6 +232,20 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoV
|
||||
return super.baseExistId(schoolId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主键Id删除数据。
|
||||
*
|
||||
* @param schoolId 主键Id。
|
||||
* @return 删除数量。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "deleteById")
|
||||
@PostMapping("/deleteById")
|
||||
public ResponseResult<Integer> deleteById(@RequestParam Long schoolId) throws Exception {
|
||||
SchoolInfo filter = new SchoolInfo();
|
||||
filter.setSchoolId(schoolId);
|
||||
return super.baseDeleteBy(filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除符合过滤条件的数据。
|
||||
*
|
||||
|
||||
@@ -3,8 +3,8 @@ package com.orange.demo.courseclassservice.controller;
|
||||
import com.github.pagehelper.page.PageMethod;
|
||||
import com.orange.demo.courseclassservice.model.*;
|
||||
import com.orange.demo.courseclassservice.service.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.courseclassinterface.vo.*;
|
||||
import com.orange.demo.courseclassapi.dto.*;
|
||||
import com.orange.demo.courseclassapi.vo.*;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.constant.*;
|
||||
@@ -503,6 +503,20 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
||||
return super.baseExistId(classId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主键Id删除数据。
|
||||
*
|
||||
* @param classId 主键Id。
|
||||
* @return 删除数量。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "deleteById")
|
||||
@PostMapping("/deleteById")
|
||||
public ResponseResult<Integer> deleteById(@RequestParam Long classId) throws Exception {
|
||||
StudentClass filter = new StudentClass();
|
||||
filter.setClassId(classId);
|
||||
return super.baseDeleteBy(filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除符合过滤条件的数据。
|
||||
*
|
||||
|
||||
@@ -4,8 +4,8 @@ import cn.jimmyshi.beanquery.BeanQuery;
|
||||
import com.github.pagehelper.page.PageMethod;
|
||||
import com.orange.demo.courseclassservice.model.*;
|
||||
import com.orange.demo.courseclassservice.service.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.courseclassinterface.vo.*;
|
||||
import com.orange.demo.courseclassapi.dto.*;
|
||||
import com.orange.demo.courseclassapi.vo.*;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.constant.*;
|
||||
@@ -244,6 +244,20 @@ public class StudentController extends BaseController<Student, StudentVo, Long>
|
||||
return super.baseExistId(studentId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主键Id删除数据。
|
||||
*
|
||||
* @param studentId 主键Id。
|
||||
* @return 删除数量。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "deleteById")
|
||||
@PostMapping("/deleteById")
|
||||
public ResponseResult<Integer> deleteById(@RequestParam Long studentId) throws Exception {
|
||||
Student filter = new Student();
|
||||
filter.setStudentId(studentId);
|
||||
return super.baseDeleteBy(filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除符合过滤条件的数据。
|
||||
*
|
||||
|
||||
@@ -20,11 +20,13 @@
|
||||
<association property="classCourse" column="course_id" foreignColumn="course_id"
|
||||
notNullColumn="course_id" resultMap="com.orange.demo.courseclassservice.dao.ClassCourseMapper.BaseResultMap" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 如果有逻辑删除字段过滤,请写到这里 -->
|
||||
<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">
|
||||
|
||||
@@ -7,11 +7,13 @@
|
||||
<result column="province_id" jdbcType="BIGINT" property="provinceId"/>
|
||||
<result column="city_id" jdbcType="BIGINT" property="cityId"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 如果有逻辑删除字段过滤,请写到这里 -->
|
||||
<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">
|
||||
|
||||
@@ -12,12 +12,14 @@
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
<result column="status" jdbcType="TINYINT" property="status"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 如果有逻辑删除字段过滤,请写到这里 -->
|
||||
<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">
|
||||
|
||||
@@ -18,11 +18,13 @@
|
||||
<result column="register_time" jdbcType="TIMESTAMP" property="registerTime"/>
|
||||
<result column="status" jdbcType="TINYINT" property="status"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 如果有逻辑删除字段过滤,请写到这里 -->
|
||||
<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">
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package com.orange.demo.courseclassservice.model;
|
||||
|
||||
import com.orange.demo.courseclassinterface.constant.CourseDifficult;
|
||||
import com.orange.demo.courseclassapi.vo.CourseVo;
|
||||
import com.orange.demo.courseclassapi.constant.CourseDifficult;
|
||||
import com.orange.demo.application.common.constant.Subject;
|
||||
import com.orange.demo.common.core.upload.UploadStoreTypeEnum;
|
||||
import com.orange.demo.common.core.annotation.UploadFlagColumn;
|
||||
import com.orange.demo.common.core.annotation.RelationDict;
|
||||
import com.orange.demo.common.core.annotation.RelationConstDict;
|
||||
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
||||
import com.orange.demo.courseclassinterface.vo.CourseVo;
|
||||
import lombok.Data;
|
||||
import org.mapstruct.*;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.orange.demo.courseclassservice.model;
|
||||
|
||||
import com.orange.demo.courseclassapi.vo.SchoolInfoVo;
|
||||
import com.orange.demo.common.core.annotation.RelationDict;
|
||||
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
||||
import com.orange.demo.courseclassinterface.vo.SchoolInfoVo;
|
||||
import lombok.Data;
|
||||
import org.mapstruct.*;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.orange.demo.courseclassservice.model;
|
||||
|
||||
import com.orange.demo.courseclassapi.vo.StudentVo;
|
||||
import com.orange.demo.application.common.constant.Gender;
|
||||
import com.orange.demo.application.common.constant.ExpLevel;
|
||||
import com.orange.demo.application.common.constant.StudentStatus;
|
||||
@@ -7,7 +8,6 @@ import com.orange.demo.common.core.annotation.RelationDict;
|
||||
import com.orange.demo.common.core.annotation.RelationConstDict;
|
||||
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
||||
import com.orange.demo.common.core.util.MyCommonUtil;
|
||||
import com.orange.demo.courseclassinterface.vo.StudentVo;
|
||||
import lombok.Data;
|
||||
import org.mapstruct.*;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package com.orange.demo.courseclassservice.model;
|
||||
|
||||
import com.orange.demo.courseclassinterface.constant.ClassLevel;
|
||||
import com.orange.demo.courseclassapi.vo.StudentClassVo;
|
||||
import com.orange.demo.courseclassapi.constant.ClassLevel;
|
||||
import com.orange.demo.common.core.annotation.RelationDict;
|
||||
import com.orange.demo.common.core.annotation.RelationConstDict;
|
||||
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
||||
import com.orange.demo.common.core.annotation.DeletedFlagColumn;
|
||||
import com.orange.demo.courseclassinterface.vo.StudentClassVo;
|
||||
import lombok.Data;
|
||||
import org.mapstruct.*;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
@@ -8,10 +8,9 @@ import com.orange.demo.common.core.base.service.BaseDictService;
|
||||
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 行政区划的Service类。
|
||||
@@ -30,22 +29,16 @@ public class AreaCodeServiceImpl extends BaseDictService<AreaCode, Long> impleme
|
||||
this.dictionaryCache = MapTreeDictionaryCache.create(AreaCode::getAreaId, AreaCode::getParentId);
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
this.reloadCachedData(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BaseDaoMapper<AreaCode> mapper() {
|
||||
return areaCodeMapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载数据库数据到内存缓存。
|
||||
*/
|
||||
@Override
|
||||
public void loadCachedData() {
|
||||
Example e = new Example(AreaCode.class);
|
||||
e.orderBy("areaLevel");
|
||||
List<AreaCode> areaCodeList = areaCodeMapper.selectByExample(e);
|
||||
dictionaryCache.putAll(areaCodeList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据上级行政区划Id,获取其下级行政区划列表。
|
||||
*
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.orange.demo.common.core.object.TokenData;
|
||||
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.sequence.wrapper.IdGeneratorWrapper;
|
||||
import com.github.pagehelper.Page;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -143,7 +144,8 @@ public class CourseServiceImpl extends BaseService<Course, Long> implements Cour
|
||||
@Override
|
||||
public List<Course> getCourseListWithRelation(Course filter, String orderBy) {
|
||||
List<Course> resultList = courseMapper.getCourseList(null, null, filter, orderBy);
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.normal());
|
||||
int batchSize = resultList instanceof Page ? 0 : 1000;
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.normal(), batchSize);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@@ -163,7 +165,8 @@ public class CourseServiceImpl extends BaseService<Course, Long> implements Cour
|
||||
String inFilterField, Set<M> inFilterValues, Course filter, String orderBy) {
|
||||
List<Course> resultList =
|
||||
courseMapper.getCourseList(inFilterField, inFilterValues, filter, orderBy);
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.dictOnly());
|
||||
int batchSize = resultList instanceof Page ? 0 : 1000;
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.dictOnly(), batchSize);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.orange.demo.common.core.object.CallResult;
|
||||
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.sequence.wrapper.IdGeneratorWrapper;
|
||||
import com.github.pagehelper.Page;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -125,7 +126,8 @@ public class SchoolInfoServiceImpl extends BaseService<SchoolInfo, Long> impleme
|
||||
@Override
|
||||
public List<SchoolInfo> getSchoolInfoListWithRelation(SchoolInfo filter, String orderBy) {
|
||||
List<SchoolInfo> resultList = schoolInfoMapper.getSchoolInfoList(null, null, filter, orderBy);
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.normal());
|
||||
int batchSize = resultList instanceof Page ? 0 : 1000;
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.normal(), batchSize);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@@ -145,7 +147,8 @@ public class SchoolInfoServiceImpl extends BaseService<SchoolInfo, Long> impleme
|
||||
String inFilterField, Set<M> inFilterValues, SchoolInfo filter, String orderBy) {
|
||||
List<SchoolInfo> resultList =
|
||||
schoolInfoMapper.getSchoolInfoList(inFilterField, inFilterValues, filter, orderBy);
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.dictOnly());
|
||||
int batchSize = resultList instanceof Page ? 0 : 1000;
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.dictOnly(), batchSize);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.orange.demo.common.core.constant.GlobalDeletedFlag;
|
||||
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.sequence.wrapper.IdGeneratorWrapper;
|
||||
import com.github.pagehelper.Page;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -151,7 +152,8 @@ public class StudentClassServiceImpl extends BaseService<StudentClass, Long> imp
|
||||
@Override
|
||||
public List<StudentClass> getStudentClassListWithRelation(StudentClass filter, String orderBy) {
|
||||
List<StudentClass> resultList = studentClassMapper.getStudentClassList(null, null, filter, orderBy);
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.normal());
|
||||
int batchSize = resultList instanceof Page ? 0 : 1000;
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.normal(), batchSize);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@@ -171,7 +173,8 @@ public class StudentClassServiceImpl extends BaseService<StudentClass, Long> imp
|
||||
String inFilterField, Set<M> inFilterValues, StudentClass filter, String orderBy) {
|
||||
List<StudentClass> resultList =
|
||||
studentClassMapper.getStudentClassList(inFilterField, inFilterValues, filter, orderBy);
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.dictOnly());
|
||||
int batchSize = resultList instanceof Page ? 0 : 1000;
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.dictOnly(), batchSize);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.orange.demo.common.core.object.CallResult;
|
||||
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.sequence.wrapper.IdGeneratorWrapper;
|
||||
import com.github.pagehelper.Page;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -142,7 +143,8 @@ public class StudentServiceImpl extends BaseService<Student, Long> implements St
|
||||
@Override
|
||||
public List<Student> getStudentListWithRelation(Student filter, String orderBy) {
|
||||
List<Student> resultList = studentMapper.getStudentList(null, null, filter, orderBy);
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.normal());
|
||||
int batchSize = resultList instanceof Page ? 0 : 1000;
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.normal(), batchSize);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@@ -162,7 +164,8 @@ public class StudentServiceImpl extends BaseService<Student, Long> implements St
|
||||
String inFilterField, Set<M> inFilterValues, Student filter, String orderBy) {
|
||||
List<Student> resultList =
|
||||
studentMapper.getStudentList(inFilterField, inFilterValues, filter, orderBy);
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.dictOnly());
|
||||
int batchSize = resultList instanceof Page ? 0 : 1000;
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.dictOnly(), batchSize);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</property>
|
||||
<property name="LOG_PATTERN_EX">
|
||||
<!-- 下面注释中 %X{PtxId}, SpanId: %X{PspanId} 为PinPoint 中的traceid -->
|
||||
[%-5p] [%d{YYYY-MM-dd HH:mm:ss}] 请求Id[%X{traceId}] [%t] ==> [TxId: %X{PtxId}, SpanId: %X{PspanId}] %msg%n
|
||||
[%-5p] [%d{YYYY-MM-dd HH:mm:ss}] T:[%X{traceId}] S:[%X{sessionId}] U:[%X{userId}] [%t] ==> [TxId: %X{PtxId}, SpanId: %X{PspanId}] %msg%n
|
||||
</property>
|
||||
<!-- 日志保留天数 -->
|
||||
<property name="EVERY_FILE_COUNT">31</property>
|
||||
|
||||
Reference in New Issue
Block a user