liuxiaolong
2019-05-06 f99bc8c6a1d10610373738edd7d0aa0181c81d99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package com.cloud.user.controller;
 
 
import com.cloud.model.sys.SysOrganization;
import com.cloud.user.service.SysOrganizationService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
 
import java.util.Map;
 
 
@RestController
@RequestMapping("data")
public class SysOrganizationAnonController
{
 
    @Autowired
    private SysOrganizationService orgService;
 
 
    @GetMapping("/users-anon/internal/findById")
    @ApiOperation(value = "通过id查询组织机构列表", notes = "通过id查询组织机构列表", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "总部Id", required = true, dataType = "Long", paramType = "form"),
            @ApiImplicitParam(name = "orgId", value = "组织机构id", required = false,  dataType = "boolean", paramType = "form")
    })
    public SysOrganization findById(Long id , Long orgId){
        return orgService.findById(id, orgId);
    }
 
    @GetMapping("/users-anon/internal/findCheckSchool")
    @ApiOperation(value = "查找学区内的所有学校", notes = "查找学区内的所有学校仅展示id,name,address", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "currentId", value = "学区id", required = true, dataType = "Long", paramType = "query"),
            @ApiImplicitParam(name = "searchName", value = "学校名字", required = true, dataType = "String", paramType = "query")
    })
    Map<String,Object> findCheckSchool(@RequestParam Map<String,Object> params){
 
        return orgService.findCheckSchool(params);
    }
 
}