xiaofei 1 год назад
Родитель
Сommit
ef5cf1f082

+ 0 - 24
teachcloud-common/src/main/java/com/qmth/teachcloud/common/bean/result/BasicStudentResult.java

@@ -24,17 +24,9 @@ public class BasicStudentResult {
     @ApiModelProperty(value = "学生电话")
     private String phoneNumber;
 
-    @JsonSerialize(using = ToStringSerializer.class)
-    @ApiModelProperty(value = "学院id")
-    private Long collegeId;
-
     @ApiModelProperty(value = "学院名称")
     private String collegeName;
 
-    @JsonSerialize(using = ToStringSerializer.class)
-    @ApiModelProperty(value = "专业id")
-    private Long majorId;
-
     @ApiModelProperty(value = "专业名称")
     private String majorName;
 
@@ -87,14 +79,6 @@ public class BasicStudentResult {
         this.phoneNumber = phoneNumber;
     }
 
-    public Long getCollegeId() {
-        return collegeId;
-    }
-
-    public void setCollegeId(Long collegeId) {
-        this.collegeId = collegeId;
-    }
-
     public String getCollegeName() {
         return collegeName;
     }
@@ -103,14 +87,6 @@ public class BasicStudentResult {
         this.collegeName = collegeName;
     }
 
-    public Long getMajorId() {
-        return majorId;
-    }
-
-    public void setMajorId(Long majorId) {
-        this.majorId = majorId;
-    }
-
     public String getMajorName() {
         return majorName;
     }

+ 8 - 17
teachcloud-common/src/main/resources/mapper/BasicStudentMapper.xml

@@ -89,29 +89,20 @@
     <select id="findById" resultType="com.qmth.teachcloud.common.bean.result.BasicStudentResult">
         SELECT
             stu.id,
-            student_name AS studentName,
-            student_code AS studentCode,
-            phone_number AS phoneNumber,
-            bc.id AS collegeId,
-            bc.name AS collegeName,
-            bm.id AS majorId,
-            bm.name AS majorName,
-            clazz_id AS clazzId,
+            stu.student_name AS studentName,
+            stu.student_code AS studentCode,
+            stu.college AS collegeName,
+            stu.major AS majorName,
+            stu.clazz_id AS clazzId,
             clz.clazz_name AS clazz,
-            stu.enable,
             stu.create_id AS createId,
             stu.create_time AS createTime
         FROM
-            basic_student stu
-                LEFT JOIN
-            basic_clazz clz ON stu.clazz_id = clz.id AND clz.enable = TRUE
-                LEFT JOIN
-            basic_major bm ON stu.major_id = bm.id AND bm.enable = TRUE
+            basic_exam_student stu
                 LEFT JOIN
-            sys_org bc ON stu.belong_org_id = bc.id
+            basic_teach_clazz clz ON stu.clazz_id = clz.id
         <where>
-            and stu.enable = true
-            <if test="id != null and id != ''">
+            <if test="id != null">
                 AND stu.id = #{id}
             </if>
         </where>