diff --git a/JAVA_MYSQL_WEBSITE/.idea/workspace.xml b/JAVA_MYSQL_WEBSITE/.idea/workspace.xml
index af83bcc..0ecf253 100644
--- a/JAVA_MYSQL_WEBSITE/.idea/workspace.xml
+++ b/JAVA_MYSQL_WEBSITE/.idea/workspace.xml
@@ -5,9 +5,8 @@
-
-
+
@@ -38,26 +37,26 @@
- {
- "keyToString": {
- "RequestMappingsPanelOrder0": "0",
- "RequestMappingsPanelOrder1": "1",
- "RequestMappingsPanelWidth0": "75",
- "RequestMappingsPanelWidth1": "75",
- "RunOnceActivity.OpenProjectViewOnStart": "true",
- "RunOnceActivity.ShowReadmeOnStart": "true",
- "SHARE_PROJECT_CONFIGURATION_FILES": "true",
- "WebServerToolWindowFactoryState": "false",
- "last_opened_file_path": "F:/02.FNSProject/JAVA_MYSQL_HCJXJY",
- "settings.editor.selected.configurable": "web.server",
- "spring.configuration.checksum": "420f802bde281311b05da23e05cddeda"
+
+}]]>
@@ -100,7 +99,8 @@
-
+
+
1730470371982
@@ -123,7 +123,14 @@
1730775248145
-
+
+ 1730787454245
+
+
+
+ 1730787454245
+
+
@@ -132,6 +139,7 @@
-
+
+
\ No newline at end of file
diff --git a/JAVA_MYSQL_WEBSITE/gp-business/src/main/resources/mapper/WebNewsMapper.xml b/JAVA_MYSQL_WEBSITE/gp-business/src/main/resources/mapper/WebNewsMapper.xml
index 580536c..7837a6f 100644
--- a/JAVA_MYSQL_WEBSITE/gp-business/src/main/resources/mapper/WebNewsMapper.xml
+++ b/JAVA_MYSQL_WEBSITE/gp-business/src/main/resources/mapper/WebNewsMapper.xml
@@ -31,6 +31,7 @@
news_id,
news_title,
news_logo,
+ news_content,
module_id,
type_id,
flag,
diff --git a/JAVA_MYSQL_ZC/HELP.md b/JAVA_MYSQL_ZC/HELP.md
new file mode 100644
index 0000000..326da52
--- /dev/null
+++ b/JAVA_MYSQL_ZC/HELP.md
@@ -0,0 +1,10 @@
+# Getting Started
+
+### Reference Documentation
+For further reference, please consider the following sections:
+
+* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
+* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.2.11.RELEASE/maven-plugin/)
+* [Spring Configuration Processor](https://docs.spring.io/spring-boot/docs/2.3.5.RELEASE/reference/htmlsingle/#configuration-metadata-annotation-processor)
+* [Spring Boot DevTools](https://docs.spring.io/spring-boot/docs/2.3.5.RELEASE/reference/htmlsingle/#using-boot-devtools)
+
diff --git a/JAVA_MYSQL_ZC/jxjy-business/jxjy-business.iml b/JAVA_MYSQL_ZC/jxjy-business/jxjy-business.iml
new file mode 100644
index 0000000..978e2f4
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/jxjy-business.iml
@@ -0,0 +1,115 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/pom.xml b/JAVA_MYSQL_ZC/jxjy-business/pom.xml
new file mode 100644
index 0000000..593e516
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/pom.xml
@@ -0,0 +1,44 @@
+
+
+ 4.0.0
+
+ com.hc
+ jxjy-education
+ 0.0.1-SNAPSHOT
+
+
+ jxjy-business
+ 0.0.1-SNAPSHOT
+ jxjy-business
+ Demo project for Spring Boot
+
+
+ 11
+ 1.2.5
+
+
+
+
+
+ com.hc
+ jxjy-core
+ 0.0.1-SNAPSHOT
+
+
+
+ com.github.pagehelper
+ pagehelper-spring-boot-starter
+ ${pagehelper.version}
+
+
+ mybatis-spring-boot-starter
+ org.mybatis.spring.boot
+
+
+
+
+
+
+
+
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/ClassCourseDto.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/ClassCourseDto.java
new file mode 100644
index 0000000..15e19d9
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/ClassCourseDto.java
@@ -0,0 +1,35 @@
+package com.hc.business.dto;
+
+import lombok.Getter;
+
+/**
+ * @author 10696
+ * @since 2020/11/25 10:41
+ */
+@Getter
+public class ClassCourseDto {
+
+ private Integer classCourseId;
+
+ private Integer classId;
+
+ private Integer courseId;
+
+ private Integer courseType;
+
+ private String courseName;
+
+ private String courseLogo;
+
+ private String courseDesc;
+
+ private Float courseHours;
+
+ private String courseTeacher;
+
+ private Integer isValid;
+
+ private String gallery;
+
+ private Integer reserved1;
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/CourseVideoDto.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/CourseVideoDto.java
new file mode 100644
index 0000000..dee944e
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/CourseVideoDto.java
@@ -0,0 +1,16 @@
+package com.hc.business.dto;
+
+import com.hc.business.model.CourseChapterVideo;
+import com.hc.business.model.UserVideoPosition;
+import lombok.Data;
+
+/**
+ * @author 10696
+ * @since 2020/11/25 10:41
+ */
+@Data
+public class CourseVideoDto {
+
+ private CourseChapterVideo video;
+ private UserVideoPosition position;
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/OrderInvoicesDto.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/OrderInvoicesDto.java
new file mode 100644
index 0000000..5a95936
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/OrderInvoicesDto.java
@@ -0,0 +1,62 @@
+package com.hc.business.dto;
+
+import lombok.Getter;
+import lombok.ToString;
+
+/**
+ * @author 10696
+ */
+@Getter
+@ToString
+public class OrderInvoicesDto {
+
+ private Integer ordersId;
+
+ private String orderNo;
+
+ private Integer userId;
+
+ private Integer classId;
+
+ private Integer orderStatus;
+
+ private String body;
+
+ private String subject;
+
+ private Double totalAmount;
+
+ private Long createTime;
+
+ private Long overTime;
+
+ private String remark;
+
+ private Integer isDe;
+
+ private Integer userInvoicesId;
+
+ private String invoicesHead;
+
+ private Integer invoicesType;
+
+ private String invoicesCode;
+
+ private String invoicesBank;
+
+ private String invoicesUser;
+
+ private String invoicesNo;
+
+ private Double invoicesPrice;
+
+ private Integer status;
+
+ private Long time;
+
+ private String remarks;
+
+ private String remarksSign;
+
+ private String taxCode;
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/PaperAnswer.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/PaperAnswer.java
new file mode 100644
index 0000000..9e508a8
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/PaperAnswer.java
@@ -0,0 +1,27 @@
+package com.hc.business.dto;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class PaperAnswer implements Serializable{
+
+ private Integer questionId;
+
+ private List answerId;
+
+ public Integer getQuestionId() {
+ return questionId;
+ }
+
+ public void setQuestionId(Integer questionId) {
+ this.questionId = questionId;
+ }
+
+ public List getAnswerId() {
+ return answerId;
+ }
+
+ public void setAnswerId(List answerId) {
+ this.answerId = answerId;
+ }
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/PaperCommitDTO.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/PaperCommitDTO.java
new file mode 100644
index 0000000..b236058
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/PaperCommitDTO.java
@@ -0,0 +1,26 @@
+package com.hc.business.dto;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.List;
+
+@Data
+public class PaperCommitDTO implements Serializable {
+
+ @NotNull(message = "用户id不可以为空")
+ private Integer userId;
+
+ @NotNull(message = "试卷id不可以为空")
+ private Integer paperId;
+
+ @NotNull(message = "班次id不可以为空")
+ private Integer classId;
+
+ @NotNull(message = "考试时间不可以为空")
+ private String testTime;
+
+ private List answerList;
+
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/PaperResultDto.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/PaperResultDto.java
new file mode 100644
index 0000000..c68ce7c
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/PaperResultDto.java
@@ -0,0 +1,19 @@
+package com.hc.business.dto;
+
+import com.hc.business.model.Paper;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author 10696
+ */
+
+@Data
+public class PaperResultDto {
+
+ private Paper paper;
+
+ private List questionTypeDtoList;
+
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/QuestionTypeDto.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/QuestionTypeDto.java
new file mode 100644
index 0000000..9a15d32
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/QuestionTypeDto.java
@@ -0,0 +1,16 @@
+package com.hc.business.dto;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author 10696
+ */
+@Data
+public class QuestionTypeDto {
+
+ private String typeName;
+
+ private List questionList;
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/RetrievePasswordDto.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/RetrievePasswordDto.java
new file mode 100644
index 0000000..b1c807b
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/RetrievePasswordDto.java
@@ -0,0 +1,34 @@
+package com.hc.business.dto;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author JIA
+ */
+
+@Data
+public class RetrievePasswordDto {
+
+ @NotNull(message = "手机号不可以为空")
+ private String userMobile;
+
+ @NotNull(message = "短信回执不可以为空")
+ private String sessionId;
+
+ @NotNull(message = "验证码不可以为空")
+ private String code;
+
+ @NotNull(message = "新密码不可以为空")
+ private String password;
+
+ private String userName;
+
+ private String userGender;
+
+ private String userCompany;
+
+ private String userEmail;
+
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/SmsLoginDto.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/SmsLoginDto.java
new file mode 100644
index 0000000..f429908
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/SmsLoginDto.java
@@ -0,0 +1,23 @@
+package com.hc.business.dto;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author JIA
+ */
+
+@Data
+public class SmsLoginDto {
+
+ @NotNull(message = "手机号不可以为空")
+ private String userMobile;
+
+ @NotNull(message = "短信回执不可以为空")
+ private String sessionId;
+
+ @NotNull(message = "验证码不可以为空")
+ private String code;
+
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/StaTimeTable.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/StaTimeTable.java
new file mode 100644
index 0000000..4f92735
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/StaTimeTable.java
@@ -0,0 +1,17 @@
+package com.hc.business.dto;
+
+import lombok.Data;
+
+/**
+ * @author 10696
+ * @since 2021/1/22 11:44
+ */
+
+@Data
+public class StaTimeTable {
+
+ private String clickDate;
+
+ private Integer countCreate;
+
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/ThirdCourseBack.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/ThirdCourseBack.java
new file mode 100644
index 0000000..1f0a842
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/ThirdCourseBack.java
@@ -0,0 +1,48 @@
+package com.hc.business.dto;
+
+import lombok.Data;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import java.io.Serializable;
+
+/**
+ * 第三方用户课程配置表(ThirdCourse)实体类
+ *
+ * @author java
+ * @since 2020-06-17 17:29:30
+ */
+
+@Data
+public class ThirdCourseBack implements Serializable {
+
+ private static final long serialVersionUID = 819515458055433747L;
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ private Integer id;
+ /**
+ * 第三方用户ID
+ */
+ private Integer thirdId;
+ /**
+ * 课程ID
+ */
+ private Integer courseId;
+ /**
+ * 是否有效,默认有效
+ */
+ private Integer status;
+ /**
+ * 配置时间
+ */
+ private Long createTime = System.currentTimeMillis();
+
+
+ private String courseName;
+ private String courseLogo;
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/ThirdCourseDto.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/ThirdCourseDto.java
new file mode 100644
index 0000000..356fb11
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/ThirdCourseDto.java
@@ -0,0 +1,24 @@
+package com.hc.business.dto;
+
+import com.hc.business.model.Course;
+import com.hc.business.model.CourseChapterVideo;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author 10696
+ */
+
+@Data
+public class ThirdCourseDto implements Serializable {
+
+ private static final long serialVersionUID = -570784181035882992L;
+
+ private Course course;
+
+ private List courseChapterVideoList;
+
+
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/TypeCourseDto.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/TypeCourseDto.java
new file mode 100644
index 0000000..69ddb92
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/TypeCourseDto.java
@@ -0,0 +1,29 @@
+package com.hc.business.dto;
+
+import lombok.Getter;
+
+
+/**
+ * 用户课程表(TypeCourse)实体类
+ *
+ * @author java
+ * @since 2020-11-09 10:05:18
+ */
+@Getter
+public class TypeCourseDto {
+
+ private Integer courseTypeReId;
+
+
+ private Integer courseId;
+
+
+ private String courseName;
+
+ private String courseLogo;
+
+
+ private Integer courseHours;
+ private String courseTeacher;
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/UserCourseDto.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/UserCourseDto.java
new file mode 100644
index 0000000..ecd134b
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/UserCourseDto.java
@@ -0,0 +1,53 @@
+package com.hc.business.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * 用户课程表(UserCourse)实体类
+ *
+ * @author java
+ * @since 2020-11-09 10:05:18
+ */
+@Getter
+public class UserCourseDto {
+
+ private Integer userCourseId;
+
+ private Integer userId;
+
+ private Integer courseId;
+
+ private Double coursePercent;
+
+ private String years;
+
+ private Integer classId;
+
+ private String courseName;
+
+ private String courseLogo;
+
+ private Integer courseType;
+
+ private Integer courseHours;
+ private String courseTeacher;
+
+// private String courseDesc;
+
+ // private Float courseHours;
+
+ //private String courseTeacher;
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/UserListDto.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/UserListDto.java
new file mode 100644
index 0000000..b1ba12d
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/UserListDto.java
@@ -0,0 +1,59 @@
+package com.hc.business.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Getter;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.Email;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * 用户表(User)实体类
+ *
+ * @author java
+ * @since 2020-11-09 10:04:13
+ */
+@Getter
+public class UserListDto implements Serializable {
+
+
+
+ private Integer userId;
+
+
+ private Integer userType;
+
+
+ private String userName;
+
+ private String userMobile;
+
+ private String userEmail;
+
+ private String userGender;
+
+
+ private String userCompany;
+
+ ///订单编号
+ private long orderNumber;
+ //支付状态
+ private int orderStatus;
+ //支付时间
+ private long orderTime;
+
+ //标题
+ private String className;
+
+ //备注
+ private String userReserved;
+
+
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/UserPriceTotal.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/UserPriceTotal.java
new file mode 100644
index 0000000..b4f4dff
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/UserPriceTotal.java
@@ -0,0 +1,23 @@
+package com.hc.business.dto;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * @author 10696
+ * @since 2021/1/26 10:51
+ */
+
+@Data
+public class UserPriceTotal {
+
+ private BigDecimal totalUserCount;
+
+ private BigDecimal todayUserCount;
+
+ private BigDecimal monthUserCount;
+
+ private BigDecimal yearUserCount;
+
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/UserStatusClassDto.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/UserStatusClassDto.java
new file mode 100644
index 0000000..3b576e4
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/UserStatusClassDto.java
@@ -0,0 +1,45 @@
+package com.hc.business.dto;
+
+import lombok.Getter;
+
+/**
+ * @author 10696
+ * @since 2020/12/6 11:50
+ */
+
+@Getter
+public class UserStatusClassDto {
+
+ private Integer statusId;
+
+ private String className;
+
+ private Float totalHours;
+
+ private Long applyStartTime;
+
+ private Long applyEndTime;
+
+ private Long studyStartTime;
+
+ private Long studyEndTime;
+
+ private Long paperStartTime;
+
+ private Long paperEndTime;
+
+ private Long certStartTime;
+
+ private Long certEndTime;
+
+ private Integer classConfigId;
+
+ private Integer needPaper;
+
+ private Integer paperId;
+
+ private Integer userId;
+
+ private Integer status;
+
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/UserTimeTotal.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/UserTimeTotal.java
new file mode 100644
index 0000000..21fcec7
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/UserTimeTotal.java
@@ -0,0 +1,21 @@
+package com.hc.business.dto;
+
+import lombok.Data;
+
+/**
+ * @author 10696
+ * @since 2021/1/22 13:30
+ */
+
+@Data
+public class UserTimeTotal {
+
+ private Integer totalUserCount;
+
+ private Integer todayUserCount;
+
+ private Integer monthUserCount;
+
+ private Integer yearUserCount;
+
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/AreaDistrictMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/AreaDistrictMapper.java
new file mode 100644
index 0000000..86b4e60
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/AreaDistrictMapper.java
@@ -0,0 +1,27 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.AreaDistrict;
+import com.hc.core.utils.mapper.Mapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * 省份表(AreaDistrict)表数据库访问层
+ *
+ * @author java
+ * @since 2020-11-20 12:48:45
+ */
+
+@Repository
+public interface AreaDistrictMapper extends Mapper {
+
+ /**
+ * 依据parentId获取地区
+ *
+ * @param parentId 父级id
+ * @return 实例对象数组
+ */
+ List queryAllByParentId(Integer parentId);
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/BannerMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/BannerMapper.java
new file mode 100644
index 0000000..53b93d4
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/BannerMapper.java
@@ -0,0 +1,18 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.Banner;
+import com.hc.core.utils.mapper.Mapper;
+import org.springframework.stereotype.Repository;
+
+/**
+ * 广告表
+ * (Banner)表数据库访问层
+ *
+ * @author java
+ * @since 2020-11-26 09:29:48
+ */
+
+@Repository
+public interface BannerMapper extends Mapper {
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/ClassConfigMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/ClassConfigMapper.java
new file mode 100644
index 0000000..0c54e55
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/ClassConfigMapper.java
@@ -0,0 +1,57 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.ClassConfig;
+import com.hc.core.utils.mapper.Mapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * 班次表(ClassConfig)表数据库访问层
+ *
+ * @author java
+ * @since 2020-11-19 16:12:30
+ */
+
+@Repository
+public interface ClassConfigMapper extends Mapper {
+
+ /**
+ * 条件查询培训班
+ *
+ * @param valid 是否上线
+ * @return 实例对象数组
+ */
+ List queryByValid(Integer valid);
+
+ /**
+ * 地区id查询培训班
+ *
+ * @param areaId 地区id
+ * @return 实例对象数组
+ */
+ List queryByAreaId(Integer areaId);
+
+ /**
+ * 培训班名称查询培训班
+ *
+ * @param name 培训班名称
+ * @return 实例对象数组
+ */
+ List queryByClassName(String name);
+
+ /**
+ * 依据开始时间查询班次
+ *
+ * @param studyStartTime
+ * @return
+ */
+ List queryByTime(Long studyStartTime);
+
+ /**
+ * 获取全部的培训班
+ *
+ * @return 实例对象数组
+ */
+ List queryAll();
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/ClassConfigSponsorMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/ClassConfigSponsorMapper.java
new file mode 100644
index 0000000..7906def
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/ClassConfigSponsorMapper.java
@@ -0,0 +1,26 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.ClassConfigSponsor;
+import com.hc.core.utils.mapper.Mapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * (ClassConfigSponsor)表数据库访问层
+ *
+ * @author java
+ * @since 2021-05-28 14:11:29
+ */
+
+@Repository
+public interface ClassConfigSponsorMapper extends Mapper {
+
+ /**
+ * 获取班次主办方信息
+ *
+ * @param classId 班次id
+ * @return 实例对象数组
+ */
+ List queryListByClassId(Integer classId);
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/ClassCourseMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/ClassCourseMapper.java
new file mode 100644
index 0000000..2f44e3b
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/ClassCourseMapper.java
@@ -0,0 +1,42 @@
+package com.hc.business.mapper;
+
+import com.hc.business.dto.ClassCourseDto;
+import com.hc.business.model.ClassCourse;
+import com.hc.core.utils.mapper.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * 班次课程表(ClassCourse)表数据库访问层
+ *
+ * @author java
+ * @since 2020-11-24 11:30:06
+ */
+
+@Repository
+public interface ClassCourseMapper extends Mapper {
+
+ /**
+ * 查询班级课程
+ *
+ * @param classId 班级id
+ * @param courseType 类别
+ * @return 实例对象数组
+ */
+ List queryByClassId(@Param("classId") Integer classId,
+ @Param("courseType") Integer courseType);
+
+ /**
+ * 查询重复课程
+ *
+ * @param classId 班级id
+ * @param courseId 课程id
+ * @return 实例对象数组
+ */
+ List queryByClassIdWithCourseId(@Param("classId") Integer classId,
+ @Param("courseId") Integer courseId);
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseChapterAnnexMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseChapterAnnexMapper.java
new file mode 100644
index 0000000..3a9995b
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseChapterAnnexMapper.java
@@ -0,0 +1,17 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.CourseChapterAnnex;
+import com.hc.core.utils.mapper.Mapper;
+import org.springframework.stereotype.Repository;
+
+/**
+ * 章节附件表(CourseChapterAnnex)表数据库访问层
+ *
+ * @author java
+ * @since 2020-11-09 10:04:49
+ */
+
+@Repository
+public interface CourseChapterAnnexMapper extends Mapper {
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseChapterMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseChapterMapper.java
new file mode 100644
index 0000000..2649c3d
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseChapterMapper.java
@@ -0,0 +1,28 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.CourseChapter;
+import org.springframework.stereotype.Repository;
+import com.hc.core.utils.mapper.Mapper;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 课程章节表(CourseChapter)表数据库访问层
+ *
+ * @author java
+ * @since 2020-11-09 10:04:47
+ */
+
+
+@Repository
+public interface CourseChapterMapper extends Mapper {
+
+ /**
+ * 改版 william
+ *
+ * @param map
+ * @return
+ */
+ List getCourseChapterChildList(Map map);
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseChapterTagMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseChapterTagMapper.java
new file mode 100644
index 0000000..5427cc3
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseChapterTagMapper.java
@@ -0,0 +1,17 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.CourseChapterTag;
+import org.springframework.stereotype.Repository;
+import com.hc.core.utils.mapper.Mapper;
+
+/**
+ * 图书章节标签表。新建完成的图书章节,可以根据讲师不同,给不同的章节打标签,比如基础阶段,进阶阶段。。。(CourseChapterTag)表数据库访问层
+ *
+ * @author java
+ * @since 2020-11-09 10:04:51
+ */
+
+@Repository
+public interface CourseChapterTagMapper extends Mapper {
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseChapterTestMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseChapterTestMapper.java
new file mode 100644
index 0000000..531485d
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseChapterTestMapper.java
@@ -0,0 +1,17 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.CourseChapterTest;
+import org.springframework.stereotype.Repository;
+import com.hc.core.utils.mapper.Mapper;
+
+/**
+ * 章节测试表/随堂练习表(CourseChapterTest)表数据库访问层
+ *
+ * @author java
+ * @since 2020-11-09 10:04:53
+ */
+
+@Repository
+public interface CourseChapterTestMapper extends Mapper {
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseChapterVideoMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseChapterVideoMapper.java
new file mode 100644
index 0000000..e826249
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseChapterVideoMapper.java
@@ -0,0 +1,35 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.CourseChapterVideo;
+import org.springframework.stereotype.Repository;
+import com.hc.core.utils.mapper.Mapper;
+
+import java.util.List;
+
+/**
+ * 课程视频(CourseChapterVideo)表数据库访问层
+ *
+ * @author java
+ * @since 2020-11-09 10:04:55
+ */
+
+@Repository
+public interface CourseChapterVideoMapper extends Mapper {
+
+ /**
+ * 获取章节下的所有视频
+ *
+ * @param chapterId 章节id
+ * @return 实例对象数组
+ */
+ List selectVideoByChapterId(Integer chapterId);
+
+ /**
+ * 获取图书下的所有视频
+ *
+ * @param courseId 课程id
+ * @return 实例对象数组
+ */
+ List selectVideoByCourseId(Integer courseId);
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseMapper.java
new file mode 100644
index 0000000..e6a8739
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseMapper.java
@@ -0,0 +1,50 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.Course;
+import org.springframework.stereotype.Repository;
+import com.hc.core.utils.mapper.Mapper;
+
+import java.util.List;
+
+/**
+ * 课程表(Course)表数据库访问层
+ *
+ * @author java
+ * @since 2020-11-09 10:04:45
+ */
+
+@Repository
+public interface CourseMapper extends Mapper {
+
+ /**
+ * 查询所有的课程分类id
+ *
+ * @param typeId 分类id
+ * @return 实例对象数组
+ */
+ List queryByTypeId(Integer typeId);
+
+ /**
+ * 依据老师名称获取课程
+ *
+ * @param name 老师名称
+ * @return 实例对象数组
+ */
+ List queryTeacherName(String name);
+
+ /**
+ * 依据课程名称获取课程
+ *
+ * @param name 课程名称
+ * @return 实例对象数组
+ */
+ List queryCourseName(String name);
+
+ /**
+ * 获取全部课程
+ *
+ * @param valid 是否上下架
+ * @return 实例对象数组
+ */
+ List queryAll(Integer valid);
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseTypeMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseTypeMapper.java
new file mode 100644
index 0000000..b98987a
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseTypeMapper.java
@@ -0,0 +1,29 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.CourseType;
+import org.springframework.stereotype.Repository;
+import tk.mybatis.mapper.common.Mapper;
+
+import java.util.List;
+
+/**
+ * (CourseType)表数据库访问层
+ *
+ * @author java
+ * @since 2020-12-17 14:12:51
+ */
+
+@Repository
+public interface CourseTypeMapper extends Mapper {
+
+ /**
+ * 查询课程分类
+ *
+ * @param courseName 课程分类名称
+ * @return 实例对象数组
+ */
+ List queryAllByCourseName(String courseName);
+
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseTypeRelationMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseTypeRelationMapper.java
new file mode 100644
index 0000000..8510251
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/CourseTypeRelationMapper.java
@@ -0,0 +1,17 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.CourseTypeRelation;
+import com.hc.core.utils.mapper.Mapper;
+import org.springframework.stereotype.Repository;
+
+/**
+ * (CourseTypeRelation)表数据库访问层
+ *
+ * @author java
+ * @since 2021-02-02 09:25:08
+ */
+
+@Repository
+public interface CourseTypeRelationMapper extends Mapper {
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/NewsMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/NewsMapper.java
new file mode 100644
index 0000000..f61a368
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/NewsMapper.java
@@ -0,0 +1,29 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.News;
+import com.hc.core.utils.mapper.Mapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * 新闻表
+ * (News)表数据库访问层
+ *
+ * @author java
+ * @since 2020-11-20 11:48:36
+ */
+
+@Repository
+public interface NewsMapper extends Mapper {
+
+ /**
+ * 依据标签id查询news
+ *
+ * @param tagId 标签id
+ * @return 实例对象数组
+ */
+ List queryByTagId(Integer tagId);
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/NewsTagMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/NewsTagMapper.java
new file mode 100644
index 0000000..7e3ead5
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/NewsTagMapper.java
@@ -0,0 +1,26 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.NewsTag;
+import com.hc.core.utils.mapper.Mapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * 新闻标签表(NewsTag)表数据库访问层
+ *
+ * @author java
+ * @since 2020-11-20 12:52:32
+ */
+
+@Repository
+public interface NewsTagMapper extends Mapper {
+
+ /**
+ * 分页查询多条数据
+ *
+ * @return 对象列表
+ */
+ List queryAll();
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/OrderUserLogMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/OrderUserLogMapper.java
new file mode 100644
index 0000000..578c663
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/OrderUserLogMapper.java
@@ -0,0 +1,38 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.OrderUserLog;
+import com.hc.core.utils.mapper.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * (OrderUserLog)表数据库访问层
+ *
+ * @author java
+ * @since 2020-12-03 09:25:08
+ */
+
+@Repository
+public interface OrderUserLogMapper extends Mapper {
+
+ /**
+ * 依据订单id查询用户
+ *
+ * @param ordersId 订单id
+ * @return 实例对象数组
+ */
+ List queryByOrderId(Integer ordersId);
+
+ /**
+ * 依据用户id和订单id查询
+ *
+ * @param ordersId 订单id
+ * @param userId 用户id
+ * @return 实例对象数组
+ */
+ List queryByUserIdAndOrderId(@Param("ordersId") Integer ordersId,
+ @Param("userId") Integer userId);
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/OrdersMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/OrdersMapper.java
new file mode 100644
index 0000000..a2b329a
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/OrdersMapper.java
@@ -0,0 +1,112 @@
+package com.hc.business.mapper;
+
+import com.hc.business.dto.OrderInvoicesDto;
+import com.hc.business.model.Orders;
+import com.hc.core.utils.mapper.Mapper;
+import org.springframework.stereotype.Repository;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * 订单表(Orders)表数据库访问层
+ *
+ * @author java
+ * @since 2020-11-26 16:46:42
+ */
+
+@Repository
+public interface OrdersMapper extends Mapper {
+
+ /**
+ * 依据订单编号获取订单信息
+ *
+ * @param orderNo 订单编号
+ * @return 实例对象
+ */
+ Orders queryByOrderNo(String orderNo);
+
+ /**
+ * 依据用户id 查询
+ *
+ * @param userId 用户id
+ * @return 实例对象数组
+ */
+ List queryAllByUserId(Integer userId);
+
+ /**
+ * 用户 查询多条数据
+ *
+ * @param classId 班次id
+ * @return 对象列表
+ */
+ List queryAllByClassId(Integer classId);
+
+ /**
+ * 用户 查询多条数据
+ *
+ * @param className 班次名称
+ * @return 对象列表
+ */
+ List queryAllByClassName(String className);
+
+ /**
+ * 用户 查询多条数据
+ *
+ * @param status 订单状态
+ * @return 对象列表
+ */
+ List queryAllByStatus(Integer status);
+
+ /**
+ * 依据发票id查询
+ *
+ * @param userInvoicesId 发票id
+ * @return 实例对象数组
+ */
+ List queryByUserInvoicesId(Integer userInvoicesId);
+
+ /**
+ * 查询总金额
+ *
+ * @return 实例对象数组
+ */
+ BigDecimal countPrice();
+
+ /**
+ * 当天订单金额
+ *
+ * @return int
+ */
+ BigDecimal queryToday();
+
+ /**
+ * 当月订单金额
+ *
+ * @return int
+ */
+ BigDecimal queryMonth();
+
+ /**
+ * 当年订单金额
+ *
+ * @return int
+ */
+ BigDecimal queryYear();
+
+ /**
+ * 获取订单数量
+ *
+ * @return 实例对象
+ */
+ Integer countOrderTotal();
+
+
+ /**
+ * 查询有效的发票和订单
+ *
+ * @return 实例对象数组
+ */
+ List queryAllWithInvoices();
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/PaperMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/PaperMapper.java
new file mode 100644
index 0000000..49a29ba
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/PaperMapper.java
@@ -0,0 +1,17 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.Paper;
+import com.hc.core.utils.mapper.Mapper;
+import org.springframework.stereotype.Repository;
+
+/**
+ * 试卷表(Paper)表数据库访问层
+ *
+ * @author java
+ * @since 2020-12-07 11:34:34
+ */
+
+@Repository
+public interface PaperMapper extends Mapper {
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/PaperQuestionMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/PaperQuestionMapper.java
new file mode 100644
index 0000000..2b42371
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/PaperQuestionMapper.java
@@ -0,0 +1,27 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.PaperQuestion;
+import com.hc.core.utils.mapper.Mapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * 随机试卷问题表(PaperQuestion)表数据库访问层
+ *
+ * @author java
+ * @since 2020-12-07 11:35:11
+ */
+
+@Repository
+public interface PaperQuestionMapper extends Mapper {
+
+ /**
+ * 依据试卷id获取抽题规则
+ *
+ * @param paperId 试卷id
+ * @return 实例对象数组
+ */
+ List queryByPaperId(Integer paperId);
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/QuestionAnswerMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/QuestionAnswerMapper.java
new file mode 100644
index 0000000..069dde5
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/QuestionAnswerMapper.java
@@ -0,0 +1,34 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.QuestionAnswer;
+import com.hc.core.utils.mapper.Mapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * 问题答案表(QuestionAnswer)表数据库访问层
+ *
+ * @author java
+ * @since 2020-12-07 11:36:19
+ */
+
+@Repository
+public interface QuestionAnswerMapper extends Mapper {
+
+ /**
+ * 获取习题答案
+ *
+ * @param questionId 试题id
+ * @return 实例对象数组
+ */
+ List queryByQuestionId(Integer questionId);
+
+ /**
+ * 依据试题id获取答案id
+ *
+ * @param questionId 试题id
+ * @return 实例对象数组
+ */
+ List selectAnswerIdListByQuestionId(Integer questionId);
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/QuestionMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/QuestionMapper.java
new file mode 100644
index 0000000..c25ac93
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/QuestionMapper.java
@@ -0,0 +1,50 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.Question;
+import com.hc.core.utils.mapper.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * 习题表(Question)表数据库访问层
+ *
+ * @author java
+ * @since 2020-12-07 11:35:55
+ */
+
+@Repository
+public interface QuestionMapper extends Mapper {
+
+
+ /**
+ * 依据主键获取题目
+ *
+ * @param questionId 题目id
+ * @return 实例对象
+ */
+ Question queryById(Integer questionId);
+
+
+ /**
+ * 获取全部习题
+ *
+ * @return 实例对象数组
+ */
+ List queryQuestions();
+
+
+ /**
+ * 获取习题id
+ *
+ * @return 实例对象数组
+ */
+ List queryByTagId(@Param("questionType") Integer questionType,
+ @Param("questionLevel") Integer questionLevel,
+ @Param("questionTagId") Integer questionTagId);
+
+
+
+ List queryTagId(@Param("questionTagId") Integer questionTagId);
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/QuestionTagMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/QuestionTagMapper.java
new file mode 100644
index 0000000..20c1bde
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/QuestionTagMapper.java
@@ -0,0 +1,17 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.QuestionTag;
+import com.hc.core.utils.mapper.Mapper;
+import org.springframework.stereotype.Repository;
+
+/**
+ * 问题标签表(QuestionTag)表数据库访问层
+ *
+ * @author java
+ * @since 2020-12-07 11:36:39
+ */
+
+@Repository
+public interface QuestionTagMapper extends Mapper {
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/QuestionTypeMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/QuestionTypeMapper.java
new file mode 100644
index 0000000..fd33417
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/QuestionTypeMapper.java
@@ -0,0 +1,17 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.QuestionType;
+import com.hc.core.utils.mapper.Mapper;
+import org.springframework.stereotype.Repository;
+
+/**
+ * 问题类型表(QuestionType)表数据库访问层
+ *
+ * @author java
+ * @since 2020-12-07 11:37:00
+ */
+
+@Repository
+public interface QuestionTypeMapper extends Mapper {
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/ThirdCourseMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/ThirdCourseMapper.java
new file mode 100644
index 0000000..ae8a21c
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/ThirdCourseMapper.java
@@ -0,0 +1,29 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.Course;
+import com.hc.business.model.ThirdCourse;
+import com.hc.core.utils.mapper.Mapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+
+/**
+ * 第三方用户课程配置表(ThirdCourse)表数据库访问层
+ *
+ * @author java
+ * @since 2020-06-17 17:29:30
+ */
+
+@Repository
+public interface ThirdCourseMapper extends Mapper {
+
+ /**
+ * 获取课程
+ *
+ * @param thirdId 第三方主键
+ * @return 实例对象数组
+ */
+ List queryThreadCourse(Integer thirdId);
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/ThirdMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/ThirdMapper.java
new file mode 100644
index 0000000..6d1c6ca
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/ThirdMapper.java
@@ -0,0 +1,30 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.Third;
+
+import com.hc.core.utils.mapper.Mapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * 第三方用户表(Third)表数据库访问层
+ *
+ * @author java
+ * @since 2020-06-17 17:29:30
+ */
+
+@Repository
+public interface ThirdMapper extends Mapper {
+
+ /**
+ * 依据token 获取第三方信息
+ *
+ * @param token 校验码
+ * @return 实例对象数组
+ */
+ List queryThirdByToken(String token);
+
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserAdminMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserAdminMapper.java
new file mode 100644
index 0000000..344ade3
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserAdminMapper.java
@@ -0,0 +1,27 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.UserAdmin;
+import com.hc.core.utils.mapper.Mapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * 管理员表(UserAdmin)表数据库访问层
+ *
+ * @author java
+ * @since 2020-11-16 13:45:04
+ */
+
+@Repository
+public interface UserAdminMapper extends Mapper {
+
+ /**
+ * 依据用户名查找管理员
+ *
+ * @param adminAccount 用户名
+ * @return 实例对象数组
+ */
+ List selectUserAdmin(String adminAccount);
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserAdviseMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserAdviseMapper.java
new file mode 100644
index 0000000..4b538ed
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserAdviseMapper.java
@@ -0,0 +1,42 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.UserAdvise;
+import com.hc.core.utils.mapper.Mapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * 用户建议表
+ * (UserAdvise)表数据库访问层
+ *
+ * @author java
+ * @since 2020-11-16 14:20:02
+ */
+
+@Repository
+public interface UserAdviseMapper extends Mapper {
+
+ /**
+ * 依据用户id查询建议
+ *
+ * @param userId 用户id
+ * @return 实例对象数组
+ */
+ List queryAllByUserId(Integer userId);
+
+ /**
+ * 依据类别id查询建议
+ *
+ * @param adviceType 类别id
+ * @return 实例对象数组
+ */
+ List queryAllByAdviceType(Integer adviceType);
+
+ /**
+ * 查询所有意见信息
+ *
+ * @return 实例对象数组
+ */
+ List queryAll();
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserCourseMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserCourseMapper.java
new file mode 100644
index 0000000..acfd597
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserCourseMapper.java
@@ -0,0 +1,61 @@
+package com.hc.business.mapper;
+
+import com.hc.business.dto.UserCourseDto;
+import com.hc.business.model.UserCourse;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+import com.hc.core.utils.mapper.Mapper;
+
+import java.util.List;
+
+/**
+ * 用户课程表(UserCourse)表数据库访问层
+ *
+ * @author java
+ * @since 2020-11-09 10:05:19
+ */
+
+@Repository
+public interface UserCourseMapper extends Mapper {
+
+ /**
+ * 依据用户id 和培训班id 获取用户课程以及进度
+ *
+ * @param userId 用户id
+ * @return 实例对象数组
+ */
+ List selectUserCourseList(@Param("userId") Integer userId,
+ @Param("classId") Integer classId);
+
+ /**
+ * 依据用户id 和培训班id 获取用户课程
+ *
+ * @param userId 用户id
+ * @param classId 班级id
+ * @return 实力对象数组
+ */
+ List selectUserCourseListByParam(@Param("userId") Integer userId,
+ @Param("classId") Integer classId);
+
+ /**
+ * 依据用户id 和培训班id,课程id获取某个课程进度 获取用户课程以及进度
+ *
+ * @param userId 用户id
+ * @return 实例对象数组
+ */
+ List selectUserCourseProgress(@Param("userId") Integer userId,
+ @Param("classId") Integer classId,
+ @Param("courseId") Integer courseId);
+
+ /**
+ * 用户课程
+ *
+ * @param userId 用户id
+ * @param classId 班级id
+ * @param courseId 课程id
+ * @return 实例对象数组
+ */
+ List selectUserCourse(@Param("userId") Integer userId,
+ @Param("classId") Integer classId,
+ @Param("courseId") Integer courseId);
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserInvoicesMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserInvoicesMapper.java
new file mode 100644
index 0000000..363a0d7
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserInvoicesMapper.java
@@ -0,0 +1,50 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.UserInvoices;
+import com.hc.core.utils.mapper.Mapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * 用户发票表(UserInvoices)表数据库访问层
+ *
+ * @author java
+ * @since 2020-12-02 10:50:34
+ */
+
+@Repository
+public interface UserInvoicesMapper extends Mapper {
+
+ /**
+ * 获取用户发票信息
+ *
+ * @param userId 用户id
+ * @return 实例对象数组
+ */
+ List queryDetailByUserId(Integer userId);
+
+ /**
+ * 查询有效发票
+ *
+ * @return 实例对象数组
+ */
+ List queryAll();
+
+ /**
+ * 获取班次发票信息
+ *
+ * @param classId 班次id
+ * @return 实例对象数组
+ */
+ List queryByClassId(Integer classId);
+
+ /**
+ * 获取状态获取发票信息
+ *
+ * @param status 状态
+ * @return 实例对象数组
+ */
+ List queryByStatus(Integer status);
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserMapper.java
new file mode 100644
index 0000000..4fcb6f9
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserMapper.java
@@ -0,0 +1,99 @@
+package com.hc.business.mapper;
+
+import com.hc.business.dto.StaTimeTable;
+import com.hc.business.dto.UserListDto;
+import com.hc.business.model.User;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+import com.hc.core.utils.mapper.Mapper;
+
+import java.util.List;
+
+/**
+ * 用户表(User)表数据库访问层
+ *
+ * @author java
+ * @since 2020-11-09 10:04:14
+ */
+
+@Repository
+public interface UserMapper extends Mapper {
+
+ /**
+ * 手机号查询用户
+ *
+ * @param userMobile 手机号
+ * @return 实例对象数组
+ */
+ List queryUserByMobile(String userMobile);
+
+ /**
+ * 身份证号查询用户
+ *
+ * @param cardId 身份证号
+ * @return 实例对象数组
+ */
+ List queryOneByCardId(String cardId);
+
+ /**
+ * 姓名查询用户
+ *
+ * @param name 身份证号
+ * @return 实例对象数组
+ */
+ List queryUserByName(String name);
+
+
+ /**
+ * 姓名查询用户
+ *
+ * @param name 身份证号
+ * @return 实例对象数组
+ */
+ List queryUserByClassName(@Param("name")String name);
+
+ /**
+ * 姓名查询用户
+ *
+ * @param name 身份证号
+ * @return 实例对象数组
+ */
+ List queryUserByClassNameAndPay(@Param("name")String name);
+
+ /**
+ * 获取最近七天用户统计数量
+ *
+ * @return 实例对象数组
+ */
+ List queryByUserCount();
+
+ /**
+ * 当天注册用户
+ *
+ * @return int
+ */
+ Integer queryToday();
+
+ /**
+ * 当月注册用户
+ *
+ * @return int
+ */
+ Integer queryMonth();
+
+ /**
+ * 当年注册用户
+ *
+ * @return int
+ */
+ Integer queryYear();
+
+ /**
+ * 用户总数
+ *
+ * @return int
+ */
+ int queryTotal();
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserRefundHistoryMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserRefundHistoryMapper.java
new file mode 100644
index 0000000..55db353
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserRefundHistoryMapper.java
@@ -0,0 +1,26 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.UserRefundHistory;
+import org.springframework.stereotype.Repository;
+import tk.mybatis.mapper.common.Mapper;
+
+
+/**
+ * 用户退款记录表(UserRefundHistory)表数据库访问层
+ *
+ * @author java
+ * @since 2020-12-10 11:31:38
+ */
+
+@Repository
+public interface UserRefundHistoryMapper extends Mapper {
+
+ /**
+ * 依据订单号查询退货单
+ *
+ * @param orderNo 订单号
+ * @return 实例对象
+ */
+ UserRefundHistory queryByOrderNo(String orderNo);
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserStatusMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserStatusMapper.java
new file mode 100644
index 0000000..f4ccc42
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserStatusMapper.java
@@ -0,0 +1,59 @@
+package com.hc.business.mapper;
+
+import com.hc.business.dto.UserStatusClassDto;
+import com.hc.business.model.User;
+import com.hc.business.model.UserStatus;
+import com.hc.core.utils.mapper.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * 用户班级学习进度表
+ * (UserStatus)表数据库访问层
+ *
+ * @author java
+ * @since 2020-12-06 11:26:42
+ */
+
+@Repository
+public interface UserStatusMapper extends Mapper {
+
+ /**
+ * 查询用户培训记录
+ *
+ * @param userId 用户id
+ * @return 实例对象数组
+ */
+ List queryDtoByUserId(Integer userId);
+
+
+ /**
+ * 查询用户状态
+ *
+ * @param userId 用户id
+ * @return 实例对象数组
+ */
+ List queryByUserId(Integer userId);
+
+
+ /**
+ * 查询用户状态
+ *
+ * @param userId 用户id
+ * @param classId 班次id
+ * @return 实例对象数组
+ */
+ List queryByClassIdAndUserId(@Param("classId") Integer classId,
+ @Param("userId") Integer userId);
+
+ /**
+ * 查询用户状态
+ *
+ * @param classId 班次id
+ * @return 实例对象数组
+ */
+ List queryByClassId(Integer classId);
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserTeacherMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserTeacherMapper.java
new file mode 100644
index 0000000..844eba1
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserTeacherMapper.java
@@ -0,0 +1,27 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.UserTeacher;
+import com.hc.core.utils.mapper.Mapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * (UserTeacher)表数据库访问层
+ *
+ * @author java
+ * @since 2020-11-20 11:08:18
+ */
+
+@Repository
+public interface UserTeacherMapper extends Mapper {
+
+ /**
+ * 依据老师名称查询老师
+ *
+ * @param name 老师名称
+ * @return 实例对象数组
+ */
+ List queryByName(String name);
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserTestHistoryMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserTestHistoryMapper.java
new file mode 100644
index 0000000..a9d3cc3
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserTestHistoryMapper.java
@@ -0,0 +1,26 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.UserTestHistory;
+import com.hc.core.utils.mapper.Mapper;
+import org.springframework.stereotype.Repository;
+
+/**
+ * 用户考试记录表(UserTestHistory)表数据库访问层
+ *
+ * @author java
+ * @since 2020-12-07 11:28:18
+ */
+
+@Repository
+public interface UserTestHistoryMapper extends Mapper {
+
+ /**
+ * 获取当前最高成绩
+ *
+ * @param userId 用户id
+ * @param classId 班次id
+ * @return 实例对象
+ */
+ UserTestHistory queryMaxScore(Integer userId, Integer classId);
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserVideoPositionMapper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserVideoPositionMapper.java
new file mode 100644
index 0000000..ad590e5
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/UserVideoPositionMapper.java
@@ -0,0 +1,30 @@
+package com.hc.business.mapper;
+
+import com.hc.business.model.UserVideoPosition;
+import com.hc.core.utils.mapper.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+ * 用户视频观看记录(UserVideoPosition)表数据库访问层
+ *
+ * @author java
+ * @since 2020-05-29 15:50:50
+ */
+
+@Repository
+public interface UserVideoPositionMapper extends Mapper{
+
+ /**
+ * 查询视频观看记录
+ *
+ * @param videoId
+ * @param userId
+ * @return
+ */
+ List selectUserPositionByUserAndVideo(@Param("videoId") Integer videoId,
+ @Param("userId") Integer userId);
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/AreaDistrict.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/AreaDistrict.java
new file mode 100644
index 0000000..b6af214
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/AreaDistrict.java
@@ -0,0 +1,143 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Transient;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.List;
+
+
+/**
+ * 省份表(AreaDistrict)实体类
+ *
+ * @author java
+ * @since 2020-11-20 12:48:44
+ */
+
+@ApiModel(value = "地区表")
+public class AreaDistrict implements Serializable {
+
+ private static final long serialVersionUID = -60609528264342036L;
+
+ /**
+ * 地区编号
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "地区编号")
+ private Integer areaId;
+
+ /**
+ * 地区名称
+ */
+ @ApiModelProperty(value = "地区名称", required = true)
+ @NotNull
+ private String areaName;
+
+ /**
+ * 父级编号
+ */
+ @ApiModelProperty(value = "父级编号", required = true)
+ @NotNull
+ private Integer parentId;
+
+ /**
+ * 省级配图
+ */
+ @ApiModelProperty(value = "省级配图", required = true)
+ private String areaImage;
+
+ /**
+ * 地区状态 0/锁定 1/开放
+ */
+ @ApiModelProperty(value = "地区状态 0/锁定 1/开放", required = true)
+ private Integer areaStatus;
+
+ /**
+ * 地区索引
+ */
+ @ApiModelProperty(value = "地区索引", required = true)
+ @NotNull
+ private Integer areaIndex;
+
+ /**
+ * 构造的
+ */
+ @Transient
+ private List areaDistrictList;
+
+ public AreaDistrict(Integer areaId, @NotNull String areaName,
+ @NotNull Integer parentId, String areaImage,
+ Integer areaStatus, @NotNull Integer areaIndex) {
+ this.areaId = areaId;
+ this.areaName = areaName;
+ this.parentId = parentId;
+ this.areaImage = areaImage;
+ this.areaStatus = areaStatus;
+ this.areaIndex = areaIndex;
+ }
+
+ public AreaDistrict() {
+ }
+
+ public Integer getAreaId() {
+ return areaId;
+ }
+
+ public void setAreaId(Integer areaId) {
+ this.areaId = areaId;
+ }
+
+ public String getAreaName() {
+ return areaName;
+ }
+
+ public void setAreaName(String areaName) {
+ this.areaName = areaName;
+ }
+
+ public Integer getParentId() {
+ return parentId;
+ }
+
+ public void setParentId(Integer parentId) {
+ this.parentId = parentId;
+ }
+
+ public String getAreaImage() {
+ return areaImage;
+ }
+
+ public void setAreaImage(String areaImage) {
+ this.areaImage = areaImage;
+ }
+
+ public Integer getAreaStatus() {
+ return areaStatus;
+ }
+
+ public void setAreaStatus(Integer areaStatus) {
+ this.areaStatus = areaStatus;
+ }
+
+ public Integer getAreaIndex() {
+ return areaIndex;
+ }
+
+ public void setAreaIndex(Integer areaIndex) {
+ this.areaIndex = areaIndex;
+ }
+
+ public List getAreaDistrictList() {
+ return areaDistrictList;
+ }
+
+ public void setAreaDistrictList(List areaDistrictList) {
+ this.areaDistrictList = areaDistrictList;
+ }
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/Banner.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/Banner.java
new file mode 100644
index 0000000..9a0532c
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/Banner.java
@@ -0,0 +1,119 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * 广告表
+ * (Banner)实体类
+ *
+ * @author java
+ * @since 2020-11-26 09:29:46
+ */
+
+
+@ApiModel(value = "banner表")
+public class Banner implements Serializable {
+
+ private static final long serialVersionUID = -34877727454440687L;
+
+ /**
+ * ID主键
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "ID主键")
+ private Integer bannerId;
+
+ /**
+ * 广告连接
+ */
+ @ApiModelProperty(value = "广告连接", required = true)
+ @NotNull
+ private String bannerUrl;
+
+ /**
+ * 索引
+ */
+ @ApiModelProperty(value = "索引", required = true)
+ @NotNull
+ private Integer bannerIndex;
+
+
+ /**
+ * banner的位置01分表表示主banner,教师banner
+ */
+ @ApiModelProperty(value = "banner的位置01分表表示主banner,教师banner", required = true)
+ @NotNull
+ private Integer bannerType;
+
+
+ /**
+ * banner的跳转位置
+ */
+ @ApiModelProperty(value = "banner的跳转位置", required = true)
+ private String bannerDest;
+
+ public Banner(Integer bannerId,
+ @NotNull String bannerUrl,
+ @NotNull Integer bannerIndex,
+ @NotNull Integer bannerType,
+ String bannerDest) {
+ this.bannerId = bannerId;
+ this.bannerUrl = bannerUrl;
+ this.bannerIndex = bannerIndex;
+ this.bannerType = bannerType;
+ this.bannerDest = bannerDest;
+
+ }
+
+ public Banner() {
+ }
+
+ public Integer getBannerId() {
+ return bannerId;
+ }
+
+ public void setBannerId(Integer bannerId) {
+ this.bannerId = bannerId;
+ }
+
+ public String getBannerUrl() {
+ return bannerUrl;
+ }
+
+ public void setBannerUrl(String bannerUrl) {
+ this.bannerUrl = bannerUrl;
+ }
+
+ public Integer getBannerIndex() {
+ return bannerIndex;
+ }
+
+ public void setBannerIndex(Integer bannerIndex) {
+ this.bannerIndex = bannerIndex;
+ }
+
+ public Integer getBannerType() {
+ return bannerType;
+ }
+
+ public void setBannerType(Integer bannerType) {
+ this.bannerType = bannerType;
+ }
+
+ public String getBannerDest() {
+ return bannerDest;
+ }
+
+ public void setBannerDest(String bannerDest) {
+ this.bannerDest = bannerDest;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/ClassConfig.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/ClassConfig.java
new file mode 100644
index 0000000..b77f134
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/ClassConfig.java
@@ -0,0 +1,202 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Transient;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * 班次表(ClassConfig)实体类
+ *
+ * @author java
+ * @since 2020-11-19 16:12:27
+ */
+
+
+@Data
+@ApiModel(value = "班次表")
+public class ClassConfig implements Serializable {
+
+ private static final long serialVersionUID = 627209293304274727L;
+
+
+ /**
+ * 地区配置编号
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "地区配置编号")
+ private Integer classConfigId;
+
+ /**
+ * 班次名称名称
+ */
+ @ApiModelProperty(value = "班次名称名称", required = true)
+ @NotNull
+ private String className;
+
+ /**
+ * 培训班介绍
+ */
+ @ApiModelProperty(value = "培训班介绍", required = true)
+ @NotNull
+ private String classDesc;
+
+ /**
+ * 类型目前启用123,分表表示先上班看课+考试+打印证书 2.考试+打印证书 3只打印证书 23对应线下班
+ */
+ @ApiModelProperty(value = "类型目前启用123,分表表示先上班看课+考试+打印证书 2.考试+打印证书 3只打印证书 23对应线下班", required = true)
+ private Integer classType;
+
+
+ /**
+ * 配图地址
+ */
+ @ApiModelProperty(value = "配图地址", required = true)
+ @NotNull
+ private String classLogo;
+
+ /**
+ * PC配图地址
+ */
+ @ApiModelProperty(value = "新PC配图地址")
+ private String classContent;
+
+ /**
+ * 移动端配图地址
+ */
+ @ApiModelProperty(value = "移动端配图地址")
+ private String classMobileContent;
+
+ /**
+ * 地区编号
+ */
+ @ApiModelProperty(value = "地区编号", required = true)
+ @NotNull
+ private Integer areaId;
+
+ @Transient
+ @ApiModelProperty(value = "地区名称")
+ private String areaName;
+
+ /**
+ * 必修课学时,根据选得必修课自动计算
+ */
+ @ApiModelProperty(value = "必修课学时,根据选得必修课自动计算", required = true)
+ private Float bxHours;
+
+ /**
+ * 选修课学时,管理员录入
+ */
+ @ApiModelProperty(value = "选修课学时,管理员录入", required = true)
+ private Float xxHours;
+
+ /**
+ * 考试学分,考试通过自动获取
+ */
+ @ApiModelProperty(value = "考试学分,考试通过自动获取", required = true)
+ private Float paperHours;
+
+ /**
+ * 试卷
+ */
+ @ApiModelProperty(value = "试卷")
+ private Integer paperId;
+
+ /**
+ * 创建时间
+ */
+ @ApiModelProperty(value = "创建时间")
+ private Long createTime;
+
+ /**
+ * 年份
+ */
+ @ApiModelProperty(value = "年份")
+ private String years;
+
+ /**
+ * 单价
+ */
+ @ApiModelProperty(value = "单价", required = true)
+ @NotNull
+ private Double price;
+
+ /**
+ * 报名开始时间
+ */
+ @ApiModelProperty(value = "报名开始时间", required = true)
+ private Long applyStartTime;
+
+ /**
+ * 报名结束时间
+ */
+ @ApiModelProperty(value = "报名结束时间", required = true)
+ private Long applyEndTime;
+
+ /**
+ * 学习开始时间
+ */
+ @ApiModelProperty(value = "学习开始时间", required = true)
+ private Long studyStartTime;
+
+ /**
+ * 学习结束时间
+ */
+ @ApiModelProperty(value = "学习结束时间", required = true)
+ private Long studyEndTime;
+
+ /**
+ * 考试开始开始时间
+ */
+ @ApiModelProperty(value = "考试开始开始时间", required = true)
+ private Long paperStartTime;
+
+ /**
+ * 考试结束时间
+ */
+ @ApiModelProperty(value = "考试结束时间", required = true)
+ private Long paperEndTime;
+
+ /**
+ * 打印证书开始时间
+ */
+ @ApiModelProperty(value = "打印证书开始时间", required = true)
+ private Long certStartTime;
+
+ /**
+ * 打印证书结束时间,可以不限制
+ */
+ @ApiModelProperty(value = "打印证书结束时间,可以不限制", required = true)
+ private Long certEndTime;
+
+ /**
+ * 是否需要考试
+ */
+ @ApiModelProperty(value = "是否需要考试", required = true)
+ @NotNull
+ private Integer needPaper;
+
+ /**
+ * 是否有效
+ */
+ @ApiModelProperty(value = "是否有效 0 无效 1有效 ")
+ private Integer valid;
+
+ /**
+ * 签证时间
+ */
+ @ApiModelProperty(value = "签证时间")
+ private Long signTime;
+
+ private String prefix;
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/ClassConfigSponsor.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/ClassConfigSponsor.java
new file mode 100644
index 0000000..1c27dd0
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/ClassConfigSponsor.java
@@ -0,0 +1,61 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+/**
+ * @author jia
+ */
+@Data
+@ApiModel(value = "班次图章表")
+public class ClassConfigSponsor implements Serializable {
+
+ private static final long serialVersionUID = 961577731337873266L;
+
+
+ /**
+ * 主键
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键", required = true)
+ private Integer sponsorId;
+
+ /**
+ * 主办方图章地址
+ */
+ @ApiModelProperty(value = "主办方图章地址", required = true)
+ private String sponsorUrl;
+
+ /**
+ * 主板方名称
+ */
+ @ApiModelProperty(value = "主板方名称", required = true)
+ private String sponsorName;
+
+ /**
+ * 班次id
+ */
+ @ApiModelProperty(value = "班次id", required = true)
+ @NotNull
+ private Integer classId;
+
+ /**
+ * 排序
+ */
+ @ApiModelProperty(value = "排序", required = true)
+ private Integer sponsorIndex;
+
+ /**
+ * 创建时间
+ */
+ @ApiModelProperty(value = "创建时间", required = true)
+ private Long createTime;
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/ClassCourse.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/ClassCourse.java
new file mode 100644
index 0000000..932afc7
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/ClassCourse.java
@@ -0,0 +1,114 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * 班次课程表(ClassCourse)实体类
+ *
+ * @author java
+ * @since 2020-11-24 11:33:30
+ */
+
+
+@ApiModel(value = "地区课程表")
+public class ClassCourse implements Serializable {
+
+ private static final long serialVersionUID = -67544251618141718L;
+
+
+ /**
+ * 地区课程编号
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "地区课程编号")
+ private Integer classCourseId;
+
+ /**
+ * 班次ID
+ */
+ @ApiModelProperty(value = "班次ID", required = true)
+ @NotNull
+ private Integer classId;
+
+ /**
+ * 课程编号
+ */
+ @ApiModelProperty(value = "课程编号", required = true)
+ @NotNull
+ private Integer courseId;
+
+ /**
+ * 课程类型12分表示必选课,可选课
+ */
+ @ApiModelProperty(value = "课程类型12分表示必选课,可选课", required = true)
+ @NotNull
+ private Integer courseType;
+
+ /**
+ * 创建时间
+ */
+ @ApiModelProperty(value = "创建时间")
+ private Long createTime;
+
+ public ClassCourse(Integer classCourseId, @NotNull Integer classId,
+ @NotNull Integer courseId,
+ @NotNull Integer courseType, Long createTime) {
+ this.classCourseId = classCourseId;
+ this.classId = classId;
+ this.courseId = courseId;
+ this.courseType = courseType;
+ this.createTime = createTime;
+ }
+
+ public ClassCourse() {
+ }
+
+ public Integer getClassCourseId() {
+ return classCourseId;
+ }
+
+ public void setClassCourseId(Integer classCourseId) {
+ this.classCourseId = classCourseId;
+ }
+
+ public Integer getClassId() {
+ return classId;
+ }
+
+ public void setClassId(Integer classId) {
+ this.classId = classId;
+ }
+
+ public Integer getCourseId() {
+ return courseId;
+ }
+
+ public void setCourseId(Integer courseId) {
+ this.courseId = courseId;
+ }
+
+ public Integer getCourseType() {
+ return courseType;
+ }
+
+ public void setCourseType(Integer courseType) {
+ this.courseType = courseType;
+ }
+
+ public Long getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Long createTime) {
+ this.createTime = createTime;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/Course.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/Course.java
new file mode 100644
index 0000000..cbb2689
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/Course.java
@@ -0,0 +1,176 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * 课程表(Course)实体类
+ *
+ * @author java
+ * @since 2020-11-09 10:04:45
+ */
+
+@ApiModel(value = "课程表")
+public class Course implements Serializable {
+
+ private static final long serialVersionUID = -89648020880598418L;
+
+
+ /**
+ * 主键ID
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键ID")
+ private Integer courseId;
+
+ /**
+ * 课程名称
+ */
+ @ApiModelProperty(value = "课程名称", required = true)
+ @NotNull
+ private String courseName;
+
+ /**
+ * 图标
+ */
+ @ApiModelProperty(value = "图标", required = true)
+ @NotNull
+ private String courseLogo;
+
+ /**
+ * 课程介绍
+ */
+ @ApiModelProperty(value = "课程介绍", required = true)
+ @NotNull
+ private String courseDesc;
+
+ /**
+ * 课程时长
+ */
+ @ApiModelProperty(value = "课程时长", required = true)
+ private Float courseHours;
+
+ /**
+ * 教师
+ */
+ @ApiModelProperty(value = "教师", required = true)
+ private String courseTeacher;
+
+ /**
+ * 课程是否上架。下架后不可见
+ */
+ @ApiModelProperty(value = "课程是否上架。下架后不可见")
+ private Integer isValid;
+
+ /**
+ * 如果有多张详情图,相册
+ */
+ @ApiModelProperty(value = "如果有多张详情图,相册")
+ private String gallery;
+
+ /**
+ * 保留位,暂不使用
+ */
+ @ApiModelProperty(value = "保留位,暂不使用")
+ private Integer reserved1;
+
+ public Course(Integer courseId, @NotNull String courseName,
+ @NotNull String courseLogo, @NotNull String courseDesc,
+ Float courseHours,
+ String courseTeacher, Integer isValid,
+ String gallery, Integer reserved1) {
+ this.courseId = courseId;
+ this.courseName = courseName;
+ this.courseLogo = courseLogo;
+ this.courseDesc = courseDesc;
+ this.courseHours = courseHours;
+ this.courseTeacher = courseTeacher;
+ this.isValid = isValid;
+ this.gallery = gallery;
+ this.reserved1 = reserved1;
+ }
+
+ public Course() {
+ }
+
+ public Integer getCourseId() {
+ return courseId;
+ }
+
+ public void setCourseId(Integer courseId) {
+ this.courseId = courseId;
+ }
+
+ public String getCourseName() {
+ return courseName;
+ }
+
+ public void setCourseName(String courseName) {
+ this.courseName = courseName;
+ }
+
+ public String getCourseLogo() {
+ return courseLogo;
+ }
+
+ public void setCourseLogo(String courseLogo) {
+ this.courseLogo = courseLogo;
+ }
+
+ public String getCourseDesc() {
+ return courseDesc;
+ }
+
+ public void setCourseDesc(String courseDesc) {
+ this.courseDesc = courseDesc;
+ }
+
+ public Float getCourseHours() {
+ return courseHours;
+ }
+
+ public void setCourseHours(Float courseHours) {
+ this.courseHours = courseHours;
+ }
+
+ public String getCourseTeacher() {
+ return courseTeacher;
+ }
+
+ public void setCourseTeacher(String courseTeacher) {
+ this.courseTeacher = courseTeacher;
+ }
+
+ public Integer getIsValid() {
+ return isValid;
+ }
+
+ public void setIsValid(Integer isValid) {
+ this.isValid = isValid;
+ }
+
+ public String getGallery() {
+ return gallery;
+ }
+
+ public void setGallery(String gallery) {
+ this.gallery = gallery;
+ }
+
+ public Integer getReserved1() {
+ return reserved1;
+ }
+
+ public void setReserved1(Integer reserved1) {
+ this.reserved1 = reserved1;
+ }
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/CourseChapter.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/CourseChapter.java
new file mode 100644
index 0000000..40b22bf
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/CourseChapter.java
@@ -0,0 +1,165 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Transient;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.List;
+
+
+/**
+ * 课程章节表(CourseChapter)实体类
+ *
+ * @author java
+ * @since 2020-11-09 10:04:47
+ */
+
+
+@ApiModel(value = "章节表")
+public class CourseChapter implements Serializable {
+
+ private static final long serialVersionUID = 873871660383226119L;
+
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键id")
+ private Integer courseChapterId;
+
+ /**
+ * 章节名字
+ */
+ @ApiModelProperty(value = "章节名字", required = true)
+ @NotNull
+ private String chapterName;
+
+ /**
+ * 父节点ID
+ */
+ @ApiModelProperty(value = "父节点ID", required = true)
+ @NotNull
+ private Integer parentId;
+
+ /**
+ * 章节层级
+ */
+ @ApiModelProperty(value = "章节层级", required = true)
+ @NotNull
+ private Integer chapterLevel;
+
+ /**
+ * 课程ID
+ */
+ @ApiModelProperty(value = "课程ID", required = true)
+ @NotNull
+ private Integer courseId;
+
+ /**
+ * 构造
+ */
+ @Transient
+ private List childChapter;
+
+ @Transient
+ private CourseChapterVideo chapterVideo;
+
+ @Transient
+ private CourseChapterAnnex courseChapterAnnex;
+
+ @Transient
+ private UserVideoPosition userVideoPosition;
+
+ public CourseChapter(Integer courseChapterId, @NotNull String chapterName,
+ @NotNull Integer parentId,
+ @NotNull Integer chapterLevel,
+ @NotNull Integer courseId) {
+ this.courseChapterId = courseChapterId;
+ this.chapterName = chapterName;
+ this.parentId = parentId;
+ this.chapterLevel = chapterLevel;
+ this.courseId = courseId;
+ }
+
+ public CourseChapter() {
+ }
+
+ public Integer getCourseChapterId() {
+ return courseChapterId;
+ }
+
+ public void setCourseChapterId(Integer courseChapterId) {
+ this.courseChapterId = courseChapterId;
+ }
+
+ public String getChapterName() {
+ return chapterName;
+ }
+
+ public void setChapterName(String chapterName) {
+ this.chapterName = chapterName;
+ }
+
+ public Integer getParentId() {
+ return parentId;
+ }
+
+ public void setParentId(Integer parentId) {
+ this.parentId = parentId;
+ }
+
+ public Integer getChapterLevel() {
+ return chapterLevel;
+ }
+
+ public void setChapterLevel(Integer chapterLevel) {
+ this.chapterLevel = chapterLevel;
+ }
+
+ public Integer getCourseId() {
+ return courseId;
+ }
+
+ public void setCourseId(Integer courseId) {
+ this.courseId = courseId;
+ }
+
+ public List getChildChapter() {
+ return childChapter;
+ }
+
+ public void setChildChapter(List childChapter) {
+ this.childChapter = childChapter;
+ }
+
+ public CourseChapterVideo getChapterVideo() {
+ return chapterVideo;
+ }
+
+ public void setChapterVideo(CourseChapterVideo chapterVideo) {
+ this.chapterVideo = chapterVideo;
+ }
+
+ public CourseChapterAnnex getCourseChapterAnnex() {
+ return courseChapterAnnex;
+ }
+
+ public void setCourseChapterAnnex(CourseChapterAnnex courseChapterAnnex) {
+ this.courseChapterAnnex = courseChapterAnnex;
+ }
+
+ public UserVideoPosition getUserVideoPosition() {
+ return userVideoPosition;
+ }
+
+ public void setUserVideoPosition(UserVideoPosition userVideoPosition) {
+ this.userVideoPosition = userVideoPosition;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/CourseChapterAnnex.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/CourseChapterAnnex.java
new file mode 100644
index 0000000..96ca425
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/CourseChapterAnnex.java
@@ -0,0 +1,115 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * 章节附件表(CourseChapterAnnex)实体类
+ *
+ * @author java
+ * @since 2020-11-09 10:04:48
+ */
+
+
+@ApiModel(value = "章节附件表")
+public class CourseChapterAnnex implements Serializable {
+
+ private static final long serialVersionUID = 282553089268625985L;
+
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键id")
+ private Integer courseChapterAnnexId;
+
+ /**
+ * 附件名字
+ */
+ @ApiModelProperty(value = "附件名字", required = true)
+ @NotNull
+ private String annexName;
+
+ /**
+ * 章节ID
+ */
+ @ApiModelProperty(value = "章节ID", required = true)
+ @NotNull
+ private Integer courseChapterId;
+
+ /**
+ * 介绍
+ */
+ @ApiModelProperty(value = "介绍", required = true)
+ @NotNull
+ private String annexIntroduction;
+
+ /**
+ * 附件地址
+ */
+ @ApiModelProperty(value = "附件地址", required = true)
+ @NotNull
+ private String annexUrl;
+
+ public CourseChapterAnnex(Integer courseChapterAnnexId, @NotNull String annexName,
+ @NotNull Integer courseChapterId,
+ @NotNull String annexIntroduction, @NotNull String annexUrl) {
+ this.courseChapterAnnexId = courseChapterAnnexId;
+ this.annexName = annexName;
+ this.courseChapterId = courseChapterId;
+ this.annexIntroduction = annexIntroduction;
+ this.annexUrl = annexUrl;
+ }
+
+ public CourseChapterAnnex() {
+ }
+
+ public Integer getCourseChapterAnnexId() {
+ return courseChapterAnnexId;
+ }
+
+ public void setCourseChapterAnnexId(Integer courseChapterAnnexId) {
+ this.courseChapterAnnexId = courseChapterAnnexId;
+ }
+
+ public String getAnnexName() {
+ return annexName;
+ }
+
+ public void setAnnexName(String annexName) {
+ this.annexName = annexName;
+ }
+
+ public Integer getCourseChapterId() {
+ return courseChapterId;
+ }
+
+ public void setCourseChapterId(Integer courseChapterId) {
+ this.courseChapterId = courseChapterId;
+ }
+
+ public String getAnnexIntroduction() {
+ return annexIntroduction;
+ }
+
+ public void setAnnexIntroduction(String annexIntroduction) {
+ this.annexIntroduction = annexIntroduction;
+ }
+
+ public String getAnnexUrl() {
+ return annexUrl;
+ }
+
+ public void setAnnexUrl(String annexUrl) {
+ this.annexUrl = annexUrl;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/CourseChapterTag.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/CourseChapterTag.java
new file mode 100644
index 0000000..302a42f
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/CourseChapterTag.java
@@ -0,0 +1,132 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * 图书章节标签表。新建完成的图书章节,可以根据讲师不同,给不同的章节打标签,比如基础阶段,进阶阶段。。。(CourseChapterTag)实体类
+ *
+ * @author java
+ * @since 2020-11-09 10:04:50
+ */
+
+
+@ApiModel(value = "章节标签表")
+public class CourseChapterTag implements Serializable {
+
+ private static final long serialVersionUID = 998792510540027363L;
+
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键id")
+ private Integer tagId;
+
+ /**
+ * 标签名
+ */
+ @ApiModelProperty(value = "标签名", required = true)
+ @NotNull
+ private String tagName;
+
+ /**
+ * 显示索引
+ */
+ @ApiModelProperty(value = "显示索引", required = true)
+ @NotNull
+ private Integer tagIndex;
+
+ /**
+ * 章节ID
+ */
+ @ApiModelProperty(value = "章节ID", required = true)
+ @NotNull
+ private Integer chapterId;
+
+ /**
+ * 讲师
+ */
+ @ApiModelProperty(value = "讲师", required = true)
+ @NotNull
+ private String teacherName;
+
+ /**
+ * 课程ID
+ */
+ @ApiModelProperty(value = "课程ID", required = true)
+ @NotNull
+ private Integer courseId;
+
+
+ public CourseChapterTag(Integer tagId, @NotNull String tagName,
+ @NotNull Integer tagIndex, @NotNull Integer chapterId,
+ @NotNull String teacherName, @NotNull Integer courseId) {
+ this.tagId = tagId;
+ this.tagName = tagName;
+ this.tagIndex = tagIndex;
+ this.chapterId = chapterId;
+ this.teacherName = teacherName;
+ this.courseId = courseId;
+ }
+
+ public CourseChapterTag() {
+ }
+
+ public Integer getTagId() {
+ return tagId;
+ }
+
+ public void setTagId(Integer tagId) {
+ this.tagId = tagId;
+ }
+
+ public String getTagName() {
+ return tagName;
+ }
+
+ public void setTagName(String tagName) {
+ this.tagName = tagName;
+ }
+
+ public Integer getTagIndex() {
+ return tagIndex;
+ }
+
+ public void setTagIndex(Integer tagIndex) {
+ this.tagIndex = tagIndex;
+ }
+
+ public Integer getChapterId() {
+ return chapterId;
+ }
+
+ public void setChapterId(Integer chapterId) {
+ this.chapterId = chapterId;
+ }
+
+ public String getTeacherName() {
+ return teacherName;
+ }
+
+ public void setTeacherName(String teacherName) {
+ this.teacherName = teacherName;
+ }
+
+ public Integer getCourseId() {
+ return courseId;
+ }
+
+ public void setCourseId(Integer courseId) {
+ this.courseId = courseId;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/CourseChapterTest.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/CourseChapterTest.java
new file mode 100644
index 0000000..e4f8022
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/CourseChapterTest.java
@@ -0,0 +1,98 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * 章节测试表/随堂练习表(CourseChapterTest)实体类
+ *
+ * @author java
+ * @since 2020-11-09 10:04:52
+ */
+
+
+@ApiModel(value = "章节测试表")
+public class CourseChapterTest implements Serializable {
+
+ private static final long serialVersionUID = 314641819841270641L;
+
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键id")
+ private Integer testId;
+
+ /**
+ * 习题id
+ */
+ @ApiModelProperty(value = "习题id", required = true)
+ @NotNull
+ private Integer questionId;
+
+ /**
+ * 章节id.目前得系统部分章节,默认0
+ */
+ @ApiModelProperty(value = "章节id.目前得系统部分章节,默认0", required = true)
+ @NotNull
+ private Integer chapterId;
+
+ /**
+ * 课程ID。目前得随堂练习都是配置在图书下得
+ */
+ @ApiModelProperty(value = "课程ID。目前得随堂练习都是配置在图书下得", required = true)
+ @NotNull
+ private Integer courseId;
+
+ public CourseChapterTest(Integer testId, @NotNull Integer questionId,
+ @NotNull Integer chapterId, @NotNull Integer courseId) {
+ this.testId = testId;
+ this.questionId = questionId;
+ this.chapterId = chapterId;
+ this.courseId = courseId;
+ }
+
+ public CourseChapterTest() {
+ }
+
+ public Integer getTestId() {
+ return testId;
+ }
+
+ public void setTestId(Integer testId) {
+ this.testId = testId;
+ }
+
+ public Integer getQuestionId() {
+ return questionId;
+ }
+
+ public void setQuestionId(Integer questionId) {
+ this.questionId = questionId;
+ }
+
+ public Integer getChapterId() {
+ return chapterId;
+ }
+
+ public void setChapterId(Integer chapterId) {
+ this.chapterId = chapterId;
+ }
+
+ public Integer getCourseId() {
+ return courseId;
+ }
+
+ public void setCourseId(Integer courseId) {
+ this.courseId = courseId;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/CourseChapterVideo.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/CourseChapterVideo.java
new file mode 100644
index 0000000..0dfc4c7
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/CourseChapterVideo.java
@@ -0,0 +1,158 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * 课程视频(CourseChapterVideo)实体类
+ *
+ * @author java
+ * @since 2020-11-09 10:04:54
+ */
+
+
+@ApiModel(value = "章节视频表")
+public class CourseChapterVideo implements Serializable {
+
+ private static final long serialVersionUID = -21553514386384145L;
+
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键id")
+ private Integer videoId;
+
+ /**
+ * 章节id,目前视频直接配置在课程下,允许章节ID=NULL
+ */
+ @ApiModelProperty(value = "章节id,目前视频直接配置在课程下,允许章节ID=NULL", required = true)
+ @NotNull
+ private Integer chapterId;
+
+ /**
+ * 视频名称
+ */
+ @ApiModelProperty(value = "视频名称", required = true)
+ @NotNull
+ private String videoName;
+
+ /**
+ * 视频地址
+ */
+ @ApiModelProperty(value = "视频地址", required = true)
+ @NotNull
+ private String videoUrl;
+
+
+ @ApiModelProperty(value = "${column.comment}", required = true)
+ private String videoOriUrl;
+
+ /**
+ * 视频所属课程ID
+ */
+ @ApiModelProperty(value = "视频所属课程ID", required = true)
+ @NotNull
+ private Integer courseId;
+
+ /**
+ * 是否精品课程,精品课程允许试看
+ */
+ @ApiModelProperty(value = "是否精品课程,精品课程允许试看")
+ private Integer isFree;
+
+ /**
+ * 试看时间,分钟
+ */
+ @ApiModelProperty(value = "试看时间,分钟")
+ private Integer freeTime;
+
+ public CourseChapterVideo(Integer videoId, @NotNull Integer chapterId,
+ @NotNull String videoName, @NotNull String videoUrl, String videoOriUrl,
+ @NotNull Integer courseId, Integer isFree, Integer freeTime) {
+ this.videoId = videoId;
+ this.chapterId = chapterId;
+ this.videoName = videoName;
+ this.videoUrl = videoUrl;
+ this.videoOriUrl = videoOriUrl;
+ this.courseId = courseId;
+ this.isFree = isFree;
+ this.freeTime = freeTime;
+ }
+
+ public CourseChapterVideo() {
+ }
+
+ public Integer getVideoId() {
+ return videoId;
+ }
+
+ public void setVideoId(Integer videoId) {
+ this.videoId = videoId;
+ }
+
+ public Integer getChapterId() {
+ return chapterId;
+ }
+
+ public void setChapterId(Integer chapterId) {
+ this.chapterId = chapterId;
+ }
+
+ public String getVideoName() {
+ return videoName;
+ }
+
+ public void setVideoName(String videoName) {
+ this.videoName = videoName;
+ }
+
+ public String getVideoUrl() {
+ return videoUrl;
+ }
+
+ public void setVideoUrl(String videoUrl) {
+ this.videoUrl = videoUrl;
+ }
+
+ public String getVideoOriUrl() {
+ return videoOriUrl;
+ }
+
+ public void setVideoOriUrl(String videoOriUrl) {
+ this.videoOriUrl = videoOriUrl;
+ }
+
+ public Integer getCourseId() {
+ return courseId;
+ }
+
+ public void setCourseId(Integer courseId) {
+ this.courseId = courseId;
+ }
+
+ public Integer getIsFree() {
+ return isFree;
+ }
+
+ public void setIsFree(Integer isFree) {
+ this.isFree = isFree;
+ }
+
+ public Integer getFreeTime() {
+ return freeTime;
+ }
+
+ public void setFreeTime(Integer freeTime) {
+ this.freeTime = freeTime;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/CourseType.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/CourseType.java
new file mode 100644
index 0000000..1adbee4
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/CourseType.java
@@ -0,0 +1,65 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * (CourseType)实体类
+ *
+ * @author java
+ * @since 2020-12-17 14:12:49
+ */
+
+@ApiModel(value = "课程分类表")
+public class CourseType implements Serializable {
+
+ private static final long serialVersionUID = -74761225011108876L;
+
+ /**
+ * 主键
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键")
+ private Integer courseTypeId;
+
+ /**
+ * 课程分类名称
+ */
+ @ApiModelProperty(value = "课程分类名称", required = true)
+ @NotNull
+ private String courseName;
+
+
+ public CourseType(Integer courseTypeId, String courseName) {
+ this.courseTypeId = courseTypeId;
+ this.courseName = courseName;
+ }
+
+ public CourseType() {
+ }
+
+ public Integer getCourseTypeId() {
+ return courseTypeId;
+ }
+
+ public void setCourseTypeId(Integer courseTypeId) {
+ this.courseTypeId = courseTypeId;
+ }
+
+ public String getCourseName() {
+ return courseName;
+ }
+
+ public void setCourseName(String courseName) {
+ this.courseName = courseName;
+ }
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/CourseTypeRelation.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/CourseTypeRelation.java
new file mode 100644
index 0000000..c467603
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/CourseTypeRelation.java
@@ -0,0 +1,92 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import java.io.Serializable;
+
+/**
+ * (CourseTypeRelation)实体类
+ *
+ * @author java
+ * @since 2021-02-02 09:25:06
+ */
+
+@ApiModel(value = "课程类别关系表")
+public class CourseTypeRelation implements Serializable {
+
+ private static final long serialVersionUID = -48750814361274136L;
+
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键id")
+ private Integer courseTypeReId;
+
+ /**
+ * 课程id
+ */
+ @ApiModelProperty(value = "课程id", required = true)
+ private Integer courseId;
+
+ /**
+ * 类别id
+ */
+ @ApiModelProperty(value = "类别id", required = true)
+ private Integer courseTypeId;
+
+ /**
+ * 创建时间
+ */
+ @ApiModelProperty(value = "创建时间")
+ private Long createTime;
+
+ public CourseTypeRelation(Integer courseTypeReId, Integer courseId, Integer courseTypeId, Long createTime) {
+ this.courseTypeReId = courseTypeReId;
+ this.courseId = courseId;
+ this.courseTypeId = courseTypeId;
+ this.createTime = createTime;
+ }
+
+ public CourseTypeRelation() {
+ }
+
+ public Integer getCourseTypeReId() {
+ return courseTypeReId;
+ }
+
+ public void setCourseTypeReId(Integer courseTypeReId) {
+ this.courseTypeReId = courseTypeReId;
+ }
+
+ public Integer getCourseId() {
+ return courseId;
+ }
+
+ public void setCourseId(Integer courseId) {
+ this.courseId = courseId;
+ }
+
+ public Integer getCourseTypeId() {
+ return courseTypeId;
+ }
+
+ public void setCourseTypeId(Integer courseTypeId) {
+ this.courseTypeId = courseTypeId;
+ }
+
+ public Long getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Long createTime) {
+ this.createTime = createTime;
+ }
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/News.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/News.java
new file mode 100644
index 0000000..32196b8
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/News.java
@@ -0,0 +1,70 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * 新闻表
+ * (News)实体类
+ *
+ * @author java
+ * @since 2020-11-20 11:48:34
+ */
+@Data
+@ApiModel(value = "资讯表")
+public class News implements Serializable {
+
+ private static final long serialVersionUID = -39295514485939079L;
+
+
+ /**
+ * 新闻id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "新闻id")
+ private Integer newsId;
+
+ /**
+ * 标题
+ */
+ @ApiModelProperty(value = "标题", required = true)
+ @NotNull
+ private String newsTitle;
+
+ /**
+ * 标题配图
+ */
+ @ApiModelProperty(value = "标题配图", required = true)
+ @NotNull
+ private String newsLogo;
+
+ /**
+ * 新闻内容
+ */
+ @ApiModelProperty(value = "新闻内容", required = true)
+ @NotNull
+ private String newsContent;
+
+ /**
+ * 新闻时间
+ */
+ @ApiModelProperty(value = "新闻时间")
+ private Long createTime;
+
+ /**
+ * 新闻类别
+ */
+ @ApiModelProperty(value = "新闻类别")
+
+ private Integer tagId;
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/NewsTag.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/NewsTag.java
new file mode 100644
index 0000000..a37bc4d
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/NewsTag.java
@@ -0,0 +1,66 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * 新闻标签表(NewsTag)实体类
+ *
+ * @author java
+ * @since 2020-11-20 13:13:47
+ */
+
+@ApiModel(value = "资讯标签表")
+public class NewsTag implements Serializable {
+
+ private static final long serialVersionUID = -31343210313614099L;
+
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键id")
+ private Integer tagId;
+
+ /**
+ * 类别名称
+ */
+ @ApiModelProperty(value = "类别名称", required = true)
+ @NotNull
+ private String tagName;
+
+ public NewsTag(Integer tagId, @NotNull String tagName) {
+ this.tagId = tagId;
+ this.tagName = tagName;
+ }
+
+ public NewsTag() {
+ }
+
+ public Integer getTagId() {
+ return tagId;
+ }
+
+ public void setTagId(Integer tagId) {
+ this.tagId = tagId;
+ }
+
+ public String getTagName() {
+ return tagName;
+ }
+
+ public void setTagName(String tagName) {
+ this.tagName = tagName;
+ }
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/OrderUserLog.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/OrderUserLog.java
new file mode 100644
index 0000000..50ee6c6
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/OrderUserLog.java
@@ -0,0 +1,96 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * (OrderUserLog)实体类
+ *
+ * @author java
+ * @since 2020-12-03 09:25:07
+ */
+
+@ApiModel(value = "订单详情表")
+public class OrderUserLog implements Serializable {
+
+ private static final long serialVersionUID = 666133974894655590L;
+
+
+ /**
+ * 主键
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键")
+ private Integer orderLogId;
+
+ /**
+ * 订单id
+ */
+ @ApiModelProperty(value = "订单id", required = true)
+ @NotNull
+ private Integer orderId;
+
+ /**
+ * 用户id
+ */
+ @ApiModelProperty(value = "用户id", required = true)
+ @NotNull
+ private Integer reUserId;
+
+ /**
+ * 创建时间
+ */
+ @ApiModelProperty(value = "创建时间")
+ private Long createTime;
+
+ public OrderUserLog(Integer orderLogId, @NotNull Integer orderId,
+ @NotNull Integer reUserId, Long createTime) {
+ this.orderLogId = orderLogId;
+ this.orderId = orderId;
+ this.reUserId = reUserId;
+ this.createTime = createTime;
+ }
+
+ public OrderUserLog() {
+ }
+
+ public Integer getOrderLogId() {
+ return orderLogId;
+ }
+
+ public void setOrderLogId(Integer orderLogId) {
+ this.orderLogId = orderLogId;
+ }
+
+ public Integer getOrderId() {
+ return orderId;
+ }
+
+ public void setOrderId(Integer orderId) {
+ this.orderId = orderId;
+ }
+
+ public Integer getReUserId() {
+ return reUserId;
+ }
+
+ public void setReUserId(Integer reUserId) {
+ this.reUserId = reUserId;
+ }
+
+ public Long getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Long createTime) {
+ this.createTime = createTime;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/Orders.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/Orders.java
new file mode 100644
index 0000000..c1cc681
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/Orders.java
@@ -0,0 +1,259 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import tk.mybatis.mapper.annotation.Order;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * 订单表(Orders)实体类
+ *
+ * @author java
+ * @since 2020-11-26 16:46:40
+ */
+
+@ApiModel(value = "订单表")
+public class Orders implements Serializable {
+
+ private static final long serialVersionUID = 204802189701833123L;
+
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键id")
+ @Order("DESC")
+ private Integer ordersId;
+
+ /**
+ * 订单号
+ */
+ @ApiModelProperty(value = "订单号")
+ @NotBlank
+ private String orderNo;
+
+ /**
+ * 用户id
+ */
+ @ApiModelProperty(value = "用户id", required = true)
+ @NotNull
+ private Integer userId;
+
+ /**
+ * 班级id
+ */
+ @ApiModelProperty(value = "班级id", required = true)
+ @NotNull
+ private Integer classId;
+
+ /**
+ * 订单状态
+ */
+ @ApiModelProperty(value = "订单状态 0 未支付 1 已支付 2 已退款")
+ private Integer orderStatus;
+
+ /**
+ * 商品介绍
+ */
+ @ApiModelProperty(value = "商品介绍", required = true)
+ @NotNull
+ private String body;
+
+ /**
+ * 订单名称
+ */
+ @ApiModelProperty(value = "订单名称", required = true)
+ @NotNull
+ private String subject;
+
+ /**
+ * 订单总金额
+ */
+ @ApiModelProperty(value = "订单总金额", required = true)
+ @NotNull
+ private Double totalAmount;
+
+ /**
+ * 创建时间
+ */
+ @ApiModelProperty(value = "创建时间")
+ private Long createTime;
+
+ /**
+ * 支付宝交易号
+ */
+ @ApiModelProperty(value = "支付宝交易号")
+ private String tradeNo;
+
+ /**
+ * 失效时间
+ */
+ @ApiModelProperty(value = "失效时间")
+ private Long overTime;
+
+ /**
+ * 订单备注
+ */
+ @ApiModelProperty(value = "订单备注")
+ private String remark;
+
+ /**
+ * 是否删除
+ */
+ @ApiModelProperty(value = "是否删除 1 未删除 0 已删除")
+ private Integer isDe;
+
+ /**
+ * 发票id
+ */
+ @ApiModelProperty(value = "发票id")
+ private Integer userInvoicesId;
+
+
+ public Orders(Integer ordersId, String orderNo,
+ @NotNull Integer userId, @NotNull Integer classId,
+ Integer orderStatus, @NotNull String body, @NotNull String subject,
+ @NotNull Double totalAmount,
+ Long createTime, String tradeNo, Long overTime, Integer isDe,
+ Integer userInvoicesId, String remark
+ ) {
+ this.ordersId = ordersId;
+ this.orderNo = orderNo;
+ this.userId = userId;
+ this.classId = classId;
+ this.orderStatus = orderStatus;
+ this.body = body;
+ this.subject = subject;
+ this.totalAmount = totalAmount;
+ this.createTime = createTime;
+ this.tradeNo = tradeNo;
+ this.overTime = overTime;
+ this.isDe = isDe;
+ this.userInvoicesId = userInvoicesId;
+ this.remark = remark;
+ }
+
+ public Orders() {
+ }
+
+ public Integer getOrdersId() {
+ return ordersId;
+ }
+
+ public void setOrdersId(Integer ordersId) {
+ this.ordersId = ordersId;
+ }
+
+ public String getOrderNo() {
+ return orderNo;
+ }
+
+ public void setOrderNo(String orderNo) {
+ this.orderNo = orderNo;
+ }
+
+ public Integer getUserId() {
+ return userId;
+ }
+
+ public void setUserId(Integer userId) {
+ this.userId = userId;
+ }
+
+ public Integer getClassId() {
+ return classId;
+ }
+
+ public void setClassId(Integer classId) {
+ this.classId = classId;
+ }
+
+ public Integer getOrderStatus() {
+ return orderStatus;
+ }
+
+ public void setOrderStatus(Integer orderStatus) {
+ this.orderStatus = orderStatus;
+ }
+
+ public String getBody() {
+ return body;
+ }
+
+ public void setBody(String body) {
+ this.body = body;
+ }
+
+ public String getSubject() {
+ return subject;
+ }
+
+ public void setSubject(String subject) {
+ this.subject = subject;
+ }
+
+ public Double getTotalAmount() {
+ return totalAmount;
+ }
+
+ public void setTotalAmount(Double totalAmount) {
+ this.totalAmount = totalAmount;
+ }
+
+ public Long getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Long createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getTradeNo() {
+ return tradeNo;
+ }
+
+ public void setTradeNo(String tradeNo) {
+ this.tradeNo = tradeNo;
+ }
+
+ public Long getOverTime() {
+ return overTime;
+ }
+
+ public void setOverTime(Long overTime) {
+ this.overTime = overTime;
+ }
+
+ public Integer getIsDe() {
+ return isDe;
+ }
+
+ public void setIsDe(Integer isDe) {
+ this.isDe = isDe;
+ }
+
+ public Integer getUserInvoicesId() {
+ return userInvoicesId;
+ }
+
+ public void setUserInvoicesId(Integer userInvoicesId) {
+ this.userInvoicesId = userInvoicesId;
+ }
+
+ public String getRemark() {
+ return remark;
+ }
+
+ public void setRemark(String remark) {
+ this.remark = remark;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/Paper.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/Paper.java
new file mode 100644
index 0000000..f0b2381
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/Paper.java
@@ -0,0 +1,193 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * 试卷表(Paper)实体类
+ *
+ * @author java
+ * @since 2020-12-07 11:34:27
+ */
+
+@ApiModel(value = "试卷表")
+public class Paper implements Serializable {
+
+ private static final long serialVersionUID = -88433359130256838L;
+
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键id")
+ private Integer paperId;
+
+ /**
+ * 试卷名称
+ */
+ @ApiModelProperty(value = "试卷名称", required = true)
+ @NotNull
+ private String paperName;
+
+ /**
+ * 试卷类别 1,2分别表示随机试卷,固定试卷
+ */
+ @ApiModelProperty(value = "试卷类别 1,2分别表示随机试卷,固定试卷")
+ private Integer paperType;
+
+ /**
+ * 试卷介绍
+ */
+ @ApiModelProperty(value = "试卷介绍", required = true)
+ @NotNull
+ private String paperIntroduction;
+
+ /**
+ * 总分
+ */
+ @ApiModelProperty(value = "总分", required = true)
+ @NotNull
+ private Integer paperScore;
+
+
+ /**
+ * 及格线
+ */
+ @ApiModelProperty(value = "及格线", required = true)
+ @NotNull
+ private Integer paperScorePass;
+
+
+ /**
+ * 时长
+ */
+ @ApiModelProperty(value = "时长", required = true)
+ private Integer paperTime;
+
+ /**
+ * 题目数量
+ */
+ @ApiModelProperty(value = "题目数量", required = true)
+ private Integer questionsNum;
+
+ /**
+ * 失效时间
+ */
+ @ApiModelProperty(value = "失效时间")
+ private Long endTime;
+
+ /**
+ * 1有效2无效
+ */
+ @ApiModelProperty(value = "1有效2无效")
+ private Integer status;
+
+ public Paper(Integer paperId, @NotNull String paperName,
+ Integer paperType, @NotNull String paperIntroduction,
+ @NotNull Integer paperScore, @NotNull Integer paperScorePass,
+ Integer paperTime,
+ Integer questionsNum, Long endTime, Integer status) {
+ this.paperId = paperId;
+ this.paperName = paperName;
+ this.paperType = paperType;
+ this.paperIntroduction = paperIntroduction;
+ this.paperScore = paperScore;
+ this.paperScorePass = paperScorePass;
+ this.paperTime = paperTime;
+ this.questionsNum = questionsNum;
+ this.endTime = endTime;
+ this.status = status;
+ }
+
+ public Paper() {
+ }
+
+ public Integer getPaperId() {
+ return paperId;
+ }
+
+ public void setPaperId(Integer paperId) {
+ this.paperId = paperId;
+ }
+
+ public String getPaperName() {
+ return paperName;
+ }
+
+ public void setPaperName(String paperName) {
+ this.paperName = paperName;
+ }
+
+ public Integer getPaperType() {
+ return paperType;
+ }
+
+ public void setPaperType(Integer paperType) {
+ this.paperType = paperType;
+ }
+
+ public String getPaperIntroduction() {
+ return paperIntroduction;
+ }
+
+ public void setPaperIntroduction(String paperIntroduction) {
+ this.paperIntroduction = paperIntroduction;
+ }
+
+ public Integer getPaperScore() {
+ return paperScore;
+ }
+
+ public void setPaperScore(Integer paperScore) {
+ this.paperScore = paperScore;
+ }
+
+ public Integer getPaperTime() {
+ return paperTime;
+ }
+
+ public void setPaperTime(Integer paperTime) {
+ this.paperTime = paperTime;
+ }
+
+ public Integer getQuestionsNum() {
+ return questionsNum;
+ }
+
+ public void setQuestionsNum(Integer questionsNum) {
+ this.questionsNum = questionsNum;
+ }
+
+ public Long getEndTime() {
+ return endTime;
+ }
+
+ public void setEndTime(Long endTime) {
+ this.endTime = endTime;
+ }
+
+ public Integer getStatus() {
+ return status;
+ }
+
+ public void setStatus(Integer status) {
+ this.status = status;
+ }
+
+ public Integer getPaperScorePass() {
+ return paperScorePass;
+ }
+
+ public void setPaperScorePass(Integer paperScorePass) {
+ this.paperScorePass = paperScorePass;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/PaperQuestion.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/PaperQuestion.java
new file mode 100644
index 0000000..1dd11d1
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/PaperQuestion.java
@@ -0,0 +1,145 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * 随机试卷问题表(PaperQuestion)实体类
+ *
+ * @author java
+ * @since 2020-12-07 11:35:09
+ */
+
+@ApiModel(value = "抽题表")
+public class PaperQuestion implements Serializable {
+
+ private static final long serialVersionUID = -31457085483443169L;
+
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键id")
+ private Integer paperRuleId;
+
+ /**
+ * 试卷编号
+ */
+ @ApiModelProperty(value = "试卷编号", required = true)
+ @NotNull
+ private Integer paperId;
+
+ /**
+ * 问题数量
+ */
+ @ApiModelProperty(value = "问题数量", required = true)
+ @NotNull
+ private Integer questionNum;
+
+ /**
+ * 难易程度
+ */
+ @ApiModelProperty(value = "难易程度", required = true)
+ private Integer questionLevel;
+
+ /**
+ * 题目类型
+ */
+ @ApiModelProperty(value = "题目类型", required = true)
+ @NotNull
+ private Integer questionType;
+
+ /**
+ * 分值
+ */
+ @ApiModelProperty(value = "分值", required = true)
+ private Integer score;
+
+ /**
+ * 基于哪个题库
+ */
+ @ApiModelProperty(value = "基于哪个题库", required = true)
+ @NotNull
+ private Integer questionTagId;
+
+ public PaperQuestion(Integer paperRuleId, @NotNull Integer paperId,
+ @NotNull Integer questionNum, Integer questionLevel,
+ @NotNull Integer questionType, Integer score,
+ @NotNull Integer questionTagId) {
+ this.paperRuleId = paperRuleId;
+ this.paperId = paperId;
+ this.questionNum = questionNum;
+ this.questionLevel = questionLevel;
+ this.questionType = questionType;
+ this.score = score;
+ this.questionTagId = questionTagId;
+ }
+
+ public PaperQuestion() {
+ }
+
+ public Integer getPaperRuleId() {
+ return paperRuleId;
+ }
+
+ public void setPaperRuleId(Integer paperRuleId) {
+ this.paperRuleId = paperRuleId;
+ }
+
+ public Integer getPaperId() {
+ return paperId;
+ }
+
+ public void setPaperId(Integer paperId) {
+ this.paperId = paperId;
+ }
+
+ public Integer getQuestionNum() {
+ return questionNum;
+ }
+
+ public void setQuestionNum(Integer questionNum) {
+ this.questionNum = questionNum;
+ }
+
+ public Integer getQuestionLevel() {
+ return questionLevel;
+ }
+
+ public void setQuestionLevel(Integer questionLevel) {
+ this.questionLevel = questionLevel;
+ }
+
+ public Integer getQuestionType() {
+ return questionType;
+ }
+
+ public void setQuestionType(Integer questionType) {
+ this.questionType = questionType;
+ }
+
+ public Integer getScore() {
+ return score;
+ }
+
+ public void setScore(Integer score) {
+ this.score = score;
+ }
+
+ public Integer getQuestionTagId() {
+ return questionTagId;
+ }
+
+ public void setQuestionTagId(Integer questionTagId) {
+ this.questionTagId = questionTagId;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/Question.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/Question.java
new file mode 100644
index 0000000..1eb5556
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/Question.java
@@ -0,0 +1,152 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Transient;
+import java.io.Serializable;
+import java.util.List;
+
+
+/**
+ * 习题表(Question)实体类
+ *
+ * @author java
+ * @since 2020-12-07 11:35:53
+ */
+
+@ApiModel(value = "题目表")
+public class Question implements Serializable {
+
+ private static final long serialVersionUID = 215664877400645272L;
+
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键id")
+ private Integer questionId;
+
+ /**
+ * 习题题干
+ */
+ @ApiModelProperty(value = "习题题干", required = true)
+ private String questionDescription;
+
+ /**
+ * 标签id
+ */
+ @ApiModelProperty(value = "标签id", required = true)
+ private Integer tagId;
+
+ /**
+ * 习题类型
+ */
+ @ApiModelProperty(value = "习题类型", required = true)
+ private Integer questionType;
+
+ /**
+ * 习题分数
+ */
+ @ApiModelProperty(value = "习题分数", required = true)
+ private Integer questionScore;
+
+ /**
+ * 习题级别,难中易
+ */
+ @ApiModelProperty(value = "习题级别,难中易", required = true)
+ private Integer questionLevel;
+
+ /**
+ * 解析
+ */
+ @ApiModelProperty(value = "解析", required = true)
+ private String analysis;
+
+ @Transient
+ private List questionAnswerList;
+
+ public Question(Integer questionId, String questionDescription,
+ Integer tagId, Integer questionType,
+ Integer questionScore, Integer questionLevel, String analysis) {
+ this.questionId = questionId;
+ this.questionDescription = questionDescription;
+ this.tagId = tagId;
+ this.questionType = questionType;
+ this.questionScore = questionScore;
+ this.questionLevel = questionLevel;
+ this.analysis = analysis;
+ }
+
+ public Question() {
+ }
+
+ public Integer getQuestionId() {
+ return questionId;
+ }
+
+ public void setQuestionId(Integer questionId) {
+ this.questionId = questionId;
+ }
+
+ public String getQuestionDescription() {
+ return questionDescription;
+ }
+
+ public void setQuestionDescription(String questionDescription) {
+ this.questionDescription = questionDescription;
+ }
+
+ public Integer getTagId() {
+ return tagId;
+ }
+
+ public void setTagId(Integer tagId) {
+ this.tagId = tagId;
+ }
+
+ public Integer getQuestionType() {
+ return questionType;
+ }
+
+ public void setQuestionType(Integer questionType) {
+ this.questionType = questionType;
+ }
+
+ public Integer getQuestionScore() {
+ return questionScore;
+ }
+
+ public void setQuestionScore(Integer questionScore) {
+ this.questionScore = questionScore;
+ }
+
+ public Integer getQuestionLevel() {
+ return questionLevel;
+ }
+
+ public void setQuestionLevel(Integer questionLevel) {
+ this.questionLevel = questionLevel;
+ }
+
+ public String getAnalysis() {
+ return analysis;
+ }
+
+ public void setAnalysis(String analysis) {
+ this.analysis = analysis;
+ }
+
+ public List getQuestionAnswerList() {
+ return questionAnswerList;
+ }
+
+ public void setQuestionAnswerList(List questionAnswerList) {
+ this.questionAnswerList = questionAnswerList;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/QuestionAnswer.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/QuestionAnswer.java
new file mode 100644
index 0000000..2b97580
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/QuestionAnswer.java
@@ -0,0 +1,97 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * 问题答案表(QuestionAnswer)实体类
+ *
+ * @author java
+ * @since 2020-12-07 11:36:17
+ */
+
+@ApiModel(value = "题目答案表")
+public class QuestionAnswer implements Serializable {
+
+ private static final long serialVersionUID = 408168416998479718L;
+
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键id")
+ private Integer questionAnswerId;
+
+ /**
+ * 习题id
+ */
+ @ApiModelProperty(value = "习题id", required = true)
+ @NotNull
+ private Integer questionId;
+
+ /**
+ * 试题答案
+ */
+ @ApiModelProperty(value = "试题答案", required = true)
+ @NotNull
+ private String questionAnswer;
+
+ /**
+ * 是否正确
+ */
+ @ApiModelProperty(value = "是否正确", required = true)
+ @NotNull
+ private Byte isTrue;
+
+ public QuestionAnswer(Integer questionAnswerId, @NotNull Integer questionId,
+ @NotNull String questionAnswer, @NotNull Byte isTrue) {
+ this.questionAnswerId = questionAnswerId;
+ this.questionId = questionId;
+ this.questionAnswer = questionAnswer;
+ this.isTrue = isTrue;
+ }
+
+ public QuestionAnswer() {
+ }
+
+ public Integer getQuestionAnswerId() {
+ return questionAnswerId;
+ }
+
+ public void setQuestionAnswerId(Integer questionAnswerId) {
+ this.questionAnswerId = questionAnswerId;
+ }
+
+ public Integer getQuestionId() {
+ return questionId;
+ }
+
+ public void setQuestionId(Integer questionId) {
+ this.questionId = questionId;
+ }
+
+ public String getQuestionAnswer() {
+ return questionAnswer;
+ }
+
+ public void setQuestionAnswer(String questionAnswer) {
+ this.questionAnswer = questionAnswer;
+ }
+
+ public Byte getIsTrue() {
+ return isTrue;
+ }
+
+ public void setIsTrue(Byte isTrue) {
+ this.isTrue = isTrue;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/QuestionTag.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/QuestionTag.java
new file mode 100644
index 0000000..7fbbaf7
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/QuestionTag.java
@@ -0,0 +1,64 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * 问题标签表(QuestionTag)实体类
+ *
+ * @author java
+ * @since 2020-12-07 11:36:38
+ */
+
+@ApiModel(value = "题目标签表")
+public class QuestionTag implements Serializable {
+
+ private static final long serialVersionUID = 707743295313254406L;
+
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键id")
+ private Integer questionTagId;
+
+ /**
+ * 标签名称
+ */
+ @ApiModelProperty(value = "标签名称", required = true)
+ @NotNull
+ private String tagName;
+
+ public QuestionTag(Integer questionTagId, @NotNull String tagName) {
+ this.questionTagId = questionTagId;
+ this.tagName = tagName;
+ }
+
+ public QuestionTag() {
+ }
+
+ public Integer getQuestionTagId() {
+ return questionTagId;
+ }
+
+ public void setQuestionTagId(Integer questionTagId) {
+ this.questionTagId = questionTagId;
+ }
+
+ public String getTagName() {
+ return tagName;
+ }
+
+ public void setTagName(String tagName) {
+ this.tagName = tagName;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/QuestionType.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/QuestionType.java
new file mode 100644
index 0000000..5bec65d
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/QuestionType.java
@@ -0,0 +1,64 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * 问题类型表(QuestionType)实体类
+ *
+ * @author java
+ * @since 2020-12-07 11:36:58
+ */
+
+@ApiModel(value = "试题类型表")
+public class QuestionType implements Serializable {
+
+ private static final long serialVersionUID = 477430279562474374L;
+
+
+ /**
+ * 题库id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "题库id")
+ private Integer typeId;
+
+ /**
+ * 类型名称
+ */
+ @ApiModelProperty(value = "类型名称", required = true)
+ @NotNull
+ private String typeName;
+
+ public QuestionType(Integer typeId, @NotNull String typeName) {
+ this.typeId = typeId;
+ this.typeName = typeName;
+ }
+
+ public QuestionType() {
+ }
+
+ public Integer getTypeId() {
+ return typeId;
+ }
+
+ public void setTypeId(Integer typeId) {
+ this.typeId = typeId;
+ }
+
+ public String getTypeName() {
+ return typeName;
+ }
+
+ public void setTypeName(String typeName) {
+ this.typeName = typeName;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/Third.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/Third.java
new file mode 100644
index 0000000..2f3bee1
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/Third.java
@@ -0,0 +1,92 @@
+package com.hc.business.model;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import java.io.Serializable;
+
+/**
+ * 第三方用户表(Third)实体类
+ *
+ * @author java
+ * @since 2020-06-17 17:29:30
+ */
+
+public class Third implements Serializable {
+
+ private static final long serialVersionUID = 449560525009961962L;
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ private Integer thirdId;
+ /**
+ * 第三方访问TOKEN
+ */
+ private String thirdToken;
+ /**
+ * 第三方名字
+ */
+ private String thirdName;
+ /**
+ * 创建时间
+ */
+ private Long createTime = System.currentTimeMillis();
+ /**
+ * 失效时间
+ */
+ private Long expireTime;
+
+ public Third(Integer thirdId, String thirdToken, String thirdName, Long createTime, Long expireTime) {
+ this.thirdId = thirdId;
+ this.thirdToken = thirdToken;
+ this.thirdName = thirdName;
+ this.createTime = createTime;
+ this.expireTime = expireTime;
+ }
+
+ public Third() {
+ }
+
+ public Integer getThirdId() {
+ return thirdId;
+ }
+
+ public void setThirdId(Integer thirdId) {
+ this.thirdId = thirdId;
+ }
+
+ public String getThirdToken() {
+ return thirdToken;
+ }
+
+ public void setThirdToken(String thirdToken) {
+ this.thirdToken = thirdToken;
+ }
+
+ public String getThirdName() {
+ return thirdName;
+ }
+
+ public void setThirdName(String thirdName) {
+ this.thirdName = thirdName;
+ }
+
+ public Long getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Long createTime) {
+ this.createTime = createTime;
+ }
+
+ public Long getExpireTime() {
+ return expireTime;
+ }
+
+ public void setExpireTime(Long expireTime) {
+ this.expireTime = expireTime;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/ThirdCourse.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/ThirdCourse.java
new file mode 100644
index 0000000..83f159d
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/ThirdCourse.java
@@ -0,0 +1,93 @@
+package com.hc.business.model;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import java.io.Serializable;
+
+/**
+ * 第三方用户课程配置表(ThirdCourse)实体类
+ *
+ * @author java
+ * @since 2020-06-17 17:29:30
+ */
+
+
+public class ThirdCourse implements Serializable {
+
+ private static final long serialVersionUID = 819515458055433746L;
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ private Integer id;
+ /**
+ * 第三方用户ID
+ */
+ private Integer thirdId;
+ /**
+ * 课程ID
+ */
+ private Integer courseId;
+ /**
+ * 是否有效,默认有效
+ */
+ private Integer status;
+ /**
+ * 配置时间
+ */
+ private Long createTime = System.currentTimeMillis();
+
+ public ThirdCourse(Integer id, Integer thirdId, Integer courseId, Integer status, Long createTime) {
+ this.id = id;
+ this.thirdId = thirdId;
+ this.courseId = courseId;
+ this.status = status;
+ this.createTime = createTime;
+ }
+
+ public ThirdCourse() {
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public Integer getThirdId() {
+ return thirdId;
+ }
+
+ public void setThirdId(Integer thirdId) {
+ this.thirdId = thirdId;
+ }
+
+ public Integer getCourseId() {
+ return courseId;
+ }
+
+ public void setCourseId(Integer courseId) {
+ this.courseId = courseId;
+ }
+
+ public Integer getStatus() {
+ return status;
+ }
+
+ public void setStatus(Integer status) {
+ this.status = status;
+ }
+
+ public Long getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Long createTime) {
+ this.createTime = createTime;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/User.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/User.java
new file mode 100644
index 0000000..4b0d9dd
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/User.java
@@ -0,0 +1,377 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.Email;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * 用户表(User)实体类
+ *
+ * @author java
+ * @since 2020-11-09 10:04:13
+ */
+
+@Builder
+@ApiModel(value = "用户表")
+public class User implements Serializable {
+
+
+ private static final long serialVersionUID = 775234090220211721L;
+
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键id")
+ private Integer userId;
+
+ /**
+ * 身份证
+ */
+ @ApiModelProperty(value = "身份证")
+ private String cardId;
+
+ /**
+ * 用户密码
+ */
+ @ApiModelProperty(value = "用户密码")
+ private String userPassword;
+
+ /**
+ * 用户类别1234分别表示自注册用户,单位报名用户,免费用户,线下用户
+ */
+ @ApiModelProperty(value = "用户类别1234分别表示自注册用户,单位报名用户,免费用户,线下用户", required = true)
+ private Integer userType;
+
+ /**
+ * 用户所属地区。只能看到该地区得课程
+ */
+ @ApiModelProperty(value = "用户所属地区。只能看到该地区得课程")
+ private Integer areaId;
+
+ /**
+ * 用户昵称
+ */
+ @ApiModelProperty(value = "用户昵称")
+ private String userNick;
+
+ /**
+ * 用户姓名
+ */
+ @ApiModelProperty(value = "用户姓名", required = true)
+ @NotNull
+ private String userName;
+
+ /**
+ * 手机号码
+ */
+ @ApiModelProperty(value = "手机号码", required = true)
+ @NotBlank
+ private String userMobile;
+
+ /**
+ * 邮箱
+ */
+ @ApiModelProperty(value = "邮箱",required = true)
+// @Email
+ @NotNull
+ private String userEmail;
+
+ /**
+ * 性别
+ */
+ @ApiModelProperty(value = "性别",required = true)
+ @NotNull
+ private String userGender;
+
+ /**
+ * 创建时间
+ */
+ @ApiModelProperty(value = "创建时间")
+ private Long createTime;
+
+ /**
+ * 生日
+ */
+ @ApiModelProperty(value = "生日")
+ private String userBirthday;
+
+ /**
+ * 是否激活。只要登陆一次,就自动激活
+ */
+ @ApiModelProperty(value = "是否激活。只要登陆一次,就自动激活")
+ private Byte active;
+
+ /**
+ * 用户头像
+ */
+ @ApiModelProperty(value = "用户头像")
+ private String userLogo;
+
+ /**
+ * 用户单位
+ */
+ @ApiModelProperty(value = "用户单位",required = true)
+ @NotNull
+ private String userCompany;
+
+ /**
+ * 保留字段1
+ */
+ @ApiModelProperty(value = "保留字段1")
+ private String userReserved1;
+
+ /**
+ * 保留字段2
+ */
+ @ApiModelProperty(value = "保留字段2")
+ private String userReserved2;
+
+ /**
+ * 保留字段3
+ */
+ @ApiModelProperty(value = "保留字段3")
+ private String userReserved3;
+
+ /**
+ * 保留字段4
+ */
+ @ApiModelProperty(value = "保留字段4")
+ private String userReserved4;
+
+ /**
+ * 保留字段5
+ */
+ @ApiModelProperty(value = "保留字段5")
+ private String userReserved5;
+
+ public User(Integer userId, String cardId, String userPassword,
+ Integer userType, Integer areaId, String userNick,
+ @NotNull String userName, @NotNull String userMobile,
+ @Email String userEmail, @NotNull String userGender,
+ Long createTime, String userBirthday, Byte active,
+ String userLogo, @NotNull String userCompany, String userReserved1,
+ String userReserved2, String userReserved3,
+ String userReserved4, String userReserved5) {
+ this.userId = userId;
+ this.cardId = cardId;
+ this.userPassword = userPassword;
+ this.userType = userType;
+ this.areaId = areaId;
+ this.userNick = userNick;
+ this.userName = userName;
+ this.userMobile = userMobile;
+ this.userEmail = userEmail;
+ this.userGender = userGender;
+ this.createTime = createTime;
+ this.userBirthday = userBirthday;
+ this.active = active;
+ this.userLogo = userLogo;
+ this.userCompany = userCompany;
+ this.userReserved1 = userReserved1;
+ this.userReserved2 = userReserved2;
+ this.userReserved3 = userReserved3;
+ this.userReserved4 = userReserved4;
+ this.userReserved5 = userReserved5;
+ }
+
+ public User() {
+ }
+
+ public Integer getUserId() {
+ return userId;
+ }
+
+ public void setUserId(Integer userId) {
+ this.userId = userId;
+ }
+
+ public String getCardId() {
+ return cardId;
+ }
+
+ public void setCardId(String cardId) {
+ this.cardId = cardId;
+ }
+
+ public String getUserPassword() {
+ return userPassword;
+ }
+
+ public void setUserPassword(String userPassword) {
+ this.userPassword = userPassword;
+ }
+
+ public Integer getUserType() {
+ return userType;
+ }
+
+ public void setUserType(Integer userType) {
+ this.userType = userType;
+ }
+
+ public Integer getAreaId() {
+ return areaId;
+ }
+
+ public void setAreaId(Integer areaId) {
+ this.areaId = areaId;
+ }
+
+ public String getUserNick() {
+ return userNick;
+ }
+
+ public void setUserNick(String userNick) {
+ this.userNick = userNick;
+ }
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+ public String getUserMobile() {
+ return userMobile;
+ }
+
+ public void setUserMobile(String userMobile) {
+ this.userMobile = userMobile;
+ }
+
+ public String getUserEmail() {
+ return userEmail;
+ }
+
+ public void setUserEmail(String userEmail) {
+ this.userEmail = userEmail;
+ }
+
+ public String getUserGender() {
+ return userGender;
+ }
+
+ public void setUserGender(String userGender) {
+ this.userGender = userGender;
+ }
+
+ public Long getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Long createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getUserBirthday() {
+ return userBirthday;
+ }
+
+ public void setUserBirthday(String userBirthday) {
+ this.userBirthday = userBirthday;
+ }
+
+ public Byte getActive() {
+ return active;
+ }
+
+ public void setActive(Byte active) {
+ this.active = active;
+ }
+
+ public String getUserLogo() {
+ return userLogo;
+ }
+
+ public void setUserLogo(String userLogo) {
+ this.userLogo = userLogo;
+ }
+
+ public String getUserCompany() {
+ return userCompany;
+ }
+
+ public void setUserCompany(String userCompany) {
+ this.userCompany = userCompany;
+ }
+
+ public String getUserReserved1() {
+ return userReserved1;
+ }
+
+ public void setUserReserved1(String userReserved1) {
+ this.userReserved1 = userReserved1;
+ }
+
+ public String getUserReserved2() {
+ return userReserved2;
+ }
+
+ public void setUserReserved2(String userReserved2) {
+ this.userReserved2 = userReserved2;
+ }
+
+ public String getUserReserved3() {
+ return userReserved3;
+ }
+
+ public void setUserReserved3(String userReserved3) {
+ this.userReserved3 = userReserved3;
+ }
+
+ public String getUserReserved4() {
+ return userReserved4;
+ }
+
+ public void setUserReserved4(String userReserved4) {
+ this.userReserved4 = userReserved4;
+ }
+
+ public String getUserReserved5() {
+ return userReserved5;
+ }
+
+ public void setUserReserved5(String userReserved5) {
+ this.userReserved5 = userReserved5;
+ }
+
+ @Override
+ public String toString() {
+ return "User{" +
+ "userId=" + userId +
+ ", cardId='" + cardId + '\'' +
+ ", userPassword='" + userPassword + '\'' +
+ ", userType=" + userType +
+ ", areaId=" + areaId +
+ ", userNick='" + userNick + '\'' +
+ ", userName='" + userName + '\'' +
+ ", userMobile='" + userMobile + '\'' +
+ ", userEmail='" + userEmail + '\'' +
+ ", userGender='" + userGender + '\'' +
+ ", createTime=" + createTime +
+ ", userBirthday='" + userBirthday + '\'' +
+ ", active=" + active +
+ ", userLogo='" + userLogo + '\'' +
+ ", userCompany='" + userCompany + '\'' +
+ ", userReserved1='" + userReserved1 + '\'' +
+ ", userReserved2='" + userReserved2 + '\'' +
+ ", userReserved3='" + userReserved3 + '\'' +
+ ", userReserved4='" + userReserved4 + '\'' +
+ ", userReserved5='" + userReserved5 + '\'' +
+ '}';
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserAdmin.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserAdmin.java
new file mode 100644
index 0000000..4cdf7db
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserAdmin.java
@@ -0,0 +1,114 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * 管理员表(UserAdmin)实体类
+ *
+ * @author java
+ * @since 2020-11-16 13:45:03
+ */
+
+@ApiModel(value = "管理员表")
+public class UserAdmin implements Serializable {
+
+ private static final long serialVersionUID = -33023267070799101L;
+
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键id")
+ private Integer userAdminId;
+
+ /**
+ * 管理员名字
+ */
+ @ApiModelProperty(value = "管理员名字", required = true)
+ @NotNull
+ private String adminName;
+
+ /**
+ * 管理员账号
+ */
+ @ApiModelProperty(value = "管理员账号", required = true)
+ @NotNull
+ private String adminAccount;
+
+ /**
+ * 管理员密码
+ */
+ @ApiModelProperty(value = "管理员密码", required = true)
+ @NotNull
+ private String adminPass;
+
+ /**
+ * 管理员级别
+ */
+ @ApiModelProperty(value = "管理员级别", required = true)
+ @NotNull
+ private Integer permissionLevel;
+
+ public UserAdmin(Integer userAdminId, @NotNull String adminName,
+ @NotNull String adminAccount,
+ @NotNull String adminPass, @NotNull Integer permissionLevel) {
+ this.userAdminId = userAdminId;
+ this.adminName = adminName;
+ this.adminAccount = adminAccount;
+ this.adminPass = adminPass;
+ this.permissionLevel = permissionLevel;
+ }
+
+ public UserAdmin() {
+ }
+
+ public Integer getUserAdminId() {
+ return userAdminId;
+ }
+
+ public void setUserAdminId(Integer userAdminId) {
+ this.userAdminId = userAdminId;
+ }
+
+ public String getAdminName() {
+ return adminName;
+ }
+
+ public void setAdminName(String adminName) {
+ this.adminName = adminName;
+ }
+
+ public String getAdminAccount() {
+ return adminAccount;
+ }
+
+ public void setAdminAccount(String adminAccount) {
+ this.adminAccount = adminAccount;
+ }
+
+ public String getAdminPass() {
+ return adminPass;
+ }
+
+ public void setAdminPass(String adminPass) {
+ this.adminPass = adminPass;
+ }
+
+ public Integer getPermissionLevel() {
+ return permissionLevel;
+ }
+
+ public void setPermissionLevel(Integer permissionLevel) {
+ this.permissionLevel = permissionLevel;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserAdvise.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserAdvise.java
new file mode 100644
index 0000000..cdac092
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserAdvise.java
@@ -0,0 +1,172 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.Email;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * 用户建议表
+ * (UserAdvise)实体类
+ *
+ * @author java
+ * @since 2020-11-16 14:20:01
+ */
+
+@ApiModel(value = "用户信息表")
+public class UserAdvise implements Serializable {
+
+ private static final long serialVersionUID = -75842427826309033L;
+
+
+ /**
+ * 主键
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键")
+ private Integer adviceId;
+
+ /**
+ * 用户ID
+ */
+ @ApiModelProperty(value = "用户ID", required = true)
+ @NotNull
+ private Integer userId;
+
+ /**
+ * 邮箱
+ */
+ @ApiModelProperty(value = "邮箱", required = true)
+ @NotNull
+ @Email
+ private String email;
+
+ /**
+ * 标题
+ */
+ @ApiModelProperty(value = "标题", required = true)
+ @NotNull
+ private String title;
+
+ /**
+ * 用户建议
+ */
+ @ApiModelProperty(value = "通知信息", required = true)
+ @NotNull
+ private String advise;
+
+ /**
+ * 时间
+ */
+ @ApiModelProperty(value = "时间")
+ private Long createTime;
+
+
+ @ApiModelProperty(value = "通知图片")
+ private String adviceLogo;
+
+
+ @ApiModelProperty(value = "通知类型")
+ private Integer adviceType;
+
+ @ApiModelProperty(value = "是否回复")
+ private Integer isReply;
+
+ public UserAdvise(Integer adviceId, @NotNull Integer userId,
+ @NotNull @Email String email,
+ @NotNull String title, @NotNull String advise,
+ Long createTime, String adviceLogo,
+ Integer adviceType, Integer isReply) {
+ this.adviceId = adviceId;
+ this.userId = userId;
+ this.email = email;
+ this.title = title;
+ this.advise = advise;
+ this.createTime = createTime;
+ this.adviceLogo = adviceLogo;
+ this.adviceType = adviceType;
+ this.isReply = isReply;
+ }
+
+ public UserAdvise() {
+ }
+
+ public Integer getAdviceId() {
+ return adviceId;
+ }
+
+ public void setAdviceId(Integer adviceId) {
+ this.adviceId = adviceId;
+ }
+
+ public Integer getUserId() {
+ return userId;
+ }
+
+ public void setUserId(Integer userId) {
+ this.userId = userId;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getAdvise() {
+ return advise;
+ }
+
+ public void setAdvise(String advise) {
+ this.advise = advise;
+ }
+
+ public Long getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Long createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getAdviceLogo() {
+ return adviceLogo;
+ }
+
+ public void setAdviceLogo(String adviceLogo) {
+ this.adviceLogo = adviceLogo;
+ }
+
+ public Integer getAdviceType() {
+ return adviceType;
+ }
+
+ public void setAdviceType(Integer adviceType) {
+ this.adviceType = adviceType;
+ }
+
+ public Integer getIsReply() {
+ return isReply;
+ }
+
+ public void setIsReply(Integer isReply) {
+ this.isReply = isReply;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserCourse.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserCourse.java
new file mode 100644
index 0000000..10a4d1d
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserCourse.java
@@ -0,0 +1,114 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * 用户课程表(UserCourse)实体类
+ *
+ * @author java
+ * @since 2020-11-09 10:05:18
+ */
+
+@ApiModel(value = "用户课程表")
+public class UserCourse implements Serializable {
+
+ private static final long serialVersionUID = 367696525637009095L;
+
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键id")
+ private Integer userCourseId;
+
+ /**
+ * 用户id
+ */
+ @ApiModelProperty(value = "用户id", required = true)
+ @NotNull
+ private Integer userId;
+
+ /**
+ * 课程SKUid
+ */
+ @ApiModelProperty(value = "课程SKUid", required = true)
+ @NotNull
+ private Integer courseId;
+
+ /**
+ * 总体进度
+ */
+ @ApiModelProperty(value = "总体进度")
+ @NotNull
+ private Double coursePercent;
+
+ /**
+ * 班级ID
+ */
+ @ApiModelProperty(value = "班级ID", required = true)
+ @NotNull
+ private Integer classId;
+
+ public UserCourse(Integer userCourseId, @NotNull Integer userId,
+ @NotNull Integer courseId, Double coursePercent,
+ @NotNull Integer classId) {
+ this.userCourseId = userCourseId;
+ this.userId = userId;
+ this.courseId = courseId;
+ this.coursePercent = coursePercent;
+ this.classId = classId;
+ }
+
+ public UserCourse() {
+ }
+
+ public Integer getUserCourseId() {
+ return userCourseId;
+ }
+
+ public void setUserCourseId(Integer userCourseId) {
+ this.userCourseId = userCourseId;
+ }
+
+ public Integer getUserId() {
+ return userId;
+ }
+
+ public void setUserId(Integer userId) {
+ this.userId = userId;
+ }
+
+ public Integer getCourseId() {
+ return courseId;
+ }
+
+ public void setCourseId(Integer courseId) {
+ this.courseId = courseId;
+ }
+
+ public Double getCoursePercent() {
+ return coursePercent;
+ }
+
+ public void setCoursePercent(Double coursePercent) {
+ this.coursePercent = coursePercent;
+ }
+
+ public Integer getClassId() {
+ return classId;
+ }
+
+ public void setClassId(Integer classId) {
+ this.classId = classId;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserInvoices.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserInvoices.java
new file mode 100644
index 0000000..8c92751
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserInvoices.java
@@ -0,0 +1,302 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Transient;
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 用户发票表(UserInvoices)实体类
+ *
+ * @author java
+ * @since 2020-12-02 10:50:29
+ */
+
+@ApiModel(value = "订单发票表")
+public class UserInvoices implements Serializable {
+
+
+ private static final long serialVersionUID = -61454177699116234L;
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键id")
+ private Integer userInvoicesId;
+
+ /**
+ * 抬头
+ */
+ @ApiModelProperty(value = "抬头", required = true)
+ private String invoicesHead;
+
+ /**
+ * 发票类型,12普票专票
+ */
+ @ApiModelProperty(value = "发票类型,12普票专票", required = true)
+ private Integer invoicesType;
+
+ /**
+ * 税号
+ */
+ @ApiModelProperty(value = "税号", required = true)
+ private String invoicesCode;
+
+ /**
+ * 开户行
+ */
+ @ApiModelProperty(value = "开户行", required = true)
+ private String invoicesBank;
+
+ /**
+ * 开户名
+ */
+ @ApiModelProperty(value = "开户名", required = true)
+ private String invoicesUser;
+
+ /**
+ * 开户账号
+ */
+ @ApiModelProperty(value = "开户账号", required = true)
+ private String invoicesNo;
+
+ /**
+ * 发票金额
+ */
+ @ApiModelProperty(value = "发票金额", required = true)
+ @NotNull
+ private Double invoicesPrice;
+
+ /**
+ * 申请日期
+ */
+ @ApiModelProperty(value = "申请日期")
+ private Long createTime;
+
+ /**
+ * 处理状态
+ */
+ @ApiModelProperty(value = "状态")
+ private Integer status;
+
+ /**
+ * 处理日期
+ */
+ @ApiModelProperty(value = "处理日期")
+ private Long time;
+
+ /**
+ * 用户ID
+ */
+ @ApiModelProperty(value = "用户ID", required = true)
+ @NotNull
+ private Integer userId;
+
+ /**
+ * 班次id
+ */
+ @ApiModelProperty(value = "班次ID", required = true)
+ @NotNull
+ private Integer classId;
+
+ /**
+ * 发票备注
+ */
+ @ApiModelProperty(value = "发票备注")
+ private String remarks;
+
+ /**
+ * 后台发票标记
+ */
+ @ApiModelProperty(value = "后台发票标记")
+ private String remarksSign;
+
+ /**
+ * 发票代码
+ */
+ @ApiModelProperty(value = "发票代码")
+ private String taxCode;
+
+ @NotEmpty
+ @ApiModelProperty(value = "订单id")
+ @Transient
+ private List ordersIdList;
+
+
+ public UserInvoices(Integer userInvoicesId, String invoicesHead,
+ Integer invoicesType, String invoicesCode, String invoicesBank,
+ String invoicesUser, String invoicesNo,
+ @NotNull Double invoicesPrice, Long createTime,
+ Integer status, Long time,
+ @NotNull Integer userId, Integer classId, String remarks
+ , String remarksSign, String taxCode, List ordersIdList) {
+ this.userInvoicesId = userInvoicesId;
+ this.invoicesHead = invoicesHead;
+ this.invoicesType = invoicesType;
+ this.invoicesCode = invoicesCode;
+ this.invoicesBank = invoicesBank;
+ this.invoicesUser = invoicesUser;
+ this.invoicesNo = invoicesNo;
+ this.invoicesPrice = invoicesPrice;
+ this.createTime = createTime;
+ this.status = status;
+ this.time = time;
+ this.userId = userId;
+ this.remarks = remarks;
+ this.remarksSign = remarksSign;
+ this.taxCode = taxCode;
+ this.classId = classId;
+ this.ordersIdList = ordersIdList;
+ }
+
+
+ public UserInvoices() {
+ }
+
+ public Integer getUserInvoicesId() {
+ return userInvoicesId;
+ }
+
+ public void setUserInvoicesId(Integer userInvoicesId) {
+ this.userInvoicesId = userInvoicesId;
+ }
+
+ public String getInvoicesHead() {
+ return invoicesHead;
+ }
+
+ public void setInvoicesHead(String invoicesHead) {
+ this.invoicesHead = invoicesHead;
+ }
+
+ public Integer getInvoicesType() {
+ return invoicesType;
+ }
+
+ public void setInvoicesType(Integer invoicesType) {
+ this.invoicesType = invoicesType;
+ }
+
+ public String getInvoicesCode() {
+ return invoicesCode;
+ }
+
+ public void setInvoicesCode(String invoicesCode) {
+ this.invoicesCode = invoicesCode;
+ }
+
+ public String getInvoicesBank() {
+ return invoicesBank;
+ }
+
+ public void setInvoicesBank(String invoicesBank) {
+ this.invoicesBank = invoicesBank;
+ }
+
+ public String getInvoicesUser() {
+ return invoicesUser;
+ }
+
+ public void setInvoicesUser(String invoicesUser) {
+ this.invoicesUser = invoicesUser;
+ }
+
+ public String getInvoicesNo() {
+ return invoicesNo;
+ }
+
+ public void setInvoicesNo(String invoicesNo) {
+ this.invoicesNo = invoicesNo;
+ }
+
+ public Double getInvoicesPrice() {
+ return invoicesPrice;
+ }
+
+ public void setInvoicesPrice(Double invoicesPrice) {
+ this.invoicesPrice = invoicesPrice;
+ }
+
+ public Long getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Long createTime) {
+ this.createTime = createTime;
+ }
+
+ public Integer getStatus() {
+ return status;
+ }
+
+ public void setStatus(Integer status) {
+ this.status = status;
+ }
+
+ public Long getTime() {
+ return time;
+ }
+
+ public void setTime(Long time) {
+ this.time = time;
+ }
+
+ public Integer getUserId() {
+ return userId;
+ }
+
+ public void setUserId(Integer userId) {
+ this.userId = userId;
+ }
+
+ public String getRemarks() {
+ return remarks;
+ }
+
+ public void setRemarks(String remarks) {
+ this.remarks = remarks;
+ }
+
+
+ public List getOrdersIdList() {
+ return ordersIdList;
+ }
+
+ public void setOrdersIdList(List ordersIdList) {
+ this.ordersIdList = ordersIdList;
+ }
+
+ public String getRemarksSign() {
+ return remarksSign;
+ }
+
+ public void setRemarksSign(String remarksSign) {
+ this.remarksSign = remarksSign;
+ }
+
+ public String getTaxCode() {
+ return taxCode;
+ }
+
+ public void setTaxCode(String taxCode) {
+ this.taxCode = taxCode;
+ }
+
+ public Integer getClassId() {
+ return classId;
+ }
+
+ public void setClassId(Integer classId) {
+ this.classId = classId;
+ }
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserRefundHistory.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserRefundHistory.java
new file mode 100644
index 0000000..bd72a5e
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserRefundHistory.java
@@ -0,0 +1,155 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+
+/**
+ * 用户退款记录表(UserRefundHistory)实体类
+ *
+ * @author java
+ * @since 2020-12-10 11:31:35
+ */
+
+@ApiModel(value = "用户退款表")
+public class UserRefundHistory implements Serializable {
+
+ private static final long serialVersionUID = -82710997323240027L;
+
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键id")
+ private Integer id;
+
+ /**
+ * 用户ID
+ */
+ @ApiModelProperty(value = "用户ID", required = true)
+ @NotNull
+ private Integer userId;
+
+ /**
+ * 用户类型12,普通用户,单位用户
+ */
+ @ApiModelProperty(value = "用户类型12,普通用户,单位用户", required = true)
+ @NotNull
+ private Integer userType;
+
+ /**
+ * 退款订单号
+ */
+ @ApiModelProperty(value = "退款订单号", required = true)
+ @NotNull
+ private String orderNo;
+
+ /**
+ * 退款时间
+ */
+ @ApiModelProperty(value = "退款时间")
+ private Long createTime;
+
+ /**
+ * 退款处理时间,保留
+ */
+ @ApiModelProperty(value = "退款处理时间,保留")
+ private Long doneTime;
+
+ @ApiModelProperty(value = "备注")
+ private String remark;
+
+ @ApiModelProperty(value = "退费金额")
+ @NotNull
+ private BigDecimal refundPrice;
+
+ public UserRefundHistory(Integer id, @NotNull Integer userId,
+ @NotNull Integer userType, String orderNo,
+ Long createTime, Long doneTime, String remark,
+ BigDecimal refundPrice) {
+ this.id = id;
+ this.userId = userId;
+ this.userType = userType;
+ this.orderNo = orderNo;
+ this.createTime = createTime;
+ this.doneTime = doneTime;
+ this.remark = remark;
+ this.refundPrice = refundPrice;
+ }
+
+ public UserRefundHistory() {
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public Integer getUserId() {
+ return userId;
+ }
+
+ public void setUserId(Integer userId) {
+ this.userId = userId;
+ }
+
+ public Integer getUserType() {
+ return userType;
+ }
+
+ public void setUserType(Integer userType) {
+ this.userType = userType;
+ }
+
+ public String getOrderNo() {
+ return orderNo;
+ }
+
+ public void setOrderNo(String orderNo) {
+ this.orderNo = orderNo;
+ }
+
+ public Long getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Long createTime) {
+ this.createTime = createTime;
+ }
+
+ public Long getDoneTime() {
+ return doneTime;
+ }
+
+ public void setDoneTime(Long doneTime) {
+ this.doneTime = doneTime;
+ }
+
+ public String getRemark() {
+ return remark;
+ }
+
+ public void setRemark(String remark) {
+ this.remark = remark;
+ }
+
+ public BigDecimal getRefundPrice() {
+ return refundPrice;
+ }
+
+ public void setRefundPrice(BigDecimal refundPrice) {
+ this.refundPrice = refundPrice;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserStatus.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserStatus.java
new file mode 100644
index 0000000..a22176b
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserStatus.java
@@ -0,0 +1,115 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * 用户班级学习进度表
+ * (UserStatus)实体类
+ *
+ * @author java
+ * @since 2020-12-06 11:37:06
+ */
+
+@ApiModel(value = "用户状态表")
+public class UserStatus implements Serializable {
+
+ private static final long serialVersionUID = 425010649051627355L;
+
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键id")
+ private Integer statusId;
+
+ /**
+ * 用户id
+ */
+ @ApiModelProperty(value = "用户id")
+ @NotNull
+ private Integer userId;
+
+ /**
+ * 地区年度继续学习配置ID
+ */
+ @ApiModelProperty(value = "地区年度继续学习配置ID")
+ @NotNull
+ private Integer classId;
+
+ /**
+ * 报名得订单号
+ */
+ @ApiModelProperty(value = "报名得订单号")
+ @NotNull
+ private Integer orderId;
+
+ /**
+ * 状态
+ */
+ @ApiModelProperty(value = "状态", required = true)
+ @NotNull
+ private Integer status;
+
+ public UserStatus(Integer statusId, @NotNull Integer userId,
+ @NotNull Integer classId,
+ @NotNull Integer orderId, @NotNull Integer status) {
+ this.statusId = statusId;
+ this.userId = userId;
+ this.classId = classId;
+ this.orderId = orderId;
+ this.status = status;
+ }
+
+ public UserStatus() {
+ }
+
+ public Integer getStatusId() {
+ return statusId;
+ }
+
+ public void setStatusId(Integer statusId) {
+ this.statusId = statusId;
+ }
+
+ public Integer getUserId() {
+ return userId;
+ }
+
+ public void setUserId(Integer userId) {
+ this.userId = userId;
+ }
+
+ public Integer getClassId() {
+ return classId;
+ }
+
+ public void setClassId(Integer classId) {
+ this.classId = classId;
+ }
+
+ public Integer getOrderId() {
+ return orderId;
+ }
+
+ public void setOrderId(Integer orderId) {
+ this.orderId = orderId;
+ }
+
+ public Integer getStatus() {
+ return status;
+ }
+
+ public void setStatus(Integer status) {
+ this.status = status;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserTeacher.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserTeacher.java
new file mode 100644
index 0000000..880b4f1
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserTeacher.java
@@ -0,0 +1,130 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+
+/**
+ * (UserTeacher)实体类
+ *
+ * @author java
+ * @since 2020-11-20 11:08:17
+ */
+
+@ApiModel(value = "老师表")
+public class UserTeacher implements Serializable {
+
+ private static final long serialVersionUID = 354661860163916483L;
+
+
+ /**
+ * 主键
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键")
+ private Integer teacherId;
+
+ /**
+ * 老师名称
+ */
+ @ApiModelProperty(value = "老师名称", required = true)
+ @NotNull
+ private String teacherName;
+
+ /**
+ * 老师简介
+ */
+ @ApiModelProperty(value = "老师简介", required = true)
+ @NotNull
+ private String teacherIntroduce;
+
+ /**
+ * 老师头像
+ */
+ @ApiModelProperty(value = "老师头像", required = true)
+ @NotNull
+ private String teacherLogo;
+
+ /**
+ * 老师图片
+ */
+ @ApiModelProperty(value = "老师图片", required = true)
+ @NotNull
+ private String teacherUrl;
+
+ /**
+ * 时间
+ */
+ @ApiModelProperty(value = "时间")
+ private Long createTime;
+
+ public UserTeacher(Integer teacherId, @NotNull String teacherName,
+ @NotNull String teacherIntroduce,
+ @NotNull String teacherLogo,
+ @NotNull String teacherUrl, Long createTime) {
+ this.teacherId = teacherId;
+ this.teacherName = teacherName;
+ this.teacherIntroduce = teacherIntroduce;
+ this.teacherLogo = teacherLogo;
+ this.teacherUrl = teacherUrl;
+ this.createTime = createTime;
+ }
+
+ public UserTeacher() {
+ }
+
+ public Integer getTeacherId() {
+ return teacherId;
+ }
+
+ public void setTeacherId(Integer teacherId) {
+ this.teacherId = teacherId;
+ }
+
+ public String getTeacherName() {
+ return teacherName;
+ }
+
+ public void setTeacherName(String teacherName) {
+ this.teacherName = teacherName;
+ }
+
+ public String getTeacherIntroduce() {
+ return teacherIntroduce;
+ }
+
+ public void setTeacherIntroduce(String teacherIntroduce) {
+ this.teacherIntroduce = teacherIntroduce;
+ }
+
+ public String getTeacherLogo() {
+ return teacherLogo;
+ }
+
+ public void setTeacherLogo(String teacherLogo) {
+ this.teacherLogo = teacherLogo;
+ }
+
+ public String getTeacherUrl() {
+ return teacherUrl;
+ }
+
+ public void setTeacherUrl(String teacherUrl) {
+ this.teacherUrl = teacherUrl;
+ }
+
+ public Long getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Long createTime) {
+ this.createTime = createTime;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserTestHistory.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserTestHistory.java
new file mode 100644
index 0000000..c21f2db
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserTestHistory.java
@@ -0,0 +1,165 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import java.io.Serializable;
+
+
+/**
+ * 用户考试记录表(UserTestHistory)实体类
+ *
+ * @author java
+ * @since 2020-12-07 11:28:17
+ */
+
+@ApiModel(value = "考试记录表")
+public class UserTestHistory implements Serializable {
+
+ private static final long serialVersionUID = -86805600747462758L;
+
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键id")
+ private Integer testId;
+
+ /**
+ * 用户Id
+ */
+ @ApiModelProperty(value = "用户Id", required = true)
+ private Integer userId;
+
+ /**
+ * 试卷ID
+ */
+ @ApiModelProperty(value = "试卷ID", required = true)
+ private Integer paperId;
+
+ /**
+ * 班次id
+ */
+ @ApiModelProperty(value = "班次ID", required = true)
+ private Integer classId;
+
+ /**
+ * 成绩
+ */
+ @ApiModelProperty(value = "成绩", required = true)
+ private Integer score;
+
+ /**
+ * 问题ID数组
+ */
+ @ApiModelProperty(value = "问题ID数组", required = true)
+ private String answer;
+
+
+ @ApiModelProperty(value = "创建时间")
+ private Long createTime;
+
+
+ @ApiModelProperty(value = "总分", required = true)
+ private Integer totalScore;
+
+ /**
+ * 考试时间
+ */
+ @ApiModelProperty(value = "考试时间", required = true)
+ private String testTime;
+
+ public UserTestHistory(Integer testId, Integer userId, Integer paperId,
+ Integer classId, Integer score, String answer,
+ Long createTime, Integer totalScore, String testTime) {
+ this.testId = testId;
+ this.userId = userId;
+ this.paperId = paperId;
+ this.classId = classId;
+ this.score = score;
+ this.answer = answer;
+ this.createTime = createTime;
+ this.totalScore = totalScore;
+ this.testTime = testTime;
+ }
+
+ public UserTestHistory() {
+ }
+
+ public Integer getTestId() {
+ return testId;
+ }
+
+ public void setTestId(Integer testId) {
+ this.testId = testId;
+ }
+
+ public Integer getUserId() {
+ return userId;
+ }
+
+ public void setUserId(Integer userId) {
+ this.userId = userId;
+ }
+
+ public Integer getPaperId() {
+ return paperId;
+ }
+
+ public void setPaperId(Integer paperId) {
+ this.paperId = paperId;
+ }
+
+ public Integer getClassId() {
+ return classId;
+ }
+
+ public void setClassId(Integer classId) {
+ this.classId = classId;
+ }
+
+ public Integer getScore() {
+ return score;
+ }
+
+ public void setScore(Integer score) {
+ this.score = score;
+ }
+
+ public String getAnswer() {
+ return answer;
+ }
+
+ public void setAnswer(String answer) {
+ this.answer = answer;
+ }
+
+ public Long getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Long createTime) {
+ this.createTime = createTime;
+ }
+
+ public Integer getTotalScore() {
+ return totalScore;
+ }
+
+ public void setTotalScore(Integer totalScore) {
+ this.totalScore = totalScore;
+ }
+
+ public String getTestTime() {
+ return testTime;
+ }
+
+ public void setTestTime(String testTime) {
+ this.testTime = testTime;
+ }
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserVideoPosition.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserVideoPosition.java
new file mode 100644
index 0000000..ba7301e
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/UserVideoPosition.java
@@ -0,0 +1,122 @@
+package com.hc.business.model;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+/**
+ * 用户视频观看记录(UserVideoPosition)实体类
+ *
+ * @author java
+ * @since 2020-05-29 15:50:50
+ */
+
+@ApiModel(value = "视频记录表")
+public class UserVideoPosition implements Serializable {
+
+ private static final long serialVersionUID = 133164084604002223L;
+
+ /**
+ * 主键id
+ */
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @ApiModelProperty(value = "主键ID")
+ private Integer userVideoPositionId;
+
+ /**
+ * 视频id
+ */
+ @ApiModelProperty(value = "视频id", required = true)
+ @NotNull
+ private Integer videoId;
+
+ /**
+ * 用户id
+ */
+ @ApiModelProperty(value = "用户id", required = true)
+ @NotNull
+ private Integer userId;
+
+ /**
+ * 视频观看时间
+ */
+ private String videoPosition;
+
+ /**
+ * 是否观看解鼠
+ */
+ private Integer watchEnd;
+
+ /**
+ * 视频时长
+ */
+ private String videoTime;
+
+ public UserVideoPosition(Integer userVideoPositionId, @NotNull Integer videoId,
+ @NotNull Integer userId,
+ String videoPosition, Integer watchEnd, String videoTime) {
+ this.userVideoPositionId = userVideoPositionId;
+ this.videoId = videoId;
+ this.userId = userId;
+ this.videoPosition = videoPosition;
+ this.watchEnd = watchEnd;
+ this.videoTime = videoTime;
+ }
+
+ public UserVideoPosition() {
+ }
+
+ public Integer getUserVideoPositionId() {
+ return userVideoPositionId;
+ }
+
+ public void setUserVideoPositionId(Integer userVideoPositionId) {
+ this.userVideoPositionId = userVideoPositionId;
+ }
+
+ public Integer getVideoId() {
+ return videoId;
+ }
+
+ public void setVideoId(Integer videoId) {
+ this.videoId = videoId;
+ }
+
+ public Integer getUserId() {
+ return userId;
+ }
+
+ public void setUserId(Integer userId) {
+ this.userId = userId;
+ }
+
+ public String getVideoPosition() {
+ return videoPosition;
+ }
+
+ public void setVideoPosition(String videoPosition) {
+ this.videoPosition = videoPosition;
+ }
+
+ public Integer getWatchEnd() {
+ return watchEnd;
+ }
+
+ public void setWatchEnd(Integer watchEnd) {
+ this.watchEnd = watchEnd;
+ }
+
+ public String getVideoTime() {
+ return videoTime;
+ }
+
+ public void setVideoTime(String videoTime) {
+ this.videoTime = videoTime;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/jwt/GenerateAuthToken.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/jwt/GenerateAuthToken.java
new file mode 100644
index 0000000..7cb2e44
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/jwt/GenerateAuthToken.java
@@ -0,0 +1,66 @@
+package com.hc.business.model.jwt;
+
+import com.hc.business.model.User;
+import com.hc.business.model.UserAdmin;
+import com.hc.business.model.login.AccessEntity;
+import com.hc.business.model.login.AuthEntity;
+import com.hc.business.model.login.TokenEntity;
+import com.hc.core.utils.exception.ResponseException;
+import com.hc.core.utils.redis.RedisUtil;
+import com.hc.core.utils.tool.IdGenerator;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+import org.springframework.util.SerializationUtils;
+
+import java.util.Objects;
+
+@Slf4j
+@Component
+public class GenerateAuthToken {
+
+
+ private final RedisUtil redisUtil;
+
+ public GenerateAuthToken(RedisUtil redisUtil) {
+ this.redisUtil = redisUtil;
+ }
+
+ public AccessEntity generateToken(AuthEntity auth, User user, UserAdmin userAdmin) {
+
+ AccessEntity accessEntity = new AccessEntity();
+ accessEntity.setAuth(auth);
+ TokenEntity tokenEntity = new TokenEntity();
+ // 默认超时 8 小时
+ tokenEntity.setExpires(60 * 60 * 8);
+ String token = JWTUtil.sign(auth.getUserName(), IdGenerator.passwordToHash(auth.getPassword()));
+ tokenEntity.setId(token);
+
+ if (userAdmin != null) {
+ //设置权限级别
+ tokenEntity.setPermissionLevel(userAdmin.getPermissionLevel());
+ }
+
+ accessEntity.setToken(tokenEntity);
+
+ String accessEntityStr = null;
+ try {
+ accessEntityStr = new String(Objects.requireNonNull(SerializationUtils.serialize(accessEntity)));
+ } catch (Exception e) {
+ throw new ResponseException(-1,"登录序列化失败");
+ }
+
+ // 写入到 redis
+ redisUtil.set(accessEntity.getToken().getId(),
+ accessEntityStr,
+ accessEntity.getToken().getExpires());
+
+ if (user != null) {
+ accessEntity.setUser(user);
+ }
+ if (userAdmin != null){
+ accessEntity.setUserAdmin(userAdmin);
+ }
+ log.info("user: {}", auth.getUserName()+" 成功登录系统");
+ return accessEntity;
+ }
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/jwt/JWTUtil.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/jwt/JWTUtil.java
new file mode 100644
index 0000000..2f33000
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/jwt/JWTUtil.java
@@ -0,0 +1,76 @@
+package com.hc.business.model.jwt;
+
+import com.auth0.jwt.JWT;
+import com.auth0.jwt.JWTVerifier;
+import com.auth0.jwt.algorithms.Algorithm;
+import com.auth0.jwt.exceptions.JWTDecodeException;
+import com.auth0.jwt.interfaces.DecodedJWT;
+import org.springframework.stereotype.Component;
+
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+
+@Component
+public class JWTUtil {
+
+ // 过期时间8小时0分钟
+
+ private static final long EXPIRE_TIME = 8 * 60 * 60 * 1000;
+
+ /**
+ * 校验token是否正确
+ *
+ * @param token 密钥
+ * @param secret 用户的密码
+ * @return 是否正确
+ */
+ public static boolean verify(String token, String userName, String secret) {
+ try {
+ Algorithm algorithm = Algorithm.HMAC256(secret);
+ JWTVerifier verifier = JWT.require(algorithm)
+ .withClaim("userName", userName)
+ .build();
+ DecodedJWT jwt = verifier.verify(token);
+ return true;
+ } catch (Exception exception) {
+ System.out.println(exception.getMessage());
+ return false;
+ }
+ }
+
+ /**
+ * 获得token中的信息无需secret解密也能获得
+ *
+ * @return token中包含的用户名
+ */
+ public static String getUserName(String token) {
+ try {
+ DecodedJWT jwt = JWT.decode(token);
+ return jwt.getClaim("userName").asString();
+ } catch (JWTDecodeException e) {
+ return null;
+ }
+ }
+
+ /**
+ * 生成签名,2小时后过期
+ *
+ * @param userName 用户名
+ * @param secret 用户的密码
+ * @return 加密的token
+ */
+ public static String sign(String userName, String secret) {
+ Date date = new Date(System.currentTimeMillis() + EXPIRE_TIME);
+ Algorithm algorithm = null;
+ try {
+ algorithm = Algorithm.HMAC256(secret);
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ }
+ // 附带userName信息
+ return JWT.create()
+ .withClaim("userName", userName)
+ .withExpiresAt(date)
+ .sign(algorithm);
+ }
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/login/AccessEntity.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/login/AccessEntity.java
new file mode 100644
index 0000000..5850fac
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/login/AccessEntity.java
@@ -0,0 +1,31 @@
+package com.hc.business.model.login;
+
+import com.hc.business.model.User;
+import com.hc.business.model.UserAdmin;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@ApiModel("登录信息表")
+@Data
+public class AccessEntity implements Serializable{
+
+ private static final long serialVersionUID = -5164168823800497252L;
+
+ @ApiModelProperty(value = "用户信息")
+ private AuthEntity auth;
+
+ @ApiModelProperty(value = "token",example = "e781d000-0498-46d3-90df-96edfd95bcd6")
+ private TokenEntity token;
+
+ @ApiModelProperty(value = "user")
+ private User user;
+
+ @ApiModelProperty(value = "userAdmin")
+ private UserAdmin userAdmin;
+
+
+
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/login/AuthEntity.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/login/AuthEntity.java
new file mode 100644
index 0000000..cec16e9
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/login/AuthEntity.java
@@ -0,0 +1,19 @@
+package com.hc.business.model.login;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+@Data
+public class AuthEntity implements Serializable {
+
+ private static final long serialVersionUID = -9061398570055647081L;
+
+ @NotNull(message = "用户名不可以为空")
+ private String userName;
+
+ @NotNull(message = "密码不可以为空")
+ private String password;
+
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/login/TokenEntity.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/login/TokenEntity.java
new file mode 100644
index 0000000..f36ac6c
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/login/TokenEntity.java
@@ -0,0 +1,21 @@
+package com.hc.business.model.login;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class TokenEntity implements Serializable{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -6482495805136843397L;
+
+ private String id;
+
+ private int expires;
+
+ private Integer permissionLevel;
+
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/AliPayService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/AliPayService.java
new file mode 100644
index 0000000..f0f9b68
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/AliPayService.java
@@ -0,0 +1,44 @@
+package com.hc.business.service;
+
+import com.alipay.api.AlipayApiException;
+import com.hc.core.utils.pay.browser.alipay.bean.AliPayRefundBean;
+import com.hc.core.utils.pay.browser.alipay.bean.AliPayBean;
+import org.springframework.stereotype.Component;
+import java.util.Map;
+
+/**
+ * @author 10696
+ */
+
+@Component
+public interface AliPayService {
+
+ /**
+ * 支付宝支付
+ *
+ * @param aliPayBean 支付对象
+ * @return 实例对象
+ * @throws AlipayApiException
+ */
+ Map alipay(AliPayBean aliPayBean) throws AlipayApiException;
+
+
+ /**
+ * 支付成功回调
+ *
+ * @param outTradeNo 订单号
+ * @param tradeNo 支付宝交易号
+ * @param tradeStatus 支付状态
+ */
+ void returnNotifyUrlInfo(String outTradeNo, String tradeNo, String tradeStatus);
+
+ /**
+ * 支付宝退款
+ *
+ * @param aliPayRefundBean 退款对象
+ * @return 实例对象
+ * @throws AlipayApiException
+ */
+ Map refund(AliPayRefundBean aliPayRefundBean) throws AlipayApiException;
+
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/AreaDistrictService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/AreaDistrictService.java
new file mode 100644
index 0000000..55618c5
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/AreaDistrictService.java
@@ -0,0 +1,60 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.AreaDistrict;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * 省份表(AreaDistrict)表服务接口
+ *
+ * @author java
+ * @since 2020-11-20 12:48:46
+ */
+
+@Component
+public interface AreaDistrictService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param areaId 主键
+ * @return 实例对象
+ */
+ AreaDistrict queryById(Integer areaId);
+
+ /**
+ * 新增数据
+ *
+ * @param areaDistrict 实例对象
+ * @return 实例对象
+ */
+ AreaDistrict insert(AreaDistrict areaDistrict);
+
+ /**
+ * 修改数据
+ *
+ * @param areaDistrict 实例对象
+ * @return 实例对象
+ */
+ AreaDistrict update(AreaDistrict areaDistrict);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param areaId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer areaId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/BannerService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/BannerService.java
new file mode 100644
index 0000000..c1939d2
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/BannerService.java
@@ -0,0 +1,61 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.Banner;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * 广告表
+ * (Banner)表服务接口
+ *
+ * @author java
+ * @since 2020-11-26 09:29:50
+ */
+
+@Component
+public interface BannerService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param bannerId 主键
+ * @return 实例对象
+ */
+ Banner queryById(Integer bannerId);
+
+ /**
+ * 新增数据
+ *
+ * @param banner 实例对象
+ * @return 实例对象
+ */
+ Banner insert(Banner banner);
+
+ /**
+ * 修改数据
+ *
+ * @param banner 实例对象
+ * @return 实例对象
+ */
+ Banner update(Banner banner);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param bannerId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer bannerId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/ClassConfigService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/ClassConfigService.java
new file mode 100644
index 0000000..39eb18b
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/ClassConfigService.java
@@ -0,0 +1,99 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.ClassConfig;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+
+/**
+ * 班次表(ClassConfig)表服务接口
+ *
+ * @author java
+ * @since 2020-11-19 16:12:31
+ */
+
+@Component
+public interface ClassConfigService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param classConfigId 主键
+ * @return 实例对象
+ */
+ ClassConfig queryById(Integer classConfigId);
+
+ /**
+ * 新增数据
+ *
+ * @param classConfig 实例对象
+ * @return 实例对象
+ */
+ ClassConfig insert(ClassConfig classConfig);
+
+ /**
+ * 修改数据
+ *
+ * @param classConfig 实例对象
+ * @return 实例对象
+ */
+ ClassConfig update(ClassConfig classConfig);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param classConfigId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer classConfigId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+ /**
+ * 校验查询培训班
+ *
+ * @param valid 是否上线
+ * @param page 页码
+ * @param size 查询条数
+ * @return 实例对象数组
+ */
+ PageInfo queryByValid(Integer valid, int page, int size);
+
+ /**
+ * 培训班名称查询培训班
+ *
+ * @param name 培训班名称
+ * @return 实例对象数组
+ */
+ List queryByClassName(String name);
+
+ /**
+ * 地区id查询培训班
+ *
+ * @param areaId 地区id
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryByAreaId(Integer areaId, int page, int size);
+
+
+ /**
+ * 学习时间查询培训班
+ *
+ * @param studyStartTime 学习开始时间
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryByTime(Long studyStartTime, Integer page, Integer size);
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/ClassConfigSponsorService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/ClassConfigSponsorService.java
new file mode 100644
index 0000000..1714753
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/ClassConfigSponsorService.java
@@ -0,0 +1,61 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.ClassConfigSponsor;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * (ClassConfigSponsor)表服务接口
+ *
+ * @author java
+ * @since 2021-05-28 14:11:29
+ */
+
+@Component
+public interface ClassConfigSponsorService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param sponsorId 主键
+ * @return 实例对象
+ */
+ ClassConfigSponsor queryById(Integer sponsorId);
+
+ /**
+ * 新增数据
+ *
+ * @param classConfigSponsor 实例对象
+ * @return 实例对象
+ */
+ ClassConfigSponsor insert(ClassConfigSponsor classConfigSponsor);
+
+ /**
+ * 修改数据
+ *
+ * @param classConfigSponsor 实例对象
+ * @return 实例对象
+ */
+ ClassConfigSponsor update(ClassConfigSponsor classConfigSponsor);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param sponsorId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer sponsorId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @param classId 班次id
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size, Integer classId);
+
+
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/ClassCourseService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/ClassCourseService.java
new file mode 100644
index 0000000..e9a13cf
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/ClassCourseService.java
@@ -0,0 +1,69 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.ClassCourse;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * 班次课程表(ClassCourse)表服务接口
+ *
+ * @author java
+ * @since 2020-11-24 11:30:07
+ */
+
+@Component
+public interface ClassCourseService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param classCourseId 主键
+ * @return 实例对象
+ */
+ ClassCourse queryById(Integer classCourseId);
+
+ /**
+ * 新增数据
+ *
+ * @param classCourse 实例对象
+ * @return 实例对象
+ */
+ ClassCourse insert(ClassCourse classCourse);
+
+ /**
+ * 修改数据
+ *
+ * @param classCourse 实例对象
+ * @return 实例对象
+ */
+ ClassCourse update(ClassCourse classCourse);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param classCourseId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer classCourseId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+ /**
+ * 获取班级下的课程
+ *
+ * @param classId 班级id
+ * @param courseType 课程类别
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryByClassId(Integer classId, Integer courseType, Integer page, Integer size);
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseChapterAnnexService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseChapterAnnexService.java
new file mode 100644
index 0000000..3dc2241
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseChapterAnnexService.java
@@ -0,0 +1,60 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.CourseChapterAnnex;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * 章节附件表(CourseChapterAnnex)表服务接口
+ *
+ * @author java
+ * @since 2020-11-09 10:04:49
+ */
+
+@Component
+public interface CourseChapterAnnexService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param courseChapterAnnexId 主键
+ * @return 实例对象
+ */
+ CourseChapterAnnex queryById(Integer courseChapterAnnexId);
+
+ /**
+ * 新增数据
+ *
+ * @param courseChapterAnnex 实例对象
+ * @return 实例对象
+ */
+ CourseChapterAnnex insert(CourseChapterAnnex courseChapterAnnex);
+
+ /**
+ * 修改数据
+ *
+ * @param courseChapterAnnex 实例对象
+ * @return 实例对象
+ */
+ CourseChapterAnnex update(CourseChapterAnnex courseChapterAnnex);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param courseChapterAnnexId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer courseChapterAnnexId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseChapterService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseChapterService.java
new file mode 100644
index 0000000..c1f982d
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseChapterService.java
@@ -0,0 +1,66 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.CourseChapter;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+
+/**
+ * 课程章节表(CourseChapter)表服务接口
+ *
+ * @author java
+ * @since 2020-11-09 10:04:47
+ */
+
+@Component
+public interface CourseChapterService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param courseChapterId 主键
+ * @return 实例对象
+ */
+ CourseChapter queryById(Integer courseChapterId);
+
+ /**
+ * 新增数据
+ *
+ * @param courseChapter 实例对象
+ * @return 实例对象
+ */
+ CourseChapter insert(CourseChapter courseChapter);
+
+ /**
+ * 修改数据
+ *
+ * @param courseChapter 实例对象
+ * @return 实例对象
+ */
+ CourseChapter update(CourseChapter courseChapter);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param courseChapterId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer courseChapterId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+
+ /***
+ * 改版。william.根据课程rootid获取所有章节的id列表
+ */
+ List getCourseChapterChildList(Integer rootId);
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseChapterTagService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseChapterTagService.java
new file mode 100644
index 0000000..b335d33
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseChapterTagService.java
@@ -0,0 +1,60 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.CourseChapterTag;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * 图书章节标签表。新建完成的图书章节,可以根据讲师不同,给不同的章节打标签,比如基础阶段,进阶阶段。。。(CourseChapterTag)表服务接口
+ *
+ * @author java
+ * @since 2020-11-09 10:04:51
+ */
+
+@Component
+public interface CourseChapterTagService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param tagId 主键
+ * @return 实例对象
+ */
+ CourseChapterTag queryById(Integer tagId);
+
+ /**
+ * 新增数据
+ *
+ * @param courseChapterTag 实例对象
+ * @return 实例对象
+ */
+ CourseChapterTag insert(CourseChapterTag courseChapterTag);
+
+ /**
+ * 修改数据
+ *
+ * @param courseChapterTag 实例对象
+ * @return 实例对象
+ */
+ CourseChapterTag update(CourseChapterTag courseChapterTag);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param tagId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer tagId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseChapterTestService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseChapterTestService.java
new file mode 100644
index 0000000..2c96970
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseChapterTestService.java
@@ -0,0 +1,60 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.CourseChapterTest;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * 章节测试表/随堂练习表(CourseChapterTest)表服务接口
+ *
+ * @author java
+ * @since 2020-11-09 10:04:53
+ */
+
+@Component
+public interface CourseChapterTestService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param testId 主键
+ * @return 实例对象
+ */
+ CourseChapterTest queryById(Integer testId);
+
+ /**
+ * 新增数据
+ *
+ * @param courseChapterTest 实例对象
+ * @return 实例对象
+ */
+ CourseChapterTest insert(CourseChapterTest courseChapterTest);
+
+ /**
+ * 修改数据
+ *
+ * @param courseChapterTest 实例对象
+ * @return 实例对象
+ */
+ CourseChapterTest update(CourseChapterTest courseChapterTest);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param testId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer testId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseChapterVideoService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseChapterVideoService.java
new file mode 100644
index 0000000..0d9aed7
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseChapterVideoService.java
@@ -0,0 +1,69 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.CourseChapterVideo;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+
+/**
+ * 课程视频(CourseChapterVideo)表服务接口
+ *
+ * @author java
+ * @since 2020-11-09 10:04:56
+ */
+
+@Component
+public interface CourseChapterVideoService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param videoId 主键
+ * @return 实例对象
+ */
+ CourseChapterVideo queryById(Integer videoId);
+
+ /**
+ * 新增数据
+ *
+ * @param courseChapterVideo 实例对象
+ * @return 实例对象
+ */
+ CourseChapterVideo insert(CourseChapterVideo courseChapterVideo);
+
+ /**
+ * 修改数据
+ *
+ * @param courseChapterVideo 实例对象
+ * @return 实例对象
+ */
+ CourseChapterVideo update(CourseChapterVideo courseChapterVideo);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param videoId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer videoId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+
+ /**
+ * 通过IcourseId查询单条数据
+ *
+ * @param courseId 主键
+ * @return 实例对象
+ */
+ List queryByCourseId(Integer courseId);
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseService.java
new file mode 100644
index 0000000..ce827a2
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseService.java
@@ -0,0 +1,110 @@
+package com.hc.business.service;
+
+import com.hc.business.dto.CourseVideoDto;
+import com.hc.business.model.Course;
+import com.hc.business.model.CourseChapterVideo;
+import org.springframework.stereotype.Component;
+import com.github.pagehelper.PageInfo;
+
+import java.util.List;
+
+
+/**
+ * 课程表(Course)表服务接口
+ *
+ * @author java
+ * @since 2020-11-09 10:04:45
+ */
+
+@Component
+public interface CourseService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param courseId 主键
+ * @return 实例对象
+ */
+ Course queryById(Integer courseId);
+
+ /**
+ * 新增数据
+ *
+ * @param course 实例对象
+ * @return 实例对象
+ */
+ Course insert(Course course);
+
+ /**
+ * 修改数据
+ *
+ * @param course 实例对象
+ * @return 实例对象
+ */
+ Course update(Course course);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param courseId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer courseId);
+
+ /**
+ * 依据老师名称获取课程
+ *
+ * @param name 老师名称
+ * @return 实例对象数组
+ */
+ List queryTeacherName(String name);
+
+ /**
+ * 依据课程名称获取课程
+ *
+ * @param name 课程名称
+ * @return 实例对象数组
+ */
+ List queryCourseName(String name);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @param valid
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size, Integer valid);
+
+ /**
+ * 分页根据类型查询课程
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @param typeId 对象列表
+ * @return 实例对象
+ */
+ PageInfo queryAllByLimitAndTypeId(int page, int size, Integer typeId);
+
+ /**
+ * 查找課程的所有章節 拼接课程视频 和 播放记录
+ *
+ * @param courseId
+ * @param userId
+ * @return
+ */
+ List getCourseChapterAndVideoPosition(Integer courseId, Integer userId, Integer classId);
+
+
+ /**
+ * 查找課程的所有视频
+ *
+ * @param courseId
+ * @return
+ * @return
+ */
+ List getAllVideos(Integer courseId);
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseTypeRelationService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseTypeRelationService.java
new file mode 100644
index 0000000..5c448e4
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseTypeRelationService.java
@@ -0,0 +1,59 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.CourseTypeRelation;
+import org.springframework.stereotype.Component;
+
+/**
+ * (CourseTypeRelation)表服务接口
+ *
+ * @author java
+ * @since 2021-02-02 09:25:10
+ */
+
+@Component
+public interface CourseTypeRelationService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param courseTypeReId 主键
+ * @return 实例对象
+ */
+ CourseTypeRelation queryById(Integer courseTypeReId);
+
+ /**
+ * 新增数据
+ *
+ * @param courseTypeRelation 实例对象
+ * @return 实例对象
+ */
+ CourseTypeRelation insert(CourseTypeRelation courseTypeRelation);
+
+ /**
+ * 修改数据
+ *
+ * @param courseTypeRelation 实例对象
+ * @return 实例对象
+ */
+ CourseTypeRelation update(CourseTypeRelation courseTypeRelation);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param courseTypeReId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer courseTypeReId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseTypeService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseTypeService.java
new file mode 100644
index 0000000..1fc0f48
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/CourseTypeService.java
@@ -0,0 +1,60 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.CourseType;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * (CourseType)表服务接口
+ *
+ * @author java
+ * @since 2020-12-17 14:12:52
+ */
+
+@Component
+public interface CourseTypeService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param courseTypeId 主键
+ * @return 实例对象
+ */
+ CourseType queryById(Integer courseTypeId);
+
+ /**
+ * 新增数据
+ *
+ * @param courseType 实例对象
+ * @return 实例对象
+ */
+ CourseType insert(CourseType courseType);
+
+ /**
+ * 修改数据
+ *
+ * @param courseType 实例对象
+ * @return 实例对象
+ */
+ CourseType update(CourseType courseType);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param courseTypeId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer courseTypeId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/NewsService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/NewsService.java
new file mode 100644
index 0000000..4e46048
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/NewsService.java
@@ -0,0 +1,71 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.News;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+
+/**
+ * 新闻表
+ * (News)表服务接口
+ *
+ * @author java
+ * @since 2020-11-20 11:48:37
+ */
+
+@Component
+public interface NewsService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param newsId 主键
+ * @return 实例对象
+ */
+ News queryById(Integer newsId);
+
+ /**
+ * 新增数据
+ *
+ * @param news 实例对象
+ * @return 实例对象
+ */
+ News insert(News news);
+
+ /**
+ * 修改数据
+ *
+ * @param news 实例对象
+ * @return 实例对象
+ */
+ News update(News news);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param newsId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer newsId);
+
+ /**
+ * 依据标签id查询 news
+ *
+ * @param tagId 标签id
+ * @return 实例对象数组
+ */
+ PageInfo queryListByTagId(Integer tagId, int page, int size);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/NewsTagService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/NewsTagService.java
new file mode 100644
index 0000000..d6e2d91
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/NewsTagService.java
@@ -0,0 +1,60 @@
+package com.hc.business.service;
+
+import com.hc.business.model.News;
+import com.hc.business.model.NewsTag;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+
+/**
+ * 新闻标签表(NewsTag)表服务接口
+ *
+ * @author java
+ * @since 2020-11-20 12:52:32
+ */
+
+@Component
+public interface NewsTagService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param tagId 主键
+ * @return 实例对象
+ */
+ NewsTag queryById(Integer tagId);
+
+ /**
+ * 新增数据
+ *
+ * @param newsTag 实例对象
+ * @return 实例对象
+ */
+ NewsTag insert(NewsTag newsTag);
+
+ /**
+ * 修改数据
+ *
+ * @param newsTag 实例对象
+ * @return 实例对象
+ */
+ NewsTag update(NewsTag newsTag);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param tagId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer tagId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @return 对象列表
+ */
+ List queryAll();
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/OrderUserLogService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/OrderUserLogService.java
new file mode 100644
index 0000000..ce3c792
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/OrderUserLogService.java
@@ -0,0 +1,70 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.OrderUserLog;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+
+/**
+ * (OrderUserLog)表服务接口
+ *
+ * @author java
+ * @since 2020-12-03 09:25:09
+ */
+
+@Component
+public interface OrderUserLogService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param orderLogId 主键
+ * @return 实例对象
+ */
+ OrderUserLog queryById(Integer orderLogId);
+
+ /**
+ * 新增数据
+ *
+ * @param orderUserLog 实例对象
+ * @return 实例对象
+ */
+ OrderUserLog insert(OrderUserLog orderUserLog);
+
+ /**
+ * 依据订单id查询订单详情
+ *
+ * @param orderId
+ * @return
+ */
+ List queryListByOrderId(Integer orderId);
+
+ /**
+ * 修改数据
+ *
+ * @param orderUserLog 实例对象
+ * @return 实例对象
+ */
+ OrderUserLog update(OrderUserLog orderUserLog);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param orderLogId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer orderLogId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/OrdersService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/OrdersService.java
new file mode 100644
index 0000000..424b4a0
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/OrdersService.java
@@ -0,0 +1,149 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.dto.UserPriceTotal;
+import com.hc.business.dto.UserTimeTotal;
+import com.hc.business.model.Orders;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+
+/**
+ * 订单表(Orders)表服务接口
+ *
+ * @author java
+ * @since 2020-11-26 16:46:44
+ */
+
+@Component
+public interface OrdersService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param ordersId 主键
+ * @return 实例对象
+ */
+ Orders queryById(Integer ordersId);
+
+ /**
+ * 新增数据
+ *
+ * @param orders 实例对象
+ * @return 实例对象
+ */
+ Orders insert(Orders orders);
+
+ /**
+ * 创建订单编号
+ *
+ * @return 实体对象
+ */
+ String createOrderNo();
+
+ /**
+ * 修改数据
+ *
+ * @param orders 实例对象
+ * @return 实例对象
+ */
+ Orders update(Orders orders);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param ordersId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer ordersId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllWithOrderInvoices(int page, int size);
+
+ /**
+ * 用户 查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @param userId 用户id
+ * @return 对象列表
+ */
+ PageInfo queryAllByUserId(int page, int size, Integer userId);
+
+ /**
+ * 用户 查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @param classId 班次id
+ * @return 对象列表
+ */
+ PageInfo queryAllByClassId(int page, int size, Integer classId);
+
+ /**
+ * 用户 查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @param className 班次名称
+ * @return 对象列表
+ */
+ PageInfo queryAllByClassName(int page, int size, String className);
+
+ /**
+ * 用户 查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @param status 订单状态
+ * @return 对象列表
+ */
+ PageInfo queryAllByStatus(int page, int size, Integer status);
+
+ /**
+ * 查询发票下的名单信息
+ *
+ * @param userInvoicesId 发票id
+ * @return 实例对象数组
+ */
+ List queryByUserInvoicesId(Integer userInvoicesId);
+
+ /**
+ * 获取用户订单金额统计数量
+ *
+ * @return 实例对象
+ */
+ UserPriceTotal queryUserCount();
+
+ /**
+ * 依据订单编号获取订单信息
+ *
+ * @param orderNo 订单编号
+ * @return 实例对象
+ */
+ List queryByOrderNo(String orderNo);
+
+ /**
+ * 获取订单数量
+ *
+ * @return 实例对象
+ */
+ Integer countOrderTotal();
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/PaperQuestionService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/PaperQuestionService.java
new file mode 100644
index 0000000..5ff6866
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/PaperQuestionService.java
@@ -0,0 +1,70 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.PaperQuestion;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+
+/**
+ * 随机试卷问题表(PaperQuestion)表服务接口
+ *
+ * @author java
+ * @since 2020-12-07 11:35:13
+ */
+
+@Component
+public interface PaperQuestionService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param paperRuleId 主键
+ * @return 实例对象
+ */
+ PaperQuestion queryById(Integer paperRuleId);
+
+ /**
+ * 新增数据
+ *
+ * @param paperQuestion 实例对象
+ * @return 实例对象
+ */
+ PaperQuestion insert(PaperQuestion paperQuestion);
+
+ /**
+ * 修改数据
+ *
+ * @param paperQuestion 实例对象
+ * @return 实例对象
+ */
+ PaperQuestion update(PaperQuestion paperQuestion);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param paperRuleId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer paperRuleId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+ /**
+ * 依据试卷id获取抽题规则
+ *
+ * @param paperId 试卷id
+ * @return 实例对象数组
+ */
+ List queryByPaperId(Integer paperId);
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/PaperService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/PaperService.java
new file mode 100644
index 0000000..bd96fe2
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/PaperService.java
@@ -0,0 +1,78 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.dto.PaperCommitDTO;
+import com.hc.business.dto.PaperResultDto;
+import com.hc.business.model.Paper;
+import com.hc.core.utils.result.Result;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * 试卷表(Paper)表服务接口
+ *
+ * @author java
+ * @since 2020-12-07 11:34:36
+ */
+
+@Component
+public interface PaperService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param paperId 主键
+ * @return 实例对象
+ */
+ Paper queryById(Integer paperId);
+
+ /**
+ * 新增数据
+ *
+ * @param paper 实例对象
+ * @return 实例对象
+ */
+ Paper insert(Paper paper);
+
+ /**
+ * 修改数据
+ *
+ * @param paper 实例对象
+ * @return 实例对象
+ */
+ Paper update(Paper paper);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param paperId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer paperId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+
+ /**
+ * 获取试卷下的习题
+ *
+ * @param paperId 试卷id
+ * @return 实例对象
+ */
+ PaperResultDto queryQuestionList(Integer paperId);
+
+ /**
+ * 提交试卷返回成绩
+ *
+ * @param commitDTO 提交
+ * @return 实例对象
+ */
+ Result paperCommit(PaperCommitDTO commitDTO);
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/QuestionAnswerService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/QuestionAnswerService.java
new file mode 100644
index 0000000..0609851
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/QuestionAnswerService.java
@@ -0,0 +1,60 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.QuestionAnswer;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * 问题答案表(QuestionAnswer)表服务接口
+ *
+ * @author java
+ * @since 2020-12-07 11:36:20
+ */
+
+@Component
+public interface QuestionAnswerService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param questionAnswerId 主键
+ * @return 实例对象
+ */
+ QuestionAnswer queryById(Integer questionAnswerId);
+
+ /**
+ * 新增数据
+ *
+ * @param questionAnswer 实例对象
+ * @return 实例对象
+ */
+ QuestionAnswer insert(QuestionAnswer questionAnswer);
+
+ /**
+ * 修改数据
+ *
+ * @param questionAnswer 实例对象
+ * @return 实例对象
+ */
+ QuestionAnswer update(QuestionAnswer questionAnswer);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param questionAnswerId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer questionAnswerId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/QuestionService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/QuestionService.java
new file mode 100644
index 0000000..93864bb
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/QuestionService.java
@@ -0,0 +1,67 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.Question;
+import org.springframework.stereotype.Component;
+
+/**
+ * 习题表(Question)表服务接口
+ *
+ * @author java
+ * @since 2020-12-07 11:35:56
+ */
+
+@Component
+public interface QuestionService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param questionId 主键
+ * @return 实例对象
+ */
+ Question queryById(Integer questionId);
+
+ /**
+ * 新增数据
+ *
+ * @param question 实例对象
+ * @return 实例对象
+ */
+ Question insert(Question question);
+
+ /**
+ * 修改数据
+ *
+ * @param question 实例对象
+ * @return 实例对象
+ */
+ Question update(Question question);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param questionId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer questionId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+ /**
+ * 分页查询多条数据
+ * @param tagId 题库id
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryByTagLimit(int tagId,int page, int size);
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/QuestionTagService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/QuestionTagService.java
new file mode 100644
index 0000000..7d2a192
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/QuestionTagService.java
@@ -0,0 +1,60 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.QuestionTag;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * 问题标签表(QuestionTag)表服务接口
+ *
+ * @author java
+ * @since 2020-12-07 11:36:41
+ */
+
+@Component
+public interface QuestionTagService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param questionTagId 主键
+ * @return 实例对象
+ */
+ QuestionTag queryById(Integer questionTagId);
+
+ /**
+ * 新增数据
+ *
+ * @param questionTag 实例对象
+ * @return 实例对象
+ */
+ QuestionTag insert(QuestionTag questionTag);
+
+ /**
+ * 修改数据
+ *
+ * @param questionTag 实例对象
+ * @return 实例对象
+ */
+ QuestionTag update(QuestionTag questionTag);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param questionTagId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer questionTagId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/QuestionTypeService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/QuestionTypeService.java
new file mode 100644
index 0000000..a78f965
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/QuestionTypeService.java
@@ -0,0 +1,60 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.QuestionType;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * 问题类型表(QuestionType)表服务接口
+ *
+ * @author java
+ * @since 2020-12-07 11:37:01
+ */
+
+@Component
+public interface QuestionTypeService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param typeId 主键
+ * @return 实例对象
+ */
+ QuestionType queryById(Integer typeId);
+
+ /**
+ * 新增数据
+ *
+ * @param questionType 实例对象
+ * @return 实例对象
+ */
+ QuestionType insert(QuestionType questionType);
+
+ /**
+ * 修改数据
+ *
+ * @param questionType 实例对象
+ * @return 实例对象
+ */
+ QuestionType update(QuestionType questionType);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param typeId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer typeId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/ThirdCourseService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/ThirdCourseService.java
new file mode 100644
index 0000000..bbbe55c
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/ThirdCourseService.java
@@ -0,0 +1,72 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.dto.ThirdCourseBack;
+import com.hc.business.dto.ThirdCourseDto;
+import com.hc.business.model.ThirdCourse;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+
+/**
+ * 第三方用户课程配置表(ThirdCourse)表服务接口
+ *
+ * @author java
+ * @since 2020-06-17 17:29:30
+ */
+
+@Component
+public interface ThirdCourseService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param id 主键
+ * @return 实例对象
+ */
+ ThirdCourse queryById(Integer id);
+
+ /**
+ * 新增数据
+ *
+ * @param thirdCourse 实例对象
+ * @return 实例对象
+ */
+ ThirdCourse insert(ThirdCourse thirdCourse);
+
+ /**
+ * 修改数据
+ *
+ * @param thirdCourse 实例对象
+ * @return 实例对象
+ */
+ ThirdCourse update(ThirdCourse thirdCourse);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param id 主键
+ * @return 是否成功
+ */
+ Boolean deleteById(Integer id);
+
+ /**
+ * 分页查询所有数据
+ *
+ * @param page 页码
+ * @param size 每页大小
+ * @return 实例对象数组
+ */
+ PageInfo queryPageAll(Integer page, Integer size);
+
+ /**
+ * 获取课程
+ *
+ * @param token 第三方token
+ * @return 实例对象数组
+ */
+ List queryThreadCourseDto(String token);
+
+ List queryThirdCourseDtoById(Integer thirdId);
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/ThirdService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/ThirdService.java
new file mode 100644
index 0000000..afea487
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/ThirdService.java
@@ -0,0 +1,58 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.Third;
+import org.springframework.stereotype.Component;
+
+/**
+ * 第三方用户表(Third)表服务接口
+ *
+ * @author java
+ * @since 2020-06-17 17:29:30
+ */
+
+@Component
+public interface ThirdService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param thirdId 主键
+ * @return 实例对象
+ */
+ Third queryById(Integer thirdId);
+
+ /**
+ * 新增数据
+ *
+ * @param third 实例对象
+ * @return 实例对象
+ */
+ Third insert(Third third);
+
+ /**
+ * 修改数据
+ *
+ * @param third 实例对象
+ * @return 实例对象
+ */
+ Third update(Third third);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param thirdId 主键
+ * @return 是否成功
+ */
+ Boolean deleteById(Integer thirdId);
+
+ /**
+ * 分页查询所有数据
+ *
+ * @param page 页码
+ * @param size 每页大小
+ * @return 实例对象数组
+ */
+ PageInfo queryPageAll(Integer page, Integer size);
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserAdminService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserAdminService.java
new file mode 100644
index 0000000..9ac1b9b
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserAdminService.java
@@ -0,0 +1,70 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.UserAdmin;
+import com.hc.business.model.login.AccessEntity;
+import com.hc.business.model.login.AuthEntity;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * 管理员表(UserAdmin)表服务接口
+ *
+ * @author java
+ * @since 2020-11-16 13:45:05
+ */
+
+@Component
+public interface UserAdminService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param userAdminId 主键
+ * @return 实例对象
+ */
+ UserAdmin queryById(Integer userAdminId);
+
+ /**
+ * 新增数据
+ *
+ * @param userAdmin 实例对象
+ * @return 实例对象
+ */
+ UserAdmin insert(UserAdmin userAdmin);
+
+ /**
+ * 修改数据
+ *
+ * @param userAdmin 实例对象
+ * @return 实例对象
+ */
+ UserAdmin update(UserAdmin userAdmin);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param userAdminId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer userAdminId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+ /**
+ * 后台管理员登录
+ *
+ * @param authEntity
+ * @return
+ */
+ AccessEntity userAdminLogin(AuthEntity authEntity);
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserAdviseService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserAdviseService.java
new file mode 100644
index 0000000..20ecc01
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserAdviseService.java
@@ -0,0 +1,71 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.UserAdvise;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+
+/**
+ * 用户建议表
+ * (UserAdvise)表服务接口
+ *
+ * @author java
+ * @since 2020-11-16 14:20:03
+ */
+
+@Component
+public interface UserAdviseService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param adviceId 主键
+ * @return 实例对象
+ */
+ UserAdvise queryById(Integer adviceId);
+
+ /**
+ * 新增数据
+ *
+ * @param userAdvise 实例对象
+ * @return 实例对象
+ */
+ UserAdvise insert(UserAdvise userAdvise);
+
+ /**
+ * 修改数据
+ *
+ * @param userAdvise 实例对象
+ * @return 实例对象
+ */
+ UserAdvise update(UserAdvise userAdvise);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param adviceId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer adviceId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param adviceType 类别
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(Integer adviceType, int page, int size);
+
+ /**
+ * 依据用户id查询建议
+ *
+ * @param userId 用户id
+ * @return 实例对象
+ */
+ PageInfo queryAllByUserId(Integer userId, int page, int size);
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserCourseService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserCourseService.java
new file mode 100644
index 0000000..6096adf
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserCourseService.java
@@ -0,0 +1,62 @@
+package com.hc.business.service;
+
+import com.hc.business.dto.UserCourseDto;
+import com.hc.business.model.UserCourse;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+
+/**
+ * 用户课程表(UserCourse)表服务接口
+ *
+ * @author java
+ * @since 2020-11-09 10:05:19
+ */
+
+@Component
+public interface UserCourseService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param userCourseId 主键
+ * @return 实例对象
+ */
+ UserCourse queryById(Integer userCourseId);
+
+ /**
+ * 新增数据
+ *
+ * @param userCourse 实例对象
+ * @return 实例对象
+ */
+ UserCourse insert(UserCourse userCourse);
+
+ /**
+ * 修改数据
+ *
+ * @param userCourse 实例对象
+ * @return 实例对象
+ */
+ UserCourse update(UserCourse userCourse);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param userCourseId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer userCourseId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ List queryAllByLimit(Integer userId, Integer classId, int page, int size);
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserInvoicesService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserInvoicesService.java
new file mode 100644
index 0000000..1eff3ec
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserInvoicesService.java
@@ -0,0 +1,86 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.UserInvoices;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+
+/**
+ * 用户发票表(UserInvoices)表服务接口
+ *
+ * @author java
+ * @since 2020-12-02 10:50:36
+ */
+
+@Component
+public interface UserInvoicesService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param userInvoicesId 主键
+ * @return 实例对象
+ */
+ UserInvoices queryById(Integer userInvoicesId);
+
+ /**
+ * 新增数据
+ *
+ * @param userInvoices 实例对象
+ * @return 实例对象
+ */
+ UserInvoices insert(UserInvoices userInvoices);
+
+ /**
+ * 修改数据
+ *
+ * @param userInvoices 实例对象
+ * @return 实例对象
+ */
+ UserInvoices update(UserInvoices userInvoices);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param userInvoicesId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer userInvoicesId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+ /**
+ * 获取用户的发票信息
+ *
+ * @param userId 用户id
+ * @return 实例对象数组
+ */
+ List queryDetailByUserId(Integer userId);
+
+ /**
+ * 获取班次发票信息
+ *
+ * @param classId 班次id
+ * @return 实例对象数组
+ */
+ List queryByClassId(Integer classId);
+
+ /**
+ * 获取状态获取发票信息
+ *
+ * @param status 状态
+ * @return 实例对象数组
+ */
+ List queryByStatus(Integer status);
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserRefundHistoryService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserRefundHistoryService.java
new file mode 100644
index 0000000..5827e2f
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserRefundHistoryService.java
@@ -0,0 +1,59 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.UserRefundHistory;
+import org.springframework.stereotype.Component;
+
+/**
+ * 用户退款记录表(UserRefundHistory)表服务接口
+ *
+ * @author java
+ * @since 2020-12-10 11:31:41
+ */
+
+@Component
+public interface UserRefundHistoryService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param id 主键
+ * @return 实例对象
+ */
+ UserRefundHistory queryById(Integer id);
+
+ /**
+ * 新增数据
+ *
+ * @param userRefundHistory 实例对象
+ * @return 实例对象
+ */
+ UserRefundHistory insert(UserRefundHistory userRefundHistory);
+
+ /**
+ * 修改数据
+ *
+ * @param userRefundHistory 实例对象
+ * @return 实例对象
+ */
+ UserRefundHistory update(UserRefundHistory userRefundHistory);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param id 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer id);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserService.java
new file mode 100644
index 0000000..dc80555
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserService.java
@@ -0,0 +1,154 @@
+package com.hc.business.service;
+
+import com.hc.business.dto.*;
+import com.hc.business.model.User;
+import com.hc.business.model.login.AccessEntity;
+import com.hc.business.model.login.AuthEntity;
+import org.springframework.stereotype.Component;
+import com.github.pagehelper.PageInfo;
+
+import java.util.List;
+
+
+/**
+ * 用户表(User)表服务接口
+ *
+ * @author java
+ * @since 2020-11-09 10:04:14
+ */
+
+@Component
+public interface UserService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param userId 主键
+ * @return 实例对象
+ */
+ User queryById(Integer userId);
+
+ /**
+ * 新增数据
+ *
+ * @param user 实例对象
+ * @return 实例对象
+ */
+ User insert(User user);
+
+ /**
+ * 修改数据
+ *
+ * @param user 实例对象
+ * @return 实例对象
+ */
+ User update(User user);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param userId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer userId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+ /**
+ * 用户登录(账号,密码)
+ *
+ * @param authEntity 实例对象
+ * @return 实例对象
+ */
+ AccessEntity userLogin(AuthEntity authEntity);
+
+
+ /**
+ * 用户登录(手机号登录)
+ *
+ * @param smsLoginDto 实例对象
+ * @return 实例对象
+ */
+ AccessEntity userLoginSms(SmsLoginDto smsLoginDto);
+
+ /**
+ * 用户注册
+ *
+ * @param retrievePasswordDto 实例对象
+ * @return 实例对象
+ */
+ AccessEntity userRegister(RetrievePasswordDto retrievePasswordDto);
+
+ /**
+ * 发送授权码
+ *
+ * @param phone 实例对象
+ * @return 实例对象
+ */
+ String sendAuthCode(String phone);
+
+ /**
+ * 校验验证码-找回密码
+ *
+ * @param retrievePasswordDto 实例对象
+ * @return 实例对象
+ */
+ User retrievePassword(RetrievePasswordDto retrievePasswordDto);
+
+ /**
+ * 依据用户手机号查询用户
+ *
+ * @param userMobile 手机号
+ * @return 实例对象数组
+ */
+ List queryByMobile(String userMobile);
+
+ /**
+ * 身份证查询用户
+ *
+ * @param cardId 身份证号
+ * @return 实例对象数组
+ */
+ List queryUserByCard(String cardId);
+
+
+ /**
+ * 姓名查询用户
+ *
+ * @param name 身份证号
+ * @return 实例对象数组
+ */
+ List queryUserByName(String name);
+
+
+ /**
+ * 姓名查询用户
+ *
+ * @param name 身份证号
+ * @return 实例对象数组
+ */
+ List queryUserByClassName(String name, int pay);
+
+ /**
+ * 获取用户统计数量
+ *
+ * @return 实例对象
+ */
+ UserTimeTotal queryUserCount();
+
+ /**
+ * 获取最近七天用户统计数量
+ *
+ * @return 实例对象数组
+ */
+ List queryByUserCount();
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserStatusService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserStatusService.java
new file mode 100644
index 0000000..c8c0a0b
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserStatusService.java
@@ -0,0 +1,84 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.dto.UserStatusClassDto;
+import com.hc.business.model.User;
+import com.hc.business.model.UserStatus;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+
+/**
+ * 用户班级学习进度表
+ * (UserStatus)表服务接口
+ *
+ * @author java
+ * @since 2020-12-06 11:26:43
+ */
+
+@Component
+public interface UserStatusService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param statusId 主键
+ * @return 实例对象
+ */
+ UserStatus queryById(Integer statusId);
+
+ /**
+ * 新增数据
+ *
+ * @param userStatus 实例对象
+ * @return 实例对象
+ */
+ UserStatus insert(UserStatus userStatus);
+
+ /**
+ * 修改数据
+ *
+ * @param userStatus 实例对象
+ * @return 实例对象
+ */
+ UserStatus update(UserStatus userStatus);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param statusId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer statusId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+ /**
+ * 查询用户培训记录
+ *
+ * @param userId 用户id
+ * @return 实例对象数组
+ */
+ List queryDtoByUserId(Integer userId);
+
+
+ /**
+ * 查询班次下的用户
+ *
+ * @param classId 班次id
+ * @param page 页码
+ * @param size 查询条数
+ * @return 实例对象
+ */
+ PageInfo queryByClassId(Integer classId, int page, int size);
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserTeacherService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserTeacherService.java
new file mode 100644
index 0000000..55dbef2
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserTeacherService.java
@@ -0,0 +1,70 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.UserTeacher;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+
+/**
+ * (UserTeacher)表服务接口
+ *
+ * @author java
+ * @since 2020-11-20 11:08:19
+ */
+
+@Component
+public interface UserTeacherService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param teacherId 主键
+ * @return 实例对象
+ */
+ UserTeacher queryById(Integer teacherId);
+
+ /**
+ * 新增数据
+ *
+ * @param userTeacher 实例对象
+ * @return 实例对象
+ */
+ UserTeacher insert(UserTeacher userTeacher);
+
+ /**
+ * 修改数据
+ *
+ * @param userTeacher 实例对象
+ * @return 实例对象
+ */
+ UserTeacher update(UserTeacher userTeacher);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param teacherId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer teacherId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+ /**
+ * 依据老师名称查询老师
+ *
+ * @param name 老师名称
+ * @return 实例对象数组
+ */
+ List queryByName(String name);
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserTestHistoryService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserTestHistoryService.java
new file mode 100644
index 0000000..28aef99
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserTestHistoryService.java
@@ -0,0 +1,67 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.UserTestHistory;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * 用户考试记录表(UserTestHistory)表服务接口
+ *
+ * @author java
+ * @since 2020-12-07 11:28:20
+ */
+
+@Component
+public interface UserTestHistoryService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param testId 主键
+ * @return 实例对象
+ */
+ UserTestHistory queryById(Integer testId);
+
+ /**
+ * 新增数据
+ *
+ * @param userTestHistory 实例对象
+ * @return 实例对象
+ */
+ UserTestHistory insert(UserTestHistory userTestHistory);
+
+ /**
+ * 修改数据
+ *
+ * @param userTestHistory 实例对象
+ * @return 实例对象
+ */
+ UserTestHistory update(UserTestHistory userTestHistory);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param testId 主键
+ * @return 是否成功
+ */
+ boolean deleteById(Integer testId);
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ PageInfo queryAllByLimit(int page, int size);
+
+
+ /**
+ * 获取当前最高成绩
+ *
+ * @param userId 用户id
+ * @return 实例对象
+ */
+ UserTestHistory queryMaxScore(Integer userId,Integer classId);
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserVideoPositionService.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserVideoPositionService.java
new file mode 100644
index 0000000..bcbdddb
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/UserVideoPositionService.java
@@ -0,0 +1,94 @@
+package com.hc.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.hc.business.model.UserVideoPosition;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * 用户视频观看记录(UserVideoPosition)表服务接口
+ *
+ * @author java
+ * @since 2020-05-29 15:50:50
+ */
+
+@Component
+public interface UserVideoPositionService {
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param userVideoPositionId 主键
+ * @return 实例对象
+ */
+ UserVideoPosition queryById(Integer userVideoPositionId);
+
+ /**
+ * 新增数据
+ *
+ * @param userVideoPosition 实例对象
+ * @return 实例对象
+ */
+ UserVideoPosition insert(UserVideoPosition userVideoPosition);
+
+ /**
+ * 修改数据
+ *
+ * @param userVideoPosition 实例对象
+ * @return 实例对象
+ */
+ UserVideoPosition update(UserVideoPosition userVideoPosition);
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param userVideoPositionId 主键
+ * @return 是否成功
+ */
+ Boolean deleteById(Integer userVideoPositionId);
+
+ /**
+ * 分页查询所有数据
+ *
+ * @param page 页码
+ * @param size 每页大小
+ * @return 实例对象数组
+ */
+ PageInfo queryAllByLimit(Integer page, Integer size);
+
+
+ /**
+ * 添加一条播放进度redis
+ *
+ * @param userVideoPosition
+ * @param courseId
+ * @return
+ */
+ UserVideoPosition insertPositionToRedis(UserVideoPosition userVideoPosition, Integer courseId);
+
+
+ /*
+ 刷新视频进度到数据库
+ */
+ int flushToDb(Integer userId, Integer videoId, Integer courseId, String years,Integer classId);
+
+ /**
+ * 获取视频进度
+ *
+ * @param positionId
+ * @return
+ */
+ UserVideoPosition getVideoPosition(Integer positionId);
+
+ /**
+ * 获取用户课程进度
+ *
+ * @param userId
+ * @param videoId
+ * @param courseId
+ * @return
+ */
+ Map findVideoPosition(Integer userId, Integer videoId, Integer courseId,Integer classId);
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/AliPayServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/AliPayServiceImpl.java
new file mode 100644
index 0000000..69a6595
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/AliPayServiceImpl.java
@@ -0,0 +1,186 @@
+package com.hc.business.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.alipay.api.AlipayApiException;
+import com.hc.business.dto.ClassCourseDto;
+import com.hc.business.dto.UserCourseDto;
+import com.hc.business.mapper.*;
+import com.hc.business.model.*;
+import com.hc.business.service.AliPayService;
+import com.hc.core.utils.constants.OrderConstants;
+import com.hc.core.utils.pay.browser.alipay.bean.AliPayBean;
+import com.hc.core.utils.pay.browser.alipay.processor.AliPayProcessor;
+import com.hc.core.utils.pay.browser.alipay.bean.AliPayRefundBean;
+import com.hc.core.utils.status.CourseFlagEnum;
+import com.hc.core.utils.status.OrdersFlagEnum;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 10696
+ */
+
+@Service
+@Slf4j
+public class AliPayServiceImpl implements AliPayService {
+
+ @Autowired
+ private AliPayProcessor aliPayProcessor;
+
+ @Autowired
+ private OrdersMapper ordersMapper;
+
+ @Autowired
+ private OrderUserLogMapper orderUserLogMapper;
+
+ @Autowired
+ private UserCourseMapper userCourseMapper;
+
+ @Autowired
+ private ClassCourseMapper classCourseMapper;
+
+ @Autowired
+ private UserStatusMapper userStatusMapper;
+
+ @Autowired
+ private UserRefundHistoryMapper userRefundHistoryMapper;
+
+ @Autowired
+ private UserAdviseMapper userAdviseMapper;
+
+ @Autowired
+ private UserMapper userMapper;
+
+ @Override
+ public Map alipay(AliPayBean aliPayBean) throws AlipayApiException {
+ Map map = new HashMap<>(2);
+ String pay = aliPayProcessor.pay(aliPayBean);
+ map.put("aliPay", pay);
+ return map;
+ }
+
+ @Override
+ public void returnNotifyUrlInfo(String outTradeNo, String tradeNo, String tradeStatus) {
+ //判断交易状态
+
+ String trade = "TRADE_SUCCESS";
+ if (!trade.equals(tradeStatus)) {
+ throw new RuntimeException("交易出错,支付回调失败");
+ }
+
+ //修改订单状态
+ Orders orders = ordersMapper.queryByOrderNo(outTradeNo);
+ orders.setTradeNo(tradeNo);
+ orders.setOrderStatus(OrdersFlagEnum.ORDERS_FLAG_PAID.getCode());
+ ordersMapper.updateByPrimaryKeySelective(orders);
+
+ //查询订单中的用户
+ Integer ordersId = orders.getOrdersId();
+ Integer classId = orders.getClassId();
+ List orderUserLogs =
+ orderUserLogMapper.queryByOrderId(ordersId);
+ List classCourseDtoList =
+ classCourseMapper.queryByClassId(classId, CourseFlagEnum.COURSE_REQUIRE_CODE.getCode());
+
+ if (CollectionUtils.isEmpty(orderUserLogs)) {
+ if (CollectionUtils.isEmpty(classCourseDtoList)) {
+ return;
+ }
+ return;
+ }
+ createUserAdvise(orderUserLogs);
+ createUserCourse(classId, orderUserLogs, classCourseDtoList);
+ }
+
+ private void createUserAdvise(List orderUserLogs) {
+ orderUserLogs.forEach(orderUserLog -> {
+ UserAdvise userAdvise = new UserAdvise();
+ userAdvise.setAdviceType(1);
+ userAdvise.setCreateTime(System.currentTimeMillis());
+ userAdvise.setAdvise("报名成功,欢迎您的加入。");
+ userAdvise.setUserId(orderUserLog.getReUserId());
+ userAdvise.setTitle("报名成功");
+ userAdviseMapper.insert(userAdvise);
+ });
+ }
+
+ @Override
+ public Map refund(AliPayRefundBean aliPayRefundBean) throws AlipayApiException {
+
+ String refund = aliPayProcessor.refund(aliPayRefundBean);
+ JSONObject jsonObject = JSON.parseObject(refund);
+ String code = (String) jsonObject.get("code");
+ String outTradeNo = (String) jsonObject.get("out_trade_no");
+
+ if (!OrderConstants.ORDER_REFUND.equals(code)) {
+ throw new RuntimeException("交易出错,退款失败");
+ }
+
+ //修改订单状态
+ Orders orders = ordersMapper.queryByOrderNo(outTradeNo);
+ orders.setOrderStatus(OrdersFlagEnum.ORDERS_FLAG_REFUNDED.getCode());
+ ordersMapper.updateByPrimaryKeySelective(orders);
+
+ //修改退款状态
+ UserRefundHistory userRefundHistory
+ = userRefundHistoryMapper.queryByOrderNo(outTradeNo);
+ userRefundHistory.setDoneTime(System.currentTimeMillis());
+ userRefundHistoryMapper.updateByPrimaryKeySelective(userRefundHistory);
+
+ //删除用户已选课程
+ Integer classId = orders.getClassId();
+ Integer userId = orders.getUserId();
+ List userCourses =
+ userCourseMapper.selectUserCourseListByParam(userId, classId);
+ userCourses.forEach(userCourse -> userCourseMapper.delete(userCourse));
+
+ Map map = new HashMap<>(2);
+ map.put("refund", refund);
+ return map;
+ }
+
+ private void createUserCourse(Integer classId,
+ List orderUserLogs,
+ List classCourseDtoList) {
+ orderUserLogs.forEach(orderUserLog -> {
+ Integer reUserId = orderUserLog.getReUserId();
+ Integer ordersId = orderUserLog.getOrderId();
+ //开用户状态
+ List userStatuses =
+ userStatusMapper.queryByClassIdAndUserId(classId, reUserId);
+ if (CollectionUtils.isEmpty(userStatuses)) {
+ UserStatus userStatus = new UserStatus();
+ userStatus.setClassId(classId);
+ userStatus.setOrderId(ordersId);
+ userStatus.setUserId(reUserId);
+ userStatus.setStatus(OrdersFlagEnum.ORDERS_FLAG_PAID.getCode());
+ userStatusMapper.insert(userStatus);
+ }
+ //课程
+ classCourseDtoList.forEach(classCourseDto -> {
+ Integer courseId = classCourseDto.getCourseId();
+ //是否已开
+ List userCourses
+ = userCourseMapper.selectUserCourseProgress(reUserId, classId, courseId);
+ if (CollectionUtils.isEmpty(userCourses)) {
+ //开课
+ UserCourse userCourse = new UserCourse();
+ userCourse.setClassId(classId);
+ userCourse.setCourseId(courseId);
+ userCourse.setUserId(reUserId);
+ userCourse.setCoursePercent(0.00);
+ userCourseMapper.insert(userCourse);
+ }
+ });
+ });
+ }
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/AreaDistrictServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/AreaDistrictServiceImpl.java
new file mode 100644
index 0000000..8248148
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/AreaDistrictServiceImpl.java
@@ -0,0 +1,93 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.AreaDistrictMapper;
+import com.hc.business.model.AreaDistrict;
+import com.hc.business.service.AreaDistrictService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 省份表(AreaDistrict)表服务实现类
+ *
+ * @author java
+ * @since 2020-11-20 12:48:47
+ */
+
+@Service("areaDistrictService")
+public class AreaDistrictServiceImpl implements AreaDistrictService {
+
+ private final AreaDistrictMapper areaDistrictMapper;
+
+ public AreaDistrictServiceImpl(AreaDistrictMapper areaDistrictMapper) {
+ this.areaDistrictMapper = areaDistrictMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param areaId 主键
+ * @return 实例对象
+ */
+ @Override
+ public AreaDistrict queryById(Integer areaId) {
+ return this.areaDistrictMapper.selectByPrimaryKey(areaId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param areaDistrict 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public AreaDistrict insert(AreaDistrict areaDistrict) {
+ this.areaDistrictMapper.insert(areaDistrict);
+ return areaDistrict;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param areaDistrict 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public AreaDistrict update(AreaDistrict areaDistrict) {
+ this.areaDistrictMapper.updateByPrimaryKeySelective(areaDistrict);
+ return this.queryById(areaDistrict.getAreaId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param areaId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer areaId) {
+ return this.areaDistrictMapper.deleteByPrimaryKey(areaId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ //分页开启
+ PageHelper.startPage(page, size);
+ List list = areaDistrictMapper.queryAllByParentId(0);
+ list.forEach(areaDistrict -> {
+ List areaDistricts = areaDistrictMapper.queryAllByParentId(areaDistrict.getAreaId());
+ areaDistrict.setAreaDistrictList(areaDistricts);
+ });
+ return new PageInfo(list);
+ }
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/BannerServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/BannerServiceImpl.java
new file mode 100644
index 0000000..fb42c11
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/BannerServiceImpl.java
@@ -0,0 +1,84 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.BannerMapper;
+import com.hc.business.model.Banner;
+import com.hc.business.service.BannerService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 广告表
+ * (Banner)表服务实现类
+ *
+ * @author java
+ * @since 2020-11-26 09:29:52
+ */
+
+@Service("bannerService")
+public class BannerServiceImpl implements BannerService {
+
+ private final BannerMapper bannerMapper;
+
+ public BannerServiceImpl(BannerMapper bannerMapper) {
+ this.bannerMapper = bannerMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param bannerId 主键
+ * @return 实例对象
+ */
+ @Override
+ public Banner queryById(Integer bannerId) {
+ return this.bannerMapper.selectByPrimaryKey(bannerId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param banner 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public Banner insert(Banner banner) {
+ this.bannerMapper.insert(banner);
+ return banner;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param banner 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public Banner update(Banner banner) {
+ this.bannerMapper.updateByPrimaryKeySelective(banner);
+ return this.queryById(banner.getBannerId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param bannerId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer bannerId) {
+ return this.bannerMapper.deleteByPrimaryKey(bannerId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.bannerMapper::selectAll);
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/ClassConfigServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/ClassConfigServiceImpl.java
new file mode 100644
index 0000000..3b18b21
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/ClassConfigServiceImpl.java
@@ -0,0 +1,145 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.AreaDistrictMapper;
+import com.hc.business.mapper.ClassConfigMapper;
+import com.hc.business.model.AreaDistrict;
+import com.hc.business.model.ClassConfig;
+import com.hc.business.service.ClassConfigService;
+import com.hc.core.utils.exception.ResponseException;
+import com.hc.core.utils.status.CodeFlagEnum;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * 班次表(ClassConfig)表服务实现类
+ *
+ * @author java
+ * @since 2020-11-19 16:12:33
+ */
+
+@Service("classConfigService")
+public class ClassConfigServiceImpl implements ClassConfigService {
+
+ private final ClassConfigMapper classConfigMapper;
+
+ private final AreaDistrictMapper areaDistrictMapper;
+
+ public ClassConfigServiceImpl(ClassConfigMapper classConfigMapper, AreaDistrictMapper areaDistrictMapper) {
+ this.classConfigMapper = classConfigMapper;
+ this.areaDistrictMapper = areaDistrictMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param classConfigId 主键
+ * @return 实例对象
+ */
+ @Override
+ public ClassConfig queryById(Integer classConfigId) {
+ return this.classConfigMapper.selectByPrimaryKey(classConfigId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param classConfig 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public ClassConfig insert(ClassConfig classConfig) {
+ classConfig.setValid(CodeFlagEnum.OBJECT_ENABLE_CODE.getCode());
+ classConfig.setCreateTime(System.currentTimeMillis());
+ this.classConfigMapper.insert(classConfig);
+ return classConfig;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param classConfig 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public ClassConfig update(ClassConfig classConfig) {
+ this.classConfigMapper.updateByPrimaryKeySelective(classConfig);
+ return this.queryById(classConfig.getClassConfigId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param classConfigId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer classConfigId) {
+ return this.classConfigMapper.deleteByPrimaryKey(classConfigId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ PageHelper.startPage(page, size);
+ List classConfigs = this.classConfigMapper.queryAll();
+ List classConfigsList = queryByAreaIdGetName(classConfigs);
+ return new PageInfo(classConfigsList);
+ }
+
+ @Override
+ public PageInfo queryByValid(Integer valid, int page, int size) {
+ PageHelper.startPage(page, size);
+ List classConfigs = this.classConfigMapper.queryByValid(valid);
+ List classConfigsList = queryByAreaIdGetName(classConfigs);
+ return new PageInfo(classConfigsList);
+ }
+
+ @Override
+ public List queryByClassName(String name) {
+ return this.classConfigMapper.queryByClassName(name);
+ }
+
+ @Override
+ public PageInfo queryByAreaId(Integer areaId, int page, int size) {
+ PageHelper.startPage(page, size);
+ List classConfigs = this.classConfigMapper.queryByAreaId(areaId);
+ List classConfigsList = queryByAreaIdGetName(classConfigs);
+ return new PageInfo(classConfigsList);
+ }
+
+ @Override
+ public PageInfo queryByTime(Long studyStartTime, Integer page, Integer size) {
+ PageHelper.startPage(page, size);
+ List classConfigs = this.classConfigMapper.queryByTime(studyStartTime);
+ List classConfigsList = queryByAreaIdGetName(classConfigs);
+ return new PageInfo(classConfigsList);
+ }
+
+ private List queryByAreaIdGetName(List classConfigs) {
+ if (CollectionUtils.isEmpty(classConfigs)) {
+ throw new ResponseException(-1, "暂无培训班上线");
+ }
+ classConfigs.forEach(classConfig -> {
+ AreaDistrict areaDistrict =
+ areaDistrictMapper.selectByPrimaryKey(classConfig.getAreaId());
+ if (Objects.isNull(areaDistrict)) {
+ return;
+ }
+ classConfig.setAreaName(areaDistrict.getAreaName());
+ });
+ return classConfigs;
+ }
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/ClassConfigSponsorServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/ClassConfigSponsorServiceImpl.java
new file mode 100644
index 0000000..e665066
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/ClassConfigSponsorServiceImpl.java
@@ -0,0 +1,93 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.ClassConfigSponsorMapper;
+import com.hc.business.model.ClassConfigSponsor;
+import com.hc.business.service.ClassConfigSponsorService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * (ClassConfigSponsor)表服务实现类
+ *
+ * @author java
+ * @since 2021-05-28 14:19:35
+ */
+
+@Service("classConfigSponsorService")
+public class ClassConfigSponsorServiceImpl implements ClassConfigSponsorService {
+
+ private final ClassConfigSponsorMapper classConfigSponsorMapper;
+
+ public ClassConfigSponsorServiceImpl(ClassConfigSponsorMapper classConfigSponsorMapper) {
+ this.classConfigSponsorMapper = classConfigSponsorMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param sponsorId 主键
+ * @return 实例对象
+ */
+ @Override
+ public ClassConfigSponsor queryById(Integer sponsorId) {
+ return this.classConfigSponsorMapper.selectByPrimaryKey(sponsorId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param classConfigSponsor 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public ClassConfigSponsor insert(ClassConfigSponsor classConfigSponsor) {
+ classConfigSponsor.setCreateTime(System.currentTimeMillis());
+ this.classConfigSponsorMapper.insert(classConfigSponsor);
+ return classConfigSponsor;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param classConfigSponsor 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public ClassConfigSponsor update(ClassConfigSponsor classConfigSponsor) {
+ this.classConfigSponsorMapper.updateByPrimaryKeySelective(classConfigSponsor);
+ return this.queryById(classConfigSponsor.getSponsorId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param sponsorId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer sponsorId) {
+ return this.classConfigSponsorMapper.deleteByPrimaryKey(sponsorId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size, Integer classId) {
+ if (Objects.isNull(classId)) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.classConfigSponsorMapper::selectAll);
+ }
+ PageHelper.startPage(page, size);
+ List classConfigSponsors = this.classConfigSponsorMapper.queryListByClassId(classId);
+ return new PageInfo(classConfigSponsors);
+ }
+
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/ClassCourseServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/ClassCourseServiceImpl.java
new file mode 100644
index 0000000..a5c5750
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/ClassCourseServiceImpl.java
@@ -0,0 +1,106 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.dto.ClassCourseDto;
+import com.hc.business.mapper.ClassCourseMapper;
+import com.hc.business.model.ClassCourse;
+import com.hc.business.service.ClassCourseService;
+import com.hc.core.utils.exception.ResponseException;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.List;
+import java.util.function.IntFunction;
+
+/**
+ * 班次课程表(ClassCourse)表服务实现类
+ *
+ * @author java
+ * @since 2020-11-24 11:30:09
+ */
+
+@Service("classCourseService")
+public class ClassCourseServiceImpl implements ClassCourseService {
+
+ private final ClassCourseMapper classCourseMapper;
+
+ public ClassCourseServiceImpl(ClassCourseMapper classCourseMapper) {
+ this.classCourseMapper = classCourseMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param classCourseId 主键
+ * @return 实例对象
+ */
+ @Override
+ public ClassCourse queryById(Integer classCourseId) {
+ return this.classCourseMapper.selectByPrimaryKey(classCourseId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param classCourse 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public ClassCourse insert(ClassCourse classCourse) {
+ Integer classId = classCourse.getClassId();
+ Integer courseId = classCourse.getCourseId();
+ List classCourses =
+ this.classCourseMapper.queryByClassIdWithCourseId(classId, courseId);
+ if (!CollectionUtils.isEmpty(classCourses)) {
+ return classCourses.get(0);
+ }
+ classCourse.setCreateTime(System.currentTimeMillis());
+ this.classCourseMapper.insert(classCourse);
+ return classCourse;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param classCourse 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public ClassCourse update(ClassCourse classCourse) {
+ this.classCourseMapper.updateByPrimaryKeySelective(classCourse);
+ return this.queryById(classCourse.getClassCourseId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param classCourseId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer classCourseId) {
+ return this.classCourseMapper.deleteByPrimaryKey(classCourseId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.classCourseMapper::selectAll);
+ }
+
+ @Override
+ public PageInfo queryByClassId(Integer classId, Integer courseType,
+ Integer page, Integer size) {
+ PageHelper.startPage(page, size);
+ List classCourseDtoList
+ = this.classCourseMapper.queryByClassId(classId, courseType);
+ return new PageInfo(classCourseDtoList);
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseChapterAnnexServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseChapterAnnexServiceImpl.java
new file mode 100644
index 0000000..32d9b38
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseChapterAnnexServiceImpl.java
@@ -0,0 +1,83 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.CourseChapterAnnexMapper;
+import com.hc.business.model.CourseChapterAnnex;
+import com.hc.business.service.CourseChapterAnnexService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 章节附件表(CourseChapterAnnex)表服务实现类
+ *
+ * @author java
+ * @since 2020-11-09 10:04:49
+ */
+
+@Service("courseChapterAnnexService")
+public class CourseChapterAnnexServiceImpl implements CourseChapterAnnexService {
+
+ private final CourseChapterAnnexMapper courseChapterAnnexMapper;
+
+ public CourseChapterAnnexServiceImpl(CourseChapterAnnexMapper courseChapterAnnexMapper) {
+ this.courseChapterAnnexMapper = courseChapterAnnexMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param courseChapterAnnexId 主键
+ * @return 实例对象
+ */
+ @Override
+ public CourseChapterAnnex queryById(Integer courseChapterAnnexId) {
+ return this.courseChapterAnnexMapper.selectByPrimaryKey(courseChapterAnnexId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param courseChapterAnnex 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public CourseChapterAnnex insert(CourseChapterAnnex courseChapterAnnex) {
+ this.courseChapterAnnexMapper.insert(courseChapterAnnex);
+ return courseChapterAnnex;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param courseChapterAnnex 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public CourseChapterAnnex update(CourseChapterAnnex courseChapterAnnex) {
+ this.courseChapterAnnexMapper.updateByPrimaryKeySelective(courseChapterAnnex);
+ return this.queryById(courseChapterAnnex.getCourseChapterAnnexId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param courseChapterAnnexId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer courseChapterAnnexId) {
+ return this.courseChapterAnnexMapper.deleteByPrimaryKey(courseChapterAnnexId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.courseChapterAnnexMapper::selectAll);
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseChapterServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseChapterServiceImpl.java
new file mode 100644
index 0000000..85fb8fb
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseChapterServiceImpl.java
@@ -0,0 +1,122 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.CourseChapterMapper;
+import com.hc.business.model.CourseChapter;
+import com.hc.business.service.CourseChapterService;
+import com.hc.core.utils.redis.RedisUtil;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 课程章节表(CourseChapter)表服务实现类
+ *
+ * @author java
+ * @since 2020-11-09 10:04:47
+ */
+
+@Service("courseChapterService")
+public class CourseChapterServiceImpl implements CourseChapterService {
+
+ private final CourseChapterMapper courseChapterMapper;
+
+
+ /**
+ * 课程以及章节缓存
+ */
+ private static final String COURSE_CHAPTER_REDIS_KEY_PREFIX = "course:chapter:list:";
+
+ private final RedisUtil redisUtil;
+
+ public CourseChapterServiceImpl(CourseChapterMapper courseChapterMapper, RedisUtil redisUtil) {
+ this.courseChapterMapper = courseChapterMapper;
+ this.redisUtil = redisUtil;
+ }
+
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param courseChapterId 主键
+ * @return 实例对象
+ */
+ @Override
+ public CourseChapter queryById(Integer courseChapterId) {
+ return this.courseChapterMapper.selectByPrimaryKey(courseChapterId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param courseChapter 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public CourseChapter insert(CourseChapter courseChapter) {
+ this.courseChapterMapper.insert(courseChapter);
+ return courseChapter;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param courseChapter 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public CourseChapter update(CourseChapter courseChapter) {
+ this.courseChapterMapper.updateByPrimaryKeySelective(courseChapter);
+ return this.queryById(courseChapter.getCourseChapterId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param courseChapterId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer courseChapterId) {
+ return this.courseChapterMapper.deleteByPrimaryKey(courseChapterId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.courseChapterMapper::selectAll);
+ }
+
+
+ /**
+ * @param courseId
+ * @return
+ */
+ @Override
+ public List getCourseChapterChildList(Integer courseId) {
+
+ //首先查找redis缓存保存的课程 章节的数据
+ String course_key = COURSE_CHAPTER_REDIS_KEY_PREFIX + courseId.toString();
+ //目前只支持到章
+ if (true == redisUtil.hasKey(course_key)) {
+ return (List) redisUtil.get(course_key);
+ } else {
+ Map map = new HashMap();
+ map.put("courseId", courseId);
+ List list = courseChapterMapper.getCourseChapterChildList(map);
+ redisUtil.set(course_key, list, 24 * 60 * 60);
+ return list;
+ }
+
+
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseChapterTagServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseChapterTagServiceImpl.java
new file mode 100644
index 0000000..aedfe5e
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseChapterTagServiceImpl.java
@@ -0,0 +1,83 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.CourseChapterTagMapper;
+import com.hc.business.model.CourseChapterTag;
+import com.hc.business.service.CourseChapterTagService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 图书章节标签表。新建完成的图书章节,可以根据讲师不同,给不同的章节打标签,比如基础阶段,进阶阶段。。。(CourseChapterTag)表服务实现类
+ *
+ * @author java
+ * @since 2020-11-09 10:04:51
+ */
+
+@Service("courseChapterTagService")
+public class CourseChapterTagServiceImpl implements CourseChapterTagService {
+
+ private final CourseChapterTagMapper courseChapterTagMapper;
+
+ public CourseChapterTagServiceImpl(CourseChapterTagMapper courseChapterTagMapper) {
+ this.courseChapterTagMapper = courseChapterTagMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param tagId 主键
+ * @return 实例对象
+ */
+ @Override
+ public CourseChapterTag queryById(Integer tagId) {
+ return this.courseChapterTagMapper.selectByPrimaryKey(tagId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param courseChapterTag 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public CourseChapterTag insert(CourseChapterTag courseChapterTag) {
+ this.courseChapterTagMapper.insert(courseChapterTag);
+ return courseChapterTag;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param courseChapterTag 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public CourseChapterTag update(CourseChapterTag courseChapterTag) {
+ this.courseChapterTagMapper.updateByPrimaryKeySelective(courseChapterTag);
+ return this.queryById(courseChapterTag.getTagId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param tagId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer tagId) {
+ return this.courseChapterTagMapper.deleteByPrimaryKey(tagId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.courseChapterTagMapper::selectAll);
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseChapterTestServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseChapterTestServiceImpl.java
new file mode 100644
index 0000000..fcf6258
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseChapterTestServiceImpl.java
@@ -0,0 +1,83 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.CourseChapterTestMapper;
+import com.hc.business.model.CourseChapterTest;
+import com.hc.business.service.CourseChapterTestService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 章节测试表/随堂练习表(CourseChapterTest)表服务实现类
+ *
+ * @author java
+ * @since 2020-11-09 10:04:53
+ */
+
+@Service("courseChapterTestService")
+public class CourseChapterTestServiceImpl implements CourseChapterTestService {
+
+ private final CourseChapterTestMapper courseChapterTestMapper;
+
+ public CourseChapterTestServiceImpl(CourseChapterTestMapper courseChapterTestMapper) {
+ this.courseChapterTestMapper = courseChapterTestMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param testId 主键
+ * @return 实例对象
+ */
+ @Override
+ public CourseChapterTest queryById(Integer testId) {
+ return this.courseChapterTestMapper.selectByPrimaryKey(testId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param courseChapterTest 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public CourseChapterTest insert(CourseChapterTest courseChapterTest) {
+ this.courseChapterTestMapper.insert(courseChapterTest);
+ return courseChapterTest;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param courseChapterTest 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public CourseChapterTest update(CourseChapterTest courseChapterTest) {
+ this.courseChapterTestMapper.updateByPrimaryKeySelective(courseChapterTest);
+ return this.queryById(courseChapterTest.getTestId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param testId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer testId) {
+ return this.courseChapterTestMapper.deleteByPrimaryKey(testId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.courseChapterTestMapper::selectAll);
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseChapterVideoServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseChapterVideoServiceImpl.java
new file mode 100644
index 0000000..a44fb93
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseChapterVideoServiceImpl.java
@@ -0,0 +1,98 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.CourseChapterVideoMapper;
+import com.hc.business.model.CourseChapterVideo;
+import com.hc.business.service.CourseChapterVideoService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 课程视频(CourseChapterVideo)表服务实现类
+ *
+ * @author java
+ * @since 2020-11-09 10:04:56
+ */
+
+@Service("courseChapterVideoService")
+public class CourseChapterVideoServiceImpl implements CourseChapterVideoService {
+
+ private final CourseChapterVideoMapper courseChapterVideoMapper;
+
+ public CourseChapterVideoServiceImpl(CourseChapterVideoMapper courseChapterVideoMapper) {
+ this.courseChapterVideoMapper = courseChapterVideoMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param videoId 主键
+ * @return 实例对象
+ */
+ @Override
+ public CourseChapterVideo queryById(Integer videoId) {
+ return this.courseChapterVideoMapper.selectByPrimaryKey(videoId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param courseChapterVideo 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public CourseChapterVideo insert(CourseChapterVideo courseChapterVideo) {
+ this.courseChapterVideoMapper.insert(courseChapterVideo);
+ return courseChapterVideo;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param courseChapterVideo 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public CourseChapterVideo update(CourseChapterVideo courseChapterVideo) {
+ this.courseChapterVideoMapper.updateByPrimaryKeySelective(courseChapterVideo);
+ return this.queryById(courseChapterVideo.getVideoId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param videoId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer videoId) {
+ return this.courseChapterVideoMapper.deleteByPrimaryKey(videoId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.courseChapterVideoMapper::selectAll);
+ }
+
+
+ /**
+ * 通过courseId查询单条数据
+ *
+ * @param courseId 课程ID
+ * @return 实例对象
+ */
+ @Override
+ public List queryByCourseId(Integer courseId){
+ return courseChapterVideoMapper.selectVideoByCourseId(courseId);
+ }
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseServiceImpl.java
new file mode 100644
index 0000000..595abf9
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseServiceImpl.java
@@ -0,0 +1,233 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.dto.CourseVideoDto;
+import com.hc.business.dto.UserCourseDto;
+import com.hc.business.mapper.CourseChapterVideoMapper;
+import com.hc.business.mapper.CourseMapper;
+import com.hc.business.mapper.UserCourseMapper;
+import com.hc.business.model.*;
+import com.hc.business.service.CourseChapterService;
+import com.hc.business.service.CourseService;
+import com.hc.business.service.UserVideoPositionService;
+import com.hc.core.utils.status.CodeFlagEnum;
+import com.hc.core.utils.tool.Compute;
+import org.springframework.stereotype.Service;
+import org.springframework.beans.BeanUtils;
+
+import java.util.*;
+
+/**
+ * 课程表(Course)表服务实现类
+ *
+ * @author java
+ * @since 2020-11-09 10:04:46
+ */
+
+@Service("courseService")
+public class CourseServiceImpl implements CourseService {
+
+ private final CourseChapterService courseChapterService;
+
+ private final CourseChapterVideoMapper courseChapterVideoMapper;
+
+ private final UserVideoPositionService userVideoPositionService;
+
+ private final CourseMapper courseMapper;
+
+ private final UserCourseMapper userCourseMapper;
+
+ public CourseServiceImpl(CourseMapper courseMapper,
+ UserCourseMapper userCourseMapper,
+ CourseChapterVideoMapper courseChapterVideoMapper,
+ UserVideoPositionService userVideoPositionService,
+ CourseChapterService courseChapterService) {
+ this.courseMapper = courseMapper;
+ this.userCourseMapper = userCourseMapper;
+ this.courseChapterVideoMapper = courseChapterVideoMapper;
+ this.userVideoPositionService = userVideoPositionService;
+ this.courseChapterService = courseChapterService;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param courseId 主键
+ * @return 实例对象
+ */
+ @Override
+ public Course queryById(Integer courseId) {
+ return this.courseMapper.selectByPrimaryKey(courseId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param course 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public Course insert(Course course) {
+ course.setIsValid(CodeFlagEnum.OBJECT_ENABLE_CODE.getCode());
+ this.courseMapper.insert(course);
+ return course;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param course 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public Course update(Course course) {
+ this.courseMapper.updateByPrimaryKeySelective(course);
+ return this.queryById(course.getCourseId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param courseId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer courseId) {
+// return this.courseMapper.deleteByPrimaryKey(courseId) > 0;
+ Course course = queryById(courseId);
+ if (!Objects.isNull(course)) {
+ course.setIsValid(CodeFlagEnum.OBJECT_DISABLED_CODE.getCode());
+ this.courseMapper.updateByPrimaryKeySelective(course);
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public List queryTeacherName(String name) {
+ return this.courseMapper.queryTeacherName(name);
+ }
+
+ @Override
+ public List queryCourseName(String name) {
+ return this.courseMapper.queryCourseName(name);
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size, Integer valid) {
+ PageHelper.startPage(page, size);
+ List courses = this.courseMapper.queryAll(valid);
+ return new PageInfo(courses);
+ }
+
+ @Override
+ public PageInfo queryAllByLimitAndTypeId(int page, int size, Integer typeId) {
+ PageHelper.startPage(page, size);
+ List courses = this.courseMapper.queryByTypeId(typeId);
+ return new PageInfo(courses);
+ }
+
+
+ @Override
+ public List getAllVideos(Integer courseId){
+ return courseChapterVideoMapper.selectVideoByCourseId(courseId);
+ }
+
+ //重写课程,缓存以及计算用户总体进度的方法和结构,
+ //继续教育不区分章节,但是支持多个视频
+ @Override
+ public List getCourseChapterAndVideoPosition(Integer courseId, Integer userId, Integer classId) {
+
+ boolean update = false;
+ List videoListDto = new ArrayList();
+
+ List videoList = courseChapterVideoMapper.selectVideoByCourseId(courseId);
+
+ Double totalPercent = Double.valueOf("0");
+ if (videoList.size() > 0) {
+
+ for (int vindex = 0; vindex < videoList.size(); vindex++) {
+
+ CourseVideoDto dto = new CourseVideoDto();
+ dto.setVideo(videoList.get(vindex));
+
+ Map map = userVideoPositionService.findVideoPosition(userId, videoList.get(vindex).getVideoId(), courseId, classId);
+ // 填入播放记录
+ if ((null != map) && (map.size() > 0)) {
+ UserVideoPosition userVideoPosition = new UserVideoPosition();
+ Double videotime = null;
+ Double position = null;
+ if (map.containsKey("update")) {
+ update = true;
+ }
+ try {
+ videotime = Double.valueOf(map.get("videotime"));
+ position = Double.valueOf(map.get("position"));
+
+ } catch (Exception e) {
+ //视频位置,长度有问题,处理吓一条
+ //视频进度有问题,不能直接跳过。否则对于 已经缓存了但是没有正确位置信息的视频就会漏掉
+ //这类数据按照位置0处理
+ userVideoPosition.setVideoTime("0");
+ userVideoPosition.setVideoPosition("0");
+ userVideoPosition.setVideoId(videoList.get(0).getVideoId());
+ userVideoPosition.setUserId(userId);
+ //没有正确数据的视频,进度按照0计算,返回结构体
+ //totalPercent = Compute.add(totalPercent, Compute.div(position, videotime, 2));
+ dto.setPosition(userVideoPosition);
+
+ //解析得视频进度数据不正确,但是依然要返回一个空得结构体。否则会造成丢掉数据有问题得视频
+ videoListDto.add(dto);
+ continue;
+ }
+
+ userVideoPosition.setVideoTime(map.get("videotime"));
+ userVideoPosition.setVideoPosition(map.get("position"));
+ userVideoPosition.setVideoId(videoList.get(0).getVideoId());
+ userVideoPosition.setUserId(userId);
+ totalPercent = Compute.add(totalPercent, Compute.div(position, videotime, 2));
+ dto.setPosition(userVideoPosition);
+ }
+
+ videoListDto.add(dto);
+ }
+
+
+ //计算平均进度
+ //计算平均进度
+ totalPercent = Compute.div(totalPercent, videoList.size(), 2);
+ if (true == update) {
+ //如果章节进度有更新,需要从新计算课程总体进度,并更新到数据库
+ //TODO 查询课程进度
+ List cardCourseList = userCourseMapper.selectUserCourseProgress(userId, classId, courseId);
+ if (cardCourseList.size() > 0) {
+ //课程进度有变化时 将查询的课程进度写入数据库
+ if (!totalPercent.equals(cardCourseList.get(0).getCoursePercent())) {
+ UserCourse userCourse = new UserCourse();
+ BeanUtils.copyProperties(cardCourseList.get(0), userCourse);
+ userCourse.setCoursePercent(totalPercent);
+ userCourseMapper.updateByPrimaryKeySelective(userCourse);
+ }
+ } else {
+ //如果没有课程得记录,则增加记录
+ UserCourse userCourse = new UserCourse();
+ userCourse.setCoursePercent(totalPercent);
+ userCourse.setCourseId(courseId);
+ userCourse.setUserId(userId);
+ userCourse.setClassId(classId);
+ userCourseMapper.insert(userCourse);
+ }
+
+ }
+ }
+ return videoListDto;
+ }
+}
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseTypeRelationServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseTypeRelationServiceImpl.java
new file mode 100644
index 0000000..682e832
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseTypeRelationServiceImpl.java
@@ -0,0 +1,84 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.CourseTypeRelationMapper;
+import com.hc.business.model.CourseTypeRelation;
+import com.hc.business.service.CourseTypeRelationService;
+import org.springframework.stereotype.Service;
+
+/**
+ * (CourseTypeRelation)表服务实现类
+ *
+ * @author java
+ * @since 2021-02-02 09:25:11
+ */
+
+@Service("courseTypeRelationService")
+public class CourseTypeRelationServiceImpl implements CourseTypeRelationService {
+
+ private final CourseTypeRelationMapper courseTypeRelationMapper;
+
+ public CourseTypeRelationServiceImpl(CourseTypeRelationMapper courseTypeRelationMapper) {
+ this.courseTypeRelationMapper = courseTypeRelationMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param courseTypeReId 主键
+ * @return 实例对象
+ */
+ @Override
+ public CourseTypeRelation queryById(Integer courseTypeReId) {
+ return this.courseTypeRelationMapper.selectByPrimaryKey(courseTypeReId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param courseTypeRelation 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public CourseTypeRelation insert(CourseTypeRelation courseTypeRelation) {
+ courseTypeRelation.setCreateTime(System.currentTimeMillis());
+ this.courseTypeRelationMapper.insert(courseTypeRelation);
+ return courseTypeRelation;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param courseTypeRelation 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public CourseTypeRelation update(CourseTypeRelation courseTypeRelation) {
+ this.courseTypeRelationMapper.updateByPrimaryKeySelective(courseTypeRelation);
+ return this.queryById(courseTypeRelation.getCourseTypeReId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param courseTypeReId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer courseTypeReId) {
+ return this.courseTypeRelationMapper.deleteByPrimaryKey(courseTypeReId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.courseTypeRelationMapper::selectAll);
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseTypeServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseTypeServiceImpl.java
new file mode 100644
index 0000000..38df346
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/CourseTypeServiceImpl.java
@@ -0,0 +1,91 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.CourseTypeMapper;
+import com.hc.business.model.CourseType;
+import com.hc.business.service.CourseTypeService;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.List;
+
+/**
+ * (CourseType)表服务实现类
+ *
+ * @author java
+ * @since 2020-12-17 14:12:54
+ */
+
+@Service("courseTypeService")
+public class CourseTypeServiceImpl implements CourseTypeService {
+
+ private final CourseTypeMapper courseTypeMapper;
+
+ public CourseTypeServiceImpl(CourseTypeMapper courseTypeMapper) {
+ this.courseTypeMapper = courseTypeMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param courseTypeId 主键
+ * @return 实例对象
+ */
+ @Override
+ public CourseType queryById(Integer courseTypeId) {
+ return this.courseTypeMapper.selectByPrimaryKey(courseTypeId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param courseType 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public CourseType insert(CourseType courseType) {
+ List courseTypes
+ = this.courseTypeMapper.queryAllByCourseName(courseType.getCourseName());
+ if (!CollectionUtils.isEmpty(courseTypes)) {
+ return courseTypes.get(0);
+ }
+ this.courseTypeMapper.insert(courseType);
+ return courseType;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param courseType 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public CourseType update(CourseType courseType) {
+ this.courseTypeMapper.updateByPrimaryKeySelective(courseType);
+ return this.queryById(courseType.getCourseTypeId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param courseTypeId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer courseTypeId) {
+ return this.courseTypeMapper.deleteByPrimaryKey(courseTypeId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.courseTypeMapper::selectAll);
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/NewsServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/NewsServiceImpl.java
new file mode 100644
index 0000000..8654677
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/NewsServiceImpl.java
@@ -0,0 +1,94 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.NewsMapper;
+import com.hc.business.model.News;
+import com.hc.business.service.NewsService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 新闻表
+ * (News)表服务实现类
+ *
+ * @author java
+ * @since 2020-11-20 11:48:38
+ */
+
+@Service("newsService")
+public class NewsServiceImpl implements NewsService {
+
+ private final NewsMapper newsMapper;
+
+ public NewsServiceImpl(NewsMapper newsMapper) {
+ this.newsMapper = newsMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param newsId 主键
+ * @return 实例对象
+ */
+ @Override
+ public News queryById(Integer newsId) {
+ return this.newsMapper.selectByPrimaryKey(newsId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param news 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public News insert(News news) {
+ news.setCreateTime(System.currentTimeMillis());
+ this.newsMapper.insert(news);
+ return news;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param news 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public News update(News news) {
+ this.newsMapper.updateByPrimaryKeySelective(news);
+ return this.queryById(news.getNewsId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param newsId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer newsId) {
+ return this.newsMapper.deleteByPrimaryKey(newsId) > 0;
+ }
+
+ @Override
+ public PageInfo queryListByTagId(Integer tagId, int page, int size) {
+ PageHelper.startPage(page, size);
+ List news = this.newsMapper.queryByTagId(tagId);
+ return new PageInfo(news);
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.newsMapper::selectAll);
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/NewsTagServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/NewsTagServiceImpl.java
new file mode 100644
index 0000000..e58e357
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/NewsTagServiceImpl.java
@@ -0,0 +1,79 @@
+package com.hc.business.service.impl;
+
+import com.hc.business.mapper.NewsTagMapper;
+import com.hc.business.model.NewsTag;
+import com.hc.business.service.NewsTagService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 新闻标签表(NewsTag)表服务实现类
+ *
+ * @author java
+ * @since 2020-11-20 12:52:33
+ */
+
+@Service("newsTagService")
+public class NewsTagServiceImpl implements NewsTagService {
+
+ private final NewsTagMapper newsTagMapper;
+
+ public NewsTagServiceImpl(NewsTagMapper newsTagMapper) {
+ this.newsTagMapper = newsTagMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param tagId 主键
+ * @return 实例对象
+ */
+ @Override
+ public NewsTag queryById(Integer tagId) {
+ return this.newsTagMapper.selectByPrimaryKey(tagId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param newsTag 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public NewsTag insert(NewsTag newsTag) {
+ this.newsTagMapper.insert(newsTag);
+ return newsTag;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param newsTag 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public NewsTag update(NewsTag newsTag) {
+ this.newsTagMapper.updateByPrimaryKeySelective(newsTag);
+ return newsTag;
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param tagId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer tagId) {
+ return this.newsTagMapper.deleteByPrimaryKey(tagId) > 0;
+ }
+
+ @Override
+ public List queryAll() {
+ return this.newsTagMapper.queryAll();
+ }
+
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/OrderUserLogServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/OrderUserLogServiceImpl.java
new file mode 100644
index 0000000..490dfaa
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/OrderUserLogServiceImpl.java
@@ -0,0 +1,100 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.OrderUserLogMapper;
+import com.hc.business.model.OrderUserLog;
+import com.hc.business.service.OrderUserLogService;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.List;
+
+/**
+ * (OrderUserLog)表服务实现类
+ *
+ * @author java
+ * @since 2020-12-03 09:25:11
+ */
+
+@Service("orderUserLogService")
+public class OrderUserLogServiceImpl implements OrderUserLogService {
+
+ private final OrderUserLogMapper orderUserLogMapper;
+
+ public OrderUserLogServiceImpl(OrderUserLogMapper orderUserLogMapper) {
+ this.orderUserLogMapper = orderUserLogMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param orderLogId 主键
+ * @return 实例对象
+ */
+ @Override
+ public OrderUserLog queryById(Integer orderLogId) {
+ return this.orderUserLogMapper.selectByPrimaryKey(orderLogId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param orderUserLog 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public OrderUserLog insert(OrderUserLog orderUserLog) {
+ Integer orderId = orderUserLog.getOrderId();
+ Integer reUserId = orderUserLog.getReUserId();
+ List orderUserLogs
+ = this.orderUserLogMapper.queryByUserIdAndOrderId(orderId, reUserId);
+ if (!CollectionUtils.isEmpty(orderUserLogs)) {
+// throw new ResponseException(InfoEnum.LOGIN_REGISTER_RE);
+ return orderUserLogs.get(0);
+ }
+ orderUserLog.setCreateTime(System.currentTimeMillis());
+ this.orderUserLogMapper.insert(orderUserLog);
+ return orderUserLog;
+ }
+
+ @Override
+ public List queryListByOrderId(Integer orderId) {
+ return orderUserLogMapper.queryByOrderId(orderId);
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param orderUserLog 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public OrderUserLog update(OrderUserLog orderUserLog) {
+ this.orderUserLogMapper.updateByPrimaryKeySelective(orderUserLog);
+ return this.queryById(orderUserLog.getOrderLogId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param orderLogId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer orderLogId) {
+ return this.orderUserLogMapper.deleteByPrimaryKey(orderLogId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.orderUserLogMapper::selectAll);
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/OrdersServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/OrdersServiceImpl.java
new file mode 100644
index 0000000..fbfd894
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/OrdersServiceImpl.java
@@ -0,0 +1,184 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.dto.UserPriceTotal;
+import com.hc.business.mapper.OrdersMapper;
+import com.hc.business.model.Orders;
+import com.hc.business.service.OrdersService;
+import com.hc.core.utils.enums.InfoEnum;
+import com.hc.core.utils.exception.ResponseException;
+import com.hc.core.utils.status.CodeFlagEnum;
+import com.hc.core.utils.status.OrdersFlagEnum;
+import org.apache.commons.lang3.RandomStringUtils;
+import org.springframework.stereotype.Service;
+
+import java.util.*;
+
+/**
+ * 订单表(Orders)表服务实现类
+ *
+ * @author java
+ * @since 2020-11-26 16:46:46
+ */
+
+@Service("ordersService")
+public class OrdersServiceImpl implements OrdersService {
+
+ private final OrdersMapper ordersMapper;
+
+ public OrdersServiceImpl(OrdersMapper ordersMapper) {
+ this.ordersMapper = ordersMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param ordersId 主键
+ * @return 实例对象
+ */
+ @Override
+ public Orders queryById(Integer ordersId) {
+ return this.ordersMapper.selectByPrimaryKey(ordersId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param orders 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public Orders insert(Orders orders) {
+ String orderNo = orders.getOrderNo().trim();
+ Orders orders1 = this.ordersMapper.queryByOrderNo(orderNo);
+ if (!Objects.isNull(orders1)) {
+ throw new ResponseException(InfoEnum.ORDER_ERROR);
+ }
+ orders.setCreateTime(System.currentTimeMillis());
+ orders.setOrderStatus(OrdersFlagEnum.ORDERS_FLAG_UNPAID.getCode());
+ orders.setIsDe(CodeFlagEnum.OBJECT_ENABLE_CODE.getCode());
+ this.ordersMapper.insert(orders);
+ return orders;
+ }
+
+ /**
+ * 创建订单编号
+ *
+ * @return 实例对象
+ */
+ @Override
+ public String createOrderNo() {
+ String mills = String.valueOf(System.currentTimeMillis());
+ String random = RandomStringUtils.randomNumeric(4);
+ String s = mills + random;
+ return s;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param orders 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public Orders update(Orders orders) {
+ this.ordersMapper.updateByPrimaryKeySelective(orders);
+ return this.queryById(orders.getOrdersId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param ordersId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer ordersId) {
+// return this.ordersMapper.deleteByPrimaryKey(ordersId) > 0;
+ Orders orders = this.ordersMapper.selectByPrimaryKey(ordersId);
+ if (Objects.isNull(orders)) {
+ return false;
+ }
+ orders.setIsDe(CodeFlagEnum.OBJECT_DISABLED_CODE.getCode());
+ return this.ordersMapper.updateByPrimaryKey(orders) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.ordersMapper::selectAll);
+ }
+
+
+ @Override
+ public PageInfo queryAllWithOrderInvoices(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.ordersMapper::queryAllWithInvoices);
+ }
+
+ @Override
+ public PageInfo queryAllByUserId(int page, int size, Integer userId) {
+ PageHelper.startPage(page, size);
+ List orders = this.ordersMapper.queryAllByUserId(userId);
+ return new PageInfo(orders);
+ }
+
+ @Override
+ public PageInfo queryAllByClassId(int page, int size, Integer classId) {
+ PageHelper.startPage(page, size);
+ List orders = this.ordersMapper.queryAllByClassId(classId);
+ return new PageInfo(orders);
+ }
+
+ @Override
+ public PageInfo queryAllByClassName(int page, int size, String className) {
+ PageHelper.startPage(page, size);
+ List orders = this.ordersMapper.queryAllByClassName(className);
+ return new PageInfo(orders);
+ }
+
+ @Override
+ public PageInfo queryAllByStatus(int page, int size, Integer status) {
+ PageHelper.startPage(page, size);
+ List orders = this.ordersMapper.queryAllByStatus(status);
+ return new PageInfo<>(orders);
+ }
+
+ @Override
+ public List queryByUserInvoicesId(Integer userInvoicesId) {
+ return this.ordersMapper.queryByUserInvoicesId(userInvoicesId);
+ }
+
+ @Override
+ public UserPriceTotal queryUserCount() {
+ UserPriceTotal userPriceTotal = new UserPriceTotal();
+ userPriceTotal.setTotalUserCount(this.ordersMapper.countPrice());
+ userPriceTotal.setTodayUserCount(this.ordersMapper.queryToday());
+ userPriceTotal.setMonthUserCount(this.ordersMapper.queryMonth());
+ userPriceTotal.setYearUserCount(this.ordersMapper.queryYear());
+ return userPriceTotal;
+ }
+
+ @Override
+ public List queryByOrderNo(String orderNo) {
+ List ordersList = new ArrayList<>();
+ Orders orders = this.ordersMapper.queryByOrderNo(orderNo);
+ if (Objects.isNull(orders)) {
+ return Collections.emptyList();
+ }
+ ordersList.add(orders);
+ return ordersList;
+ }
+
+ @Override
+ public Integer countOrderTotal() {
+ return this.ordersMapper.countOrderTotal();
+ }
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/PaperQuestionServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/PaperQuestionServiceImpl.java
new file mode 100644
index 0000000..5c5e1ed
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/PaperQuestionServiceImpl.java
@@ -0,0 +1,90 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.PaperQuestionMapper;
+import com.hc.business.model.PaperQuestion;
+import com.hc.business.service.PaperQuestionService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 随机试卷问题表(PaperQuestion)表服务实现类
+ *
+ * @author java
+ * @since 2020-12-07 11:35:14
+ */
+
+@Service("paperQuestionService")
+public class PaperQuestionServiceImpl implements PaperQuestionService {
+
+ private final PaperQuestionMapper paperQuestionMapper;
+
+ public PaperQuestionServiceImpl(PaperQuestionMapper paperQuestionMapper) {
+ this.paperQuestionMapper = paperQuestionMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param paperRuleId 主键
+ * @return 实例对象
+ */
+ @Override
+ public PaperQuestion queryById(Integer paperRuleId) {
+ return this.paperQuestionMapper.selectByPrimaryKey(paperRuleId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param paperQuestion 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public PaperQuestion insert(PaperQuestion paperQuestion) {
+ this.paperQuestionMapper.insert(paperQuestion);
+ return paperQuestion;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param paperQuestion 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public PaperQuestion update(PaperQuestion paperQuestion) {
+ this.paperQuestionMapper.updateByPrimaryKeySelective(paperQuestion);
+ return this.queryById(paperQuestion.getPaperRuleId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param paperRuleId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer paperRuleId) {
+ return this.paperQuestionMapper.deleteByPrimaryKey(paperRuleId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.paperQuestionMapper::selectAll);
+ }
+
+ @Override
+ public List queryByPaperId(Integer paperId) {
+ return this.paperQuestionMapper.queryByPaperId(paperId);
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/PaperServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/PaperServiceImpl.java
new file mode 100644
index 0000000..a15c499
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/PaperServiceImpl.java
@@ -0,0 +1,263 @@
+package com.hc.business.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.dto.PaperAnswer;
+import com.hc.business.dto.PaperCommitDTO;
+import com.hc.business.dto.PaperResultDto;
+import com.hc.business.dto.QuestionTypeDto;
+import com.hc.business.mapper.*;
+import com.hc.business.model.*;
+import com.hc.business.service.PaperService;
+import com.hc.core.utils.enums.InfoEnum;
+import com.hc.core.utils.exception.ResponseException;
+import com.hc.core.utils.result.Result;
+import com.hc.core.utils.tool.Verification;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+import java.util.Random;
+
+/**
+ * 试卷表(Paper)表服务实现类
+ *
+ * @author java
+ * @since 2020-12-07 11:34:36
+ */
+
+@Service("paperService")
+public class PaperServiceImpl implements PaperService {
+
+ private final PaperMapper paperMapper;
+
+ private final QuestionMapper questionMapper;
+
+ private final PaperQuestionMapper paperQuestionMapper;
+
+ private final QuestionTypeMapper questionTypeMapper;
+
+ private final QuestionAnswerMapper questionAnswerMapper;
+
+ private final UserTestHistoryMapper userTestHistoryMapper;
+
+ private final UserMapper userMapper;
+
+ public PaperServiceImpl(PaperMapper paperMapper,
+ QuestionMapper questionMapper,
+ PaperQuestionMapper paperQuestionMapper,
+ QuestionTypeMapper questionTypeMapper,
+ QuestionAnswerMapper questionAnswerMapper,
+ UserTestHistoryMapper userTestHistoryMapper,
+ UserMapper userMapper) {
+ this.paperMapper = paperMapper;
+ this.questionMapper = questionMapper;
+ this.paperQuestionMapper = paperQuestionMapper;
+ this.questionTypeMapper = questionTypeMapper;
+ this.questionAnswerMapper = questionAnswerMapper;
+ this.userTestHistoryMapper = userTestHistoryMapper;
+ this.userMapper = userMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param paperId 主键
+ * @return 实例对象
+ */
+ @Override
+ public Paper queryById(Integer paperId) {
+ return this.paperMapper.selectByPrimaryKey(paperId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param paper 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public Paper insert(Paper paper) {
+ this.paperMapper.insert(paper);
+ return paper;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param paper 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public Paper update(Paper paper) {
+ this.paperMapper.updateByPrimaryKeySelective(paper);
+ return this.queryById(paper.getPaperId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param paperId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer paperId) {
+ return this.paperMapper.deleteByPrimaryKey(paperId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.paperMapper::selectAll);
+ }
+
+ @Override
+ public PaperResultDto queryQuestionList(Integer paperId) {
+
+ List questionTypeDtoList = new ArrayList<>();
+ PaperResultDto paperResultDto = new PaperResultDto();
+
+ Paper paper = paperMapper.selectByPrimaryKey(paperId);
+ //可加入试卷状态判断
+ if (Objects.isNull(paper)) {
+ throw new ResponseException(InfoEnum.PAPER_ERROR);
+ }
+
+ //查询抽题规则
+ List paperQuestions = paperQuestionMapper.queryByPaperId(paperId);
+
+
+ for (PaperQuestion paperQuestion : paperQuestions) {
+
+ QuestionTypeDto questionTypeDto = new QuestionTypeDto();
+
+ Integer questionType = paperQuestion.getQuestionType();
+
+ Integer questionLevel = paperQuestion.getQuestionLevel();
+
+ Integer questionTagId = paperQuestion.getQuestionTagId();
+
+ QuestionType questionType1
+ = questionTypeMapper.selectByPrimaryKey(questionType);
+
+ List questionList1
+ = questionMapper.queryByTagId(questionType, questionLevel, questionTagId);
+
+ if (Objects.isNull(questionType1)) {
+ throw new ResponseException(-1, "数据库无此类型习题,请联系管理员");
+ }
+
+ List idList = new ArrayList<>();
+ if (questionList1.size() == paperQuestion.getQuestionNum() || questionList1.size() < paperQuestion.getQuestionNum()) {
+ idList = questionList1;
+ } else {
+ //循环随机需要的题目 直到达到需要的数目
+ for (int i = 0; i < paperQuestion.getQuestionNum(); i++) {
+ Integer randomId;
+ do {
+ //随机一个id
+ randomId = questionList1.get(new Random().nextInt(questionList1.size() - 1));
+ } while (idList.contains(randomId));
+ idList.add(randomId);
+ }
+ }
+
+ questionTypeDto.setQuestionList(idList);
+ questionTypeDto.setTypeName(questionType1.getTypeName());
+ questionTypeDtoList.add(questionTypeDto);
+
+ }
+
+ paperResultDto.setPaper(paper);
+ paperResultDto.setQuestionTypeDtoList(questionTypeDtoList);
+ return paperResultDto;
+ }
+
+ @Override
+ public Result paperCommit(PaperCommitDTO commitDTO) {
+
+// Integer userId = commitDTO.getUserId();
+
+// int i = userTestHistoryMapper.queryCountByParam(userId);
+
+// if (i > 2) {
+// throw new ResponseException(-1,"您已有三次考试记录,当前批次暂无机会继续考试");
+// }
+
+ Integer amountScore = this.calculateScore(commitDTO.getAnswerList());
+
+ User user = userMapper.selectByPrimaryKey(commitDTO.getUserId());
+ if (user == null) {
+ throw new ResponseException(InfoEnum.LOGIN_USER_NAME_ERROR);
+ }
+
+ //进行试卷提交后的相关操作 考试记录的信息
+ Paper paper = paperMapper.selectByPrimaryKey(commitDTO.getPaperId());
+ if (Objects.isNull(paper)) {
+ throw new ResponseException(InfoEnum.PAPER_ERROR);
+ }
+
+ UserTestHistory testHistory = new UserTestHistory();
+
+ testHistory.setCreateTime(System.currentTimeMillis());
+ testHistory.setPaperId(commitDTO.getPaperId());
+ testHistory.setClassId(commitDTO.getClassId());
+ testHistory.setTestTime(commitDTO.getTestTime());
+ testHistory.setUserId(commitDTO.getUserId());
+ testHistory.setTotalScore(paper.getPaperScore());
+ testHistory.setScore(amountScore);
+
+ String answer = JSON.toJSONString(commitDTO.getAnswerList());
+ testHistory.setAnswer(answer);
+ userTestHistoryMapper.insert(testHistory);
+
+ return Result.success(testHistory);
+ }
+
+
+ private Integer calculateScore(List answerList) {
+
+ Integer AMOUNT_SCORE = 0;
+
+ for (PaperAnswer answer : answerList) {
+ //前台传过来的问题id
+ Integer questionId = answer.getQuestionId();
+ //前台传过来的问题答案
+ List paperAnswerId = answer.getAnswerId();
+ //依据问题id查出正确答案 然后和前端传过来的答案对比
+ List answerId =
+ questionAnswerMapper.selectAnswerIdListByQuestionId(questionId);
+ if (CollectionUtils.isEmpty(answerId)) {
+ throw new ResponseException(-1, "此题未配置答案,请联系管理员");
+ }
+ //获取对应问题的题库的信息
+ Question question = questionMapper.selectByPrimaryKey(questionId);
+ if (Objects.isNull(question.getQuestionScore())) {
+ throw new ResponseException(-1, "数据库习题未配置分数,请联系管理员");
+ }
+
+ //判断前端提交答案是否与题库答案相等
+ //多选题长度不同,答案肯定不对
+ if(true == Verification.equalList(paperAnswerId,answerId)){
+ //累计成绩
+ AMOUNT_SCORE += question.getQuestionScore();
+ }
+
+ // if (paperAnswerId.equals(answerId)) {
+// //累计成绩
+// AMOUNT_SCORE += question.getQuestionScore();
+// }
+ }
+ return AMOUNT_SCORE;
+ }
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/QuestionAnswerServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/QuestionAnswerServiceImpl.java
new file mode 100644
index 0000000..621af5e
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/QuestionAnswerServiceImpl.java
@@ -0,0 +1,83 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.QuestionAnswerMapper;
+import com.hc.business.model.QuestionAnswer;
+import com.hc.business.service.QuestionAnswerService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 问题答案表(QuestionAnswer)表服务实现类
+ *
+ * @author java
+ * @since 2020-12-07 11:36:22
+ */
+
+@Service("questionAnswerService")
+public class QuestionAnswerServiceImpl implements QuestionAnswerService {
+
+ private final QuestionAnswerMapper questionAnswerMapper;
+
+ public QuestionAnswerServiceImpl(QuestionAnswerMapper questionAnswerMapper) {
+ this.questionAnswerMapper = questionAnswerMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param questionAnswerId 主键
+ * @return 实例对象
+ */
+ @Override
+ public QuestionAnswer queryById(Integer questionAnswerId) {
+ return this.questionAnswerMapper.selectByPrimaryKey(questionAnswerId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param questionAnswer 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public QuestionAnswer insert(QuestionAnswer questionAnswer) {
+ this.questionAnswerMapper.insert(questionAnswer);
+ return questionAnswer;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param questionAnswer 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public QuestionAnswer update(QuestionAnswer questionAnswer) {
+ this.questionAnswerMapper.updateByPrimaryKeySelective(questionAnswer);
+ return this.queryById(questionAnswer.getQuestionAnswerId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param questionAnswerId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer questionAnswerId) {
+ return this.questionAnswerMapper.deleteByPrimaryKey(questionAnswerId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.questionAnswerMapper::selectAll);
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/QuestionServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/QuestionServiceImpl.java
new file mode 100644
index 0000000..aab5f40
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/QuestionServiceImpl.java
@@ -0,0 +1,97 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.QuestionMapper;
+import com.hc.business.model.Question;
+import com.hc.business.service.QuestionService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 习题表(Question)表服务实现类
+ *
+ * @author java
+ * @since 2020-12-07 11:35:57
+ */
+
+@Service("questionService")
+public class QuestionServiceImpl implements QuestionService {
+
+ private final QuestionMapper questionMapper;
+
+ public QuestionServiceImpl(QuestionMapper questionMapper) {
+ this.questionMapper = questionMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param questionId 主键
+ * @return 实例对象
+ */
+ @Override
+ public Question queryById(Integer questionId) {
+ return this.questionMapper.queryById(questionId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param question 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public Question insert(Question question) {
+ this.questionMapper.insert(question);
+ return question;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param question 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public Question update(Question question) {
+ this.questionMapper.updateByPrimaryKeySelective(question);
+ return this.queryById(question.getQuestionId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param questionId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer questionId) {
+ return this.questionMapper.deleteByPrimaryKey(questionId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.questionMapper::queryQuestions);
+ }
+
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param tagId 题库id
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryByTagLimit(int tagId, int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(() -> questionMapper.queryTagId(tagId));
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/QuestionTagServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/QuestionTagServiceImpl.java
new file mode 100644
index 0000000..8b5fa62
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/QuestionTagServiceImpl.java
@@ -0,0 +1,83 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.QuestionTagMapper;
+import com.hc.business.model.QuestionTag;
+import com.hc.business.service.QuestionTagService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 问题标签表(QuestionTag)表服务实现类
+ *
+ * @author java
+ * @since 2020-12-07 11:36:42
+ */
+
+@Service("questionTagService")
+public class QuestionTagServiceImpl implements QuestionTagService {
+
+ private final QuestionTagMapper questionTagMapper;
+
+ public QuestionTagServiceImpl(QuestionTagMapper questionTagMapper) {
+ this.questionTagMapper = questionTagMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param questionTagId 主键
+ * @return 实例对象
+ */
+ @Override
+ public QuestionTag queryById(Integer questionTagId) {
+ return this.questionTagMapper.selectByPrimaryKey(questionTagId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param questionTag 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public QuestionTag insert(QuestionTag questionTag) {
+ this.questionTagMapper.insert(questionTag);
+ return questionTag;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param questionTag 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public QuestionTag update(QuestionTag questionTag) {
+ this.questionTagMapper.updateByPrimaryKeySelective(questionTag);
+ return this.queryById(questionTag.getQuestionTagId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param questionTagId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer questionTagId) {
+ return this.questionTagMapper.deleteByPrimaryKey(questionTagId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.questionTagMapper::selectAll);
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/QuestionTypeServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/QuestionTypeServiceImpl.java
new file mode 100644
index 0000000..26d42c6
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/QuestionTypeServiceImpl.java
@@ -0,0 +1,83 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.QuestionTypeMapper;
+import com.hc.business.model.QuestionType;
+import com.hc.business.service.QuestionTypeService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 问题类型表(QuestionType)表服务实现类
+ *
+ * @author java
+ * @since 2020-12-07 11:37:03
+ */
+
+@Service("questionTypeService")
+public class QuestionTypeServiceImpl implements QuestionTypeService {
+
+ private final QuestionTypeMapper questionTypeMapper;
+
+ public QuestionTypeServiceImpl(QuestionTypeMapper questionTypeMapper) {
+ this.questionTypeMapper = questionTypeMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param typeId 主键
+ * @return 实例对象
+ */
+ @Override
+ public QuestionType queryById(Integer typeId) {
+ return this.questionTypeMapper.selectByPrimaryKey(typeId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param questionType 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public QuestionType insert(QuestionType questionType) {
+ this.questionTypeMapper.insert(questionType);
+ return questionType;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param questionType 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public QuestionType update(QuestionType questionType) {
+ this.questionTypeMapper.updateByPrimaryKeySelective(questionType);
+ return this.queryById(questionType.getTypeId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param typeId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer typeId) {
+ return this.questionTypeMapper.deleteByPrimaryKey(typeId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.questionTypeMapper::selectAll);
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/ThirdCourseServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/ThirdCourseServiceImpl.java
new file mode 100644
index 0000000..b6ac621
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/ThirdCourseServiceImpl.java
@@ -0,0 +1,163 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.dto.ThirdCourseBack;
+import com.hc.business.dto.ThirdCourseDto;
+import com.hc.business.mapper.CourseChapterVideoMapper;
+import com.hc.business.mapper.CourseMapper;
+import com.hc.business.mapper.ThirdCourseMapper;
+import com.hc.business.mapper.ThirdMapper;
+import com.hc.business.model.Course;
+import com.hc.business.model.CourseChapterVideo;
+import com.hc.business.model.Third;
+import com.hc.business.model.ThirdCourse;
+import com.hc.business.service.ThirdCourseService;
+import com.hc.core.utils.enums.InfoEnum;
+import com.hc.core.utils.exception.ResponseException;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 第三方用户课程配置表(ThirdCourse)表服务实现类
+ *
+ * @author java
+ * @since 2020-06-17 17:29:30
+ */
+
+@Service("thirdCourseService")
+public class ThirdCourseServiceImpl implements ThirdCourseService {
+
+ private final ThirdCourseMapper thirdCourseMapper;
+
+ private final ThirdMapper thirdMapper;
+
+ private final CourseChapterVideoMapper courseChapterVideoMapper;
+
+ private final CourseMapper courseMapper ;
+
+ public ThirdCourseServiceImpl(ThirdCourseMapper thirdCourseMapper, ThirdMapper thirdMapper, CourseChapterVideoMapper courseChapterVideoMapper,
+ CourseMapper courseMapper) {
+ this.thirdCourseMapper = thirdCourseMapper;
+ this.thirdMapper = thirdMapper;
+ this.courseChapterVideoMapper = courseChapterVideoMapper;
+ this.courseMapper = courseMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param id 主键
+ * @return 实例对象
+ */
+ @Override
+ public ThirdCourse queryById(Integer id) {
+ return this.thirdCourseMapper.selectByPrimaryKey(id);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param thirdCourse 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public ThirdCourse insert(ThirdCourse thirdCourse) {
+ this.thirdCourseMapper.insert(thirdCourse);
+ return thirdCourse;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param thirdCourse 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public ThirdCourse update(ThirdCourse thirdCourse) {
+ this.thirdCourseMapper.updateByPrimaryKeySelective(thirdCourse);
+ return this.queryById(thirdCourse.getId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param id 主键
+ * @return 是否成功
+ */
+ @Override
+ public Boolean deleteById(Integer id) {
+ return this.thirdCourseMapper.deleteByPrimaryKey(id) > 0;
+ }
+
+ /**
+ * 分页查询全部数据
+ *
+ * @param page
+ * @param size
+ * @return 实例对象数组
+ */
+ @Override
+ public PageInfo queryPageAll(Integer page, Integer size) {
+ PageHelper.startPage(page, size);
+ List list = this.thirdCourseMapper.selectAll();
+ return new PageInfo(list);
+ }
+
+ @Override
+ public List queryThreadCourseDto(String token) {
+ //查询单位
+ List thirds = thirdMapper.queryThirdByToken(token);
+ if (CollectionUtils.isEmpty(thirds)) {
+ throw new ResponseException(InfoEnum.TOKEN_ERROR);
+ }
+ Third third = thirds.get(0);
+ Integer thirdId = third.getThirdId();
+
+ List thirdCourseDtoList = new ArrayList<>();
+ List courses = thirdCourseMapper.queryThreadCourse(thirdId);
+ if (CollectionUtils.isEmpty(courses)) {
+ return null;
+ }
+ courses.forEach(course -> {
+ ThirdCourseDto thirdCourseDto = new ThirdCourseDto();
+ Integer courseId = course.getCourseId();
+ List courseChapterVideos
+ = courseChapterVideoMapper.selectVideoByCourseId(courseId);
+ thirdCourseDto.setCourse(course);
+ thirdCourseDto.setCourseChapterVideoList(courseChapterVideos);
+ thirdCourseDtoList.add(thirdCourseDto);
+ });
+ return thirdCourseDtoList;
+ }
+
+ @Override
+ public List queryThirdCourseDtoById(Integer thirdId) {
+
+ List list = thirdCourseMapper.selectAll();
+ List backList = new ArrayList();
+ for (ThirdCourse tc:
+ list) {
+
+ ThirdCourseBack back = new ThirdCourseBack();
+ Course course = courseMapper.selectByPrimaryKey(tc.getCourseId());
+ if(null == course){
+ continue;
+ }
+
+ back.setThirdId(thirdId);
+ back.setId(tc.getId());
+ back.setCourseId(tc.getCourseId());
+ back.setCourseName(course.getCourseName());
+ back.setCourseLogo(course.getCourseLogo());
+
+ backList.add(back);
+
+ }
+
+ return backList;
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/ThirdServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/ThirdServiceImpl.java
new file mode 100644
index 0000000..42cfa3a
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/ThirdServiceImpl.java
@@ -0,0 +1,88 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.ThirdMapper;
+import com.hc.business.model.Third;
+import com.hc.business.service.ThirdService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 第三方用户表(Third)表服务实现类
+ *
+ * @author java
+ * @since 2020-06-17 17:29:30
+ */
+
+@Service("thirdService")
+public class ThirdServiceImpl implements ThirdService {
+
+ private final ThirdMapper thirdMapper;
+
+ public ThirdServiceImpl(ThirdMapper thirdMapper) {
+ this.thirdMapper = thirdMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param thirdId 主键
+ * @return 实例对象
+ */
+ @Override
+ public Third queryById(Integer thirdId) {
+ return this.thirdMapper.selectByPrimaryKey(thirdId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param third 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public Third insert(Third third) {
+ this.thirdMapper.insert(third);
+ return third;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param third 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public Third update(Third third) {
+ this.thirdMapper.updateByPrimaryKeySelective(third);
+ return this.queryById(third.getThirdId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param thirdId 主键
+ * @return 是否成功
+ */
+ @Override
+ public Boolean deleteById(Integer thirdId) {
+ return this.thirdMapper.deleteByPrimaryKey(thirdId) > 0;
+ }
+
+ /**
+ * 分页查询全部数据
+ *
+ * @param page
+ * @param size
+ * @return 实例对象数组
+ */
+ @Override
+ public PageInfo queryPageAll(Integer page, Integer size) {
+ PageHelper.startPage(page, size);
+ List list = this.thirdMapper.selectAll();
+ return new PageInfo(list);
+ }
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserAdminServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserAdminServiceImpl.java
new file mode 100644
index 0000000..a063ca4
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserAdminServiceImpl.java
@@ -0,0 +1,125 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.UserAdminMapper;
+import com.hc.business.model.UserAdmin;
+import com.hc.business.model.jwt.GenerateAuthToken;
+import com.hc.business.model.login.AccessEntity;
+import com.hc.business.model.login.AuthEntity;
+import com.hc.business.service.UserAdminService;
+import com.hc.core.utils.enums.InfoEnum;
+import com.hc.core.utils.exception.ResponseException;
+import com.hc.core.utils.tool.IdGenerator;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * 管理员表(UserAdmin)表服务实现类
+ *
+ * @author java
+ * @since 2020-11-16 13:45:07
+ */
+
+@Service("userAdminService")
+public class UserAdminServiceImpl implements UserAdminService {
+
+ private final UserAdminMapper userAdminMapper;
+
+ private final GenerateAuthToken generateAuthToken;
+
+ public UserAdminServiceImpl(UserAdminMapper userAdminMapper,
+ GenerateAuthToken generateAuthToken) {
+ this.userAdminMapper = userAdminMapper;
+ this.generateAuthToken = generateAuthToken;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param userAdminId 主键
+ * @return 实例对象
+ */
+ @Override
+ public UserAdmin queryById(Integer userAdminId) {
+ return this.userAdminMapper.selectByPrimaryKey(userAdminId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param userAdmin 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public UserAdmin insert(UserAdmin userAdmin) {
+ userAdmin.setPermissionLevel(2);
+ userAdmin.setAdminPass(IdGenerator.passwordToHash((userAdmin.getAdminPass())));
+ this.userAdminMapper.insert(userAdmin);
+ return userAdmin;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param userAdmin 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public UserAdmin update(UserAdmin userAdmin) {
+ String adminPass = userAdmin.getAdminPass();
+ if (!Objects.isNull(adminPass)) {
+ userAdmin.setAdminPass(IdGenerator.passwordToHash(adminPass));
+ }
+ this.userAdminMapper.updateByPrimaryKeySelective(userAdmin);
+ return this.queryById(userAdmin.getUserAdminId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param userAdminId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer userAdminId) {
+ return this.userAdminMapper.deleteByPrimaryKey(userAdminId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.userAdminMapper::selectAll);
+ }
+
+ @Override
+ public AccessEntity userAdminLogin(AuthEntity authEntity) {
+
+ String adminAccount = authEntity.getUserName().trim();
+ //依据用户名查询管理员
+ List userAdmins = userAdminMapper.selectUserAdmin(adminAccount);
+ if (CollectionUtils.isEmpty(userAdmins)) {
+ throw new ResponseException(InfoEnum.LOGIN_USER_NAME_ERROR);
+ }
+ UserAdmin userAdmin = userAdmins.get(0);
+
+ //密码错误
+ String password = IdGenerator.passwordToHash(authEntity.getPassword());
+ if (!Objects.equals(password, userAdmin.getAdminPass())) {
+ throw new ResponseException(InfoEnum.LOGIN_PASSWORD_ERROR);
+ }
+
+ //验证密码正确 生成token 存入redis并返回
+ //登录成功 生成token
+ return generateAuthToken.generateToken(authEntity, null, userAdmin);
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserAdviseServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserAdviseServiceImpl.java
new file mode 100644
index 0000000..fef3047
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserAdviseServiceImpl.java
@@ -0,0 +1,108 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.UserAdviseMapper;
+import com.hc.business.model.UserAdvise;
+import com.hc.business.service.UserAdviseService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * 用户建议表
+ * (UserAdvise)表服务实现类
+ *
+ * @author java
+ * @since 2020-11-16 14:20:04
+ */
+
+@Service("userAdviseService")
+public class UserAdviseServiceImpl implements UserAdviseService {
+
+ private final UserAdviseMapper userAdviseMapper;
+
+ public UserAdviseServiceImpl(UserAdviseMapper userAdviseMapper) {
+ this.userAdviseMapper = userAdviseMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param adviceId 主键
+ * @return 实例对象
+ */
+ @Override
+ public UserAdvise queryById(Integer adviceId) {
+ return this.userAdviseMapper.selectByPrimaryKey(adviceId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param userAdvise 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public UserAdvise insert(UserAdvise userAdvise) {
+ userAdvise.setCreateTime(System.currentTimeMillis());
+ this.userAdviseMapper.insert(userAdvise);
+ return userAdvise;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param userAdvise 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public UserAdvise update(UserAdvise userAdvise) {
+ this.userAdviseMapper.updateByPrimaryKeySelective(userAdvise);
+ return this.queryById(userAdvise.getAdviceId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param adviceId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer adviceId) {
+ return this.userAdviseMapper.deleteByPrimaryKey(adviceId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(Integer adviceType, int page, int size) {
+ PageHelper.startPage(page, size);
+ if (Objects.isNull(adviceType)) {
+ List userAdvises = this.userAdviseMapper.queryAll();
+ return new PageInfo<>(userAdvises);
+ }
+ List userAdvises = this.userAdviseMapper.queryAllByAdviceType(adviceType);
+ return new PageInfo<>(userAdvises);
+ }
+
+ /**
+ * 依据用户获取建议
+ *
+ * @param userId 用户id
+ * @return 实例对象数组
+ */
+ @Override
+ public PageInfo queryAllByUserId(Integer userId, int page, int size) {
+ PageHelper.startPage(page, size);
+ List userAdvises = this.userAdviseMapper.queryAllByUserId(userId);
+ return new PageInfo(userAdvises);
+ }
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserCourseServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserCourseServiceImpl.java
new file mode 100644
index 0000000..ce427d2
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserCourseServiceImpl.java
@@ -0,0 +1,95 @@
+package com.hc.business.service.impl;
+
+import com.hc.business.dto.UserCourseDto;
+import com.hc.business.mapper.UserCourseMapper;
+import com.hc.business.model.UserCourse;
+import com.hc.business.service.UserCourseService;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.List;
+
+/**
+ * 用户课程表(UserCourse)表服务实现类
+ *
+ * @author java
+ * @since 2020-11-09 10:05:19
+ */
+
+@Service("userCourseService")
+public class UserCourseServiceImpl implements UserCourseService {
+
+ private final UserCourseMapper userCourseMapper;
+
+ public UserCourseServiceImpl(UserCourseMapper userCourseMapper) {
+ this.userCourseMapper = userCourseMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param userCourseId 主键
+ * @return 实例对象
+ */
+ @Override
+ public UserCourse queryById(Integer userCourseId) {
+ return this.userCourseMapper.selectByPrimaryKey(userCourseId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param userCourse 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public UserCourse insert(UserCourse userCourse) {
+ List userCourses =
+ this.userCourseMapper.selectUserCourse(
+ userCourse.getUserId(),
+ userCourse.getClassId(),
+ userCourse.getCourseId());
+ if (!CollectionUtils.isEmpty(userCourses)) {
+ return userCourses.get(0);
+ }
+ this.userCourseMapper.insert(userCourse);
+ return userCourse;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param userCourse 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public UserCourse update(UserCourse userCourse) {
+ this.userCourseMapper.updateByPrimaryKeySelective(userCourse);
+ return this.queryById(userCourse.getUserCourseId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param userCourseId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer userCourseId) {
+ return this.userCourseMapper.deleteByPrimaryKey(userCourseId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据,根据user_id查询该用户下所有的课程
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public List queryAllByLimit(Integer userId, Integer classId, int page, int size) {
+ // return PageHelper.startPage(page, size).doSelectPageInfo(this.userCourseMapper::selectAll);
+ return userCourseMapper.selectUserCourseList(userId, classId);
+ }
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserInvoicesServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserInvoicesServiceImpl.java
new file mode 100644
index 0000000..2759696
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserInvoicesServiceImpl.java
@@ -0,0 +1,144 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.OrdersMapper;
+import com.hc.business.mapper.UserInvoicesMapper;
+import com.hc.business.model.Orders;
+import com.hc.business.model.UserInvoices;
+import com.hc.business.service.UserInvoicesService;
+import com.hc.core.utils.status.CodeFlagEnum;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * 用户发票表(UserInvoices)表服务实现类
+ *
+ * @author java
+ * @since 2020-12-02 10:50:38
+ */
+
+@Service("userInvoicesService")
+public class UserInvoicesServiceImpl implements UserInvoicesService {
+
+ private final UserInvoicesMapper userInvoicesMapper;
+
+ private final OrdersMapper ordersMapper;
+
+ public UserInvoicesServiceImpl(UserInvoicesMapper userInvoicesMapper,
+ OrdersMapper ordersMapper) {
+ this.userInvoicesMapper = userInvoicesMapper;
+ this.ordersMapper = ordersMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param userInvoicesId 主键
+ * @return 实例对象
+ */
+ @Override
+ public UserInvoices queryById(Integer userInvoicesId) {
+ return this.userInvoicesMapper.selectByPrimaryKey(userInvoicesId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param userInvoices 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public UserInvoices insert(UserInvoices userInvoices) {
+ userInvoices.setStatus(CodeFlagEnum.OBJECT_ENABLE_CODE.getCode());
+ userInvoices.setCreateTime(System.currentTimeMillis());
+ userInvoicesMapper.insert(userInvoices);
+ userInvoices.getOrdersIdList().forEach(orderId -> {
+ Orders orders = ordersMapper.selectByPrimaryKey(orderId);
+ if (!Objects.isNull(orders)) {
+// Integer orderStatus = orders.getOrderStatus();
+// if (OrdersFlagEnum.ORDERS_FLAG_PAID.getCode().equals(orderStatus)) {
+ if (orders.getUserInvoicesId() == null) {
+ orders.setUserInvoicesId(userInvoices.getUserInvoicesId());
+ ordersMapper.updateByPrimaryKey(orders);
+// userInvoices.setStatus(CodeFlagEnum.OBJECT_ENABLE_CODE.getCode());
+// update(userInvoices);
+// }
+ }
+ }
+ });
+ return userInvoices;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param userInvoices 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public UserInvoices update(UserInvoices userInvoices) {
+ this.userInvoicesMapper.updateByPrimaryKeySelective(userInvoices);
+ return this.queryById(userInvoices.getUserInvoicesId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param userInvoicesId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer userInvoicesId) {
+ return this.userInvoicesMapper.deleteByPrimaryKey(userInvoicesId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.userInvoicesMapper::queryAll);
+ }
+
+ /**
+ * 依据用户id获取发票信息
+ *
+ * @param userId 用户id
+ * @return 实例对象数组
+ */
+ @Override
+ public List queryDetailByUserId(Integer userId) {
+ return userInvoicesMapper.queryDetailByUserId(userId);
+ }
+
+ /**
+ * 获取班次发票信息
+ *
+ * @param classId 班次id
+ * @return 实例对象数组
+ */
+ @Override
+ public List queryByClassId(Integer classId) {
+ return userInvoicesMapper.queryByClassId(classId);
+ }
+
+ /**
+ * 获取状态获取发票信息
+ *
+ * @param status 状态
+ * @return 实例对象数组
+ */
+ @Override
+ public List queryByStatus(Integer status) {
+ return userInvoicesMapper.queryByStatus(status);
+ }
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserRefundHistoryServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserRefundHistoryServiceImpl.java
new file mode 100644
index 0000000..da49314
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserRefundHistoryServiceImpl.java
@@ -0,0 +1,93 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.UserRefundHistoryMapper;
+import com.hc.business.model.UserRefundHistory;
+import com.hc.business.service.UserRefundHistoryService;
+import com.hc.core.utils.exception.ResponseException;
+import org.springframework.stereotype.Service;
+
+import java.util.Objects;
+
+/**
+ * 用户退款记录表(UserRefundHistory)表服务实现类
+ *
+ * @author java
+ * @since 2020-12-10 11:31:43
+ */
+
+@Service("userRefundHistoryService")
+public class UserRefundHistoryServiceImpl implements UserRefundHistoryService {
+
+ private final UserRefundHistoryMapper userRefundHistoryMapper;
+
+ public UserRefundHistoryServiceImpl(UserRefundHistoryMapper userRefundHistoryMapper) {
+ this.userRefundHistoryMapper = userRefundHistoryMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param id 主键
+ * @return 实例对象
+ */
+ @Override
+ public UserRefundHistory queryById(Integer id) {
+ return this.userRefundHistoryMapper.selectByPrimaryKey(id);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param userRefundHistory 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public UserRefundHistory insert(UserRefundHistory userRefundHistory) {
+ String orderNo = userRefundHistory.getOrderNo();
+ UserRefundHistory userRefundHistory1
+ = this.userRefundHistoryMapper.queryByOrderNo(orderNo);
+ if (!Objects.isNull(userRefundHistory1)) {
+ throw new ResponseException(-1, "退款已提交请不要重复操作");
+ }
+ userRefundHistory.setCreateTime(System.currentTimeMillis());
+ this.userRefundHistoryMapper.insert(userRefundHistory);
+ return userRefundHistory;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param userRefundHistory 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public UserRefundHistory update(UserRefundHistory userRefundHistory) {
+ this.userRefundHistoryMapper.updateByPrimaryKeySelective(userRefundHistory);
+ return this.queryById(userRefundHistory.getId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param id 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer id) {
+ return this.userRefundHistoryMapper.deleteByPrimaryKey(id) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.userRefundHistoryMapper::selectAll);
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserServiceImpl.java
new file mode 100644
index 0000000..1492c13
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserServiceImpl.java
@@ -0,0 +1,297 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.dto.*;
+import com.hc.business.mapper.UserMapper;
+import com.hc.business.model.User;
+import com.hc.business.model.jwt.GenerateAuthToken;
+import com.hc.business.model.login.AccessEntity;
+import com.hc.business.model.login.AuthEntity;
+import com.hc.business.service.UserService;
+import com.hc.core.utils.enums.InfoEnum;
+import com.hc.core.utils.exception.ResponseException;
+import com.hc.core.utils.msm.MessageService;
+import com.hc.core.utils.tool.IdGenerator;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * 用户表(User)表服务实现类
+ *
+ * @author java
+ * @since 2020-11-09 10:04:14
+ */
+
+@Service("userService")
+public class UserServiceImpl implements UserService {
+
+ private final UserMapper userMapper;
+
+ private final MessageService messageService;
+
+ private final GenerateAuthToken generateAuthToken;
+
+ public UserServiceImpl(UserMapper userMapper,
+ MessageService messageService,
+ GenerateAuthToken generateAuthToken) {
+ this.userMapper = userMapper;
+ this.messageService = messageService;
+ this.generateAuthToken = generateAuthToken;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param userId 主键
+ * @return 实例对象
+ */
+ @Override
+ public User queryById(Integer userId) {
+ return this.userMapper.selectByPrimaryKey(userId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param user 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public User insert(User user) {
+ String userMobile = user.getUserMobile();
+ List users = queryByMobile(userMobile);
+ if (!CollectionUtils.isEmpty(users)) {
+ return users.get(0);
+ }
+ user.setCreateTime(System.currentTimeMillis());
+ user.setUserType(1);
+ String userPass = StringUtils.substring(userMobile, 5, 11);
+ user.setUserPassword(IdGenerator.passwordToHash(userPass));
+ this.userMapper.insert(user);
+ return user;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param user 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public User update(User user) {
+ String userPassword = user.getUserPassword();
+ if (!Objects.isNull(userPassword)) {
+ user.setUserPassword(IdGenerator.passwordToHash(userPassword));
+ }
+ this.userMapper.updateByPrimaryKeySelective(user);
+ return this.queryById(user.getUserId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param userId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer userId) {
+ return this.userMapper.deleteByPrimaryKey(userId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.userMapper::selectAll);
+ }
+
+ @Override
+ public AccessEntity userLogin(AuthEntity authEntity) {
+ String userMobile = authEntity.getUserName().trim();
+ List users = queryByMobile(userMobile);
+ if (CollectionUtils.isEmpty(users)) {
+ throw new ResponseException(InfoEnum.LOGIN_USER_NAME_ERROR);
+ }
+ User user1 = users.get(0);
+ String userPassword = user1.getUserPassword();
+ validatePass(authEntity, userPassword);
+ return generateAuthToken.generateToken(authEntity, user1, null);
+ }
+
+ @Override
+ public AccessEntity userLoginSms(SmsLoginDto smsLoginDto) {
+ String sessionId = smsLoginDto.getSessionId();
+ String code = smsLoginDto.getCode();
+ //校验验证码
+ validCode(sessionId, code);
+ //登录
+ String userMobile = smsLoginDto.getUserMobile().trim();
+ List users = queryByMobile(userMobile);
+ AuthEntity authEntity = new AuthEntity();
+ authEntity.setUserName(userMobile);
+ authEntity.setPassword(StringUtils.substring(userMobile, 5, 11));
+ if (!CollectionUtils.isEmpty(users)) {
+ return generateAuthToken.generateToken(authEntity, users.get(0), null);
+ }
+ User user = new User();
+ user.setUserMobile(userMobile);
+ insert(user);
+ return generateAuthToken.generateToken(authEntity, user, null);
+ }
+
+ /**
+ * 密码校验
+ *
+ * @param authEntity 实例对象
+ * @param userPass 实例对象
+ */
+ private void validatePass(AuthEntity authEntity, String userPass) {
+ String password = IdGenerator.passwordToHash(authEntity.getPassword());
+ if (!Objects.equals(password, userPass)) {
+ throw new ResponseException(InfoEnum.LOGIN_PASSWORD_ERROR);
+ }
+ }
+
+ @Override
+ public AccessEntity userRegister(RetrievePasswordDto retrievePasswordDto) {
+ String sessionId = retrievePasswordDto.getSessionId();
+ String code = retrievePasswordDto.getCode();
+ //校验验证码
+ validCode(sessionId, code);
+ //查询重复用户
+ String userMobile = retrievePasswordDto.getUserMobile().trim();
+ String password = retrievePasswordDto.getPassword();
+ String passwordToHash = IdGenerator.passwordToHash(password);
+ String userGender = retrievePasswordDto.getUserGender().trim();
+ String userCompany = retrievePasswordDto.getUserCompany().trim();
+ String userEmail = retrievePasswordDto.getUserEmail().trim();
+
+ //手机号注册
+ List users = queryByMobile(userMobile);
+ if (!CollectionUtils.isEmpty(users)) {
+ throw new ResponseException(InfoEnum.LOGIN_REGISTER_RE);
+ }
+ //注册用户
+ User user = User.builder()
+ .createTime(System.currentTimeMillis())
+ .userMobile(userMobile)
+ .userPassword(passwordToHash)
+ .userName(retrievePasswordDto.getUserName())
+ .userGender(userGender)
+ .userCompany(userCompany)
+ .userEmail(userEmail)
+ .userType(1)
+ .userLogo("https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1605516088299&di=33e95d78e4ad99b4784665961f1af6e4&imgtype=0&src=http%3A%2F%2Fku.90sjimg.com%2Felement_origin_min_pic%2F01%2F48%2F88%2F16574444edb24ea.jpg")
+ .build();
+ this.userMapper.insertSelective(user);
+
+ AuthEntity authEntity = new AuthEntity();
+ authEntity.setUserName(userMobile);
+ authEntity.setPassword(password);
+ return generateAuthToken.generateToken(authEntity, user, null);
+ }
+
+ @Override
+ public String sendAuthCode(String phone) {
+ return messageService.sendValidShortMessage(phone);
+ }
+
+ @Override
+ public User retrievePassword(RetrievePasswordDto retrievePasswordDto) {
+ String sessionId = retrievePasswordDto.getSessionId();
+ String code = retrievePasswordDto.getCode();
+ //校验验证码
+ validCode(sessionId, code);
+ //修改密码
+ String userMobile = retrievePasswordDto.getUserMobile().trim();
+ List users = queryByMobile(userMobile);
+ assert users.size() != 0;
+ User user = users.get(0);
+ String password = retrievePasswordDto.getPassword().trim();
+ user.setUserPassword(password);
+ return update(user);
+ }
+
+ @Override
+ public List queryByMobile(String userMobile) {
+ return userMapper.queryUserByMobile(userMobile);
+ }
+
+ @Override
+ public List queryUserByCard(String cardId) {
+ return userMapper.queryOneByCardId(cardId);
+ }
+
+ @Override
+ public List queryUserByName(String name) {
+ return userMapper.queryUserByName(name);
+ }
+
+ @Override
+ public List queryUserByClassName(String name, int pay) {
+
+ if((null == name) || (name.isEmpty())){
+ return null;
+ }else {
+
+ if(1 == pay){
+ //只搜已经支付得
+ return this.userMapper.queryUserByClassNameAndPay(name);
+
+ }else {
+
+ //所有订单
+ return this.userMapper.queryUserByClassName(name);
+ }
+
+ }
+ }
+
+
+
+ @Override
+ public UserTimeTotal queryUserCount() {
+ UserTimeTotal userTimeTotal = new UserTimeTotal();
+ userTimeTotal.setTotalUserCount(this.userMapper.queryTotal());
+ userTimeTotal.setTodayUserCount(checkNullInt(this.userMapper.queryToday()));
+ userTimeTotal.setMonthUserCount(checkNullInt(this.userMapper.queryMonth()));
+ userTimeTotal.setYearUserCount(checkNullInt(this.userMapper.queryYear()));
+ return userTimeTotal;
+ }
+
+ private int checkNullInt(Integer count) {
+ if (Objects.isNull(count)) {
+ return 0;
+ }
+ return count;
+ }
+
+ @Override
+ public List queryByUserCount() {
+ List staTimeTableList = this.userMapper.queryByUserCount();
+ Collections.reverse(staTimeTableList);
+ return staTimeTableList;
+ }
+
+ private void validCode(String sessionId, String code) {
+ boolean b = messageService.validCode(
+ sessionId,
+ code);
+ if (!b) {
+ throw new ResponseException(InfoEnum.AUTHCODE_ERROR);
+ }
+ }
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserStatusServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserStatusServiceImpl.java
new file mode 100644
index 0000000..4864044
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserStatusServiceImpl.java
@@ -0,0 +1,106 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.dto.UserStatusClassDto;
+import com.hc.business.mapper.UserStatusMapper;
+import com.hc.business.model.UserStatus;
+import com.hc.business.service.UserStatusService;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.List;
+
+/**
+ * 用户班级学习进度表
+ * (UserStatus)表服务实现类
+ *
+ * @author java
+ * @since 2020-12-06 11:26:45
+ */
+
+@Service("userStatusService")
+public class UserStatusServiceImpl implements UserStatusService {
+
+ private final UserStatusMapper userStatusMapper;
+
+ public UserStatusServiceImpl(UserStatusMapper userStatusMapper) {
+ this.userStatusMapper = userStatusMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param statusId 主键
+ * @return 实例对象
+ */
+ @Override
+ public UserStatus queryById(Integer statusId) {
+ return this.userStatusMapper.selectByPrimaryKey(statusId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param userStatus 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public UserStatus insert(UserStatus userStatus) {
+ List userStatuses
+ = this.userStatusMapper.queryByClassIdAndUserId(userStatus.getClassId(),
+ userStatus.getUserId());
+ if (!CollectionUtils.isEmpty(userStatuses)) {
+ return userStatuses.get(0);
+ }
+ this.userStatusMapper.insert(userStatus);
+ return userStatus;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param userStatus 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public UserStatus update(UserStatus userStatus) {
+ this.userStatusMapper.updateByPrimaryKeySelective(userStatus);
+ return this.queryById(userStatus.getStatusId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param statusId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer statusId) {
+ return this.userStatusMapper.deleteByPrimaryKey(statusId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.userStatusMapper::selectAll);
+ }
+
+ @Override
+ public List queryDtoByUserId(Integer userId) {
+ return this.userStatusMapper.queryDtoByUserId(userId);
+ }
+
+ @Override
+ public PageInfo queryByClassId(Integer classId, int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(() -> this.userStatusMapper.queryByClassId(classId));
+ }
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserTeacherServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserTeacherServiceImpl.java
new file mode 100644
index 0000000..a5e4549
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserTeacherServiceImpl.java
@@ -0,0 +1,93 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.UserTeacherMapper;
+import com.hc.business.model.UserTeacher;
+import com.hc.business.service.UserTeacherService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * (UserTeacher)表服务实现类
+ *
+ * @author java
+ * @since 2020-11-20 11:08:20
+ */
+
+@Service("userTeacherService")
+public class UserTeacherServiceImpl implements UserTeacherService {
+
+ private final UserTeacherMapper userTeacherMapper;
+
+ public UserTeacherServiceImpl(UserTeacherMapper userTeacherMapper) {
+ this.userTeacherMapper = userTeacherMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param teacherId 主键
+ * @return 实例对象
+ */
+ @Override
+ public UserTeacher queryById(Integer teacherId) {
+ return this.userTeacherMapper.selectByPrimaryKey(teacherId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param userTeacher 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public UserTeacher insert(UserTeacher userTeacher) {
+ userTeacher.setCreateTime(System.currentTimeMillis());
+ this.userTeacherMapper.insert(userTeacher);
+ return userTeacher;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param userTeacher 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public UserTeacher update(UserTeacher userTeacher) {
+ this.userTeacherMapper.updateByPrimaryKeySelective(userTeacher);
+ return this.queryById(userTeacher.getTeacherId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param teacherId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer teacherId) {
+ return this.userTeacherMapper.deleteByPrimaryKey(teacherId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.userTeacherMapper::selectAll);
+ }
+
+ @Override
+ public List queryByName(String name) {
+ return this.userTeacherMapper.queryByName(name);
+ }
+
+
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserTestHistoryServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserTestHistoryServiceImpl.java
new file mode 100644
index 0000000..5341d0b
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserTestHistoryServiceImpl.java
@@ -0,0 +1,88 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.mapper.UserTestHistoryMapper;
+import com.hc.business.model.UserTestHistory;
+import com.hc.business.service.UserTestHistoryService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 用户考试记录表(UserTestHistory)表服务实现类
+ *
+ * @author java
+ * @since 2020-12-07 11:28:21
+ */
+
+@Service("userTestHistoryService")
+public class UserTestHistoryServiceImpl implements UserTestHistoryService {
+
+ private final UserTestHistoryMapper userTestHistoryMapper;
+
+ public UserTestHistoryServiceImpl(UserTestHistoryMapper userTestHistoryMapper) {
+ this.userTestHistoryMapper = userTestHistoryMapper;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param testId 主键
+ * @return 实例对象
+ */
+ @Override
+ public UserTestHistory queryById(Integer testId) {
+ return this.userTestHistoryMapper.selectByPrimaryKey(testId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param userTestHistory 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public UserTestHistory insert(UserTestHistory userTestHistory) {
+ this.userTestHistoryMapper.insert(userTestHistory);
+ return userTestHistory;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param userTestHistory 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public UserTestHistory update(UserTestHistory userTestHistory) {
+ this.userTestHistoryMapper.updateByPrimaryKeySelective(userTestHistory);
+ return this.queryById(userTestHistory.getTestId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param testId 主键
+ * @return 是否成功
+ */
+ @Override
+ public boolean deleteById(Integer testId) {
+ return this.userTestHistoryMapper.deleteByPrimaryKey(testId) > 0;
+ }
+
+ /**
+ * 分页查询多条数据
+ *
+ * @param page 页码
+ * @param size 查询条数
+ * @return 对象列表
+ */
+ @Override
+ public PageInfo queryAllByLimit(int page, int size) {
+ return PageHelper.startPage(page, size).doSelectPageInfo(this.userTestHistoryMapper::selectAll);
+ }
+
+ @Override
+ public UserTestHistory queryMaxScore(Integer userId,Integer classId) {
+ return userTestHistoryMapper.queryMaxScore(userId,classId);
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserVideoPositionServiceImpl.java b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserVideoPositionServiceImpl.java
new file mode 100644
index 0000000..41d1f07
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/UserVideoPositionServiceImpl.java
@@ -0,0 +1,381 @@
+package com.hc.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hc.business.dto.UserCourseDto;
+import com.hc.business.mapper.CourseChapterVideoMapper;
+import com.hc.business.mapper.UserCourseMapper;
+import com.hc.business.mapper.UserVideoPositionMapper;
+import com.hc.business.model.UserVideoPosition;
+import com.hc.business.model.CourseChapterVideo;
+import com.hc.business.model.UserCourse;
+import com.hc.business.service.UserVideoPositionService;
+import com.hc.core.utils.redis.RedisUtil;
+import com.hc.core.utils.exception.ResponseException;
+import com.hc.core.utils.tool.Compute;
+import com.hc.core.utils.tool.Verification;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 用户视频观看记录(UserVideoPosition)表服务实现类
+ *
+ * @author java
+ * @since 2020-05-29 15:50:50
+ */
+
+@Service("userVideoPositionService")
+public class UserVideoPositionServiceImpl implements UserVideoPositionService {
+
+ private final RedisUtil redisUtil;
+
+ private final UserVideoPositionMapper userVideoPositionMapper;
+
+ private final CourseChapterVideoMapper chapterVideoMapper;
+
+ private final UserVideoPositionMapper positionMapper;
+
+ private final UserCourseMapper userCourseMapper;
+
+ private static final String REDIS_KEY_PREFIX = "user:video:position:";
+
+ public UserVideoPositionServiceImpl(UserVideoPositionMapper userVideoPositionMapper, RedisUtil redisUtil, CourseChapterVideoMapper videoMapper,
+ UserVideoPositionMapper positionMapper, UserCourseMapper userCourseMapper) {
+ this.userVideoPositionMapper = userVideoPositionMapper;
+ this.chapterVideoMapper = videoMapper;
+ this.positionMapper = positionMapper;
+ this.userCourseMapper = userCourseMapper;
+ this.redisUtil = redisUtil;
+ }
+
+ /**
+ * 通过ID查询单条数据
+ *
+ * @param userVideoPositionId 主键
+ * @return 实例对象
+ */
+ @Override
+ public UserVideoPosition queryById(Integer userVideoPositionId) {
+ return userVideoPositionMapper.selectByPrimaryKey(userVideoPositionId);
+ }
+
+ /**
+ * 新增数据
+ *
+ * @param userVideoPosition 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public UserVideoPosition insert(UserVideoPosition userVideoPosition) {
+ userVideoPositionMapper.insert(userVideoPosition);
+ return userVideoPosition;
+ }
+
+ /**
+ * 修改数据
+ *
+ * @param userVideoPosition 实例对象
+ * @return 实例对象
+ */
+ @Override
+ public UserVideoPosition update(UserVideoPosition userVideoPosition) {
+ userVideoPositionMapper.updateByPrimaryKeySelective(userVideoPosition);
+ return this.queryById(userVideoPosition.getUserVideoPositionId());
+ }
+
+ /**
+ * 通过主键删除数据
+ *
+ * @param userVideoPositionId 主键
+ * @return 是否成功
+ */
+ @Override
+ public Boolean deleteById(Integer userVideoPositionId) {
+ return userVideoPositionMapper.deleteByPrimaryKey(userVideoPositionId) > 0;
+ }
+
+ /**
+ * 分页查询所有数据
+ *
+ * @return 实例对象数组
+ */
+ @Override
+ public PageInfo queryAllByLimit(Integer page, Integer size) {
+ PageHelper.startPage(page, size);
+ List list = userVideoPositionMapper.selectAll();
+ return new PageInfo(list);
+ }
+
+ /**
+ * 重新计算课程的总进度,没有章节得概念,但是多个视频
+ *
+ * @param userId
+ * @param years
+ * @param courseId
+ * @return
+ */
+
+ private boolean calcCourseChapterAndVideoPosition(Integer courseId, Integer userId, String years,Integer classId) {
+
+ //重写计算
+ //取一个课程所有的视频列表
+ List video_list = chapterVideoMapper.selectVideoByCourseId(courseId);
+ if ((null == video_list) || (video_list.size() <= 0)) {
+ return false;
+ }
+
+ //遍历每个视频的进度
+ Double totalPercent = Double.valueOf("0");
+ for (CourseChapterVideo video :
+ video_list) {
+
+ List position_list = positionMapper.selectUserPositionByUserAndVideo(video.getVideoId(), userId);
+ if ((null == position_list) || (0 == position_list.size())) {
+ continue;
+ }
+
+ try {
+ Double videotime = Double.valueOf(position_list.get(0).getVideoTime());
+ Double position = Double.valueOf(position_list.get(0).getVideoPosition());
+
+ totalPercent = Compute.add(totalPercent, Compute.div(position, videotime, 2));
+ } catch (Exception e) {
+ //计算出错,不计入进度
+ continue;
+ }
+
+
+ }
+
+ //计算平均进度
+ totalPercent = Compute.div(totalPercent, video_list.size(), 2);
+ //如果章节进度有更新,需要从新计算课程总体进度,并更新到数据库
+ //TODO 查询课程进度
+ List cardCourseList = userCourseMapper.selectUserCourseProgress(userId, classId,courseId);
+ if (cardCourseList.size() > 0) {
+ //课程进度有变化时 将查询的课程进度写入数据库
+ if (!totalPercent.equals(cardCourseList.get(0).getCoursePercent())) {
+ UserCourse userCourse = new UserCourse();
+ BeanUtils.copyProperties(cardCourseList.get(0), userCourse);
+ userCourse.setCoursePercent(totalPercent);
+ userCourseMapper.updateByPrimaryKeySelective(userCourse);
+ }
+ } else {
+ //如果没有课程得记录,则增加记录
+ UserCourse userCourse = new UserCourse();
+ userCourse.setCoursePercent(totalPercent);
+ userCourse.setCourseId(courseId);
+ userCourse.setUserId(userId);
+ userCourse.setClassId(classId);
+ userCourseMapper.insert(userCourse);
+ }
+
+ return true;
+ }
+
+ //课程进度接口
+ //刷新进度到数据库
+ @Override
+ public int flushToDb(Integer userId, Integer videoId, Integer courseId, String years,Integer classId) {
+
+ if ((null == videoId) || (null == userId) || (null == courseId)) {
+ return 0;
+ }
+ String key = REDIS_KEY_PREFIX + userId + ":" + videoId;
+ String key_v = "position" + String.valueOf(videoId);
+ String key_t = "videotime" + String.valueOf(videoId);
+ String key_u = "update" + String.valueOf(videoId);
+ //没有缓存得进度信息,不刷新
+ if ((true != redisUtil.hashHasKey(key, key_v)) || (true != redisUtil.hashHasKey(key, key_t))) {
+ return 0;
+ }
+
+ /**
+ * 首先更新单挑播放记录
+ */
+
+ String videoTime = redisUtil.hashGet(key, key_t).toString();
+ String position = redisUtil.hashGet(key, key_v).toString();
+ //首先查找是否存在userVideoPostion记录
+ List plist = userVideoPositionMapper.selectUserPositionByUserAndVideo(videoId, userId);
+ //不存在记录
+ Double percent = Compute.div(Double.valueOf(position), Double.valueOf(videoTime), 2);
+
+ if ((null == plist) || (plist.size() <= 0)) {
+ //新增记录
+ UserVideoPosition uposition = new UserVideoPosition();
+ uposition.setVideoId(videoId);
+ uposition.setUserId(userId);
+ uposition.setVideoTime(videoTime);
+ uposition.setVideoPosition(position);
+ if (percent >= 0.95) {
+ uposition.setWatchEnd(1);
+ } else {
+ uposition.setWatchEnd(0);
+ }
+
+ try {
+ userVideoPositionMapper.insert(uposition);
+ } catch (Exception e) {
+ return 0;
+ }
+ } else {
+ //修改记录,只保存一条记录
+ UserVideoPosition uposition = plist.get(0);
+ //位置比数据库保存得少,不刷新
+ if (Double.valueOf(position) <= Double.valueOf(uposition.getVideoPosition())) {
+ return 0;
+ }
+ uposition.setVideoPosition(position);
+ if (percent >= 0.95) {
+ uposition.setWatchEnd(1);
+ } else {
+ uposition.setWatchEnd(0);
+ }
+ try {
+ userVideoPositionMapper.updateByPrimaryKey(uposition);
+ } catch (Exception e) {
+ return 0;
+ }
+ }
+
+ //更新课程总进度
+ calcCourseChapterAndVideoPosition(courseId, userId, years,classId);
+
+ return 1;
+ }
+
+ @Override
+ public Map findVideoPosition(Integer userId, Integer videoId, Integer courseId,Integer classId) {
+
+ String key = REDIS_KEY_PREFIX + userId + ":" + videoId ;
+ String key_v = "position" + String.valueOf(videoId);
+ String key_t = "videotime" + String.valueOf(videoId);
+ String key_u = "update" + String.valueOf(videoId);
+
+ //redis中不存在,从数据库查找,防止极端情况下,完全清理了缓存,全部丢掉数据
+ Map map = new HashMap<>(2);
+ if ((true != redisUtil.hashHasKey(key, key_v)) || (true != redisUtil.hashHasKey(key, key_t))) {
+ List position_list = userVideoPositionMapper.selectUserPositionByUserAndVideo(videoId, userId);
+ if ((null != position_list) && (position_list.size() > 0)) {
+ UserVideoPosition position = position_list.get(0);
+ redisUtil.hashDel(key, key_t);
+ redisUtil.hashDel(key, key_v);
+
+ map.put("position", position.getVideoPosition());
+ map.put("videotime", position.getVideoTime());
+
+ redisUtil.hashSet(key, key_v, position.getVideoPosition());
+ redisUtil.hashSet(key, key_v, position.getVideoTime());
+
+ return map;
+ }
+
+ } else {
+ String videoPosition = (null == redisUtil.hashGet(key, key_v)) ? null : redisUtil.hashGet(key, key_v).toString();
+ String videoTime = (null == redisUtil.hashGet(key, key_t)) ? null : redisUtil.hashGet(key, key_t).toString();
+ map.put("position", videoPosition);
+ map.put("videotime", videoTime);
+ if (redisUtil.hashHasKey(key, key_u)) {
+ map.put("update", "1");
+ redisUtil.hashDel(key, key_u);
+ }
+ return map;
+ }
+
+ return map;
+
+ }
+
+ @Override
+ public UserVideoPosition getVideoPosition(Integer positionId) {
+ return userVideoPositionMapper.selectByPrimaryKey(positionId);
+ }
+
+// @Override
+// public int insertVideoPositionList(List userVideoPositionList) {
+// return userVideoPositionMapper.insertList(userVideoPositionList);
+// }
+
+
+ @Override
+ public UserVideoPosition insertPositionToRedis(UserVideoPosition userVideoPosition, Integer courseId) {
+
+ String key = REDIS_KEY_PREFIX + userVideoPosition.getUserId() + ":" + userVideoPosition.getVideoId();
+ String key_v = "position" + String.valueOf(userVideoPosition.getVideoId());
+ String key_t = "videotime" + String.valueOf(userVideoPosition.getVideoId());
+ //是否更新标记位,用来同步数据使用
+ String key_u = "update" + String.valueOf(userVideoPosition.getVideoId());
+
+ //校验播放记录百分比 大于97% 默认100%
+ if (Verification.verificationString(userVideoPosition.getVideoTime()) && Verification.verificationString(userVideoPosition.getVideoPosition())) {
+ if (Double.valueOf(userVideoPosition.getVideoPosition()) > Double.valueOf(userVideoPosition.getVideoTime())) {
+ userVideoPosition.setVideoPosition(userVideoPosition.getVideoTime());
+ }
+ if (Double.valueOf(userVideoPosition.getVideoTime()) != 0) {
+ Double percent = Compute.div(Double.valueOf(userVideoPosition.getVideoPosition()), Double.valueOf(userVideoPosition.getVideoTime()), 2);
+ if (percent >= 0.95) {
+ //设置视频观看长度 = 视频总长
+ userVideoPosition.setVideoPosition(userVideoPosition.getVideoTime());
+ }
+ }
+ }
+ try {
+ if (Verification.verificationString(userVideoPosition.getVideoPosition())) {
+ if (redisUtil.hasKey(key)) {
+ //hashset已存在
+ String videoPosition = (String) redisUtil.hashGet(key, key_v);
+ String videoTime = (String) redisUtil.hashGet(key, key_t);
+
+ //表示i视频进度有更新
+ redisUtil.hashDel(key, key_u);
+ redisUtil.hashSet(key, key_u, "1");
+
+ //单个视频总长是否已存在
+ if (Verification.verificationString(videoTime)) {
+ //大于原先长
+ if (Double.valueOf(userVideoPosition.getVideoTime()) > Double.valueOf(videoTime)) {
+ redisUtil.hashDel(key, key_t);
+ redisUtil.hashSet(key, key_t, userVideoPosition.getVideoTime());
+ }
+ } else {
+ redisUtil.hashSet(key, key_t, userVideoPosition.getVideoTime());
+ }
+
+ //单个视频播放记录是否已存在
+ if (Verification.verificationString(videoPosition)) {
+ if (Double.valueOf(userVideoPosition.getVideoPosition()) > Double.valueOf(videoPosition)) {
+ //大于原先值
+ //先删除原先的存储
+ redisUtil.hashDel(key, key_v);
+ redisUtil.hashSet(key, key_v, userVideoPosition.getVideoPosition());
+ }
+
+ //如果位置大于视频最大长度,肯定出错了。不能超过视频最大长度
+ if (Double.valueOf(userVideoPosition.getVideoPosition()) >= Double.valueOf(videoTime)) {
+ redisUtil.hashDel(key, key_v);
+ redisUtil.hashSet(key, key_v, videoTime);
+ }
+ } else {
+ redisUtil.hashSet(key, key_v, userVideoPosition.getVideoPosition());
+ }
+ } else {
+ //每次添加时将播放记录先添加至redis
+ Map pairs = new HashMap(16);
+ pairs.put(key_v, userVideoPosition.getVideoPosition());
+ pairs.put(key_t, userVideoPosition.getVideoTime());
+ pairs.put(key_u, "1");
+ redisUtil.hashMapSet(key, pairs);
+ }
+ }
+ return userVideoPosition;
+ } catch (Exception e) {
+ throw new ResponseException(e.hashCode(), e.getMessage());
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/JAVA_MYSQL_ZC/jxjy-business/src/main/resources/mapper/AreaDistrictMapper.xml b/JAVA_MYSQL_ZC/jxjy-business/src/main/resources/mapper/AreaDistrictMapper.xml
new file mode 100644
index 0000000..c2f3ae4
--- /dev/null
+++ b/JAVA_MYSQL_ZC/jxjy-business/src/main/resources/mapper/AreaDistrictMapper.xml
@@ -0,0 +1,31 @@
+
+
+