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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
package com.cloud.user.controller;
 
import com.cloud.model.common.Page;
import com.cloud.model.sys.BbEmployeeRelation;
import com.cloud.user.service.BbEmployeeRelationService;
import com.cloud.user.vo.BbEmployeeRelationVO;
import io.swagger.annotations.Api;
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.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.List;
import java.util.Map;
 
/**
 * 人员关系表
 * 控制层
 */
@RestController
@Api(value = "BbEmployeeController", description = "人员表操作控制层Feign调用")
@RequestMapping("data")
public class BbEmployeeRelationFeignController {
 
    @Autowired
    private BbEmployeeRelationService service;
        
    /**
     * 添加
     */
    @RequestMapping("/BbEmployeeRelation/feign/add")
    @ApiOperation(value = "人员关系添加", notes = "BbEmployeeRelation表人员关系添加模块", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "beanVO", value = "人员关系BbEmployeeRelation实例", required = true, dataType = "BbEmployeeRelation", paramType = "body")
    })
    public Map<String,Object> add(List<BbEmployeeRelationVO> beanVOs) {
        return service.addBbEmployeeRelation(beanVOs);
    }
        
    /**
     * 去编辑
     */
    @RequestMapping("/BbEmployeeRelation/feign/toUpdate")
    @ApiOperation(value = "人员关系修改查询", notes = "人员关系id,orgId查询要修改的人员关系信息", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "beanVO", value = "人员关系BbEmployeeRelation实例", required = true, dataType = "BbEmployeeRelation", paramType = "body")
    })
    public BbEmployeeRelation toUpdate(BbEmployeeRelationVO beanVO) {
        return service.toUpdateBbEmployeeRelation(beanVO);
    }
        
    /**
     * 编辑
     */
    @RequestMapping("/BbEmployeeRelation/feign/update")
    @ApiOperation(value = "人员关系修改更新", notes = "根据人员关系id,orgId保存要修改的人员关系信息", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "beanVO", value = "人员关系BbEmployeeRelation实例", required = true, dataType = "BbEmployeeRelation", paramType = "body")
    })
    public Map<String,Object> update(BbEmployeeRelationVO beanVO) {
        return service.updateBbEmployeeRelation(beanVO);
    }
 
    /**
     * 列表
     */
    @RequestMapping("/BbEmployeeRelation/feign/list")
    @ApiOperation(value = "查询人员关系列表", notes = "根据人员关系id,orgId查询人员关系信息列表", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "start", value = "起始页", required = true, dataType = "String", paramType = "query"),
            @ApiImplicitParam(name = "length", value = "条数", required = true, dataType = "String", paramType = "query"),
            @ApiImplicitParam(name = "orgId", value = "分库orgId", required = true, dataType = "String", paramType = "query")
    })
    public Page<BbEmployeeRelation> findBbEmployeeRelations(@RequestParam Map<String, Object> params) {
        return service.findBbEmployeeRelations(params);
    }
    
    /**
     * 删除
     */
    @RequestMapping("/BbEmployeeRelation/feign/delete")
    @ApiOperation(value = "删除人员关系", notes = "根据人员关系id,orgId删除人员关系信息", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "人员ID", required = true, dataType = "String", paramType = "query"),
            @ApiImplicitParam(name = "orgId", value = "分库orgId", required = true, dataType = "String", paramType = "query")
    })
    public Integer delete(@RequestParam Map<String, Object> params) {
        return service.deleteById(params, null);
    }
    
}