소스 검색

Merge branch 'master' of http://git.dayaedu.com/yonge/edu-saas

zouxuan 5 년 전
부모
커밋
0abdc765be

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

@@ -11,7 +11,6 @@ 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.*;
 
@@ -41,7 +40,7 @@ public class ExamLocationController extends BaseController {
 
     @ApiOperation("获取所在机构所有考点")
     @GetMapping(value = "/getTenantAllLocations")
-    public HttpResponseResult<List<ExamLocation>> getTenantAllLocations(@Param("tenantId") String tenantId){
+    public HttpResponseResult<List<ExamLocation>> getTenantAllLocations(){
         return succeed(examLocationService.getTenantAllLocations(TenantContextHolder.getTenantId()));
     }
 
@@ -56,6 +55,7 @@ public class ExamLocationController extends BaseController {
     @PostMapping(value = "/add")
     public HttpResponseResult add(@RequestBody ExamLocation examLocation) {
         examLocation.setTenantId(TenantContextHolder.getTenantId());
+        examLocation.setIsAvailable(true);
         examLocationService.insert(examLocation);
         return succeed();
     }

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

@@ -103,6 +103,6 @@
 	</select>
 
 	<select id="getTenantAllLocations" resultMap="ExamLocation">
-		SELECT * FROM exam_location WHERE tenant_id_ = #{tenantId}
+		SELECT * FROM exam_location WHERE tenant_id_ = #{tenantId} AND is_available_=1 ORDER BY id_
 	</select>
 </mapper>