feng_ting-ting 1 month ago
parent
commit
a1882f1f6f

+ 2 - 2
XiaoETech-admin/src/main/resources/application-druid.yml

@@ -6,9 +6,9 @@ spring:
         druid:
             # 主库数据源
             master:
-                url: jdbc:mysql://123.57.134.90:3306/xiao?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                url: jdbc:mysql://localhost:3306/xiao?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                 username: root
-                password: Tingting520
+                password: root
             # 从库数据源
             slave:
                 # 从数据源开关/默认关闭

+ 7 - 7
XiaoETech-admin/src/main/resources/application.yml

@@ -134,11 +134,11 @@ wx-app:
   appId: wxa2a76a594be60e4d
   appSecret: 73e228a4fea627fb74d5a9de8585d880
 
-wx:
-  pay:
-    appId:  #微信公众号或者小程序等的appid
-    secret:
-    mchId: 1516562401 #微信支付商户号
-    mchKey: 7f633cbfbd892b4d256bc6edffe3b089 #微信支付商户密钥
-    notifyUrl: http://8.130.135.74:8053/api/order/student/pay/wxCallback #支付回调地址
+#wx:
+#  pay:
+#    appId:  #微信公众号或者小程序等的appid
+#    secret:
+#    mchId: 1516562401 #微信支付商户号
+#    mchKey: 7f633cbfbd892b4d256bc6edffe3b089 #微信支付商户密钥
+#    notifyUrl: http://8.130.135.74:8053/api/order/student/pay/wxCallback #支付回调地址
 

+ 4 - 3
XiaoETech-common/pom.xml

@@ -17,6 +17,7 @@
 
     <dependencies>
 
+
         <!-- Spring框架基本的核心工具 -->
         <dependency>
             <groupId>org.springframework</groupId>
@@ -52,13 +53,13 @@
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-lang3</artifactId>
         </dependency>
-  
+
         <!-- JSON工具类 -->
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-databind</artifactId>
         </dependency>
-        
+
         <!-- 阿里JSON解析器 -->
         <dependency>
             <groupId>com.alibaba.fastjson2</groupId>
@@ -121,4 +122,4 @@
 
     </dependencies>
 
-</project>
+</project>

+ 1 - 1
XiaoETech-framework/pom.xml

@@ -61,4 +61,4 @@
 
     </dependencies>
 
-</project>
+</project>

+ 10 - 9
XiaoETech-framework/src/main/java/com/zhentao/framework/config/MyBatisConfig.java

@@ -1,11 +1,6 @@
 package com.zhentao.framework.config;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import javax.sql.DataSource;
+import com.zhentao.common.utils.StringUtils;
 import org.apache.ibatis.io.VFS;
 import org.apache.ibatis.session.SqlSessionFactory;
 import org.mybatis.spring.SqlSessionFactoryBean;
@@ -22,11 +17,17 @@ import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
 import org.springframework.core.type.classreading.MetadataReader;
 import org.springframework.core.type.classreading.MetadataReaderFactory;
 import org.springframework.util.ClassUtils;
-import com.zhentao.common.utils.StringUtils;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
 
 /**
  * Mybatis支持*匹配扫描包
- * 
+ *
  * @author ruoyi
  */
 @Configuration
@@ -129,4 +130,4 @@ public class MyBatisConfig
         sessionFactory.setConfigLocation(new DefaultResourceLoader().getResource(configLocation));
         return sessionFactory.getObject();
     }
-}
+}

+ 6 - 1
XiaoETech-quartz/pom.xml

@@ -17,6 +17,11 @@
 
     <dependencies>
 
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
+
         <!-- 定时任务 -->
         <dependency>
             <groupId>org.quartz-scheduler</groupId>
@@ -37,4 +42,4 @@
 
     </dependencies>
 
-</project>
+</project>

+ 27 - 9
XiaoETech-system/pom.xml

@@ -16,21 +16,39 @@
     </description>
 
     <dependencies>
-
-        <!-- 通用工具-->
-        <dependency>
-            <groupId>com.zhentao</groupId>
-            <artifactId>zhentao-common</artifactId>
-        </dependency>
+        <!-- 集成mybatis-plus -->
         <dependency>
             <groupId>com.baomidou</groupId>
