package com.dk.mdm.controller.mst; import com.dk.common.model.pojo.PageList; import com.dk.common.response.ResponseResultVO; import com.dk.mdm.model.pojo.mst.Org; import com.dk.common.controller.BaseController; import com.dk.common.service.BaseService; import com.dk.mdm.model.query.core.OrganizationQuery; import com.dk.mdm.model.query.mst.OrgQuery; import com.dk.mdm.model.response.core.OrganizationResponse; import com.dk.mdm.model.vo.core.OrganizationVO; import com.dk.mdm.model.vo.mst.OrgVO; import io.swagger.annotations.ApiOperation; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RestController; import io.swagger.annotations.Api; import com.dk.mdm.service.mst.OrgService; @Api(tags = "组织机构API接口") @RestController @RequestMapping("/mst/org") public class OrgController{ public BaseService getService() { return orgService; } @Autowired private OrgService orgService; /** * @desc : 条件查询 * @author : 王英杰 * @date : 2024/2/26 14:02 */ @ApiOperation( value = "分页、关联、条件查询", notes = "分页、关联、条件查询" ) @PostMapping({"list_by"}) public ResponseResultVO> selectByCond(@RequestBody OrgQuery orgQuery) { return orgService.selectByCond(orgQuery); } /** * @desc : 新建组织部门 * @author : 王英杰 * @date : 2024/2/27 9:13 */ @ApiOperation( value = "新建组织部门", notes = "新建组织部门" ) @PostMapping({"insert"}) @Transactional(rollbackFor = Exception.class) public ResponseResultVO insert(@RequestBody OrgVO orgVO) { return orgService.insert(orgVO); } }