wangliang 4 gadi atpakaļ
vecāks
revīzija
0f474cd854
16 mainītis faili ar 107 papildinājumiem un 72 dzēšanām
  1. 6 2
      themis-backend/src/main/java/com/qmth/themis/backend/api/TBExamInvigilateUserController.java
  2. 2 1
      themis-backend/src/main/java/com/qmth/themis/backend/api/TBUserController.java
  3. 2 1
      themis-backend/src/main/java/com/qmth/themis/backend/api/TEStudentController.java
  4. 8 3
      themis-business/src/main/java/com/qmth/themis/business/dao/TBExamInvigilateUserMapper.java
  5. 2 2
      themis-business/src/main/java/com/qmth/themis/business/dao/TBUserMapper.java
  6. 2 1
      themis-business/src/main/java/com/qmth/themis/business/dao/TEStudentMapper.java
  7. 7 2
      themis-business/src/main/java/com/qmth/themis/business/service/TBExamInvigilateUserService.java
  8. 2 1
      themis-business/src/main/java/com/qmth/themis/business/service/TBUserService.java
  9. 14 12
      themis-business/src/main/java/com/qmth/themis/business/service/TEStudentService.java
  10. 9 4
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TBExamInvigilateUserServiceImpl.java
  11. 3 3
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TBUserServiceImpl.java
  12. 37 38
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TEStudentServiceImpl.java
  13. 4 2
      themis-business/src/main/java/com/qmth/themis/business/templete/impl/TaskRoomCodeExportTemplete.java
  14. 3 0
      themis-business/src/main/resources/mapper/TBExamInvigilateUserMapper.xml
  15. 3 0
      themis-business/src/main/resources/mapper/TBUserMapper.xml
  16. 3 0
      themis-business/src/main/resources/mapper/TEStudentMapper.xml

+ 6 - 2
themis-backend/src/main/java/com/qmth/themis/backend/api/TBExamInvigilateUserController.java

@@ -63,7 +63,8 @@ public class TBExamInvigilateUserController {
     @RequestMapping(value = "/query", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "监考员信息", response = TBExamInvigilateUserDto.class)})
     public Result query(@ApiParam(value = "考试批次id", required = true) @RequestParam(required = false) Long examId, @ApiParam(value = "考场代码", required = false) @RequestParam(required = false) String roomCode, @ApiParam(value = "用户id", required = false) @RequestParam(required = false) Long userId, @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber, @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
-        return ResultUtil.ok(tbExamInvigilateUserService.examInvigilateUserQuery(new Page<>(pageNumber, pageSize), examId, roomCode, userId));
+        TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
+        return ResultUtil.ok(tbExamInvigilateUserService.examInvigilateUserQuery(new Page<>(pageNumber, pageSize), examId, roomCode, userId, tbUser.getOrgId()));
     }
 
     @ApiOperation(value = "监考员修改接口")
