commit:集成knife4j

This commit is contained in:
Jerry
2020-10-29 18:51:32 +08:00
parent c87e94d2e8
commit 6e57f10dfc
648 changed files with 6447 additions and 708 deletions

View File

@@ -50,10 +50,10 @@
<orderEntry type="library" name="Maven: joda-time:joda-time:2.10.5" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-csv:1.8" level="project" />
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.1.5" 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.70" 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" />
@@ -91,6 +91,24 @@
<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.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.nacos:nacos-client:1.2.1" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-common:1.2.1" level="project" />
@@ -247,7 +265,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.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: net.bytebuddy:byte-buddy:1.10.8" 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-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.skyscreamer:jsonassert:1.5.0" level="project" />

View File

@@ -26,5 +26,11 @@
<artifactId>common-core</artifactId>
<version>1.0.0</version>
</dependency>
<!-- knife4j 接口文档框架 -->
<dependency>
<groupId>com.orange.demo</groupId>
<artifactId>common-swagger</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</project>

View File

@@ -17,7 +17,7 @@ import java.util.*;
* 行政区划远程访问接口类。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@FeignClient(name = "system-service", fallbackFactory = AreaCodeClient.AreaCodeClientFallbackFactory.class)
public interface AreaCodeClient extends BaseClient<AreaCodeDto, Long> {

View File

@@ -17,7 +17,7 @@ import java.util.*;
* 课程数据服务远程数据操作访问接口。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@FeignClient(
name = "course-class",

View File

@@ -17,7 +17,7 @@ import java.util.*;
* 服务远程数据操作访问接口。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@FeignClient(
name = "course-class",

View File

@@ -17,7 +17,7 @@ import java.util.*;
* 校区数据服务远程数据操作访问接口。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@FeignClient(
name = "course-class",

View File

@@ -17,7 +17,7 @@ import java.util.*;
* 班级数据服务远程数据操作访问接口。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@FeignClient(
name = "course-class",

View File

@@ -17,7 +17,7 @@ import java.util.*;
* 学生数据服务远程数据操作访问接口。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@FeignClient(
name = "course-class",

View File

@@ -7,7 +7,7 @@ import java.util.Map;
* 班级级别常量字典对象。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
public final class ClassLevel {

View File

@@ -7,7 +7,7 @@ import java.util.Map;
* 班级状态常量字典对象。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
public final class ClassStatus {

View File

@@ -7,7 +7,7 @@ import java.util.Map;
* 课程难度常量字典对象。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
public final class CourseDifficult {

View File

@@ -1,33 +1,40 @@
package com.orange.demo.courseclassinterface.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 行政区划Dto。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@ApiModel("行政区划实体对象")
@Data
public class AreaCodeDto {
/**
* 行政区划主键Id
*/
@ApiModelProperty(value = "行政区划主键Id", required = true)
private Long areaId;
/**
* 行政区划名称
*/
@ApiModelProperty(value = "行政区划名称")
private String areaName;
/**
* 行政区划级别 (1: 省级别 2: 市级别 3: 区级别)
*/
@ApiModelProperty(value = "行政区划级别")
private Integer areaLevel;
/**
* 父级行政区划Id
*/
@ApiModelProperty(value = "父级行政区划Id")
private Long parentId;
}

View File

@@ -10,7 +10,7 @@ import javax.validation.constraints.*;
* ClassCourseDto对象。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Data
public class ClassCourseDto {

View File

@@ -10,7 +10,7 @@ import javax.validation.constraints.*;
* ClassStudentDto对象。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Data
public class ClassStudentDto {

View File

@@ -5,6 +5,8 @@ import com.orange.demo.common.core.validator.ConstDictRef;
import com.orange.demo.courseclassinterface.constant.CourseDifficult;
import com.orange.demo.application.common.constant.Subject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.*;
@@ -17,37 +19,43 @@ import java.util.Map;
* CourseDto对象。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@ApiModel("CourseDto实体对象")
@Data
public class CourseDto {
/**
* 主键Id。
*/
@ApiModelProperty(value = "主键Id", required = true)
@NotNull(message = "数据验证失败主键Id不能为空", groups = {UpdateGroup.class})
private Long courseId;
/**
* 课程名称。
*/
@ApiModelProperty(value = "课程名称", required = true)
@NotBlank(message = "数据验证失败,课程名称不能为空!")
private String courseName;
/**
* 课程价格。
*/
@ApiModelProperty(value = "课程价格", required = true)
@NotNull(message = "数据验证失败,课程价格不能为空!")
private BigDecimal price;
/**
* 课程描述。
*/
@ApiModelProperty(value = "课程描述")
private String description;
/**
* 课程难度(0: 容易 1: 普通 2: 很难)。
*/
@ApiModelProperty(value = "课程难度(0: 容易 1: 普通 2: 很难)", required = true)
@NotNull(message = "数据验证失败,课程难度不能为空!")
@ConstDictRef(constDictClass = CourseDifficult.class, message = "数据验证失败,课程难度为无效值!")
private Integer difficulty;
@@ -55,12 +63,14 @@ public class CourseDto {
/**
* 年级Id。
*/
@ApiModelProperty(value = "年级Id", required = true)
@NotNull(message = "数据验证失败,所属年级不能为空!")
private Integer gradeId;
/**
* 学科Id。
*/
@ApiModelProperty(value = "学科Id", required = true)
@NotNull(message = "数据验证失败,所属学科不能为空!")
@ConstDictRef(constDictClass = Subject.class, message = "数据验证失败,所属学科为无效值!")
private Integer subjectId;
@@ -68,77 +78,92 @@ public class CourseDto {
/**
* 课时数量。
*/
@ApiModelProperty(value = "课时数量", required = true)
@NotNull(message = "数据验证失败,课时数量不能为空!")
private Integer classHour;
/**
* 多张课程图片地址。
*/
@ApiModelProperty(value = "多张课程图片地址", required = true)
@NotBlank(message = "数据验证失败,课程图片不能为空!")
private String pictureUrl;
/**
* 创建用户Id。
*/
@ApiModelProperty(value = "创建用户Id")
private Long createUserId;
/**
* 创建时间。
*/
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**
* 最后修改时间。
*/
@ApiModelProperty(value = "最后修改时间")
private Date updateTime;
/**
* price 范围过滤起始值(>=)。
*/
@ApiModelProperty(value = "price 范围过滤起始值(>=)")
private BigDecimal priceStart;
/**
* price 范围过滤结束值(<=)。
*/
@ApiModelProperty(value = "price 范围过滤结束值(<=)")
private BigDecimal priceEnd;
/**
* classHour 范围过滤起始值(>=)。
*/
@ApiModelProperty(value = "classHour 范围过滤起始值(>=)")
private Integer classHourStart;
/**
* classHour 范围过滤结束值(<=)。
*/
@ApiModelProperty(value = "classHour 范围过滤结束值(<=)")
private Integer classHourEnd;
/**
* updateTime 范围过滤起始值(>=)。
*/
@ApiModelProperty(value = "updateTime 范围过滤起始值(>=)")
private String updateTimeStart;
/**
* updateTime 范围过滤结束值(<=)。
*/
@ApiModelProperty(value = "updateTime 范围过滤结束值(<=)")
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;
}

View File

@@ -2,6 +2,8 @@ package com.orange.demo.courseclassinterface.dto;
import com.orange.demo.common.core.validator.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.*;
@@ -10,20 +12,23 @@ import javax.validation.constraints.*;
* GradeDto对象。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@ApiModel("GradeDto实体对象")
@Data
public class GradeDto {
/**
* 主键Id。
*/
@ApiModelProperty(value = "主键Id", required = true)
@NotNull(message = "数据验证失败主键Id不能为空", groups = {UpdateGroup.class})
private Integer gradeId;
/**
* 年级名称。
*/
@ApiModelProperty(value = "年级名称", required = true)
@NotBlank(message = "数据验证失败,年级名称不能为空!")
private String gradeName;
}

View File

@@ -2,6 +2,8 @@ package com.orange.demo.courseclassinterface.dto;
import com.orange.demo.common.core.validator.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.*;
@@ -12,42 +14,49 @@ import java.util.Map;
* SchoolInfoDto对象。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@ApiModel("SchoolInfoDto实体对象")
@Data
public class SchoolInfoDto {
/**
* 学校Id。
*/
@ApiModelProperty(value = "学校Id", required = true)
@NotNull(message = "数据验证失败学校Id不能为空", groups = {UpdateGroup.class})
private Long schoolId;
/**
* 学校名称。
*/
@ApiModelProperty(value = "学校名称", required = true)
@NotBlank(message = "数据验证失败,学校名称不能为空!")
private String schoolName;
/**
* 所在省Id。
*/
@ApiModelProperty(value = "所在省Id", required = true)
@NotNull(message = "数据验证失败,所在省份不能为空!")
private Long provinceId;
/**
* 所在城市Id。
*/
@ApiModelProperty(value = "所在城市Id", required = true)
@NotNull(message = "数据验证失败,所在城市不能为空!")
private Long cityId;
/**
* provinceId 字典关联数据。
*/
@ApiModelProperty(hidden = true)
private Map<String, Object> provinceIdDictMap;
/**
* cityId 字典关联数据。
*/
@ApiModelProperty(hidden = true)
private Map<String, Object> cityIdDictMap;
}

View File

@@ -4,6 +4,8 @@ import com.orange.demo.common.core.validator.UpdateGroup;
import com.orange.demo.common.core.validator.ConstDictRef;
import com.orange.demo.courseclassinterface.constant.ClassLevel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.*;
@@ -15,44 +17,51 @@ import java.util.Map;
* StudentClassDto对象。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@ApiModel("StudentClassDto实体对象")
@Data
public class StudentClassDto {
/**
* 班级Id。
*/
@ApiModelProperty(value = "班级Id", required = true)
@NotNull(message = "数据验证失败班级Id不能为空", groups = {UpdateGroup.class})
private Long classId;
/**
* 班级名称。
*/
@ApiModelProperty(value = "班级名称", required = true)
@NotBlank(message = "数据验证失败,班级名称不能为空!")
private String className;
/**
* 学校Id。
*/
@ApiModelProperty(value = "学校Id", required = true)
@NotNull(message = "数据验证失败,所属校区不能为空!")
private Long schoolId;
/**
* 学生班长Id。
*/
@ApiModelProperty(value = "学生班长Id", required = true)
@NotNull(message = "数据验证失败,班长不能为空!")
private Long leaderId;
/**
* 已完成课时数量。
*/
@ApiModelProperty(value = "已完成课时数量", required = true)
@NotNull(message = "数据验证失败,已完成课时不能为空!")
private Integer finishClassHour;
/**
* 班级级别(0: 初级班 1: 培优班 2: 冲刺提分班 3: 竞赛班)。
*/
@ApiModelProperty(value = "班级级别(0: 初级班 1: 培优班 2: 冲刺提分班 3: 竞赛班)", required = true)
@NotNull(message = "数据验证失败,班级级别不能为空!")
@ConstDictRef(constDictClass = ClassLevel.class, message = "数据验证失败,班级级别为无效值!")
private Integer classLevel;
@@ -60,25 +69,30 @@ public class StudentClassDto {
/**
* 创建用户。
*/
@ApiModelProperty(value = "创建用户")
private Long createUserId;
/**
* 班级创建时间。
*/
@ApiModelProperty(value = "班级创建时间")
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;
}

View File

@@ -6,6 +6,8 @@ import com.orange.demo.application.common.constant.Gender;
import com.orange.demo.application.common.constant.ExpLevel;
import com.orange.demo.application.common.constant.StudentStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.*;
@@ -17,50 +19,58 @@ import java.util.Map;
* StudentDto对象。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@ApiModel("StudentDto实体对象")
@Data
public class StudentDto {
/**
* 学生Id。
*/
@ApiModelProperty(value = "学生Id", required = true)
@NotNull(message = "数据验证失败学生Id不能为空", groups = {UpdateGroup.class})
private Long studentId;
/**
* 登录手机。
*/
@ApiModelProperty(value = "登录手机", required = true)
@NotBlank(message = "数据验证失败,手机号码不能为空!")
private String loginMobile;
/**
* 学生姓名。
*/
@ApiModelProperty(value = "学生姓名", required = true)
@NotBlank(message = "数据验证失败,姓名不能为空!")
private String studentName;
/**
* 所在省份Id。
*/
@ApiModelProperty(value = "所在省份Id", required = true)
@NotNull(message = "数据验证失败,所在省份不能为空!")
private Long provinceId;
/**
* 所在城市Id。
*/
@ApiModelProperty(value = "所在城市Id", required = true)
@NotNull(message = "数据验证失败,所在城市不能为空!")
private Long cityId;
/**
* 区县Id。
*/
@ApiModelProperty(value = "区县Id", required = true)
@NotNull(message = "数据验证失败,所在区县不能为空!")
private Long districtId;
/**
* 学生性别 (0: 女生 1: 男生)。
*/
@ApiModelProperty(value = "学生性别 (0: 女生 1: 男生)", required = true)
@NotNull(message = "数据验证失败,性别不能为空!")
@ConstDictRef(constDictClass = Gender.class, message = "数据验证失败,性别为无效值!")
private Integer gender;
@@ -68,12 +78,14 @@ public class StudentDto {
/**
* 生日。
*/
@ApiModelProperty(value = "生日", required = true)
@NotNull(message = "数据验证失败,生日不能为空!")
private Date birthday;
/**
* 经验等级 (0: 初级 1: 中级 2: 高级 3: 资深)。
*/
@ApiModelProperty(value = "经验等级 (0: 初级 1: 中级 2: 高级 3: 资深)", required = true)
@NotNull(message = "数据验证失败,经验等级不能为空!")
@ConstDictRef(constDictClass = ExpLevel.class, message = "数据验证失败,经验等级为无效值!")
private Integer experienceLevel;
@@ -81,35 +93,41 @@ public class StudentDto {
/**
* 总共充值学币数量。
*/
@ApiModelProperty(value = "总共充值学币数量", required = true)
@NotNull(message = "数据验证失败,充值学币不能为空!", groups = {UpdateGroup.class})
private Integer totalCoin;
/**
* 可用学币数量。
*/
@ApiModelProperty(value = "可用学币数量", required = true)
@NotNull(message = "数据验证失败,剩余学币不能为空!", groups = {UpdateGroup.class})
private Integer leftCoin;
/**
* 年级Id。
*/
@ApiModelProperty(value = "年级Id", required = true)
@NotNull(message = "数据验证失败,年级不能为空!")
private Integer gradeId;
/**
* 校区Id。
*/
@ApiModelProperty(value = "校区Id", required = true)
@NotNull(message = "数据验证失败,所属校区不能为空!")
private Long schoolId;
/**
* 注册时间。
*/
@ApiModelProperty(value = "注册时间")
private Date registerTime;
/**
* 学生状态 (0: 正常 1: 锁定 2: 注销)。
*/
@ApiModelProperty(value = "学生状态 (0: 正常 1: 锁定 2: 注销)", required = true)
@NotNull(message = "数据验证失败,状态 不能为空!", groups = {UpdateGroup.class})
@ConstDictRef(constDictClass = StudentStatus.class, message = "数据验证失败,状态 为无效值!")
private Integer status;
@@ -117,65 +135,78 @@ public class StudentDto {
/**
* birthday 范围过滤起始值(>=)。
*/
@ApiModelProperty(value = "birthday 范围过滤起始值(>=)")
private String birthdayStart;
/**
* birthday 范围过滤结束值(<=)。
*/
@ApiModelProperty(value = "birthday 范围过滤结束值(<=)")
private String birthdayEnd;
/**
* registerTime 范围过滤起始值(>=)。
*/
@ApiModelProperty(value = "registerTime 范围过滤起始值(>=)")
private String registerTimeStart;
/**
* registerTime 范围过滤结束值(<=)。
*/
@ApiModelProperty(value = "registerTime 范围过滤结束值(<=)")
private String registerTimeEnd;
/**
* true LIKE搜索字符串。
*/
@ApiModelProperty(value = "LIKE模糊搜索字符串")
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;
}

View File

@@ -50,9 +50,9 @@
<orderEntry type="library" name="Maven: joda-time:joda-time:2.10.5" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-csv:1.8" level="project" />
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.1.5" 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.alibaba:fastjson:1.2.70" 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" />
@@ -87,6 +87,23 @@
<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.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="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" />

View File

@@ -9,7 +9,7 @@ import org.springframework.context.annotation.ComponentScan;
* course-class服务启动类。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@SpringCloudApplication
@EnableFeignClients(basePackages = "com.orange.demo")

View File

@@ -14,7 +14,7 @@ import org.springframework.context.annotation.Configuration;
* defaultSomething: defaultValue
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Data
@RefreshScope

View File

@@ -14,7 +14,7 @@ import javax.sql.DataSource;
* 数据源配置Bean对象。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Configuration
@EnableTransactionManagement

View File

@@ -1,5 +1,6 @@
package com.orange.demo.courseclassservice.controller;
import io.swagger.annotations.Api;
import cn.jimmyshi.beanquery.BeanQuery;
import com.orange.demo.common.core.base.controller.BaseController;
import com.orange.demo.common.core.base.service.BaseService;
@@ -19,8 +20,9 @@ import java.util.*;
* 行政区划数据访问接口类。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Api(tags = "行政区划数据访问接口")
@RestController
@RequestMapping("/areaCode")
public class AreaCodeController extends BaseController<AreaCode, AreaCodeDto, Long> {

View File

@@ -6,7 +6,6 @@ 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;
import com.orange.demo.courseclassservice.model.*;
@@ -21,6 +20,9 @@ import com.orange.demo.common.core.annotation.MyRequestBody;
import com.orange.demo.common.core.validator.UpdateGroup;
import com.orange.demo.common.redis.cache.SessionCacheHelper;
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -34,8 +36,9 @@ import java.util.*;
* 课程数据操作控制器类。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Api(tags = "课程数据管理接口")
@Slf4j
@RestController
@RequestMapping("/course")
@@ -61,8 +64,16 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
* @param courseDto 新增对象。
* @return 应答结果对象包含新增对象主键Id。
*/
@ApiOperationSupport(ignoreParameters = {
"course.courseId",
"course.priceStart",
"course.priceEnd",
"course.classHourStart",
"course.classHourEnd",
"course.updateTimeStart",
"course.updateTimeEnd"})
@PostMapping("/add")
public ResponseResult<JSONObject> add(@MyRequestBody("course") CourseDto courseDto) {
public ResponseResult<Long> add(@MyRequestBody("course") CourseDto courseDto) {
String errorMessage = MyCommonUtil.getModelValidationError(courseDto);
if (errorMessage != null) {
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
@@ -75,9 +86,7 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
}
course = courseService.saveNew(course);
JSONObject responseData = new JSONObject();
responseData.put("courseId", course.getCourseId());
return ResponseResult.success(responseData);
return ResponseResult.success(course.getCourseId());
}
/**
@@ -86,6 +95,13 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
* @param courseDto 更新对象。
* @return 应答结果对象。
*/
@ApiOperationSupport(ignoreParameters = {
"course.priceStart",
"course.priceEnd",
"course.classHourStart",
"course.classHourEnd",
"course.updateTimeStart",
"course.updateTimeEnd"})
@PostMapping("/update")
public ResponseResult<Void> update(@MyRequestBody("course") CourseDto courseDto) {
String errorMessage = MyCommonUtil.getModelValidationError(courseDto, Default.class, UpdateGroup.class);
@@ -146,7 +162,7 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
* @return 应答结果对象,包含查询结果集。
*/
@PostMapping("/list")
public ResponseResult<JSONObject> list(
public ResponseResult<MyPageData<CourseDto>> list(
@MyRequestBody("courseFilter") CourseDto courseDtoFilter,
@MyRequestBody MyOrderParam orderParam,
@MyRequestBody MyPageParam pageParam) {
@@ -301,6 +317,7 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
* @param withDict 是否包含字典关联。
* @return 应答结果对象,包含主对象集合。
*/
@ApiOperation(hidden = true, value = "listByIds")
@PostMapping("/listByIds")
public ResponseResult<List<CourseDto>> listByIds(
@RequestParam Set<Long> courseIds, @RequestParam Boolean withDict) {
@@ -314,6 +331,7 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
* @param withDict 是否包含字典关联。
* @return 应答结果对象,包含主对象数据。
*/
@ApiOperation(hidden = true, value = "getById")
@PostMapping("/getById")
public ResponseResult<CourseDto> getById(
@RequestParam Long courseId, @RequestParam Boolean withDict) {
@@ -326,6 +344,7 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
* @param courseIds 主键Id集合。
* @return 应答结果对象包含true全部存在否则false。
*/
@ApiOperation(hidden = true, value = "existIds")
@PostMapping("/existIds")
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> courseIds) {
return super.baseExistIds(courseIds);
@@ -337,6 +356,7 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
* @param courseId 主键Id。
* @return 应答结果对象包含true表示存在否则false。
*/
@ApiOperation(hidden = true, value = "existId")
@PostMapping("/existId")
public ResponseResult<Boolean> existId(@RequestParam Long courseId) {
return super.baseExistId(courseId);
@@ -348,6 +368,7 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
* @param queryParam 查询参数。
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
*/
@ApiOperation(hidden = true, value = "listBy")
@PostMapping("/listBy")
public ResponseResult<List<CourseDto>> listBy(@RequestBody MyQueryParam queryParam) {
return super.baseListBy(queryParam, Course.INSTANCE);
@@ -359,6 +380,7 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
* @param queryParam 查询参数。
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
*/
@ApiOperation(hidden = true, value = "listMapBy")
@PostMapping("/listMapBy")
public ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
return super.baseListMapBy(queryParam, Course.INSTANCE);
@@ -370,6 +392,7 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
* @param queryParam 查询参数。
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
*/
@ApiOperation(hidden = true, value = "getBy")
@PostMapping("/getBy")
public ResponseResult<CourseDto> getBy(@RequestBody MyQueryParam queryParam) {
return super.baseGetBy(queryParam, Course.INSTANCE);
@@ -381,6 +404,7 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
* @param queryParam 查询参数。
* @return 应答结果对象,包含结果数量。
*/
@ApiOperation(hidden = true, value = "countBy")
@PostMapping("/countBy")
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
return super.baseCountBy(queryParam);
@@ -392,6 +416,7 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
* @param aggregationParam 聚合参数。
* @return 应该结果对象包含聚合计算后的分组Map列表。
*/
@ApiOperation(hidden = true, value = "aggregateBy")
@PostMapping("/aggregateBy")
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
return super.baseAggregateBy(aggregationParam);

View File

@@ -2,6 +2,9 @@ package com.orange.demo.courseclassservice.controller;
import cn.jimmyshi.beanquery.BeanQuery;
import com.alibaba.fastjson.JSONObject;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
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.BaseDictService;
@@ -25,8 +28,9 @@ import java.util.*;
* 年级操作控制器类。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Api(tags = "年级管理接口")
@Slf4j
@RestController
@RequestMapping("/grade")
@@ -46,17 +50,16 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
* @param gradeDto 新增对象。
* @return 应答结果对象包含新增对象主键Id。
*/
@ApiOperationSupport(ignoreParameters = {"grade.gradeId"})
@PostMapping("/add")
public ResponseResult<JSONObject> add(@MyRequestBody("grade") GradeDto gradeDto) {
public ResponseResult<Integer> add(@MyRequestBody("grade") GradeDto gradeDto) {
String errorMessage = MyCommonUtil.getModelValidationError(gradeDto);
if (errorMessage != null) {
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
}
Grade grade = MyModelUtil.copyTo(gradeDto, Grade.class);
grade = gradeService.saveNew(grade);
JSONObject responseData = new JSONObject();
responseData.put("gradeId", grade.getGradeId());
return ResponseResult.success(responseData);
return ResponseResult.success(grade.getGradeId());
}
/**
@@ -117,7 +120,7 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
GradeDto gradeDto = MyModelUtil.copyTo(grade, GradeDto.class);
return ResponseResult.success(gradeDto);
}
/**
* 以字典形式返回全部年级数据集合。
* 白名单接口,登录用户均可访问。
@@ -138,6 +141,7 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
* @param withDict 是否包含字典关联。
* @return 应答结果对象,包含主对象集合。
*/
@ApiOperation(hidden = true, value = "listByIds")
@PostMapping("/listByIds")
public ResponseResult<List<GradeDto>> listByIds(
@RequestParam Set<Integer> gradeIds, @RequestParam Boolean withDict) {
@@ -151,6 +155,7 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
* @param withDict 是否包含字典关联。
* @return 应答结果对象,包含主对象数据。
*/
@ApiOperation(hidden = true, value = "getById")
@PostMapping("/getById")
public ResponseResult<GradeDto> getById(
@RequestParam Integer gradeId, @RequestParam Boolean withDict) {
@@ -163,6 +168,7 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
* @param gradeIds 主键Id集合。
* @return 应答结果对象包含true全部存在否则false。
*/
@ApiOperation(hidden = true, value = "existIds")
@PostMapping("/existIds")
public ResponseResult<Boolean> existIds(@RequestParam Set<Integer> gradeIds) {
return super.baseExistIds(gradeIds);
@@ -174,6 +180,7 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
* @param gradeId 主键Id。
* @return 应答结果对象包含true全部存在否则false。
*/
@ApiOperation(hidden = true, value = "existId")
@PostMapping("/existId")
public ResponseResult<Boolean> existId(@RequestParam Integer gradeId) {
return super.baseExistId(gradeId);
@@ -185,6 +192,7 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
* @param queryParam 查询参数。
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
*/
@ApiOperation(hidden = true, value = "listBy")
@PostMapping("/listBy")
public ResponseResult<List<GradeDto>> listBy(@RequestBody MyQueryParam queryParam) {
return super.baseListBy(queryParam, null);
@@ -196,6 +204,7 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
* @param queryParam 查询参数。
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
*/
@ApiOperation(hidden = true, value = "getBy")
@PostMapping("/getBy")
public ResponseResult<GradeDto> getBy(@RequestBody MyQueryParam queryParam) {
return super.baseGetBy(queryParam, null);

View File

@@ -1,7 +1,6 @@
package com.orange.demo.courseclassservice.controller;
import cn.jimmyshi.beanquery.BeanQuery;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.Page;
import com.github.pagehelper.page.PageMethod;
import com.orange.demo.courseclassservice.model.*;
@@ -14,6 +13,9 @@ 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;
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -25,8 +27,9 @@ import java.util.*;
* 校区数据操作控制器类。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Api(tags = "校区数据管理接口")
@Slf4j
@RestController
@RequestMapping("/schoolInfo")
@@ -46,8 +49,9 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
* @param schoolInfoDto 新增对象。
* @return 应答结果对象包含新增对象主键Id。
*/
@ApiOperationSupport(ignoreParameters = {"schoolInfo.userId"})
@PostMapping("/add")
public ResponseResult<JSONObject> add(@MyRequestBody("schoolInfo") SchoolInfoDto schoolInfoDto) {
public ResponseResult<Long> add(@MyRequestBody("schoolInfo") SchoolInfoDto schoolInfoDto) {
String errorMessage = MyCommonUtil.getModelValidationError(schoolInfoDto);
if (errorMessage != null) {
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
@@ -60,9 +64,7 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
}
schoolInfo = schoolInfoService.saveNew(schoolInfo);
JSONObject responseData = new JSONObject();
responseData.put("schoolId", schoolInfo.getSchoolId());
return ResponseResult.success(responseData);
return ResponseResult.success(schoolInfo.getSchoolId());
}
/**
@@ -131,7 +133,7 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
* @return 应答结果对象,包含查询结果集。
*/
@PostMapping("/list")
public ResponseResult<JSONObject> list(
public ResponseResult<MyPageData<SchoolInfoDto>> list(
@MyRequestBody("schoolInfoFilter") SchoolInfoDto schoolInfoDtoFilter,
@MyRequestBody MyOrderParam orderParam,
@MyRequestBody MyPageParam pageParam) {
@@ -193,6 +195,7 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
* @param withDict 是否包含字典关联。
* @return 应答结果对象,包含主对象集合。
*/
@ApiOperation(hidden = true, value = "listByIds")
@PostMapping("/listByIds")
public ResponseResult<List<SchoolInfoDto>> listByIds(
@RequestParam Set<Long> schoolIds, @RequestParam Boolean withDict) {
@@ -206,6 +209,7 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
* @param withDict 是否包含字典关联。
* @return 应答结果对象,包含主对象数据。
*/
@ApiOperation(hidden = true, value = "getById")
@PostMapping("/getById")
public ResponseResult<SchoolInfoDto> getById(
@RequestParam Long schoolId, @RequestParam Boolean withDict) {
@@ -218,6 +222,7 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
* @param schoolIds 主键Id集合。
* @return 应答结果对象包含true全部存在否则false。
*/
@ApiOperation(hidden = true, value = "existIds")
@PostMapping("/existIds")
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> schoolIds) {
return super.baseExistIds(schoolIds);
@@ -229,6 +234,7 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
* @param schoolId 主键Id。
* @return 应答结果对象包含true表示存在否则false。
*/
@ApiOperation(hidden = true, value = "existId")
@PostMapping("/existId")
public ResponseResult<Boolean> existId(@RequestParam Long schoolId) {
return super.baseExistId(schoolId);
@@ -240,6 +246,7 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
* @param queryParam 查询参数。
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
*/
@ApiOperation(hidden = true, value = "listBy")
@PostMapping("/listBy")
public ResponseResult<List<SchoolInfoDto>> listBy(@RequestBody MyQueryParam queryParam) {
return super.baseListBy(queryParam, SchoolInfo.INSTANCE);
@@ -251,6 +258,7 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
* @param queryParam 查询参数。
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
*/
@ApiOperation(hidden = true, value = "listMapBy")
@PostMapping("/listMapBy")
public ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
return super.baseListMapBy(queryParam, SchoolInfo.INSTANCE);
@@ -262,6 +270,7 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
* @param queryParam 查询参数。
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
*/
@ApiOperation(hidden = true, value = "getBy")
@PostMapping("/getBy")
public ResponseResult<SchoolInfoDto> getBy(@RequestBody MyQueryParam queryParam) {
return super.baseGetBy(queryParam, SchoolInfo.INSTANCE);
@@ -273,6 +282,7 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
* @param queryParam 查询参数。
* @return 应答结果对象,包含结果数量。
*/
@ApiOperation(hidden = true, value = "countBy")
@PostMapping("/countBy")
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
return super.baseCountBy(queryParam);
@@ -284,6 +294,7 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
* @param aggregationParam 聚合参数。
* @return 应该结果对象包含聚合计算后的分组Map列表。
*/
@ApiOperation(hidden = true, value = "aggregateBy")
@PostMapping("/aggregateBy")
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
return super.baseAggregateBy(aggregationParam);

View File

@@ -1,6 +1,5 @@
package com.orange.demo.courseclassservice.controller;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.Page;
import com.github.pagehelper.page.PageMethod;
import com.orange.demo.courseclassservice.model.*;
@@ -13,6 +12,9 @@ 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;
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -25,8 +27,9 @@ import java.util.stream.Collectors;
* 班级数据操作控制器类。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Api(tags = "班级数据管理接口")
@Slf4j
@RestController
@RequestMapping("/studentClass")
@@ -50,8 +53,9 @@ public class StudentClassController extends BaseController<StudentClass, Student
* @param studentClassDto 新增对象。
* @return 应答结果对象包含新增对象主键Id。
*/
@ApiOperationSupport(ignoreParameters = {"studentClass.userId"})
@PostMapping("/add")
public ResponseResult<JSONObject> add(@MyRequestBody("studentClass") StudentClassDto studentClassDto) {
public ResponseResult<Long> add(@MyRequestBody("studentClass") StudentClassDto studentClassDto) {
String errorMessage = MyCommonUtil.getModelValidationError(studentClassDto);
if (errorMessage != null) {
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
@@ -64,9 +68,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
}
studentClass = studentClassService.saveNew(studentClass);
JSONObject responseData = new JSONObject();
responseData.put("classId", studentClass.getClassId());
return ResponseResult.success(responseData);
return ResponseResult.success(studentClass.getClassId());
}
/**
@@ -135,7 +137,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
* @return 应答结果对象,包含查询结果集。
*/
@PostMapping("/list")
public ResponseResult<JSONObject> list(
public ResponseResult<MyPageData<StudentClassDto>> list(
@MyRequestBody("studentClassFilter") StudentClassDto studentClassDtoFilter,
@MyRequestBody MyOrderParam orderParam,
@MyRequestBody MyPageParam pageParam) {
@@ -187,7 +189,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
* @return 应答结果对象,返回符合条件的数据列表。
*/
@PostMapping("/listNotInClassCourse")
public ResponseResult<JSONObject> listNotInClassCourse(
public ResponseResult<MyPageData<CourseDto>> listNotInClassCourse(
@MyRequestBody Long classId,
@MyRequestBody("courseFilter") CourseDto courseDtoFilter,
@MyRequestBody MyOrderParam orderParam,
@@ -205,8 +207,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
String orderBy = MyOrderParam.buildOrderBy(orderParam, Course.class);
List<Course> courseList =
courseService.getNotInCourseListByClassId(classId, filter, orderBy);
JSONObject responseData = MyPageUtil.makeResponseData(courseList, Course.INSTANCE);
return ResponseResult.success(responseData);
return ResponseResult.success(MyPageUtil.makeResponseData(courseList, Course.INSTANCE));
}
/**
@@ -219,7 +220,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
* @return 应答结果对象,返回符合条件的数据列表。
*/
@PostMapping("/listClassCourse")
public ResponseResult<JSONObject> listClassCourse(
public ResponseResult<MyPageData<CourseDto>> listClassCourse(
@MyRequestBody Long classId,
@MyRequestBody("courseFilter") CourseDto courseDtoFilter,
@MyRequestBody MyOrderParam orderParam,
@@ -237,8 +238,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
String orderBy = MyOrderParam.buildOrderBy(orderParam, Course.class);
List<Course> courseList =
courseService.getCourseListByClassId(classId, filter, orderBy);
JSONObject responseData = MyPageUtil.makeResponseData(courseList, Course.INSTANCE);
return ResponseResult.success(responseData);
return ResponseResult.success(MyPageUtil.makeResponseData(courseList, Course.INSTANCE));
}
/**
@@ -344,7 +344,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
* @return 应答结果对象,返回符合条件的数据列表。
*/
@PostMapping("/listNotInClassStudent")
public ResponseResult<JSONObject> listNotInClassStudent(
public ResponseResult<MyPageData<StudentDto>> listNotInClassStudent(
@MyRequestBody Long classId,
@MyRequestBody("studentFilter") StudentDto studentDtoFilter,
@MyRequestBody MyOrderParam orderParam,
@@ -362,8 +362,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
String orderBy = MyOrderParam.buildOrderBy(orderParam, Student.class);
List<Student> studentList =
studentService.getNotInStudentListByClassId(classId, filter, orderBy);
JSONObject responseData = MyPageUtil.makeResponseData(studentList, Student.INSTANCE);
return ResponseResult.success(responseData);
return ResponseResult.success(MyPageUtil.makeResponseData(studentList, Student.INSTANCE));
}
/**
@@ -376,7 +375,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
* @return 应答结果对象,返回符合条件的数据列表。
*/
@PostMapping("/listClassStudent")
public ResponseResult<JSONObject> listClassStudent(
public ResponseResult<MyPageData<StudentDto>> listClassStudent(
@MyRequestBody Long classId,
@MyRequestBody("studentFilter") StudentDto studentDtoFilter,
@MyRequestBody MyOrderParam orderParam,
@@ -394,8 +393,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
String orderBy = MyOrderParam.buildOrderBy(orderParam, Student.class);
List<Student> studentList =
studentService.getStudentListByClassId(classId, filter, orderBy);
JSONObject responseData = MyPageUtil.makeResponseData(studentList, Student.INSTANCE);
return ResponseResult.success(responseData);
return ResponseResult.success(MyPageUtil.makeResponseData(studentList, Student.INSTANCE));
}
/**
@@ -456,6 +454,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
* @param withDict 是否包含字典关联。
* @return 应答结果对象,包含主对象集合。
*/
@ApiOperation(hidden = true, value = "listByIds")
@PostMapping("/listByIds")
public ResponseResult<List<StudentClassDto>> listByIds(
@RequestParam Set<Long> classIds, @RequestParam Boolean withDict) {
@@ -469,6 +468,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
* @param withDict 是否包含字典关联。
* @return 应答结果对象,包含主对象数据。
*/
@ApiOperation(hidden = true, value = "getById")
@PostMapping("/getById")
public ResponseResult<StudentClassDto> getById(
@RequestParam Long classId, @RequestParam Boolean withDict) {
@@ -481,6 +481,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
* @param classIds 主键Id集合。
* @return 应答结果对象包含true全部存在否则false。
*/
@ApiOperation(hidden = true, value = "existIds")
@PostMapping("/existIds")
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> classIds) {
return super.baseExistIds(classIds);
@@ -492,6 +493,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
* @param classId 主键Id。
* @return 应答结果对象包含true表示存在否则false。
*/
@ApiOperation(hidden = true, value = "existId")
@PostMapping("/existId")
public ResponseResult<Boolean> existId(@RequestParam Long classId) {
return super.baseExistId(classId);
@@ -503,6 +505,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
* @param queryParam 查询参数。
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
*/
@ApiOperation(hidden = true, value = "listBy")
@PostMapping("/listBy")
public ResponseResult<List<StudentClassDto>> listBy(@RequestBody MyQueryParam queryParam) {
return super.baseListBy(queryParam, StudentClass.INSTANCE);
@@ -514,6 +517,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
* @param queryParam 查询参数。
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
*/
@ApiOperation(hidden = true, value = "listMapBy")
@PostMapping("/listMapBy")
public ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
return super.baseListMapBy(queryParam, StudentClass.INSTANCE);
@@ -525,6 +529,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
* @param queryParam 查询参数。
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
*/
@ApiOperation(hidden = true, value = "getBy")
@PostMapping("/getBy")
public ResponseResult<StudentClassDto> getBy(@RequestBody MyQueryParam queryParam) {
return super.baseGetBy(queryParam, StudentClass.INSTANCE);
@@ -536,6 +541,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
* @param queryParam 查询参数。
* @return 应答结果对象,包含结果数量。
*/
@ApiOperation(hidden = true, value = "countBy")
@PostMapping("/countBy")
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
return super.baseCountBy(queryParam);
@@ -547,6 +553,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
* @param aggregationParam 聚合参数。
* @return 应该结果对象包含聚合计算后的分组Map列表。
*/
@ApiOperation(hidden = true, value = "aggregateBy")
@PostMapping("/aggregateBy")
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
return super.baseAggregateBy(aggregationParam);

View File

@@ -1,7 +1,6 @@
package com.orange.demo.courseclassservice.controller;
import cn.jimmyshi.beanquery.BeanQuery;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.Page;
import com.github.pagehelper.page.PageMethod;
import com.orange.demo.courseclassservice.model.*;
@@ -14,6 +13,9 @@ 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;
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -25,8 +27,9 @@ import java.util.*;
* 学生数据操作控制器类。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Api(tags = "学生数据管理接口")
@Slf4j
@RestController
@RequestMapping("/student")
@@ -46,8 +49,15 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
* @param studentDto 新增对象。
* @return 应答结果对象包含新增对象主键Id。
*/
@ApiOperationSupport(ignoreParameters = {
"student.studentId",
"student.searchString",
"student.birthdayStart",
"student.birthdayEnd",
"student.registerTimeStart",
"student.registerTimeEnd"})
@PostMapping("/add")
public ResponseResult<JSONObject> add(@MyRequestBody("student") StudentDto studentDto) {
public ResponseResult<Long> add(@MyRequestBody("student") StudentDto studentDto) {
String errorMessage = MyCommonUtil.getModelValidationError(studentDto);
if (errorMessage != null) {
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
@@ -60,9 +70,7 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
}
student = studentService.saveNew(student);
JSONObject responseData = new JSONObject();
responseData.put("studentId", student.getStudentId());
return ResponseResult.success(responseData);
return ResponseResult.success(student.getStudentId());
}
/**
@@ -71,6 +79,12 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
* @param studentDto 更新对象。
* @return 应答结果对象。
*/
@ApiOperationSupport(ignoreParameters = {
"student.searchString",
"student.birthdayStart",
"student.birthdayEnd",
"student.registerTimeStart",
"student.registerTimeEnd"})
@PostMapping("/update")
public ResponseResult<Void> update(@MyRequestBody("student") StudentDto studentDto) {
String errorMessage = MyCommonUtil.getModelValidationError(studentDto, Default.class, UpdateGroup.class);
@@ -131,7 +145,7 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
* @return 应答结果对象,包含查询结果集。
*/
@PostMapping("/list")
public ResponseResult<JSONObject> list(
public ResponseResult<MyPageData<StudentDto>> list(
@MyRequestBody("studentFilter") StudentDto studentDtoFilter,
@MyRequestBody MyOrderParam orderParam,
@MyRequestBody MyPageParam pageParam) {
@@ -193,6 +207,7 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
* @param withDict 是否包含字典关联。
* @return 应答结果对象,包含主对象集合。
*/
@ApiOperation(hidden = true, value = "listByIds")
@PostMapping("/listByIds")
public ResponseResult<List<StudentDto>> listByIds(
@RequestParam Set<Long> studentIds, @RequestParam Boolean withDict) {
@@ -206,6 +221,7 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
* @param withDict 是否包含字典关联。
* @return 应答结果对象,包含主对象数据。
*/
@ApiOperation(hidden = true, value = "getById")
@PostMapping("/getById")
public ResponseResult<StudentDto> getById(
@RequestParam Long studentId, @RequestParam Boolean withDict) {
@@ -218,6 +234,7 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
* @param studentIds 主键Id集合。
* @return 应答结果对象包含true全部存在否则false。
*/
@ApiOperation(hidden = true, value = "existIds")
@PostMapping("/existIds")
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> studentIds) {
return super.baseExistIds(studentIds);
@@ -229,6 +246,7 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
* @param studentId 主键Id。
* @return 应答结果对象包含true表示存在否则false。
*/
@ApiOperation(hidden = true, value = "existId")
@PostMapping("/existId")
public ResponseResult<Boolean> existId(@RequestParam Long studentId) {
return super.baseExistId(studentId);
@@ -240,6 +258,7 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
* @param queryParam 查询参数。
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
*/
@ApiOperation(hidden = true, value = "listBy")
@PostMapping("/listBy")
public ResponseResult<List<StudentDto>> listBy(@RequestBody MyQueryParam queryParam) {
return super.baseListBy(queryParam, Student.INSTANCE);
@@ -251,6 +270,7 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
* @param queryParam 查询参数。
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
*/
@ApiOperation(hidden = true, value = "listMapBy")
@PostMapping("/listMapBy")
public ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
return super.baseListMapBy(queryParam, Student.INSTANCE);
@@ -262,6 +282,7 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
* @param queryParam 查询参数。
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
*/
@ApiOperation(hidden = true, value = "getBy")
@PostMapping("/getBy")
public ResponseResult<StudentDto> getBy(@RequestBody MyQueryParam queryParam) {
return super.baseGetBy(queryParam, Student.INSTANCE);
@@ -273,6 +294,7 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
* @param queryParam 查询参数。
* @return 应答结果对象,包含结果数量。
*/
@ApiOperation(hidden = true, value = "countBy")
@PostMapping("/countBy")
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
return super.baseCountBy(queryParam);
@@ -284,6 +306,7 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
* @param aggregationParam 聚合参数。
* @return 应该结果对象包含聚合计算后的分组Map列表。
*/
@ApiOperation(hidden = true, value = "aggregateBy")
@PostMapping("/aggregateBy")
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
return super.baseAggregateBy(aggregationParam);

View File

@@ -7,7 +7,7 @@ import com.orange.demo.courseclassservice.model.AreaCode;
* 行政区划数据操作访问接口。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
public interface AreaCodeMapper extends BaseDaoMapper<AreaCode> {
}

View File

@@ -7,7 +7,7 @@ import com.orange.demo.courseclassservice.model.ClassCourse;
* 数据操作访问接口。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
public interface ClassCourseMapper extends BaseDaoMapper<ClassCourse> {
}

View File

@@ -7,7 +7,7 @@ import com.orange.demo.courseclassservice.model.ClassStudent;
* 数据操作访问接口。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
public interface ClassStudentMapper extends BaseDaoMapper<ClassStudent> {
}

View File

@@ -10,7 +10,7 @@ import java.util.*;
* 课程数据数据操作访问接口。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
public interface CourseMapper extends BaseDaoMapper<Course> {

View File

@@ -7,7 +7,7 @@ import com.orange.demo.courseclassservice.model.Grade;
* 年级数据操作访问接口。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
public interface GradeMapper extends BaseDaoMapper<Grade> {
}

View File

@@ -7,7 +7,7 @@ import com.orange.demo.courseclassservice.model.MaterialEdition;
* 数据操作访问接口。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
public interface MaterialEditionMapper extends BaseDaoMapper<MaterialEdition> {
}

View File

@@ -10,7 +10,7 @@ import java.util.*;
* 校区数据数据操作访问接口。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
public interface SchoolInfoMapper extends BaseDaoMapper<SchoolInfo> {

View File

@@ -10,7 +10,7 @@ import java.util.*;
* 班级数据数据操作访问接口。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
public interface StudentClassMapper extends BaseDaoMapper<StudentClass> {

View File

@@ -10,7 +10,7 @@ import java.util.*;
* 学生数据数据操作访问接口。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
public interface StudentMapper extends BaseDaoMapper<Student> {

View File

@@ -68,7 +68,7 @@
</if>
<include refid="filterRef"/>
</where>
<if test="orderBy != null">
<if test="orderBy != null and orderBy != ''">
ORDER BY ${orderBy}
</if>
</select>
@@ -98,7 +98,7 @@
AND zz_class_course.course_id = zz_course.course_id
<include refid="filterRef"/>
</where>
<if test="orderBy != null">
<if test="orderBy != null and orderBy != ''">
ORDER BY ${orderBy}
</if>
</select>
@@ -113,7 +113,7 @@
WHERE zz_class_course.class_id = #{classId} AND zz_class_course.course_id = zz_course.course_id)
<include refid="filterRef"/>
</where>
<if test="orderBy != null">
<if test="orderBy != null and orderBy != ''">
ORDER BY ${orderBy}
</if>
</select>

View File

@@ -34,7 +34,7 @@
</if>
<include refid="filterRef"/>
</where>
<if test="orderBy != null">
<if test="orderBy != null and orderBy != ''">
ORDER BY ${orderBy}
</if>
</select>

View File

@@ -39,7 +39,7 @@
</if>
<include refid="filterRef"/>
</where>
<if test="orderBy != null">
<if test="orderBy != null and orderBy != ''">
ORDER BY ${orderBy}
</if>
</select>

View File

@@ -69,7 +69,7 @@
</if>
<include refid="filterRef"/>
</where>
<if test="orderBy != null">
<if test="orderBy != null and orderBy != ''">
ORDER BY ${orderBy}
</if>
</select>
@@ -98,7 +98,7 @@
AND zz_class_student.student_id = zz_student.student_id
<include refid="filterRef"/>
</where>
<if test="orderBy != null">
<if test="orderBy != null and orderBy != ''">
ORDER BY ${orderBy}
</if>
</select>
@@ -113,7 +113,7 @@
WHERE zz_class_student.class_id = #{classId} AND zz_class_student.student_id = zz_student.student_id)
<include refid="filterRef"/>
</where>
<if test="orderBy != null">
<if test="orderBy != null and orderBy != ''">
ORDER BY ${orderBy}
</if>
</select>

View File

@@ -8,7 +8,7 @@ import javax.persistence.*;
* 行政区划实体对象。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Data
@Table(name = "zz_area_code")

View File

@@ -8,7 +8,7 @@ import javax.validation.constraints.*;
* ClassCourse实体对象。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Data
@Table(name = "zz_class_course")

View File

@@ -8,7 +8,7 @@ import javax.validation.constraints.*;
* ClassStudent实体对象。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Data
@Table(name = "zz_class_student")

View File

@@ -23,7 +23,7 @@ import java.util.Map;
* Course实体对象。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Data
@Table(name = "zz_course")

View File

@@ -10,7 +10,7 @@ import javax.validation.constraints.*;
* Grade实体对象。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Data
@Table(name = "zz_grade")

View File

@@ -8,7 +8,7 @@ import javax.validation.constraints.*;
* MaterialEdition实体对象。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Data
@Table(name = "zz_material_edition")

View File

@@ -15,7 +15,7 @@ import java.util.Map;
* SchoolInfo实体对象。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Data
@Table(name = "zz_school_info")

View File

@@ -21,7 +21,7 @@ import java.util.Map;
* Student实体对象。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Data
@Table(name = "zz_student")

View File

@@ -21,7 +21,7 @@ import java.util.Map;
* StudentClass实体对象。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Data
@Table(name = "zz_class")

View File

@@ -17,7 +17,7 @@ import java.util.List;
* 行政区划的Service类。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Service
public class AreaCodeService extends BaseDictService<AreaCode, AreaCodeDto, Long> {

View File

@@ -21,7 +21,7 @@ import java.util.*;
* 课程数据数据操作服务类。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Service
public class CourseService extends BaseService<Course, CourseDto, Long> {

View File

@@ -18,7 +18,7 @@ import javax.annotation.PostConstruct;
* 年级数据操作服务类。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Service
public class GradeService extends BaseDictService<Grade, GradeDto, Integer> {

View File

@@ -20,7 +20,7 @@ import java.util.*;
* 校区数据数据操作服务类。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Service
public class SchoolInfoService extends BaseService<SchoolInfo, SchoolInfoDto, Long> {
@@ -77,7 +77,6 @@ public class SchoolInfoService extends BaseService<SchoolInfo, SchoolInfoDto, Lo
@Transactional(rollbackFor = Exception.class)
public boolean remove(Long schoolId) {
return schoolInfoMapper.deleteByPrimaryKey(schoolId) != 0;
// 这里可继续删除关联数据。
}
/**

View File

@@ -23,7 +23,7 @@ import java.util.*;
* 班级数据数据操作服务类。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Service
public class StudentClassService extends BaseService<StudentClass, StudentClassDto, Long> {
@@ -102,7 +102,6 @@ public class StudentClassService extends BaseService<StudentClass, StudentClassD
if (studentClassMapper.updateByExampleSelective(deletedObject, studentClassExample) == 0) {
return false;
}
// 这里可继续删除关联数据。
// 开始删除多对多子表的关联
ClassCourse classCourse = new ClassCourse();
classCourse.setClassId(classId);

View File

@@ -21,7 +21,7 @@ import java.util.*;
* 学生数据数据操作服务类。
*
* @author Jerry
* @date 2020-10-19
* @date 2020-08-08
*/
@Service
public class StudentService extends BaseService<Student, StudentDto, Long> {

View File

@@ -59,6 +59,9 @@
<Root level="${OUTPUT_LOG_LEVEL}">
<AppenderRef ref="console"/>
</Root>
<Logger name="springfox.documentation" additivity="false" level="error">
<AppenderRef ref="console"/>
</Logger>
<!-- AsyncLogger 是基于Disruptor的全量异步队列性能极高队列默认大小4096。-->
<!-- 队列默认值可通过JVM参数设置参考博客https://www.jianshu.com/p/82469047acbf -->
<AsyncLogger name="com.orange.demo" additivity="false" level="info">