-            <artifactId>mybatis-plus-boot-starter</artifactId>
-            <version>3.4.2</version>
+            <artifactId>mybatis-plus-core</artifactId>
+            <version>3.5.1</version>
         </dependency>
         <dependency>
             <groupId>org.projectlombok</groupId>
             <artifactId>lombok</artifactId>
-            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid-spring-boot-starter</artifactId>
+            <version>1.1.20</version>
+        </dependency>
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt</artifactId>
+            <version>0.9.1</version>
+        </dependency>
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>5.8.11</version> <!-- 确保版本号是正确的 -->
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
+        </dependency>
+        <!-- 通用工具-->
+        <dependency>
+            <groupId>com.zhentao</groupId>
+            <artifactId>zhentao-common</artifactId>
         </dependency>
     </dependencies>
 

+ 77 - 0
XiaoETech-system/src/main/java/com/zhentao/system/domain/Course.java

@@ -48,4 +48,81 @@ public class Course implements Serializable {
     private String courseOutline;
 
     private static final long serialVersionUID = 1L;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        com.zhentao.system.domain.Course other = (com.zhentao.system.domain.Course) that;
+        return (this.getCourseId() == null ? other.getCourseId() == null : this.getCourseId().equals(other.getCourseId()))
+                && (this.getCourseName() == null ? other.getCourseName() == null : this.getCourseName().equals(other.getCourseName()))
+                && (this.getCourseDescription() == null ? other.getCourseDescription() == null : this.getCourseDescription().equals(other.getCourseDescription()))
+                && (this.getCourseCategory() == null ? other.getCourseCategory() == null : this.getCourseCategory().equals(other.getCourseCategory()))
+                && (this.getInstructorId() == null ? other.getInstructorId() == null : this.getInstructorId().equals(other.getInstructorId()))
+                && (this.getCourseCover() == null ? other.getCourseCover() == null : this.getCourseCover().equals(other.getCourseCover()))
+                && (this.getCoursePrice() == null ? other.getCoursePrice() == null : this.getCoursePrice().equals(other.getCoursePrice()))
+                && (this.getCourseDuration() == null ? other.getCourseDuration() == null : this.getCourseDuration().equals(other.getCourseDuration()))
+                && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
+                && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
+                && (this.getCourseStatus() == null ? other.getCourseStatus() == null : this.getCourseStatus().equals(other.getCourseStatus()))
+                && (this.getStudyNum() == null ? other.getStudyNum() == null : this.getStudyNum().equals(other.getStudyNum()))
+                && (this.getIsFree() == null ? other.getIsFree() == null : this.getIsFree().equals(other.getIsFree()))
+                && (this.getRecommendIndex() == null ? other.getRecommendIndex() == null : this.getRecommendIndex().equals(other.getRecommendIndex()))
+                && (this.getCourseOutline() == null ? other.getCourseOutline() == null : this.getCourseOutline().equals(other.getCourseOutline()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getCourseId() == null) ? 0 : getCourseId().hashCode());
+        result = prime * result + ((getCourseName() == null) ? 0 : getCourseName().hashCode());
+        result = prime * result + ((getCourseDescription() == null) ? 0 : getCourseDescription().hashCode());
+        result = prime * result + ((getCourseCategory() == null) ? 0 : getCourseCategory().hashCode());
+        result = prime * result + ((getInstructorId() == null) ? 0 : getInstructorId().hashCode());
+        result = prime * result + ((getCourseCover() == null) ? 0 : getCourseCover().hashCode());
+        result = prime * result + ((getCoursePrice() == null) ? 0 : getCoursePrice().hashCode());
+        result = prime * result + ((getCourseDuration() == null) ? 0 : getCourseDuration().hashCode());
+        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
+        result = prime * result + ((getCourseStatus() == null) ? 0 : getCourseStatus().hashCode());
+        result = prime * result + ((getStudyNum() == null) ? 0 : getStudyNum().hashCode());
+        result = prime * result + ((getIsFree() == null) ? 0 : getIsFree().hashCode());
+        result = prime * result + ((getRecommendIndex() == null) ? 0 : getRecommendIndex().hashCode());
+        result = prime * result + ((getCourseOutline() == null) ? 0 : getCourseOutline().hashCode());
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", courseId=").append(courseId);
+        sb.append(", courseName=").append(courseName);
+        sb.append(", courseDescription=").append(courseDescription);
+        sb.append(", courseCategory=").append(courseCategory);
+        sb.append(", instructorId=").append(instructorId);
+        sb.append(", courseCover=").append(courseCover);
+        sb.append(", coursePrice=").append(coursePrice);
+        sb.append(", courseDuration=").append(courseDuration);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", courseStatus=").append(courseStatus);
+        sb.append(", studyNum=").append(studyNum);
+        sb.append(", isFree=").append(isFree);
+        sb.append(", recommendIndex=").append(recommendIndex);
+        sb.append(", courseOutline=").append(courseOutline);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
 }

