Browse Source

考务接口修改

wangliang 5 years ago
parent
commit
8301a56e66

+ 76 - 4
themis-backend/src/main/java/com/qmth/themis/backend/api/TEExamPaperController.java

@@ -1,8 +1,29 @@
 package com.qmth.themis.backend.api;
 
-import io.swagger.annotations.Api;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.qmth.themis.backend.util.ServletUtil;
+import com.qmth.themis.business.constant.SystemConstant;
+import com.qmth.themis.business.entity.TBUser;
+import com.qmth.themis.business.entity.TEExamPaper;
+import com.qmth.themis.business.enums.FieldUniqueEnum;
+import com.qmth.themis.business.service.TEExamPaperService;
+import com.qmth.themis.business.util.JacksonUtil;
+import com.qmth.themis.common.contanst.Constants;
+import com.qmth.themis.common.exception.BusinessException;
+import com.qmth.themis.common.util.Result;
+import com.qmth.themis.common.util.ResultUtil;
+import io.swagger.annotations.*;
+import org.springframework.dao.DuplicateKeyException;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
 
 /**
  * @Description: 考试试卷 前端控制器
@@ -13,7 +34,58 @@ import org.springframework.web.bind.annotation.RestController;
  */
 @Api(tags = "考试试卷Controller")
 @RestController
-@RequestMapping("/${prefix.url.admin}/examPaper")
+@RequestMapping("/${prefix.url.admin}/paper")
 public class TEExamPaperController {
 
+    @Resource
+    TEExamPaperService teExamPaperService;
+
+    @ApiOperation(value = "考试试卷查询接口")
+    @RequestMapping(value = "/query", method = RequestMethod.GET)
+    @ApiResponses({@ApiResponse(code = 200, message = "考试科目信息", response = TEExamPaper.class)})
+    public Result query(@ApiParam(value = "考试批次id", required = true) @RequestParam Long examId, @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode) {
+        QueryWrapper<TEExamPaper> teExamPaperQueryWrapper = new QueryWrapper<>();
+        teExamPaperQueryWrapper.lambda().eq(TEExamPaper::getExamId, examId).eq(TEExamPaper::getCourseCode, courseCode);
+        List<TEExamPaper> teExamPaperList = teExamPaperService.list(teExamPaperQueryWrapper);
+        Map map = new HashMap<>();
+        map.put(SystemConstant.RECORDS, teExamPaperList);
+        return ResultUtil.ok(map);
+    }
+
+    @ApiOperation(value = "考试试卷参数修改接口")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    @Transactional
+    @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
+    public Result save(@ApiParam(value = "考试试卷信息", required = true) @RequestBody List<TEExamPaper> teExamPaperList) {
+        try {
+            HttpServletRequest request = ServletUtil.getRequest();
+            TBUser tbUser = (TBUser) ServletUtil.getRequestAccount(request);
+            teExamPaperList.forEach(s -> {
+                if (Objects.nonNull(s.getId())) {
+                    s.setUpdateId(tbUser.getId());
+                }
+            });
+            teExamPaperService.updateBatchById(teExamPaperList);
+        } catch (Exception e) {
+            e.printStackTrace();
+            if (e instanceof DuplicateKeyException) {
+                String errorColumn = e.getCause().toString();
+                String columnStr = errorColumn.substring(errorColumn.lastIndexOf("key") + 3, errorColumn.length()).replaceAll("'", "");
+                throw new BusinessException("机构id[" + teExamPaperList.get(0).getExamId() + "]下的" + FieldUniqueEnum.convertToCode(columnStr) + "数据不允许重复插入");
+            } else if (e instanceof BusinessException) {
+                throw new BusinessException(e.getMessage());
+            } else {
+                throw new RuntimeException(e);
+            }
+        }
+        return ResultUtil.ok(JacksonUtil.parseJson(SystemConstant.SUCCESS));
+    }
+
+    @ApiOperation(value = "考试试卷数据包上传接口")
+    @RequestMapping(value = "/import", method = RequestMethod.POST)
+    @Transactional
+    @ApiResponses({@ApiResponse(code = 200, message = "{\"taskId\":0", response = Result.class)})
+    public Result importData(@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file) {
+        return ResultUtil.ok(JacksonUtil.parseJson(SystemConstant.SUCCESS));
+    }
 }

+ 37 - 1
themis-backend/src/main/java/com/qmth/themis/backend/api/TEExamStudentController.java

