From ccf133f9aeba0321cb8fd1af0192f4d4b09ac603 Mon Sep 17 00:00:00 2001 From: wanggeng <450292408@qq.com> Date: Thu, 23 Sep 2021 23:13:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=B5=84=E6=BA=90=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=EF=BC=8C=E8=B0=83=E6=95=B4=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../department/IDepartmentBaseService.java | 6 +- .../main/java/ink/wgink/pojo/vos/IdsVO.java | 12 ++ .../DepartmentResourceController.java | 195 ++++++++++++++++++ .../DepartmentUserResourceController.java | 111 ++++++++++ .../service/impl/DepartmentServiceImpl.java | 22 +- .../resources/PositionResourceController.java | 155 ++++++++++++++ .../PositionUserResourceController.java | 92 +++++++++ .../resources/RoleResourceController.java | 154 ++++++++++++++ .../resources/RoleUserResourceController.java | 82 ++++++++ .../wgink/service/role/pojo/pos/RolePO.java | 143 ------------- 10 files changed, 817 insertions(+), 155 deletions(-) create mode 100644 service-department/src/main/java/ink/wgink/service/department/controller/resources/DepartmentResourceController.java create mode 100644 service-department/src/main/java/ink/wgink/service/department/controller/resources/DepartmentUserResourceController.java create mode 100644 service-position/src/main/java/ink/wgink/service/position/controller/resources/PositionResourceController.java create mode 100644 service-position/src/main/java/ink/wgink/service/position/controller/resources/PositionUserResourceController.java create mode 100644 service-role/src/main/java/ink/wgink/service/role/controller/resources/RoleResourceController.java create mode 100644 service-role/src/main/java/ink/wgink/service/role/controller/resources/RoleUserResourceController.java delete mode 100644 service-role/src/main/java/ink/wgink/service/role/pojo/pos/RolePO.java diff --git a/basic-interface/src/main/java/ink/wgink/interfaces/department/IDepartmentBaseService.java b/basic-interface/src/main/java/ink/wgink/interfaces/department/IDepartmentBaseService.java index a7e53395..e5f8cd0a 100644 --- a/basic-interface/src/main/java/ink/wgink/interfaces/department/IDepartmentBaseService.java +++ b/basic-interface/src/main/java/ink/wgink/interfaces/department/IDepartmentBaseService.java @@ -143,7 +143,7 @@ public interface IDepartmentBaseService { * @param departmentParentId * @return */ - List listByParentId(String departmentParentId); + List listPOByParentId(String departmentParentId); /** * 通过上级ID和添加获取组织部门全部增量列表(简单格式) @@ -152,7 +152,7 @@ public interface IDepartmentBaseService { * @param addDate * @return */ - List listByParentIdAndAddDate(String departmentParentId, String addDate); + List listPOByParentIdAndAddDate(String departmentParentId, String addDate); /** * 通过上级ID和更新获取组织部门全部新增和修改的列表(简单格式) @@ -161,6 +161,6 @@ public interface IDepartmentBaseService { * @param updateDate * @return */ - List listByParentIdAndUpdateDate(String departmentParentId, String updateDate); + List listPOByParentIdAndUpdateDate(String departmentParentId, String updateDate); } diff --git a/basic-pojo/src/main/java/ink/wgink/pojo/vos/IdsVO.java b/basic-pojo/src/main/java/ink/wgink/pojo/vos/IdsVO.java index fc0b3b1c..a44e2888 100644 --- a/basic-pojo/src/main/java/ink/wgink/pojo/vos/IdsVO.java +++ b/basic-pojo/src/main/java/ink/wgink/pojo/vos/IdsVO.java @@ -21,6 +21,8 @@ public class IdsVO { @ApiModelProperty(name = "ids", value = "ID列表") private List ids; + @ApiModelProperty(name = "ids2", value = "ID列表") + private List ids2; public List getIds() { return ids == null ? new ArrayList() : ids; @@ -30,11 +32,21 @@ public class IdsVO { this.ids = ids; } + public List getIds2() { + return ids2; + } + + public void setIds2(List ids2) { + this.ids2 = ids2; + } + @Override public String toString() { final StringBuilder sb = new StringBuilder("{"); sb.append("\"ids\":") .append(ids); + sb.append(",\"ids2\":") + .append(ids2); sb.append('}'); return sb.toString(); } diff --git a/service-department/src/main/java/ink/wgink/service/department/controller/resources/DepartmentResourceController.java b/service-department/src/main/java/ink/wgink/service/department/controller/resources/DepartmentResourceController.java new file mode 100644 index 00000000..cb90c0d7 --- /dev/null +++ b/service-department/src/main/java/ink/wgink/service/department/controller/resources/DepartmentResourceController.java @@ -0,0 +1,195 @@ +package ink.wgink.service.department.controller.resources; + +import ink.wgink.common.base.DefaultBaseController; +import ink.wgink.interfaces.consts.ISystemConstant; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.dtos.ZTreeDTO; +import ink.wgink.pojo.dtos.department.DepartmentDTO; +import ink.wgink.pojo.pos.DepartmentPO; +import ink.wgink.pojo.result.ErrorResult; +import ink.wgink.pojo.result.SuccessResultData; +import ink.wgink.pojo.result.SuccessResultList; +import ink.wgink.pojo.vos.IdsVO; +import ink.wgink.service.department.service.IDepartmentService; +import io.swagger.annotations.*; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @ClassName: DepartmentController + * @Description: 组织部门 + * @Author: wenc + * @Date: 2019/1/8 7:23 PM + * @Version: 1.0 + **/ +@Api(tags = ISystemConstant.API_TAGS_RESOURCE_PREFIX + "组织部门") +@RestController +@RequestMapping(ISystemConstant.RESOURCE_PREFIX + "/department") +public class DepartmentResourceController extends DefaultBaseController { + + @Autowired + private IDepartmentService departmentService; + + @ApiOperation(value = "组织部门列表", notes = "组织部门列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "departmentParentId", value = "组织部门上级ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list") + public List list() { + Map params = new HashMap<>(0); + return departmentService.list(params); + } + + @ApiOperation(value = "组织部门列表", notes = "组织部门列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "departmentParentId", value = "组织部门上级ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list/{departmentParentId}") + public List list(@PathVariable("departmentParentId") String departmentParentId) { + Map params = new HashMap<>(0); + params.put("departmentParentId", departmentParentId); + return departmentService.list(params); + } + + @ApiOperation(value = "组织部门列表", notes = "组织部门列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "departmentParentId", value = "组织部门上级ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-all") + public List listAll() { + Map params = requestParams(); + return departmentService.listAll(params); + } + + @ApiOperation(value = "组织部门zTree列表", notes = "组织部门zTree列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "id", value = "父ID", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-ztree") + public List listZTree() { + Map params = requestParams(); + String departmentParentId = "0"; + if (!StringUtils.isBlank(params.get("id") == null ? null : params.get("id").toString())) { + departmentParentId = params.get("id").toString(); + } + return departmentService.listZTree(departmentParentId, params); + } + + @ApiOperation(value = "组织部门详情", notes = "组织部门详情接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "departmentId", value = "部门ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get/{departmentId}") + public DepartmentDTO get(@PathVariable("departmentId") String departmentId) { + return departmentService.get(departmentId); + } + + @ApiOperation(value = "组织部门分页列表", notes = "组织部门分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "parentId", value = "上级ID", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpage") + public SuccessResultList> listPage(ListPage page) { + Map params = requestParams(); + String departmentParentId = "0"; + if (!StringUtils.isBlank(params.get("parentId") == null ? null : params.get("parentId").toString())) { + departmentParentId = params.get("parentId").toString(); + } + params.put("departmentParentId", departmentParentId); + page.setParams(params); + return departmentService.listPage(page); + } + + @ApiOperation(value = "组织部门详情", notes = "组织部门详情接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "departmentId", value = "部门ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get-po/{departmentId}") + public DepartmentPO getPO(@PathVariable("departmentId") String departmentId) { + return departmentService.getPO(departmentId); + } + + @ApiOperation(value = "组织部门详情", notes = "组织部门详情接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-po") + public List listPO() { + Map params = requestParams(); + return departmentService.listPO(params); + } + + @ApiOperation(value = "组织部门ID列表", notes = "组织部门ID列表接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-id") + public List listId() { + Map params = requestParams(); + return departmentService.listId(params); + } + + @ApiOperation(value = "组织部门详情", notes = "组织部门详情接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "departmentParentId", value = "上级部门ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-po/parentid/{departmentParentId}") + public List listPOByParentId(@PathVariable("departmentParentId") String departmentParentId) { + return departmentService.listPOByParentId(departmentParentId); + } + + @ApiOperation(value = "组织部门详情", notes = "组织部门详情接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "departmentId", value = "部门ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("list-po/ids") + public List listPO(@RequestBody IdsVO idsVO) { + return departmentService.listPO(idsVO.getIds()); + } + + @ApiOperation(value = "组织部门详情", notes = "组织部门详情接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "departmentParentId", value = "上级部门ID", paramType = "path"), + @ApiImplicitParam(name = "addDate", value = "添加时间,yyyy-MM-dd", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-po/parentid/{departmentParentId}/add-date/{addDate}") + public List listPOByParentIdAndAddDate(@PathVariable("departmentParentId") String departmentParentId, @PathVariable("addDate") String addDate) { + return departmentService.listPOByParentIdAndAddDate(departmentParentId, addDate); + } + + @ApiOperation(value = "组织部门详情", notes = "组织部门详情接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "departmentParentId", value = "上级部门ID", paramType = "path"), + @ApiImplicitParam(name = "updateDate", value = "修改时间,yyyy-MM-dd", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-po/parentid/{departmentParentId}/update-date/{updateDate}") + public List listPOByParentIdAndUpdateDate(@PathVariable("departmentParentId") String departmentParentId, @PathVariable("updateDate") String updateDate) { + return departmentService.listPOByParentIdAndUpdateDate(departmentParentId, updateDate); + } + + @ApiOperation(value = "统计", notes = "统计接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("count") + public SuccessResultData count() { + Map params = requestParams(); + Integer count = departmentService.count(params); + return new SuccessResultData<>(count); + } +} diff --git a/service-department/src/main/java/ink/wgink/service/department/controller/resources/DepartmentUserResourceController.java b/service-department/src/main/java/ink/wgink/service/department/controller/resources/DepartmentUserResourceController.java new file mode 100644 index 00000000..e63dd793 --- /dev/null +++ b/service-department/src/main/java/ink/wgink/service/department/controller/resources/DepartmentUserResourceController.java @@ -0,0 +1,111 @@ +package ink.wgink.service.department.controller.resources; + +import ink.wgink.common.base.DefaultBaseController; +import ink.wgink.interfaces.consts.ISystemConstant; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.dtos.department.DepartmentUserDTO; +import ink.wgink.pojo.result.ErrorResult; +import ink.wgink.pojo.result.SuccessResultList; +import ink.wgink.pojo.vos.IdsVO; +import ink.wgink.service.department.service.IDepartmentUserService; +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + +/** + * When you feel like quitting. Think about why you started + * 当你想要放弃的时候,想想当初你为何开始 + * + * @ClassName: DepartmentUserController + * @Description: 组织部门用户 + * @Author: wanggeng + * @Date: 2021/1/28 4:19 下午 + * @Version: 1.0 + */ +@Api(tags = ISystemConstant.API_TAGS_RESOURCE_PREFIX + "组织部门用户") +@RestController +@RequestMapping(ISystemConstant.RESOURCE_PREFIX + "/department/user") +public class DepartmentUserResourceController extends DefaultBaseController { + + @Autowired + private IDepartmentUserService departmentUserService; + + @ApiOperation(value = "组织部门用户列表", notes = "组织部门用户列表接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list") + public List list() { + Map params = requestParams(); + return departmentUserService.list(params); + } + + @ApiOperation(value = "组织部门用户列表", notes = "通过组织部门ID获取组织部门用户列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "departmentId", value = "部门ID", paramType = "path"), + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list/{departmentId}") + public List list(@PathVariable("departmentId") String departmentId) { + return departmentUserService.list(departmentId); + } + + @ApiOperation(value = "组织部门用户列表", notes = "通过部门ID列表获取组织部门用户列表接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("list/department-ids") + public List listByDepartmentIds(@RequestBody IdsVO idsVO) { + return departmentUserService.list(idsVO.getIds()); + } + + @ApiOperation(value = "组织部门用户ID列表", notes = "通过部门ID组织部门用户ID列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "departmentId", value = "部门ID", paramType = "path"), + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-user-id/{departmentId}") + public List listUserId(@PathVariable("departmentId") String departmentId) { + return departmentUserService.listUserId(departmentId); + } + + @ApiOperation(value = "组织部门用户ID列表", notes = "通过组织部门ID列表获取组织部门用户ID列表接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-user-id/department-ids") + public List listUserIdByDepartmentIds(@RequestBody IdsVO idsVO) { + return departmentUserService.listUserId(idsVO.getIds()); + } + + @ApiOperation(value = "组织部门用户ID列表", notes = "通过组织部门ID与用户ID列表获取组织部门用户ID列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "departmentId", value = "部门ID", paramType = "path"), + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-user-id/department-id/{departmentId}/user-ids") + public List listUserIdByDepartmentIdAndUserIds(@PathVariable("departmentId") String departmentId, @RequestBody IdsVO idsVO) { + return departmentUserService.listUserId(departmentId, idsVO.getIds()); + } + + @ApiOperation(value = "组织部门用户ID列表", notes = "通过组织部门ID列表与用户ID列表获取用户ID列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "departmentId", value = "部门ID", paramType = "path"), + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-user-id/department-ids/user-ids") + public List listUserIdByDepartmentIdsAndUserIds(@RequestBody IdsVO idsVO) { + return departmentUserService.listUserId(idsVO.getIds(), idsVO.getIds2()); + } + + @ApiOperation(value = "组织部门用户列表", notes = "组织部门用户列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "departmentId", value = "部门ID", paramType = "path"), + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpage/{departmentId}") + public SuccessResultList> listPage(@PathVariable("departmentId") String departmentId, ListPage page) { + return departmentUserService.listPage(departmentId, page); + } + +} diff --git a/service-department/src/main/java/ink/wgink/service/department/service/impl/DepartmentServiceImpl.java b/service-department/src/main/java/ink/wgink/service/department/service/impl/DepartmentServiceImpl.java index b9fc0c64..9ee10977 100644 --- a/service-department/src/main/java/ink/wgink/service/department/service/impl/DepartmentServiceImpl.java +++ b/service-department/src/main/java/ink/wgink/service/department/service/impl/DepartmentServiceImpl.java @@ -17,6 +17,7 @@ import ink.wgink.pojo.ListPage; import ink.wgink.pojo.dtos.ZTreeDTO; import ink.wgink.pojo.dtos.department.DepartmentDTO; import ink.wgink.pojo.dtos.department.DepartmentSimpleDTO; +import ink.wgink.pojo.pos.DepartmentPO; import ink.wgink.pojo.result.SuccessResultList; import ink.wgink.pojo.result.UploadExcelResultDTO; import ink.wgink.service.department.dao.IDepartmentDao; @@ -127,7 +128,7 @@ public class DepartmentServiceImpl extends DefaultBaseService implements IDepart @Override public void updateMerge(String departmentId, MergeDepartmentInfoVO mergeDepartmentInfoVO) { - ink.wgink.pojo.pos.DepartmentPO departmentPO = getPO(departmentId); + DepartmentPO departmentPO = getPO(departmentId); if (departmentPO == null) { throw new SearchException("部门不存在"); } @@ -318,36 +319,39 @@ public class DepartmentServiceImpl extends DefaultBaseService implements IDepart } @Override - public ink.wgink.pojo.pos.DepartmentPO getPO(String departmentId) { + public DepartmentPO getPO(String departmentId) { Map params = getHashMap(2); params.put("departmentId", departmentId); return departmentDao.getSimple(params); } @Override - public List listPO(Map params) { + public List listPO(Map params) { return departmentDao.listPO(params); } @Override - public List listPO(List departmentIds) { + public List listPO(List departmentIds) { + if(departmentIds.isEmpty()) { + + } Map params = getHashMap(2); params.put("departmentIds", departmentIds); return listPO(params); } @Override - public List listByParentId(String departmentParentId) { + public List listPOByParentId(String departmentParentId) { return listSimpleByParentIdAndAddDateOrUpdateDate(departmentParentId, null, null); } @Override - public List listByParentIdAndAddDate(String departmentParentId, String addDate) { + public List listPOByParentIdAndAddDate(String departmentParentId, String addDate) { return listSimpleByParentIdAndAddDateOrUpdateDate(departmentParentId, addDate, null); } @Override - public List listByParentIdAndUpdateDate(String departmentParentId, String updateDate) { + public List listPOByParentIdAndUpdateDate(String departmentParentId, String updateDate) { return listSimpleByParentIdAndAddDateOrUpdateDate(departmentParentId, null, updateDate); } @@ -359,10 +363,10 @@ public class DepartmentServiceImpl extends DefaultBaseService implements IDepart * @param updateDate 更新日期 * @return */ - private List listSimpleByParentIdAndAddDateOrUpdateDate(String departmentParentId, String addDate, String updateDate) { + private List listSimpleByParentIdAndAddDateOrUpdateDate(String departmentParentId, String addDate, String updateDate) { Map params = getHashMap(3); if (!StringUtils.equals(ISystemConstant.TREE_ROOT_ID, departmentParentId)) { - ink.wgink.pojo.pos.DepartmentPO departmentPO = getPO(departmentParentId); + DepartmentPO departmentPO = getPO(departmentParentId); if (departmentPO == null) { return new ArrayList<>(); } diff --git a/service-position/src/main/java/ink/wgink/service/position/controller/resources/PositionResourceController.java b/service-position/src/main/java/ink/wgink/service/position/controller/resources/PositionResourceController.java new file mode 100644 index 00000000..2f360ef1 --- /dev/null +++ b/service-position/src/main/java/ink/wgink/service/position/controller/resources/PositionResourceController.java @@ -0,0 +1,155 @@ +package ink.wgink.service.position.controller.resources; + +import ink.wgink.common.base.DefaultBaseController; +import ink.wgink.interfaces.consts.ISystemConstant; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.dtos.ZTreeDTO; +import ink.wgink.pojo.dtos.position.PositionDTO; +import ink.wgink.pojo.pos.PositionPO; +import ink.wgink.pojo.result.ErrorResult; +import ink.wgink.pojo.result.SuccessResultData; +import ink.wgink.pojo.result.SuccessResultList; +import ink.wgink.pojo.vos.IdsVO; +import ink.wgink.service.position.service.IPositionService; +import io.swagger.annotations.*; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + +/** + * @ClassName: PositionController + * @Description: 职位 + * @Author: admin + * @Date: 2019-04-11 22:41:20 + * @Version: 1.0 + **/ +@Api(tags = ISystemConstant.API_TAGS_RESOURCE_PREFIX + "职位管理接口") +@RestController +@RequestMapping(ISystemConstant.RESOURCE_PREFIX + "/position") +public class PositionResourceController extends DefaultBaseController { + + @Autowired + private IPositionService positionService; + + @ApiOperation(value = "职位列表", notes = "职位列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "positionParentId", value = "职位上级ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-all") + public List listAll() { + return positionService.listAllByParentId("0"); + } + + @ApiOperation(value = "职位列表", notes = "职位列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "positionParentId", value = "职位上级ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-all/parentid/{positionParentId}") + public List listAllByParentId(@PathVariable("positionParentId") String positionParentId) { + return positionService.listAllByParentId(positionParentId); + } + + @ApiOperation(value = "职位详情", notes = "职位详情接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "positionId", value = "职位ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get") + public PositionDTO get() { + Map params = requestParams(); + return positionService.get(params); + } + + @ApiOperation(value = "职位详情", notes = "职位详情接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "positionId", value = "职位ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get/id/{positionId}") + public PositionDTO getById(@PathVariable("positionId") String positionId) { + return positionService.get(positionId); + } + + @ApiOperation(value = "zTree列表", notes = "zTree列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "id", value = "父ID", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-ztree") + public List listZTree() { + Map params = requestParams(); + String positionParentId = "0"; + if (!StringUtils.isBlank(params.get(ISystemConstant.PARAMS_ID) == null ? null : params.get(ISystemConstant.PARAMS_ID).toString())) { + positionParentId = params.get(ISystemConstant.PARAMS_ID).toString(); + } + params.put("positionParentId", positionParentId); + return positionService.listZTree(params); + } + + @ApiOperation(value = "分页职位列表", notes = "分页职位列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "parentId", value = "上级ID", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpage") + public SuccessResultList> listPage(ListPage page) { + Map params = requestParams(); + String positionParentId = "0"; + if (!StringUtils.isBlank(params.get("parentId") == null ? null : params.get("parentId").toString())) { + positionParentId = params.get("parentId").toString(); + } + params.put("positionParentId", positionParentId); + page.setParams(params); + return positionService.listPage(page); + } + + @ApiOperation(value = "取职位列表", notes = "获取用户职位接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("list") + public List list() { + Map params = requestParams(); + return positionService.list(params); + } + + @ApiOperation(value = "通过ID列表获取职位列表", notes = "通过ID列表获取用户职位接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("list/ids") + public List listByIds(@RequestBody IdsVO idsVO) { + return positionService.list(idsVO.getIds()); + } + + @ApiOperation(value = "取职位列表", notes = "用户职位接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("list-po") + public List listPO() { + Map params = requestParams(); + return positionService.listPO(params); + } + + @ApiOperation(value = "通过ID列表获取职位列表", notes = "通过ID列表获取用户职位接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("list-po/ids") + public List listPOByIds(@RequestBody IdsVO idsVO) { + return positionService.listPO(idsVO.getIds()); + } + + @ApiOperation(value = "统计", notes = "统计接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("count") + public SuccessResultData count() { + Map params = requestParams(); + Integer count = positionService.count(params); + return new SuccessResultData<>(count); + } + +} diff --git a/service-position/src/main/java/ink/wgink/service/position/controller/resources/PositionUserResourceController.java b/service-position/src/main/java/ink/wgink/service/position/controller/resources/PositionUserResourceController.java new file mode 100644 index 00000000..e39b3fe4 --- /dev/null +++ b/service-position/src/main/java/ink/wgink/service/position/controller/resources/PositionUserResourceController.java @@ -0,0 +1,92 @@ +package ink.wgink.service.position.controller.resources; + +import ink.wgink.common.base.DefaultBaseController; +import ink.wgink.interfaces.consts.ISystemConstant; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.dtos.position.PositionUserDTO; +import ink.wgink.pojo.pos.PositionPO; +import ink.wgink.pojo.result.ErrorResult; +import ink.wgink.pojo.result.SuccessResultList; +import ink.wgink.pojo.vos.IdsVO; +import ink.wgink.service.position.service.IPositionUserService; +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + +/** + * When you feel like quitting. Think about why you started + * 当你想要放弃的时候,想想当初你为何开始 + * + * @ClassName: PositionUserController + * @Description: 职位用户 + * @Author: wanggeng + * @Date: 2021/2/16 11:31 上午 + * @Version: 1.0 + */ +@Api(tags = ISystemConstant.API_TAGS_RESOURCE_PREFIX + "职位用户") +@RestController +@RequestMapping(ISystemConstant.RESOURCE_PREFIX + "/position/user") +public class PositionUserResourceController extends DefaultBaseController { + + @Autowired + private IPositionUserService positionUserService; + + @ApiOperation(value = "人员ID列表", notes = "通过职位获取人员ID列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "positionId", value = "职位ID", paramType = "path"), + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-userid/{positionId}") + public List listUserId(@PathVariable("positionId") String positionId) { + return positionUserService.listUserId(positionId); + } + + @ApiOperation(value = "人员ID列表", notes = "通过职位获取人员ID列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "positionId", value = "职位ID", paramType = "path"), + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-userid/position-ids") + public List listUserIdByPositionIds(@RequestBody IdsVO idsVO) { + return positionUserService.listUserId(idsVO.getIds()); + } + + @ApiOperation(value = "组人员列表", notes = "组人员列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "positionId", value = "组ID", paramType = "path", dataType = "String"), + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpage/{positionId}") + public SuccessResultList> listPage(@PathVariable("positionId") String positionId, ListPage page) { + Map params = requestParams(); + page.setParams(params); + return positionUserService.listPage(positionId, page); + } + + @ApiOperation(value = "职位列表", notes = "通过用户ID获取职位列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "positionId", value = "组ID", paramType = "path", dataType = "String"), + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-position-po/userid/{userId}") + public List listPositionPOByUserId(@PathVariable("userId") String userId) { + return positionUserService.listPositionPOByUserId(userId); + } + + @ApiOperation(value = "职位列表", notes = "通过用户ID列表获取职位列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "positionId", value = "组ID", paramType = "path", dataType = "String"), + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-position-po/user-ids") + public List listPositionPOByUserId(@RequestBody IdsVO idsVO) { + return positionUserService.listPositionPOByUserIds(idsVO.getIds()); + } + +} diff --git a/service-role/src/main/java/ink/wgink/service/role/controller/resources/RoleResourceController.java b/service-role/src/main/java/ink/wgink/service/role/controller/resources/RoleResourceController.java new file mode 100644 index 00000000..d4cd94c5 --- /dev/null +++ b/service-role/src/main/java/ink/wgink/service/role/controller/resources/RoleResourceController.java @@ -0,0 +1,154 @@ +package ink.wgink.service.role.controller.resources; + +import ink.wgink.common.base.DefaultBaseController; +import ink.wgink.exceptions.SearchException; +import ink.wgink.interfaces.consts.ISystemConstant; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.dtos.ZTreeDTO; +import ink.wgink.pojo.dtos.role.RoleDTO; +import ink.wgink.pojo.pos.RolePO; +import ink.wgink.pojo.result.ErrorResult; +import ink.wgink.pojo.result.SuccessResultData; +import ink.wgink.pojo.result.SuccessResultList; +import ink.wgink.pojo.vos.IdsVO; +import ink.wgink.service.role.service.IRoleService; +import io.swagger.annotations.*; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + +/** + * @ClassName: RoleController + * @Description: 角色 + * @Author: wenc + * @Date: 2019/1/6 3:03 PM + * @Version: 1.0 + * @MenuUrl: admin/role/goroles + **/ +@Api(tags = ISystemConstant.API_TAGS_RESOURCE_PREFIX + "角色") +@RestController +@RequestMapping(ISystemConstant.RESOURCE_PREFIX + "/role") +public class RoleResourceController extends DefaultBaseController { + + @Autowired + private IRoleService roleService; + + @ApiOperation(value = "角色详情", notes = "角色详情接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get") + public RoleDTO get() { + Map params = requestParams(); + return roleService.get(params); + } + + @ApiOperation(value = "角色详情", notes = "角色详情接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "roleId", value = "角色ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get/{roleId}") + public RoleDTO getRole(@PathVariable("roleId") String roleId) { + return roleService.get(roleId); + } + + @ApiOperation(value = "角色列表", notes = "角色列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "roleParentId", value = "角色上级ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list") + public List list() { + Map params = requestParams(); + return roleService.list(params); + } + + @ApiOperation(value = "角色列表", notes = "角色列表接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-po") + public List listPO() { + Map params = requestParams(); + return roleService.listPO(params); + } + + @ApiOperation(value = "角色列表", notes = "角色列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "roleParentId", value = "角色上级ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("list-po/role-ids") + public List listPOByRoleIds(@RequestBody IdsVO idsVO) { + return roleService.listPO(idsVO.getIds()); + } + + @ApiOperation(value = "全部角色列表", notes = "全部角色列表接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-all") + public List listAll(@PathVariable("roleParentId") String roleParentId) { + Map params = requestParams(); + params.put("roleParentId", "0"); + return roleService.listAll(params); + } + + @ApiOperation(value = "角色列表", notes = "角色列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "roleParentId", value = "角色上级ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-all/parentid/{roleParentId}") + public List listAllByParentId(@PathVariable("roleParentId") String roleParentId) { + Map params = requestParams(); + params.put("roleParentId", roleParentId); + return roleService.listAll(params); + } + + @ApiOperation(value = "角色zTree列表", notes = "角色zTree列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "id", value = "上级ID", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-ztree") + public List listZTree() throws SearchException { + Map params = requestParams(); + String roleParentId = ISystemConstant.TREE_ROOT_ID; + if (!StringUtils.isBlank(params.get(ISystemConstant.PARAMS_ID) == null ? null : params.get(ISystemConstant.PARAMS_ID).toString())) { + roleParentId = params.get(ISystemConstant.PARAMS_ID).toString(); + } + params.put("roleParentId", roleParentId); + return roleService.listZTree(params); + } + + @ApiOperation(value = "角色分页列表", notes = "角色分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "parentId", value = "上级ID", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpage") + public SuccessResultList> listPage(ListPage page) throws SearchException { + Map params = requestParams(); + String roleParentId = "0"; + if (!StringUtils.isBlank(params.get(ISystemConstant.PARAMS_PARENT_ID) == null ? null : params.get(ISystemConstant.PARAMS_PARENT_ID).toString())) { + roleParentId = params.get(ISystemConstant.PARAMS_PARENT_ID).toString(); + } + params.put("roleParentId", roleParentId); + page.setParams(params); + return roleService.listPage(page); + } + + @ApiOperation(value = "统计", notes = "统计接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("count") + public SuccessResultData count() { + Map params = requestParams(); + Integer count = roleService.count(params); + return new SuccessResultData<>(count); + } + +} diff --git a/service-role/src/main/java/ink/wgink/service/role/controller/resources/RoleUserResourceController.java b/service-role/src/main/java/ink/wgink/service/role/controller/resources/RoleUserResourceController.java new file mode 100644 index 00000000..6bc97a82 --- /dev/null +++ b/service-role/src/main/java/ink/wgink/service/role/controller/resources/RoleUserResourceController.java @@ -0,0 +1,82 @@ +package ink.wgink.service.role.controller.resources; + +import ink.wgink.common.base.DefaultBaseController; +import ink.wgink.interfaces.consts.ISystemConstant; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.dtos.role.RoleUserDTO; +import ink.wgink.pojo.pos.RolePO; +import ink.wgink.pojo.result.ErrorResult; +import ink.wgink.pojo.result.SuccessResultList; +import ink.wgink.pojo.vos.IdsVO; +import ink.wgink.service.role.service.IRoleUserService; +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + +/** + * When you feel like quitting. Think about why you started + * 当你想要放弃的时候,想想当初你为何开始 + * + * @ClassName: RoleUserController + * @Description: 角色用户 + * @Author: WangGeng + * @Date: 2021/2/18 11:19 + * @Version: 1.0 + **/ +@Api(tags = ISystemConstant.API_TAGS_RESOURCE_PREFIX + "角色用户") +@RestController +@RequestMapping(ISystemConstant.RESOURCE_PREFIX + "/role/user") +public class RoleUserResourceController extends DefaultBaseController { + + @Autowired + private IRoleUserService roleUserService; + + @ApiOperation(value = "角色用户ID列表", notes = "通过角色ID获取角色用户ID列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "roleId", value = "用户角色ID", paramType = "path"), + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-userid/roleid/{roleId}") + public List listUserIdByRoleId(@PathVariable("roleId") String roleId) { + return roleUserService.listUserId(roleId); + } + + @ApiOperation(value = "角色用户ID列表", notes = "通过角色ID列表获取角色用户ID列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "roleId", value = "用户角色ID", paramType = "path"), + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("list-userid/role-ids") + public List listUserIdByRoleIds(@RequestBody IdsVO idsVO) { + return roleUserService.listUserId(idsVO.getIds()); + } + + @ApiOperation(value = "角色用户分页列表", notes = "角色用户分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "roleId", value = "角色ID", paramType = "path", dataType = "String"), + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-page/{roleId}") + public SuccessResultList> listPage(@PathVariable("roleId") String roleId, ListPage page) { + Map params = requestParams(); + page.setParams(params); + return roleUserService.listPage(roleId, page); + } + + @ApiOperation(value = "角色列表", notes = "通过用户ID获取角色列表") + @ApiImplicitParams({ + @ApiImplicitParam(name = "userId", value = "用户ID", paramType = "path", dataType = "String"), + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-page/userid/{userId}") + public List listRolePOByUserId(@PathVariable("userId") String userId) { + return roleUserService.listRolePOByUserId(userId); + } + +} diff --git a/service-role/src/main/java/ink/wgink/service/role/pojo/pos/RolePO.java b/service-role/src/main/java/ink/wgink/service/role/pojo/pos/RolePO.java deleted file mode 100644 index ed9e6196..00000000 --- a/service-role/src/main/java/ink/wgink/service/role/pojo/pos/RolePO.java +++ /dev/null @@ -1,143 +0,0 @@ -package ink.wgink.service.role.pojo.pos; - -import java.io.Serializable; - -/** - * @ClassName: RoleDTO - * @Description: 角色 - * @Author: wenc - * @Date: 2019/1/6 3:50 PM - * @Version: 1.0 - **/ -public class RolePO implements Serializable { - - private static final long serialVersionUID = 5002416086605618923L; - private String roleId; - private String roleParentId; - private Boolean isParent; - private String roleName; - private String roleSummary; - private String roleDataAuthority; - private String roleCode; - private String roleInsert; - private String roleDelete; - private String roleUpdate; - private String roleQuery; - - public String getRoleId() { - return roleId == null ? "" : roleId.trim(); - } - - public void setRoleId(String roleId) { - this.roleId = roleId; - } - - public String getRoleParentId() { - return roleParentId == null ? "" : roleParentId.trim(); - } - - public void setRoleParentId(String roleParentId) { - this.roleParentId = roleParentId; - } - - public Boolean getParent() { - return isParent; - } - - public void setParent(Boolean parent) { - isParent = parent; - } - - public String getRoleName() { - return roleName == null ? "" : roleName.trim(); - } - - public void setRoleName(String roleName) { - this.roleName = roleName; - } - - public String getRoleSummary() { - return roleSummary == null ? "" : roleSummary.trim(); - } - - public void setRoleSummary(String roleSummary) { - this.roleSummary = roleSummary; - } - - public String getRoleDataAuthority() { - return roleDataAuthority == null ? "" : roleDataAuthority.trim(); - } - - public void setRoleDataAuthority(String roleDataAuthority) { - this.roleDataAuthority = roleDataAuthority; - } - - public String getRoleCode() { - return roleCode == null ? "" : roleCode.trim(); - } - - public void setRoleCode(String roleCode) { - this.roleCode = roleCode; - } - - public String getRoleInsert() { - return roleInsert == null ? "" : roleInsert.trim(); - } - - public void setRoleInsert(String roleInsert) { - this.roleInsert = roleInsert; - } - - public String getRoleDelete() { - return roleDelete == null ? "" : roleDelete.trim(); - } - - public void setRoleDelete(String roleDelete) { - this.roleDelete = roleDelete; - } - - public String getRoleUpdate() { - return roleUpdate == null ? "" : roleUpdate.trim(); - } - - public void setRoleUpdate(String roleUpdate) { - this.roleUpdate = roleUpdate; - } - - public String getRoleQuery() { - return roleQuery == null ? "" : roleQuery.trim(); - } - - public void setRoleQuery(String roleQuery) { - this.roleQuery = roleQuery; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("{"); - sb.append("\"roleId\":") - .append("\"").append(roleId).append("\""); - sb.append(",\"roleParentId\":") - .append("\"").append(roleParentId).append("\""); - sb.append(",\"isParent\":") - .append(isParent); - sb.append(",\"roleName\":") - .append("\"").append(roleName).append("\""); - sb.append(",\"roleSummary\":") - .append("\"").append(roleSummary).append("\""); - sb.append(",\"roleDataAuthority\":") - .append("\"").append(roleDataAuthority).append("\""); - sb.append(",\"roleCode\":") - .append("\"").append(roleCode).append("\""); - sb.append(",\"roleInsert\":") - .append("\"").append(roleInsert).append("\""); - sb.append(",\"roleDelete\":") - .append("\"").append(roleDelete).append("\""); - sb.append(",\"roleUpdate\":") - .append("\"").append(roleUpdate).append("\""); - sb.append(",\"roleQuery\":") - .append("\"").append(roleQuery).append("\""); - sb.append('}'); - return sb.toString(); - } -} \ No newline at end of file