Joburgess 4 anos atrás
pai
commit
435f1b4ace

+ 0 - 6
edu-auth/edu-auth-api/src/main/java/com/keao/edu/auth/api/client/SysMessageFeignService.java

@@ -3,19 +3,13 @@ package com.keao.edu.auth.api.client;
 import com.keao.edu.auth.api.client.fallback.SysMessageFeignServiceFallback;
 import com.keao.edu.auth.api.entity.SysMessageParams;
 import com.keao.edu.common.config.FeignConfiguration;
-import com.keao.edu.common.enums.MessageTypeEnum;
-import com.keao.edu.thirdparty.message.MessageSenderPluginContext;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.GetMapping;
 
-import java.util.Date;
-import java.util.Map;
-
 @FeignClient(contextId = "SysMessageFeignService", name = "auth-server", configuration = { FeignConfiguration.class }, fallback = SysMessageFeignServiceFallback.class)
 public interface SysMessageFeignService {
 
-
     @GetMapping(value = "sysMessage/batchSendMessage", consumes = MediaType.APPLICATION_JSON_VALUE)
     void batchSendMessage(SysMessageParams sysMessageParams);
 }

+ 8 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/controller/ExamLocationController.java

@@ -11,10 +11,12 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.Date;
+import java.util.List;
 
 /**
  * @Author Joburgess
@@ -37,6 +39,12 @@ public class ExamLocationController extends BaseController {
         return succeed(examLocationService.queryPage(queryInfo));
     }
 
+    @ApiOperation("获取所在机构所有考点")
+    @GetMapping(value = "/getTenantAllLocations")
+    public HttpResponseResult<List<ExamLocation>> getTenantAllLocations(@Param("tenantId") String tenantId){
+        return succeed(examLocationService.getTenantAllLocations(TenantContextHolder.getTenantId()));
+    }
+
     @ApiOperation("查询考点详情")
     @ApiImplicitParam(name = "id", value = "机构ID", required = true, dataType = "Integer", paramType = "path")
     @GetMapping(value = "/query")

+ 2 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/dao/ExamLocationDao.java

@@ -15,4 +15,6 @@ public interface ExamLocationDao extends BaseDAO<Integer, ExamLocation> {
      * @return
      */
     List<ExamLocation> getExamLocationByIds(@Param("ids") String ids);
+
+    List<ExamLocation> getTenantAllLocations(@Param("tenantId") String tenantId);
 }

+ 5 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/ExamLocationService.java

@@ -3,7 +3,12 @@ package com.keao.edu.user.service;
 
 import com.keao.edu.common.service.BaseService;
 import com.keao.edu.user.entity.ExamLocation;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 public interface ExamLocationService extends BaseService<Integer, ExamLocation> {
 
+    List<ExamLocation> getTenantAllLocations(@Param("tenantId") String tenantId);
+
 }

+ 7 - 1
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/ExamLocationServiceImpl.java

@@ -8,6 +8,8 @@ import com.keao.edu.user.service.ExamLocationService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 @Service
 public class ExamLocationServiceImpl extends BaseServiceImpl<Integer, ExamLocation> implements ExamLocationService {
 	
@@ -18,5 +20,9 @@ public class ExamLocationServiceImpl extends BaseServiceImpl<Integer, ExamLocati
 	public BaseDAO<Integer, ExamLocation> getDAO() {
 		return examLocationDao;
 	}
-	
+
+	@Override
+	public List<ExamLocation> getTenantAllLocations(String tenantId) {
+		return examLocationDao.getTenantAllLocations(tenantId);
+	}
 }

+ 4 - 0
edu-user/edu-user-server/src/main/resources/config/mybatis/ExamLocationMapper.xml

@@ -101,4 +101,8 @@
 	<select id="getExamLocationByIds" resultMap="ExamLocation">
 		SELECT * FROM exam_location WHERE FIND_IN_SET(id_,#{ids})
 	</select>
+
+	<select id="getTenantAllLocations" resultMap="ExamLocation">
+		SELECT * FROM exam_location WHERE tenant_id_ = #{tenantId}
+	</select>
 </mapper>