@@ -1,8 +1,24 @@
 package com.qmth.themis.backend.api;
 
-import io.swagger.annotations.Api;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.qmth.themis.business.constant.SystemConstant;
+import com.qmth.themis.business.entity.TEExamStudent;
+import com.qmth.themis.business.service.TEExamStudentService;
+import com.qmth.themis.business.util.JacksonUtil;
+import com.qmth.themis.common.util.Result;
+import com.qmth.themis.common.util.ResultUtil;
+import io.swagger.annotations.*;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * @Description: 考生库 前端控制器
@@ -16,4 +32,24 @@ import org.springframework.web.bind.annotation.RestController;
 @RequestMapping("/${prefix.url.admin}/examStudent")
 public class TEExamStudentController {
 
+    @Resource
+    TEExamStudentService teExamStudentService;
+
+    @ApiOperation(value = "考生查询接口")
+    @RequestMapping(value = "/query", method = RequestMethod.GET)
+    @ApiResponses({@ApiResponse(code = 200, message = "考生信息", response = TEExamStudent.class)})
+    public Result query(@ApiParam(value = "考试批次id", required = true) @RequestParam Long examId, @ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long activityId, @ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity, @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name, @ApiParam(value = "考场代码", required = false) @RequestParam(required = false) String roomCode, @ApiParam(value = "科目代码", required = false) @RequestParam(required = false) String courseCode, @ApiParam(value = "年级", required = false) @RequestParam String grade, @ApiParam(value = "是否启用", required = false) @RequestParam(required = false) Integer enable, @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber, @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
+        IPage<Map> teExamStudentIPage = teExamStudentService.examStudentQuery(new Page<>(pageNumber, pageSize), examId, activityId, identity, name, roomCode, courseCode, grade, enable);
+        Map map = new HashMap<>();
+        map.put(SystemConstant.RECORDS, teExamStudentIPage);
+        return ResultUtil.ok(map);
+    }
+
+    @ApiOperation(value = "考生导入接口")
+    @RequestMapping(value = "/import", method = RequestMethod.POST)
+    @Transactional
+    @ApiResponses({@ApiResponse(code = 200, message = "{\"taskId\":0", response = Result.class)})
+    public Result importData(@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file) {
+        return ResultUtil.ok(JacksonUtil.parseJson(SystemConstant.SUCCESS));
+    }
 }

+ 26 - 1
themis-backend/src/main/java/com/qmth/themis/backend/api/TEStudentController.java

@@ -1,9 +1,22 @@
 package com.qmth.themis.backend.api;
 
-import io.swagger.annotations.Api;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.qmth.themis.business.constant.SystemConstant;
+import com.qmth.themis.business.entity.TEExamStudent;
+import com.qmth.themis.business.service.TEStudentService;
+import com.qmth.themis.common.util.Result;
+import com.qmth.themis.common.util.ResultUtil;
+import io.swagger.annotations.*;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
+
 /**
  * @Description: 学生档案 前端控制器
  * @Param:
@@ -16,4 +29,16 @@ import org.springframework.web.bind.annotation.RestController;
 @RequestMapping("/${prefix.url.admin}/student")
 public class TEStudentController {
 
+    @Resource
+    TEStudentService teStudentService;
+
+    @ApiOperation(value = "学生查询接口")
+    @RequestMapping(value = "/query", method = RequestMethod.GET)
+    @ApiResponses({@ApiResponse(code = 200, message = "考生信息", response = TEExamStudent.class)})
+    public Result query(@ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity, @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name, @ApiParam(value = "是否启用", required = false) @RequestParam(required = false) Integer enable, @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber, @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
+        IPage<Map> teExamStudentIPage = teStudentService.studentQuery(new Page<>(pageNumber, pageSize), identity, name, enable);
+        Map map = new HashMap<>();
+        map.put(SystemConstant.RECORDS, teExamStudentIPage);
+        return ResultUtil.ok(map);
+    }
 }

+ 19 - 0
themis-business/src/main/java/com/qmth/themis/business/dao/TEExamStudentMapper.java

@@ -1,8 +1,12 @@
 package com.qmth.themis.business.dao;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.qmth.themis.business.entity.TEExamStudent;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.Map;
 
 /**
  * @Description: 考生库 Mapper 接口
@@ -14,4 +18,19 @@ import org.apache.ibatis.annotations.Mapper;
 @Mapper
 public interface TEExamStudentMapper extends BaseMapper<TEExamStudent> {
 
+    /**
+     * 查询考生信息
+     *
+     * @param iPage
+     * @param examId
+     * @param activityId
+     * @param identity
+     * @param name
+     * @param roomCode
+     * @param courseCode
+     * @param grade
+     * @param enable
+     * @return
+     */
+    public IPage<Map> examStudentQuery(IPage<Map> iPage, @Param("examId") Long examId, @Param("activityId") Long activityId, @Param("identity") String identity, @Param("name") String name, @Param("roomCode") String roomCode, @Param("courseCode") String courseCode, @Param("grade") String grade, @Param("enable") Integer enable);
 }