@@ -177,7 +178,7 @@ public class TBExamInvigilateUserController {
     @RequestMapping(value = "/export", method = RequestMethod.POST)
     @Transactional
     @ApiResponses({@ApiResponse(code = 200, message = "{\"taskId\":0}", response = Result.class)})
-    public Result export() {
+    public Result export(@ApiParam(value = "考试批次id", required = true) @RequestParam(required = false) Long examId, @ApiParam(value = "考场代码", required = false) @RequestParam(required = false) String roomCode, @ApiParam(value = "用户id", required = false) @RequestParam(required = false) Long userId) {
         TBTaskHistory tbTaskHistory = null;
         try {
             int count = tbExamInvigilateUserService.count();
@@ -190,6 +191,9 @@ public class TBExamInvigilateUserController {
                 transMap.put("tbTaskHistory", tbTaskHistory);
                 transMap.put("createId", tbUser.getId());
                 transMap.put("orgId", tbUser.getOrgId());
+                transMap.put("examId", examId);
+                transMap.put("roomCode", roomCode);
+                transMap.put("userId", userId);
                 //mq发送消息start
                 MqDto mqDto = new MqDto(MqTopicEnum.THEMIS_TOPIC.getCode(), MqTagEnum.ROOM_CODE_EXPORT.name(), transMap, MqTagEnum.ROOM_CODE_EXPORT, String.valueOf(tbTaskHistory.getId()), tbUser.getName());
                 mqDtoService.assembleSendOneWayMsg(mqDto);

+ 2 - 1
themis-backend/src/main/java/com/qmth/themis/backend/api/TBUserController.java

@@ -544,7 +544,8 @@ public class TBUserController {
     @RequestMapping(value = "/query", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "用户信息", response = TBUserDto.class)})
     public Result query(@ApiParam(value = "用户id", required = false) @RequestParam(required = false) Long id, @ApiParam(value = "登录名", required = false) @RequestParam(required = false) String loginName, @ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name, @ApiParam(value = "角色", required = false) @RequestParam(required = false) String roleCode, @ApiParam(value = "是否启用", required = false) @RequestParam(required = false) Integer enable, @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber, @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
-        IPage<TBUserDto> tbUserIPage = tbUserService.userQuery(new Page<>(pageNumber, pageSize), id, loginName, name, roleCode, enable);
+        TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
+        IPage<TBUserDto> tbUserIPage = tbUserService.userQuery(new Page<>(pageNumber, pageSize), id, loginName, name, roleCode, enable, tbUser.getOrgId());
         tbUserIPage.getRecords().forEach(s -> {
             if (Objects.nonNull(s.getRoleNameStr())) {
                 s.setRoleName(Arrays.asList(s.getRoleNameStr().split(",")));

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

@@ -55,7 +55,8 @@ public class TEStudentController {
     @RequestMapping(value = "/query", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "考生信息", response = TEStudentDto.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<TEStudentDto> teExamStudentIPage = teStudentService.studentQuery(new Page<>(pageNumber, pageSize), identity, name, enable);
+        TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
+        IPage<TEStudentDto> teExamStudentIPage = teStudentService.studentQuery(new Page<>(pageNumber, pageSize), identity, name, enable, tbUser.getOrgId());
         if (teExamStudentIPage.getRecords() != null && teExamStudentIPage.getRecords().size() > 0) {
             for (TEStudentDto dto : teExamStudentIPage.getRecords()) {
                 if (StringUtils.isNotBlank(dto.getBasePhotoPath())) {

+ 8 - 3
themis-business/src/main/java/com/qmth/themis/business/dao/TBExamInvigilateUserMapper.java

@@ -28,16 +28,21 @@ public interface TBExamInvigilateUserMapper extends BaseMapper<TBExamInvigilateU
      * @param examId
      * @param roomCode
      * @param userId
+     * @param orgId
      * @return
      */
-    public IPage<TBExamInvigilateUserDto> examInvigilateUserQuery(IPage<Map> iPage, @Param("examId") Long examId, @Param("roomCode") String roomCode, @Param("userId") Long userId);
+    public IPage<TBExamInvigilateUserDto> examInvigilateUserQuery(IPage<Map> iPage, @Param("examId") Long examId, @Param("roomCode") String roomCode, @Param("userId") Long userId, @Param("orgId") Long orgId);
 
     /**
      * 监考员导出
      *
+     * @param examId
+     * @param roomCode
+     * @param userId
+     * @param orgId
      * @return
      */
-    public List<RoomCodeExportDto> examInvigilateUserExport();
+    public List<RoomCodeExportDto> examInvigilateUserExport(@Param("examId") Long examId, @Param("roomCode") String roomCode, @Param("userId") Long userId, @Param("orgId") Long orgId);
 
-	public List<Map<String, String>> getInvigilateUsers(@Param("examId") Long examId, @Param("roomCode") String roomCode);
+    public List<Map<String, String>> getInvigilateUsers(@Param("examId") Long examId, @Param("roomCode") String roomCode);
 }

+ 2 - 2
themis-business/src/main/java/com/qmth/themis/business/dao/TBUserMapper.java

@@ -7,7 +7,6 @@ import com.qmth.themis.business.entity.TBUser;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
-import java.util.List;
 import java.util.Map;
 
 /**
@@ -29,7 +28,8 @@ public interface TBUserMapper extends BaseMapper<TBUser> {
      * @param name
      * @param role
      * @param enable
+     * @param orgId
      * @return
      */
-    IPage<TBUserDto> userQuery(IPage<Map> iPage, @Param("id") Long id, @Param("loginName") String loginName, @Param("name") String name, @Param("role") String role, @Param("enable") Integer enable);
+    IPage<TBUserDto> userQuery(IPage<Map> iPage, @Param("id") Long id, @Param("loginName") String loginName, @Param("name") String name, @Param("role") String role, @Param("enable") Integer enable, @Param("orgId") Long orgId);
 }

+ 2 - 1
themis-business/src/main/java/com/qmth/themis/business/dao/TEStudentMapper.java

@@ -27,9 +27,10 @@ public interface TEStudentMapper extends BaseMapper<TEStudent> {
      * @param identity
      * @param name
      * @param enable
+     * @param orgId
      * @return
      */
-    public IPage<TEStudentDto> studentQuery(IPage<Map> iPage, @Param("identity") String identity, @Param("name") String name, @Param("enable") Integer enable);
+    public IPage<TEStudentDto> studentQuery(IPage<Map> iPage, @Param("identity") String identity, @Param("name") String name, @Param("enable") Integer enable, @Param("orgId") Long orgId);
 
     /**
      * 学生考试记录查询

+ 7 - 2
themis-business/src/main/java/com/qmth/themis/business/service/TBExamInvigilateUserService.java

@@ -25,14 +25,19 @@ public interface TBExamInvigilateUserService extends IService<TBExamInvigilateUs
      * @param examId
      * @param roomCode
      * @param userId
+     * @param orgId
      * @return
      */
-    public IPage<TBExamInvigilateUserDto> examInvigilateUserQuery(IPage<Map> iPage, Long examId, String roomCode, Long userId);
+    public IPage<TBExamInvigilateUserDto> examInvigilateUserQuery(IPage<Map> iPage, Long examId, String roomCode, Long userId, Long orgId);
 
     /**
      * 监考员导出
      *
+     * @param examId
+     * @param roomCode
+     * @param userId
+     * @param orgId
      * @return
      */
-    public List<RoomCodeExportDto> examInvigilateUserExport();
+    public List<RoomCodeExportDto> examInvigilateUserExport(Long examId, String roomCode, Long userId, Long orgId);
 }

+ 2 - 1
themis-business/src/main/java/com/qmth/themis/business/service/TBUserService.java

@@ -25,7 +25,8 @@ public interface TBUserService extends IService<TBUser> {
      * @param name
      * @param role
      * @param enable
+     * @param orgId
      * @return
      */
-    IPage<TBUserDto> userQuery(IPage<Map> iPage, Long id, String loginName, String name, String role, Integer enable);
+    IPage<TBUserDto> userQuery(IPage<Map> iPage, Long id, String loginName, String name, String role, Integer enable, Long orgId);
 }

+ 14 - 12
themis-business/src/main/java/com/qmth/themis/business/service/TEStudentService.java

@@ -1,15 +1,14 @@
 package com.qmth.themis.business.service;
 
-import java.util.Map;
-
-import org.springframework.web.multipart.MultipartFile;
-
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.qmth.themis.business.bean.backend.StudentPhotoUploadResponseBean;
 import com.qmth.themis.business.dto.response.TEStudentDto;
 import com.qmth.themis.business.dto.response.TEStudentExamRecordDto;
 import com.qmth.themis.business.entity.TEStudent;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.Map;
 
 /**
  * @Description: 学生档案 服务类
@@ -27,9 +26,10 @@ public interface TEStudentService extends IService<TEStudent> {
      * @param identity
      * @param name
      * @param enable
+     * @param orgId
      * @return
      */
-    public IPage<TEStudentDto> studentQuery(IPage<Map> iPage, String identity, String name, Integer enable);
+    public IPage<TEStudentDto> studentQuery(IPage<Map> iPage, String identity, String name, Integer enable, Long orgId);
 
     /**
      * 学生考试记录查询
@@ -41,12 +41,14 @@ public interface TEStudentService extends IService<TEStudent> {
      */
     public IPage<TEStudentExamRecordDto> studentExamRecordQuery(IPage<Map> iPage, Long studentId, Long examId);
 
-	/**底照上传
-	 * @param orgId
-	 * @param identity
-	 * @param file
-	 * @param md5
-	 * @return
-	 */
+    /**
+     * 底照上传
+     *
+     * @param orgId
+     * @param identity
+     * @param file
+     * @param md5
+     * @return
+     */
     public StudentPhotoUploadResponseBean photoUpload(Long orgId, String identity, MultipartFile file, String md5);
 }

+ 9 - 4
themis-business/src/main/java/com/qmth/themis/business/service/impl/TBExamInvigilateUserServiceImpl.java

@@ -33,20 +33,25 @@ public class TBExamInvigilateUserServiceImpl extends ServiceImpl<TBExamInvigilat
      * @param examId
      * @param roomCode
      * @param userId
+     * @param orgId
      * @return
      */
     @Override
-    public IPage<TBExamInvigilateUserDto> examInvigilateUserQuery(IPage<Map> iPage, Long examId, String roomCode, Long userId) {
-        return tbExamInvigilateUserMapper.examInvigilateUserQuery(iPage, examId, roomCode, userId);
+    public IPage<TBExamInvigilateUserDto> examInvigilateUserQuery(IPage<Map> iPage, Long examId, String roomCode, Long userId, Long orgId) {
+        return tbExamInvigilateUserMapper.examInvigilateUserQuery(iPage, examId, roomCode, userId, orgId);
     }
 
     /**
      * 监考员导出
      *
+     * @param examId
+     * @param roomCode
+     * @param userId
+     * @param orgId
      * @return
      */
     @Override
-    public List<RoomCodeExportDto> examInvigilateUserExport() {
-        return tbExamInvigilateUserMapper.examInvigilateUserExport();
+    public List<RoomCodeExportDto> examInvigilateUserExport(Long examId, String roomCode, Long userId, Long orgId) {
+        return tbExamInvigilateUserMapper.examInvigilateUserExport(examId, roomCode, userId, orgId);
     }
 }

+ 3 - 3
themis-business/src/main/java/com/qmth/themis/business/service/impl/TBUserServiceImpl.java

@@ -9,7 +9,6 @@ import com.qmth.themis.business.service.TBUserService;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
-import java.util.List;
 import java.util.Map;
 
 /**
@@ -34,10 +33,11 @@ public class TBUserServiceImpl extends ServiceImpl<TBUserMapper, TBUser> impleme
      * @param name
      * @param role
      * @param enable
+     * @param orgId
      * @return
      */
     @Override
-    public IPage<TBUserDto> userQuery(IPage<Map> iPage, Long id, String loginName, String name, String role, Integer enable) {
-        return tbUserMapper.userQuery(iPage, id, loginName, name, role, enable);
+    public IPage<TBUserDto> userQuery(IPage<Map> iPage, Long id, String loginName, String name, String role, Integer enable, Long orgId) {
+        return tbUserMapper.userQuery(iPage, id, loginName, name, role, enable, orgId);
     }
 }

+ 37 - 38
themis-business/src/main/java/com/qmth/themis/business/service/impl/TEStudentServiceImpl.java

@@ -1,32 +1,30 @@
 package com.qmth.themis.business.service.impl;
 
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Map;
-
-import javax.annotation.Resource;
-
-import com.google.gson.Gson;
-import com.qmth.themis.business.dto.cache.TEStudentCacheDto;
-import com.qmth.themis.business.util.RedisUtil;
-import org.apache.commons.codec.digest.DigestUtils;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.multipart.MultipartFile;
-
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.google.gson.Gson;
 import com.qmth.themis.business.bean.backend.StudentPhotoUploadResponseBean;
 import com.qmth.themis.business.config.SystemConfig;
 import com.qmth.themis.business.dao.TEStudentMapper;
+import com.qmth.themis.business.dto.cache.TEStudentCacheDto;
 import com.qmth.themis.business.dto.response.TEStudentDto;
 import com.qmth.themis.business.dto.response.TEStudentExamRecordDto;
 import com.qmth.themis.business.entity.TEStudent;
 import com.qmth.themis.business.service.TEStudentService;
 import com.qmth.themis.business.util.OssUtil;
+import com.qmth.themis.business.util.RedisUtil;
 import com.qmth.themis.common.exception.BusinessException;
+import org.apache.commons.codec.digest.DigestUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Map;
 
 /**
  * @Description: 学生档案 服务实现类
@@ -40,7 +38,7 @@ public class TEStudentServiceImpl extends ServiceImpl<TEStudentMapper, TEStudent
 
     @Resource
     TEStudentMapper teStudentMapper;
-    
+
     @Resource
     SystemConfig systemConfig;
 
@@ -54,11 +52,12 @@ public class TEStudentServiceImpl extends ServiceImpl<TEStudentMapper, TEStudent
      * @param identity
      * @param name
      * @param enable
+     * @param orgId
      * @return
      */
     @Override
-    public IPage<TEStudentDto> studentQuery(IPage<Map> iPage, String identity, String name, Integer enable) {
-        return teStudentMapper.studentQuery(iPage, identity, name, enable);
+    public IPage<TEStudentDto> studentQuery(IPage<Map> iPage, String identity, String name, Integer enable, Long orgId) {
+        return teStudentMapper.studentQuery(iPage, identity, name, enable, orgId);
     }
 
     /**
@@ -73,40 +72,40 @@ public class TEStudentServiceImpl extends ServiceImpl<TEStudentMapper, TEStudent
     public IPage<TEStudentExamRecordDto> studentExamRecordQuery(IPage<Map> iPage, Long studentId, Long examId) {
         return teStudentMapper.studentExamRecordQuery(iPage, studentId, examId);
     }
-    
-    
+
+
     @Transactional
     @Override
     public StudentPhotoUploadResponseBean photoUpload(Long orgId, String identity, MultipartFile file, String md5) {
-    	QueryWrapper<TEStudent> wrapper = new QueryWrapper<>();
-    	wrapper.lambda().eq(TEStudent::getOrgId, orgId);
-    	wrapper.lambda().eq(TEStudent::getIdentity, identity);
-    	TEStudent student=this.getOne(wrapper);
-    	if(student==null) {
-    		throw new BusinessException("学生不存在");
-    	}
-    	String fileName = file.getOriginalFilename();
-        String suffix = fileName.substring(fileName.lastIndexOf(".")+1).toLowerCase();
-        String filePath = "base_photo/"+orgId+"/"+student.getId()+"."+suffix;
+        QueryWrapper<TEStudent> wrapper = new QueryWrapper<>();
+        wrapper.lambda().eq(TEStudent::getOrgId, orgId);
+        wrapper.lambda().eq(TEStudent::getIdentity, identity);
+        TEStudent student = this.getOne(wrapper);
+        if (student == null) {
+            throw new BusinessException("学生不存在");
+        }
+        String fileName = file.getOriginalFilename();
+        String suffix = fileName.substring(fileName.lastIndexOf(".") + 1).toLowerCase();
+        String filePath = "base_photo/" + orgId + "/" + student.getId() + "." + suffix;
         InputStream in = null;
         try {
-        	String fileMd5 = DigestUtils.md5Hex(file.getBytes());
-        	if (!md5.equals(fileMd5)) {
-        		throw new BusinessException("文件md5不一致");
-        	}
-        	student.setBasePhotoPath(filePath);
-        	this.saveOrUpdate(student);
+            String fileMd5 = DigestUtils.md5Hex(file.getBytes());
+            if (!md5.equals(fileMd5)) {
+                throw new BusinessException("文件md5不一致");
+            }
+            student.setBasePhotoPath(filePath);
+            this.saveOrUpdate(student);
             Gson gson = new Gson();
             TEStudentCacheDto teStudentCacheDto = gson.fromJson(gson.toJson(student), TEStudentCacheDto.class);
             redisUtil.setStudent(student.getId(), teStudentCacheDto);
             in = file.getInputStream();
             OssUtil.ossUploadStream(systemConfig.getOssEnv(3), filePath, in);
             String url = systemConfig.getProperty("aliyun.oss.url") + File.separator + filePath;
-            StudentPhotoUploadResponseBean ret=new StudentPhotoUploadResponseBean();
+            StudentPhotoUploadResponseBean ret = new StudentPhotoUploadResponseBean();
             ret.setPhotoUrl(url);
             return ret;
         } catch (IOException e) {
-        	throw new BusinessException("文件读取出错");
+            throw new BusinessException("文件读取出错");
         } finally {
             if (in != null) {
                 try {

+ 4 - 2
themis-business/src/main/java/com/qmth/themis/business/templete/impl/TaskRoomCodeExportTemplete.java

@@ -8,7 +8,6 @@ import com.qmth.themis.business.service.TBExamInvigilateUserService;
 import com.qmth.themis.business.templete.TaskExportCommon;
 import com.qmth.themis.business.templete.TaskExportTemplete;
 import com.qmth.themis.business.templete.service.TempleteLogicService;
-import com.qmth.themis.business.util.JacksonUtil;
 import com.qmth.themis.common.util.Result;
 import com.qmth.themis.common.util.ResultUtil;
 import org.apache.poi.ss.usermodel.*;
@@ -62,7 +61,10 @@ public class TaskRoomCodeExportTemplete implements TaskExportTemplete {
         int y = 0, min = 0;
         try {
             taskExportCommon.getTxtList().add(DateUtil.format(new Date(), timeFormat) + "->开始准备处理导出的考场数据");
-            List<RoomCodeExportDto> roomCodeExportDtoList = tbExamInvigilateUserService.examInvigilateUserExport();
+            Long examId = (Long) map.get("examId");
+            String roomCode = (String) map.get("roomCode");
+            Long userId = (Long) map.get("userId");
+            List<RoomCodeExportDto> roomCodeExportDtoList = tbExamInvigilateUserService.examInvigilateUserExport(examId, roomCode, userId, taskExportCommon.getOrgId());
 
             boolean oss = (boolean) taskExportCommon.getOssEnv().get(SystemConstant.OSS);
             StringJoiner stringJoiner = new StringJoiner("");

+ 3 - 0
themis-business/src/main/resources/mapper/TBExamInvigilateUserMapper.xml

@@ -27,6 +27,9 @@
             <if test="roomCode != null and roomCode != ''">
                 and tbeiu.room_code like concat('%', #{roomCode}, '%')
             </if>
+            <if test="orgId != null and orgId != ''">
+                and tbeiu.org_id = #{orgId}
+            </if>
         </where>
         ) t
     </sql>

+ 3 - 0
themis-business/src/main/resources/mapper/TBUserMapper.xml

@@ -56,6 +56,9 @@
                 <if test="enable != null and enable != '' or enable == 0">
                     and tbu.enable = #{enable}
                 </if>
+                <if test="orgId != null and orgId != ''">
+                    and tbu.org_id = #{orgId}
+                </if>
             </where> group by tbu.org_id,tbu.id,tbu.mobile_number,tbu.login_name,tbu.name,tbu.enable) t
             <where>
                 t.roleCodeStr <![CDATA[ <> ]]> 'SUPER_ADMIN'

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

@@ -38,6 +38,9 @@
             <if test="enable != null and enable != '' or enable == 0">
                 and tes.enable = #{enable}
             </if>
+            <if test="orgId != null and orgId != ''">
+                and tes.org_id = #{orgId}
+            </if>
         </where>
         ) t order by t.name
     </select>