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 add(List 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 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 findBbEmployeeRelations(@RequestParam Map 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 params) { return service.deleteById(params, null); } }