+ 14 - 0
themis-business/src/main/java/com/qmth/themis/business/dao/TEStudentMapper.java

@@ -1,8 +1,12 @@
 package com.qmth.themis.business.dao;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.qmth.themis.business.entity.TEStudent;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.Map;
 
 /**
  * @Description: 学生档案 Mapper 接口
@@ -14,4 +18,14 @@ import org.apache.ibatis.annotations.Mapper;
 @Mapper
 public interface TEStudentMapper extends BaseMapper<TEStudent> {
 
+    /**
+     * 学生档案查询
+     *
+     * @param iPage
+     * @param identity
+     * @param name
+     * @param enable
+     * @return
+     */
+    public IPage<Map> studentQuery(IPage<Map> iPage, @Param("identity") String identity, @Param("name") String name, @Param("enable") Integer enable);
 }

+ 1 - 1
themis-business/src/main/java/com/qmth/themis/business/entity/TEExamPaper.java

@@ -55,7 +55,7 @@ public class TEExamPaper extends BaseEntity {
     @TableField(value = "answer_path")
     private String answerPath;
 
-    @ApiModelProperty(value = "题干包含音频")
+    @ApiModelProperty(value = "题干包含音频,0:不包含,1:包含")
     @TableField(value = "has_audio")
     private Integer hasAudio;
 

+ 24 - 0
themis-business/src/main/java/com/qmth/themis/business/entity/TEExamStudent.java

@@ -67,6 +67,30 @@ public class TEExamStudent extends BaseEntity {
     @TableField(value = "enable")
     private Integer enable;
 
+    @ApiModelProperty(value = "年级")
+    @TableField(value = "grade")
+    private String grade;
+
+    @ApiModelProperty(value = "教学班级")
+    @TableField(value = "class_no")
+    private String classNo;
+
+    public String getClassNo() {
+        return classNo;
+    }
+
+    public void setClassNo(String classNo) {
+        this.classNo = classNo;
+    }
+
+    public String getGrade() {
+        return grade;
+    }
+
+    public void setGrade(String grade) {
+        this.grade = grade;
+    }
+
     public String getRoomName() {
         return roomName;
     }

+ 1 - 1
themis-business/src/main/java/com/qmth/themis/business/entity/TEStudent.java

@@ -39,7 +39,7 @@ public class TEStudent extends BaseEntity {
     @TableField(value = "name")
     private String name;
 
-    @ApiModelProperty(value = "性别")
+    @ApiModelProperty(value = "性别,0:女,1:男")
     @TableField(value = "gender")
     private Integer gender;
 

+ 19 - 1
themis-business/src/main/java/com/qmth/themis/business/enums/FieldUniqueEnum.java

@@ -15,7 +15,13 @@ public enum FieldUniqueEnum {
 
     t_e_exam_activity_examId_code_Idx("考场批次编码"),
 
-    t_e_exam_course_examId_courseCode_Idx("考试科目编码");
+    t_e_exam_course_examId_courseCode_Idx("考试科目编码"),
+
+    t_e_exam_paper_examId_code_Idx("考试试卷编码"),
+
+    t_e_exam_student_examId_roomCode_Idx("考场代码"),
+
+    t_e_student_orgId_identity_Idx("证件号");
 
     private String code;
 
@@ -38,6 +44,12 @@ public enum FieldUniqueEnum {
             return t_e_exam_orgId_code_Idx.name();
         } else if (Objects.equals(value.trim(), t_e_exam_course_examId_courseCode_Idx.code)) {
             return t_e_exam_course_examId_courseCode_Idx.name();
+        } else if (Objects.equals(value.trim(), t_e_exam_paper_examId_code_Idx.code)) {
+            return t_e_exam_paper_examId_code_Idx.name();
+        } else if (Objects.equals(value.trim(), t_e_exam_student_examId_roomCode_Idx.code)) {
+            return t_e_exam_student_examId_roomCode_Idx.name();
+        } else if (Objects.equals(value.trim(), t_e_student_orgId_identity_Idx.code)) {
+            return t_e_student_orgId_identity_Idx.name();
         } else {
             return t_e_exam_activity_examId_code_Idx.name();
         }
@@ -54,6 +66,12 @@ public enum FieldUniqueEnum {
             return t_e_exam_orgId_code_Idx.code;
         } else if (Objects.equals(value.trim(), t_e_exam_course_examId_courseCode_Idx.name())) {
             return t_e_exam_course_examId_courseCode_Idx.code;
+        } else if (Objects.equals(value.trim(), t_e_exam_paper_examId_code_Idx.name())) {
+            return t_e_exam_paper_examId_code_Idx.code;
+        } else if (Objects.equals(value.trim(), t_e_exam_student_examId_roomCode_Idx.name())) {
+            return t_e_exam_student_examId_roomCode_Idx.code;
+        } else if (Objects.equals(value.trim(), t_e_student_orgId_identity_Idx.name())) {
+            return t_e_student_orgId_identity_Idx.code;
         } else {
             return t_e_exam_activity_examId_code_Idx.code;
         }

+ 18 - 0
themis-business/src/main/java/com/qmth/themis/business/service/TEExamStudentService.java

@@ -1,8 +1,11 @@
 package com.qmth.themis.business.service;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.qmth.themis.business.entity.TEExamStudent;
 
+import java.util.Map;
+
 /**
  * @Description: 考生库 服务类
  * @Param:
@@ -12,4 +15,19 @@ import com.qmth.themis.business.entity.TEExamStudent;
  */
 public interface TEExamStudentService extends IService<TEExamStudent> {
 
+    /**
+     * 查询考生信息
+     *
+     * @param iPage
+     * @param examId
+     * @param activityId
+     * @param identity
+     * @param name
+     * @param roomCode
+     * @param courseCode
+     * @param grade
+     * @param enable
+     * @return
+     */
+    public IPage<Map> examStudentQuery(IPage<Map> iPage, Long examId, Long activityId, String identity, String name, String roomCode, String courseCode, String grade, Integer enable);
 }

+ 13 - 0
themis-business/src/main/java/com/qmth/themis/business/service/TEStudentService.java

@@ -1,8 +1,11 @@
 package com.qmth.themis.business.service;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.qmth.themis.business.entity.TEStudent;
 
+import java.util.Map;
+
 /**
  * @Description: 学生档案 服务类
  * @Param:
@@ -12,4 +15,14 @@ import com.qmth.themis.business.entity.TEStudent;
  */
 public interface TEStudentService extends IService<TEStudent> {
 
+    /**
+     * 学生档案查询
+     *
+     * @param iPage
+     * @param identity
+     * @param name
+     * @param enable
+     * @return
+     */
+    public IPage<Map> studentQuery(IPage<Map> iPage, String identity, String name, Integer enable);
 }

+ 25 - 0
themis-business/src/main/java/com/qmth/themis/business/service/impl/TEExamStudentServiceImpl.java

@@ -1,11 +1,15 @@
 package com.qmth.themis.business.service.impl;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.themis.business.dao.TEExamStudentMapper;
 import com.qmth.themis.business.entity.TEExamStudent;
 import com.qmth.themis.business.service.TEExamStudentService;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
+import java.util.Map;
+
 /**
  * @Description: 考生库 服务实现类
  * @Param:
@@ -16,4 +20,25 @@ import org.springframework.stereotype.Service;
 @Service
 public class TEExamStudentServiceImpl extends ServiceImpl<TEExamStudentMapper, TEExamStudent> implements TEExamStudentService {
 
+    @Resource
+    TEExamStudentMapper teExamStudentMapper;
+
+    /**
+     * 查询考生信息
+     *
+     * @param iPage
+     * @param examId
+     * @param activityId
+     * @param identity
+     * @param name
+     * @param roomCode
+     * @param courseCode
+     * @param grade
+     * @param enable
+     * @return
+     */
+    @Override
+    public IPage<Map> examStudentQuery(IPage<Map> iPage, Long examId, Long activityId, String identity, String name, String roomCode, String courseCode, String grade, Integer enable) {
+        return teExamStudentMapper.examStudentQuery(iPage, examId, activityId, identity, name, roomCode, courseCode, grade, enable);
+    }
 }

+ 20 - 0
themis-business/src/main/java/com/qmth/themis/business/service/impl/TEStudentServiceImpl.java

@@ -1,11 +1,15 @@
 package com.qmth.themis.business.service.impl;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.themis.business.dao.TEStudentMapper;
 import com.qmth.themis.business.entity.TEStudent;
 import com.qmth.themis.business.service.TEStudentService;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
+import java.util.Map;
+
 /**
  * @Description: 学生档案 服务实现类
  * @Param:
@@ -16,4 +20,20 @@ import org.springframework.stereotype.Service;
 @Service
 public class TEStudentServiceImpl extends ServiceImpl<TEStudentMapper, TEStudent> implements TEStudentService {
 
+    @Resource
+    TEStudentMapper teStudentMapper;
+
+    /**
+     * 学生档案查询
+     *
+     * @param iPage
+     * @param identity
+     * @param name
+     * @param enable
+     * @return
+     */
+    @Override
+    public IPage<Map> studentQuery(IPage<Map> iPage, String identity, String name, Integer enable) {
+        return teStudentMapper.studentQuery(iPage, identity, name, enable);
+    }
 }

+ 49 - 0
themis-business/src/main/resources/mapper/TEExamStudentMapper.xml

@@ -2,4 +2,53 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.qmth.themis.business.dao.TEExamStudentMapper">
 
+    <select id="examStudentQuery" resultType="java.util.Map">
+        select
+            tees.id,
+            tee.name as examName,
+            tees.name,
+            tees.`identity`,
+            teea.code,
+            teec.course_code as courseCode,
+            teec.course_name as courseName,
+            tees.enable,
+            tees.room_code as roomCode,
+            tees.room_name as roomName,
+            tees.grade,
+            tees.class_no as classNo
+        from
+            t_e_exam_student tees
+        left join t_e_exam tee on
+            tees.exam_id = tee.id
+        left join t_e_exam_activity teea on
+            tees.exam_activity_id = teea.id
+        left join t_e_exam_course teec on
+            tees.course_code = teec.course_code
+        <where>
+            <if test="examId != null and examId != ''">
+                and tees.exam_id = #{examId}
+            </if>
+            <if test="activityId != null and activityId != ''">
+                and tees.exam_activity_id = #{activityId}
+            </if>
+            <if test="identity != null and identity != ''">
+                and tees.identity like concat('%', #{identity}, '%')
+            </if>
+            <if test="name != null and name != ''">
+                and tees.name like concat('%', #{name}, '%')
+            </if>
+            <if test="roomCode != null and roomCode != ''">
+                and tees.room_code = #{roomCode}
+            </if>
+            <if test="courseCode != null and courseCode != ''">
+                and tees.course_code = #{courseCode}
+            </if>
+            <if test="enable != null and enable != '' or enable == 0">
+                and tees.enable = #{enable}
+            </if>
+            <if test="grade != null and grade != ''">
+                and tees.grade = #{grade}
+            </if>
+        </where>
+    </select>
 </mapper>

+ 39 - 0
themis-business/src/main/resources/mapper/TEStudentMapper.xml

@@ -2,4 +2,43 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.qmth.themis.business.dao.TEStudentMapper">
 
+    <select id="studentQuery" resultType="java.util.Map">
+        select
+            tes.name,
+            tes.`identity`,
+            tbo.name as orgName,
+            tes.enable,
+            tes.base_photo_path as basePhotoPath,
+            (
+            select
+                tbu.name
+            from
+                t_b_user tbu
+            where
+                tbu.id = tes.create_id) as createName,
+            (
+            select
+                tbu.name
+            from
+                t_b_user tbu
+            where
+                tbu.id = tes.update_id) as updateName,
+            tes.create_time as createTime,
+            tes.update_time as updateTime
+        from
+            t_e_student tes
+        left join t_b_org tbo on
+            tbo.id = tes.org_id
+        <where>
+            <if test="identity != null and identity != ''">
+                and tes.identity like concat('%', #{identity}, '%')
+            </if>
+            <if test="name != null and name != ''">
+                and tes.name like concat('%', #{name}, '%')
+            </if>
+            <if test="enable != null and enable != '' or enable == 0">
+                and tes.enable = #{enable}
+            </if>
+        </where>
+    </select>
 </mapper>