change преди 3 години
родител
ревизия
5bff01e79c

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/domain/ClassGrade.java

@@ -25,7 +25,7 @@ public class ClassGrade implements Serializable {
 private static final long serialVersionUID=1L;
 
     /** $column.columnComment */
-    @TableId(value = "class_id")
+    @TableId(value = "grade_id")
     private Long gradeId;
     /** 开班状态 0未开班 1开班 */
     private Integer classStatus;

+ 10 - 10
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeMapper.xml

@@ -5,7 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 <mapper namespace="com.zhongzheng.modules.grade.mapper.ClassGradeMapper">
 
     <resultMap type="com.zhongzheng.modules.grade.domain.ClassGrade" id="ClassGradeResult">
-        <result property="gradeId" column="class_id"/>
+        <result property="gradeId" column="grade_id"/>
         <result property="classStatus" column="class_status"/>
         <result property="officialName" column="official_name"/>
         <result property="className" column="class_name"/>
@@ -126,7 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             (SELECT nick_name FROM sys_user u where g.sys_user_id = u.user_id) as nick_name,
             (SELECT area_name FROM apply_areas a where a.area_id = g.areas_id) as area_name,
             (SELECT area_name FROM apply_areas a where a.area_id = g.city_id) as city_name,
-            (SELECT COUNT(a.id) FROM class_grade_user a where a.grade_id = g.class_id and a.status =1) as student_num
+            (SELECT COUNT(a.id) FROM class_grade_user a where a.grade_id = g.grade_id and a.status =1) as student_num
         FROM
             class_grade g
         where 1=1
@@ -154,7 +154,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             LEFT JOIN goods d ON s.goods_id = d.goods_id
             WHERE
             1 = 1
-            AND g.class_id = s.grade_id
+            AND g.grade_id = s.grade_id
             AND d.education_type_id =#{educationTypeId}
             ) >0
         </if>
@@ -167,7 +167,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             LEFT JOIN goods d ON s.goods_id = d.goods_id
             WHERE
             1 = 1
-            AND g.class_id = s.grade_id
+            AND g.grade_id = s.grade_id
             AND d.business_id =#{businessId}
             ) >0
         </if>
@@ -180,7 +180,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             LEFT JOIN goods d ON s.goods_id = d.goods_id
             WHERE
             1 = 1
-            AND g.class_id = s.grade_id
+            AND g.grade_id = s.grade_id
             AND d.school_id =#{schoolId}
             ) >0
         </if>
@@ -193,7 +193,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             LEFT JOIN goods d ON s.goods_id = d.goods_id
             WHERE
             1 = 1
-            AND g.class_id = s.grade_id
+            AND g.grade_id = s.grade_id
             AND d.major_id =#{majorId}
             ) >0
         </if>
@@ -235,18 +235,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         cgu.grade_id,
         u.telphone,
         (case WHEN (select COUNT(uu.id) FROM user_update uu where cgu.user_id = uu.user_id) >0 then 1 ELSE 0 end) as user_status,
-        (SELECT g.class_hours FROM goods g LEFT JOIN class_grade_goods cgg on cgg.goods_id = g.goods_id where cg.class_id = cgg.grade_id) as class_hours,
+        (SELECT g.class_hours FROM goods g LEFT JOIN class_grade_goods cgg on cgg.goods_id = g.goods_id where cg.grade_id = cgg.grade_id) as class_hours,
         cgu.period_status,
         cgu.finish_status,
-        (SELECT g.study_start_time FROM goods g LEFT JOIN class_grade_goods cgg on cgg.goods_id = g.goods_id where cg.class_id = cgg.grade_id) as study_start_time,
-        (SELECT g.study_end_time FROM goods g LEFT JOIN class_grade_goods cgg on cgg.goods_id = g.goods_id where cg.class_id = cgg.grade_id) as study_end_time,
+        (SELECT g.study_start_time FROM goods g LEFT JOIN class_grade_goods cgg on cgg.goods_id = g.goods_id where cg.grade_id = cgg.grade_id) as study_start_time,
+        (SELECT g.study_end_time FROM goods g LEFT JOIN class_grade_goods cgg on cgg.goods_id = g.goods_id where cg.grade_id = cgg.grade_id) as study_end_time,
         cg.class_start_time,
         cg.class_end_time,
         cgu.official_status,
         cgu.learn_status
         FROM
         class_grade_user cgu
-        LEFT JOIN class_grade cg ON cgu.grade_id = cg.class_id
+        LEFT JOIN class_grade cg ON cgu.grade_id = cg.grade_id
         LEFT JOIN `user` u ON u.user_id = cgu.user_id
         where 1=1
         and cgu.`status` =1

+ 3 - 3
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeUserMapper.xml

@@ -90,9 +90,9 @@
         g.goods_id = c.goods_id where c.grade_id = u.grade_id) as school_name,
         (select b.education_name FROM course_education_type b LEFT JOIN goods g on b.id = g.education_type_id LEFT JOIN
         class_grade_goods c on g.goods_id = c.goods_id where c.grade_id = u.grade_id) as education_name,
-        (SELECT g.grade_code FROM class_grade g where u.grade_id = g.class_id) as grade_code,
-        (SELECT g.class_name FROM class_grade g where u.grade_id = g.class_id) as grade_name,
-        (SELECT g.status FROM class_grade g where u.grade_id = g.class_id) as grade_status
+        (SELECT g.grade_code FROM class_grade g where u.grade_id = g.grade_id) as grade_code,
+        (SELECT g.class_name FROM class_grade g where u.grade_id = g.grade_id) as grade_name,
+        (SELECT g.status FROM class_grade g where u.grade_id = g.grade_id) as grade_status
         FROM
         class_grade_user u
         where 1=1