mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-17 18:46:36 +08:00
commit:集成Minio
This commit is contained in:
@@ -36,6 +36,10 @@
|
||||
- 控制台URL: localhost:8858
|
||||
- 用户名密码:sentinel/sentinel
|
||||
- 注意:该服务缺省端口为8080,容易冲突,所以改为8858。我们在所有的配置中均使用了8858,而非8080。
|
||||
- Minio
|
||||
- 版本:7.0.2
|
||||
- 控制台URL:需要配置Nginx,将请求导入到我们缺省设置的19000端口,之后可通过浏览器操作minio。
|
||||
- 缺省用户名密码:admin/admin123456
|
||||
- ELK (可选,docker-compose-elk)
|
||||
- 版本:7.5.x
|
||||
- Kibana控制台URL:localhost:5601
|
||||
@@ -44,7 +48,6 @@
|
||||
- 控制台URL:localhost:8079
|
||||
- admin-monitor服务模块 (可选)
|
||||
- 控制台URL:localhost:8769
|
||||
|
||||
- 启动upms服务 (保证登录和用户权限服务可用)
|
||||
- 启动其他业务应用微服务<br>
|
||||
推荐在gateway服务之前启动,以便gateway服务启动后可以即刻发现服务。由于gateway是从注册中心定时拉取微服务信息,所以在gateway之后启动的微服务,通常会延迟一小段时间之后才会被发现。
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
* 服务指标监控启动类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@SpringBootApplication
|
||||
@EnableAdminServer
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.Map;
|
||||
* 设备类型常量字典对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public final class DeviceType {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.Map;
|
||||
* 经验等级常量字典对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public final class ExpLevel {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.Map;
|
||||
* 性别常量字典对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public final class Gender {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.Map;
|
||||
* 学生行为常量字典对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public final class StudentActionType {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.Map;
|
||||
* 学生状态常量字典对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public final class StudentStatus {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.Map;
|
||||
* 学科常量字典对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public final class Subject {
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.*;
|
||||
* 行政区划远程访问接口类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@FeignClient(name = "system-service", fallbackFactory = AreaCodeClient.AreaCodeClientFallbackFactory.class)
|
||||
public interface AreaCodeClient extends BaseClient<AreaCodeDto, Long> {
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.*;
|
||||
* 课程数据服务远程数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@FeignClient(
|
||||
name = "course-class",
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.*;
|
||||
* 服务远程数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@FeignClient(
|
||||
name = "course-class",
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.*;
|
||||
* 校区数据服务远程数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@FeignClient(
|
||||
name = "course-class",
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.*;
|
||||
* 班级数据服务远程数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@FeignClient(
|
||||
name = "course-class",
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.*;
|
||||
* 学生数据服务远程数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@FeignClient(
|
||||
name = "course-class",
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.Map;
|
||||
* 班级级别常量字典对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public final class ClassLevel {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.Map;
|
||||
* 班级状态常量字典对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public final class ClassStatus {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.Map;
|
||||
* 课程难度常量字典对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public final class CourseDifficult {
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.Data;
|
||||
* 行政区划Dto。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
public class AreaCodeDto {
|
||||
|
||||
@@ -10,7 +10,7 @@ import javax.validation.constraints.*;
|
||||
* ClassCourseDto对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
public class ClassCourseDto {
|
||||
@@ -30,5 +30,6 @@ public class ClassCourseDto {
|
||||
/**
|
||||
* 课程顺序(数值越小越靠前)。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,课程顺序(数值越小越靠前)不能为空!", groups = {UpdateGroup.class})
|
||||
private Integer courseOrder;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import javax.validation.constraints.*;
|
||||
* ClassStudentDto对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
public class ClassStudentDto {
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.Map;
|
||||
* CourseDto对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
public class CourseDto {
|
||||
@@ -122,6 +122,11 @@ public class CourseDto {
|
||||
*/
|
||||
private String updateTimeEnd;
|
||||
|
||||
/**
|
||||
* courseId 的多对多关联表数据对象,数据对应类型为ClassCourseDto。
|
||||
*/
|
||||
private Map<String, Object> classCourse;
|
||||
|
||||
/**
|
||||
* gradeId 字典关联数据。
|
||||
*/
|
||||
|
||||
@@ -10,7 +10,7 @@ import javax.validation.constraints.*;
|
||||
* GradeDto对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
public class GradeDto {
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.Map;
|
||||
* SchoolInfoDto对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
public class SchoolInfoDto {
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.Map;
|
||||
* StudentClassDto对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
public class StudentClassDto {
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.Map;
|
||||
* StudentDto对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
public class StudentDto {
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
<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" />
|
||||
@@ -64,7 +63,6 @@
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi:3.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:3.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:2.6.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.04" level="project" />
|
||||
<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" />
|
||||
@@ -113,6 +111,18 @@
|
||||
<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" />
|
||||
<orderEntry type="module" module-name="common-minio" />
|
||||
<orderEntry type="library" name="Maven: io.minio:minio:7.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.simpleframework:simple-xml:2.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: stax:stax:1.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: xpp3:xpp3:1.1.3.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.12.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.squareup.okio:okio:1.17.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.github.spotbugs:spotbugs-annotations:4.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.jcip:jcip-annotations:1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
|
||||
<orderEntry type="module" module-name="common-sequence" />
|
||||
<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" />
|
||||
@@ -160,7 +170,6 @@
|
||||
<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.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: org.codehaus.woodstox:stax2-api:4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.woodstox:woodstox-core:5.0.3" level="project" />
|
||||
|
||||
@@ -25,6 +25,11 @@
|
||||
<artifactId>common-redis</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>common-minio</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>common-sequence</artifactId>
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.springframework.context.annotation.ComponentScan;
|
||||
* course-class服务启动类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@SpringCloudApplication
|
||||
@EnableFeignClients(basePackages = "com.orange.demo")
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
* defaultSomething: defaultValue
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
@RefreshScope
|
||||
|
||||
@@ -14,7 +14,7 @@ import javax.sql.DataSource;
|
||||
* 数据源配置Bean对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Configuration
|
||||
@EnableTransactionManagement
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.*;
|
||||
* 行政区划数据访问接口类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/areaCode")
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package com.orange.demo.courseclassservice.controller;
|
||||
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
import cn.jimmyshi.beanquery.BeanQuery;
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
import com.orange.demo.common.core.upload.BaseUpDownloader;
|
||||
import com.orange.demo.common.core.upload.UpDownloaderFactory;
|
||||
import com.orange.demo.common.core.upload.UploadResponseInfo;
|
||||
import com.orange.demo.common.core.upload.UploadStoreInfo;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.page.PageMethod;
|
||||
@@ -10,7 +14,7 @@ import com.orange.demo.courseclassservice.service.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||
import com.orange.demo.common.core.constant.*;
|
||||
import com.orange.demo.common.core.base.controller.BaseController;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||
@@ -23,7 +27,6 @@ import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import javax.validation.groups.Default;
|
||||
import java.util.*;
|
||||
|
||||
@@ -31,7 +34,7 @@ import java.util.*;
|
||||
* 课程数据操作控制器类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@@ -44,6 +47,8 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
||||
private ApplicationConfig appConfig;
|
||||
@Autowired
|
||||
private SessionCacheHelper cacheHelper;
|
||||
@Autowired
|
||||
private UpDownloaderFactory upDownloaderFactory;
|
||||
|
||||
@Override
|
||||
protected BaseService<Course, CourseDto, Long> service() {
|
||||
@@ -209,26 +214,33 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
||||
// 如果请求参数中没有包含主键Id,就判断该文件是否为当前session上传的。
|
||||
if (courseId == null) {
|
||||
if (!cacheHelper.existSessionUploadFile(filename)) {
|
||||
response.setStatus(HttpServletResponse.SC_FORBIDDEN);
|
||||
ResponseResult.output(HttpServletResponse.SC_FORBIDDEN);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
Course course = courseService.getById(courseId);
|
||||
if (course == null) {
|
||||
response.setStatus(HttpServletResponse.SC_NOT_FOUND);
|
||||
ResponseResult.output(HttpServletResponse.SC_NOT_FOUND);
|
||||
return;
|
||||
}
|
||||
String fieldJsonData = (String) ReflectUtil.getFieldValue(course, fieldName);
|
||||
if (fieldJsonData == null) {
|
||||
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
|
||||
ResponseResult.output(HttpServletResponse.SC_BAD_REQUEST);
|
||||
return;
|
||||
}
|
||||
if (!UpDownloadUtil.containFile(fieldJsonData, filename)) {
|
||||
response.setStatus(HttpServletResponse.SC_FORBIDDEN);
|
||||
if (!BaseUpDownloader.containFile(fieldJsonData, filename)) {
|
||||
ResponseResult.output(HttpServletResponse.SC_FORBIDDEN);
|
||||
return;
|
||||
}
|
||||
}
|
||||
UpDownloadUtil.doDownload(appConfig.getUploadFileBaseDir(),
|
||||
UploadStoreInfo storeInfo = MyModelUtil.getUploadStoreInfo(Course.class, fieldName);
|
||||
if (!storeInfo.isSupportUpload()) {
|
||||
ResponseResult.output(HttpServletResponse.SC_NOT_IMPLEMENTED,
|
||||
ResponseResult.error(ErrorCodeEnum.INVALID_UPLOAD_FIELD));
|
||||
return;
|
||||
}
|
||||
BaseUpDownloader upDownloader = upDownloaderFactory.get(storeInfo.getStoreType());
|
||||
upDownloader.doDownload(appConfig.getUploadFileBaseDir(),
|
||||
Course.class.getSimpleName(), fieldName, filename, asImage, response);
|
||||
} catch (Exception e) {
|
||||
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
|
||||
@@ -242,20 +254,30 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
||||
* @param fieldName 上传文件名。
|
||||
* @param asImage 是否作为图片上传。如果是图片,今后下载的时候无需权限验证。否则就是附件上传,下载时需要权限验证。
|
||||
* @param uploadFile 上传文件对象。
|
||||
* @param response Http 应答对象。
|
||||
* @throws IOException 文件读写错误。
|
||||
*/
|
||||
@PostMapping("/upload")
|
||||
public void upload(
|
||||
@RequestParam String fieldName,
|
||||
@RequestParam Boolean asImage,
|
||||
@RequestParam("uploadFile") MultipartFile uploadFile,
|
||||
HttpServletResponse response) throws IOException {
|
||||
String filename = UpDownloadUtil.doUpload(appConfig.getUploadFileBaseDir(), appConfig.getServiceContextPath(),
|
||||
Course.class.getSimpleName(), fieldName, asImage, uploadFile, response);
|
||||
if (filename != null) {
|
||||
cacheHelper.putSessionUploadFile(filename);
|
||||
@RequestParam("uploadFile") MultipartFile uploadFile) throws Exception {
|
||||
UploadStoreInfo storeInfo = MyModelUtil.getUploadStoreInfo(Course.class, fieldName);
|
||||
// 这里就会判断参数中指定的字段,是否支持上传操作。
|
||||
if (!storeInfo.isSupportUpload()) {
|
||||
ResponseResult.output(HttpServletResponse.SC_FORBIDDEN,
|
||||
ResponseResult.error(ErrorCodeEnum.INVALID_UPLOAD_FIELD));
|
||||
return;
|
||||
}
|
||||
// 根据字段注解中的存储类型,通过工厂方法获取匹配的上传下载实现类,从而解耦。
|
||||
BaseUpDownloader upDownloader = upDownloaderFactory.get(storeInfo.getStoreType());
|
||||
UploadResponseInfo responseInfo = upDownloader.doUpload(appConfig.getServiceContextPath(),
|
||||
appConfig.getUploadFileBaseDir(), Course.class.getSimpleName(), fieldName, asImage, uploadFile);
|
||||
if (responseInfo.getUploadFailed()) {
|
||||
ResponseResult.output(HttpServletResponse.SC_FORBIDDEN,
|
||||
ResponseResult.error(ErrorCodeEnum.UPLOAD_FAILED, responseInfo.getErrorMessage()));
|
||||
return;
|
||||
}
|
||||
cacheHelper.putSessionUploadFile(responseInfo.getFilename());
|
||||
ResponseResult.output(ResponseResult.success(responseInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.*;
|
||||
* 年级操作控制器类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.orange.demo.courseclassservice.service.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||
import com.orange.demo.common.core.constant.*;
|
||||
import com.orange.demo.common.core.base.controller.BaseController;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||
@@ -25,7 +25,7 @@ import java.util.*;
|
||||
* 校区数据操作控制器类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.orange.demo.courseclassservice.service.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||
import com.orange.demo.common.core.constant.*;
|
||||
import com.orange.demo.common.core.base.controller.BaseController;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||
@@ -25,7 +25,7 @@ import java.util.stream.Collectors;
|
||||
* 班级数据操作控制器类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.orange.demo.courseclassservice.service.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||
import com.orange.demo.common.core.constant.*;
|
||||
import com.orange.demo.common.core.base.controller.BaseController;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||
@@ -25,7 +25,7 @@ import java.util.*;
|
||||
* 学生数据操作控制器类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.orange.demo.courseclassservice.model.AreaCode;
|
||||
* 行政区划数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public interface AreaCodeMapper extends BaseDaoMapper<AreaCode> {
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import com.orange.demo.courseclassservice.model.ClassCourse;
|
||||
* 数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public interface ClassCourseMapper extends BaseDaoMapper<ClassCourse> {
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.orange.demo.courseclassservice.model.ClassStudent;
|
||||
* 数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public interface ClassStudentMapper extends BaseDaoMapper<ClassStudent> {
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.*;
|
||||
* 课程数据数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public interface CourseMapper extends BaseDaoMapper<Course> {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.orange.demo.courseclassservice.model.Grade;
|
||||
* 年级数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public interface GradeMapper extends BaseDaoMapper<Grade> {
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.orange.demo.courseclassservice.model.MaterialEdition;
|
||||
* 数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public interface MaterialEditionMapper extends BaseDaoMapper<MaterialEdition> {
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.*;
|
||||
* 校区数据数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public interface SchoolInfoMapper extends BaseDaoMapper<SchoolInfo> {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.*;
|
||||
* 班级数据数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public interface StudentClassMapper extends BaseDaoMapper<StudentClass> {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.*;
|
||||
* 学生数据数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public interface StudentMapper extends BaseDaoMapper<Student> {
|
||||
|
||||
|
||||
@@ -16,6 +16,11 @@
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="BaseResultMapWithClassCourse" type="com.orange.demo.courseclassservice.model.Course" extends="BaseResultMap">
|
||||
<association property="classCourse" column="course_id" foreignColumn="course_id"
|
||||
notNullColumn="course_id" resultMap="com.orange.demo.courseclassservice.dao.ClassCourseMapper.BaseResultMap" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="filterRef">
|
||||
<if test="courseFilter != null">
|
||||
<if test="courseFilter.courseName != null and courseFilter.courseName != ''">
|
||||
@@ -81,9 +86,10 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getCourseListByClassId" resultMap="BaseResultMap">
|
||||
<select id="getCourseListByClassId" resultMap="BaseResultMapWithClassCourse">
|
||||
SELECT
|
||||
zz_course.*
|
||||
zz_course.*,
|
||||
zz_class_course.*
|
||||
FROM
|
||||
zz_course,
|
||||
zz_class_course
|
||||
|
||||
@@ -8,7 +8,7 @@ import javax.persistence.*;
|
||||
* 行政区划实体对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zz_area_code")
|
||||
|
||||
@@ -8,7 +8,7 @@ import javax.validation.constraints.*;
|
||||
* ClassCourse实体对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zz_class_course")
|
||||
@@ -33,6 +33,7 @@ public class ClassCourse {
|
||||
/**
|
||||
* 课程顺序(数值越小越靠前)。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,课程顺序(数值越小越靠前)不能为空!")
|
||||
@Column(name = "course_order")
|
||||
private Integer courseOrder;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import javax.validation.constraints.*;
|
||||
* ClassStudent实体对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zz_class_student")
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.orange.demo.courseclassservice.model;
|
||||
|
||||
import com.orange.demo.courseclassinterface.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;
|
||||
@@ -21,7 +23,7 @@ import java.util.Map;
|
||||
* Course实体对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zz_course")
|
||||
@@ -85,6 +87,7 @@ public class Course {
|
||||
/**
|
||||
* 多张课程图片地址。
|
||||
*/
|
||||
@UploadFlagColumn(storeType = UploadStoreTypeEnum.MINIO_SYSTEM)
|
||||
@NotBlank(message = "数据验证失败,课程图片不能为空!")
|
||||
@Column(name = "picture_url")
|
||||
private String pictureUrl;
|
||||
@@ -143,6 +146,12 @@ public class Course {
|
||||
@Transient
|
||||
private String updateTimeEnd;
|
||||
|
||||
/**
|
||||
* courseId 的多对多关联表数据对象。
|
||||
*/
|
||||
@Transient
|
||||
private ClassCourse classCourse;
|
||||
|
||||
@RelationDict(
|
||||
masterIdField = "gradeId",
|
||||
slaveServiceName = "gradeService",
|
||||
@@ -172,6 +181,7 @@ public class Course {
|
||||
* @param courseDto 域对象。
|
||||
* @return 实体对象。
|
||||
*/
|
||||
@Mapping(target = "classCourse", expression = "java(mapToBean(courseDto.getClassCourse(), com.orange.demo.courseclassservice.model.ClassCourse.class))")
|
||||
@Override
|
||||
Course toModel(CourseDto courseDto);
|
||||
/**
|
||||
@@ -180,6 +190,7 @@ public class Course {
|
||||
* @param course 实体对象。
|
||||
* @return 域对象。
|
||||
*/
|
||||
@Mapping(target = "classCourse", expression = "java(beanToMap(course.getClassCourse(), false))")
|
||||
@Override
|
||||
CourseDto fromModel(Course course);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import javax.validation.constraints.*;
|
||||
* Grade实体对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zz_grade")
|
||||
|
||||
@@ -8,7 +8,7 @@ import javax.validation.constraints.*;
|
||||
* MaterialEdition实体对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zz_material_edition")
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.Map;
|
||||
* SchoolInfo实体对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zz_school_info")
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.Map;
|
||||
* Student实体对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zz_student")
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.Map;
|
||||
* StudentClass实体对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zz_class")
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.List;
|
||||
* 行政区划的Service类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Service
|
||||
public class AreaCodeService extends BaseDictService<AreaCode, AreaCodeDto, Long> {
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.*;
|
||||
* 课程数据数据操作服务类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Service
|
||||
public class CourseService extends BaseService<Course, CourseDto, Long> {
|
||||
|
||||
@@ -18,7 +18,7 @@ import javax.annotation.PostConstruct;
|
||||
* 年级数据操作服务类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Service
|
||||
public class GradeService extends BaseDictService<Grade, GradeDto, Integer> {
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.*;
|
||||
* 校区数据数据操作服务类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Service
|
||||
public class SchoolInfoService extends BaseService<SchoolInfo, SchoolInfoDto, Long> {
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.*;
|
||||
* 班级数据数据操作服务类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Service
|
||||
public class StudentClassService extends BaseService<StudentClass, StudentClassDto, Long> {
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.*;
|
||||
* 学生数据数据操作服务类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Service
|
||||
public class StudentService extends BaseService<Student, StudentDto, Long> {
|
||||
|
||||
@@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* 网关服务启动类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class})
|
||||
@SpringCloudApplication
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
* 网关业务配置类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
@RefreshScope
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.springframework.web.util.pattern.PathPatternParser;
|
||||
* 跨域信任配置类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Configuration
|
||||
public class CorsConfig {
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.nio.charset.StandardCharsets;
|
||||
* Web通用过滤器配置类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Configuration
|
||||
public class FilterConfig {
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.*;
|
||||
* Spring Cloud Gateway的Sentinel流控配置类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Configuration
|
||||
public class SentinelConfig {
|
||||
|
||||
@@ -4,7 +4,7 @@ package com.orange.demo.gateway.constant;
|
||||
* 网关业务相关的常量对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public final class GatewayConstant {
|
||||
|
||||
@@ -16,12 +16,12 @@ public final class GatewayConstant {
|
||||
/**
|
||||
* 登录URL。
|
||||
*/
|
||||
public static final String ADMIN_LOGIN_URL = "/admin/login/doLogin";
|
||||
public static final String ADMIN_LOGIN_URL = "/admin/upms/login/doLogin";
|
||||
|
||||
/**
|
||||
* 登出URL。
|
||||
*/
|
||||
public static final String ADMIN_LOGOUT_URL = "/admin/login/doLogout";
|
||||
public static final String ADMIN_LOGOUT_URL = "/admin/upms/login/doLogout";
|
||||
|
||||
/**
|
||||
* sessionId的键名称。
|
||||
|
||||
@@ -46,7 +46,7 @@ import java.util.Map;
|
||||
* 全局后处理过滤器。主要用于将用户的会话信息存到缓存服务器,以及在登出时清除缓存中的会话数据。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Slf4j
|
||||
public class AuthenticationPostFilter implements GlobalFilter, Ordered {
|
||||
|
||||
@@ -38,7 +38,7 @@ import java.util.Map;
|
||||
* 全局前处理过滤器。主要用于用户操作权限验证。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Slf4j
|
||||
public class AuthenticationPreFilter implements GlobalFilter, Ordered {
|
||||
@@ -70,7 +70,7 @@ public class AuthenticationPreFilter implements GlobalFilter, Ordered {
|
||||
response.setStatusCode(HttpStatus.UNAUTHORIZED);
|
||||
response.getHeaders().setContentType(MediaType.APPLICATION_JSON);
|
||||
byte[] responseBody = JSON.toJSONString(ResponseResult.error(ErrorCodeEnum.UNAUTHORIZED_LOGIN,
|
||||
"用户登录已过期,请重新登录!")).getBytes(StandardCharsets.UTF_8);
|
||||
"用户登录已过期或尚未登录,请重新登录!")).getBytes(StandardCharsets.UTF_8);
|
||||
return response.writeWith(Flux.just(response.bufferFactory().wrap(responseBody)));
|
||||
}
|
||||
// 这里判断是否需要定时刷新token
|
||||
|
||||
@@ -17,7 +17,7 @@ import reactor.core.publisher.Mono;
|
||||
* 为整个链路生成唯一的traceId,并存储在Request Head中。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Slf4j
|
||||
public class RequestLogFilter implements GlobalFilter, Ordered {
|
||||
|
||||
@@ -16,7 +16,7 @@ import reactor.core.publisher.Mono;
|
||||
* 将整个链路的traceId存储在Response Head中,并返回给前端,便于问题定位。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Slf4j
|
||||
public class ResponseLogFilter implements GlobalFilter, Ordered {
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.*;
|
||||
* 课程统计服务远程数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@FeignClient(
|
||||
name = "stats",
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.*;
|
||||
* 学生行为统计服务远程数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@FeignClient(
|
||||
name = "stats",
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.*;
|
||||
* 学生行为流水服务远程数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@FeignClient(
|
||||
name = "stats",
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.Map;
|
||||
* CourseTransStatsDto对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
public class CourseTransStatsDto {
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.Map;
|
||||
* StudentActionStatsDto对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
public class StudentActionStatsDto {
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.Map;
|
||||
* StudentActionTransDto对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
public class StudentActionTransDto {
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.springframework.context.annotation.ComponentScan;
|
||||
* stats服务启动类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@SpringCloudApplication
|
||||
@EnableFeignClients(basePackages = "com.orange.demo")
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
* defaultSomething: defaultValue
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
@RefreshScope
|
||||
|
||||
@@ -14,7 +14,7 @@ import javax.sql.DataSource;
|
||||
* 数据源配置Bean对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Configuration
|
||||
@EnableTransactionManagement
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.orange.demo.statsservice.service.*;
|
||||
import com.orange.demo.statsinterface.dto.*;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||
import com.orange.demo.common.core.constant.*;
|
||||
import com.orange.demo.common.core.base.controller.BaseController;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||
@@ -22,7 +22,7 @@ import java.util.*;
|
||||
* 课程统计操作控制器类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.orange.demo.statsservice.service.*;
|
||||
import com.orange.demo.statsinterface.dto.*;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||
import com.orange.demo.common.core.constant.*;
|
||||
import com.orange.demo.common.core.base.controller.BaseController;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||
@@ -22,7 +22,7 @@ import java.util.*;
|
||||
* 学生行为统计操作控制器类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.orange.demo.statsservice.service.*;
|
||||
import com.orange.demo.statsinterface.dto.*;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||
import com.orange.demo.common.core.constant.*;
|
||||
import com.orange.demo.common.core.base.controller.BaseController;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||
@@ -24,7 +24,7 @@ import java.util.*;
|
||||
* 学生行为流水操作控制器类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.*;
|
||||
* 课程统计数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public interface CourseTransStatsMapper extends BaseDaoMapper<CourseTransStats> {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.orange.demo.statsservice.model.Grade;
|
||||
* 数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public interface GradeMapper extends BaseDaoMapper<Grade> {
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.orange.demo.statsservice.model.SchoolInfo;
|
||||
* 数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public interface SchoolInfoMapper extends BaseDaoMapper<SchoolInfo> {
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.*;
|
||||
* 学生行为统计数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public interface StudentActionStatsMapper extends BaseDaoMapper<StudentActionStats> {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.*;
|
||||
* 学生行为流水数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public interface StudentActionTransMapper extends BaseDaoMapper<StudentActionTrans> {
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.Map;
|
||||
* CourseTransStats实体对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zz_course_trans_stats")
|
||||
|
||||
@@ -10,7 +10,7 @@ import javax.validation.constraints.*;
|
||||
* Grade实体对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zz_grade")
|
||||
|
||||
@@ -8,7 +8,7 @@ import javax.validation.constraints.*;
|
||||
* SchoolInfo实体对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zz_school_info")
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.Map;
|
||||
* StudentActionStats实体对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zz_student_action_stats")
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.Map;
|
||||
* StudentActionTrans实体对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zz_student_action_trans")
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.*;
|
||||
* 课程统计数据操作服务类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Service
|
||||
public class CourseTransStatsService extends BaseService<CourseTransStats, CourseTransStatsDto, Long> {
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.*;
|
||||
* 学生行为统计数据操作服务类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Service
|
||||
public class StudentActionStatsService extends BaseService<StudentActionStats, StudentActionStatsDto, Long> {
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.*;
|
||||
* 学生行为流水数据操作服务类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@Service
|
||||
public class StudentActionTransService extends BaseService<StudentActionTrans, StudentActionTransDto, Long> {
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.*;
|
||||
* 用户管理服务远程数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
@FeignClient(
|
||||
name = "upms",
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.Map;
|
||||
* 菜单类型常量对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public final class SysMenuType {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.Map;
|
||||
* 权限字类型常量对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public final class SysPermCodeType {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.Map;
|
||||
* 权限资源模块类型常量对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-09-27
|
||||
* @date 2020-10-19
|
||||
*/
|
||||
public final class SysPermModuleType {
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user