+ 24 - 22
XiaoETech-system/src/main/resources/mapper/system/CourseMapper.xml

@@ -1,29 +1,31 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="com.zhentao.system.mapper.CourseMapper">
-    <resultMap id="CourseResult" type="course">
-        <id property="courseId" column="course_id"/>
-        <result property="courseName" column="course_name"/>
-        <result property="courseDescription" column="course_description"/>
-        <result property="courseCategory" column="course_category"/>
-        <result property="instructorId" column="instructor_id"/>
-        <result property="courseCover" column="course_cover"/>
-        <result property="coursePrice" column="course_price"/>
-        <result property="courseDuration" column="course_duration"/>
-        <result property="createTime" column="create_time"/>
-        <result property="updateTime" column="update_time"/>
-        <result property="courseStatus" column="course_status"/>
-        <result property="studyNum" column="student_num"/>
-        <result property="isFree" column="is_free"/>
-        <result property="recommendIndex" column="recommend_index"/>
-        <result property="courseOutline" column="course_outline"/>
-        <association property="category" javaType="courseCategory" resultMap="categoryResult"/>
-    </resultMap>
-    <resultMap id="categoryResult" type="courseCategory">
-        <id property="categoryId" column="category_id"/>
-        <result property="categoryName" column="category_name"/>
-        <result property="categoryDescription" column="category_description"/>
+    <resultMap id="BaseResultMap" type="com.zhentao.system.domain.Course">
+        <id property="courseId" column="course_id" jdbcType="INTEGER"/>
+        <result property="courseName" column="course_name" jdbcType="VARCHAR"/>
+        <result property="courseDescription" column="course_description" jdbcType="VARCHAR"/>
+        <result property="courseCategory" column="course_category" jdbcType="INTEGER"/>
+        <result property="instructorId" column="instructor_id" jdbcType="INTEGER"/>
+        <result property="courseCover" column="course_cover" jdbcType="VARCHAR"/>
+        <result property="coursePrice" column="course_price" jdbcType="DECIMAL"/>
+        <result property="courseDuration" column="course_duration" jdbcType="INTEGER"/>
+        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+        <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+        <result property="courseStatus" column="course_status" jdbcType="OTHER"/>
+        <result property="studyNum" column="study_num" jdbcType="INTEGER"/>
+        <result property="isFree" column="is_free" jdbcType="TINYINT"/>
+        <result property="recommendIndex" column="recommend_index" jdbcType="INTEGER"/>
+        <result property="courseOutline" column="course_outline" jdbcType="VARCHAR"/>
     </resultMap>
+
+    <sql id="Base_Column_List">
+        course_id,course_name,course_description,
+        course_category,instructor_id,course_cover,
+        course_price,course_duration,create_time,
+        update_time,course_status,study_num,
+        is_free,recommend_index,course_outline
+    </sql>
     <select id="selectCourseList" resultType="com.zhentao.system.domain.Course">
         select c.*, cc.category_name, i.instructor_name from course c left join course_category cc on c.course_category = cc.category_id
         left join instructor i on c.instructor_id = i.instructor_id

+ 0 - 7
pom.xml

@@ -40,13 +40,6 @@
     <!-- 依赖声明 -->
     <dependencyManagement>
         <dependencies>
-            <!-- https://mvnrepository.com/artifact/com.github.wxpay/wxpay-sdk -->
-            <dependency>
-                <groupId>com.github.wxpay</groupId>
-                <artifactId>wxpay-sdk</artifactId>
-                <version>0.0.3</version>
-            </dependency>
-
 
             <!-- 覆盖SpringFramework的依赖配置-->
             <dependency>