|
@@ -0,0 +1,50 @@
|
|
|
+package com.dragoninfo.dcuc.authweb.restcontroller.auth;
|
|
|
+
|
|
|
+import com.dragoninfo.dcuc.auth.auth.facade.IAuthRoleOrgRelFacade;
|
|
|
+import com.dragoninfo.dcuc.auth.auth.vo.roleorgauth.RoleOrgAuthSaveVo;
|
|
|
+import com.dragoninfo.dcuc.auth.auth.vo.roleorgauth.RoleOrgAuthVo;
|
|
|
+import com.dragoninfo.dcuc.common.utils.ResponseUtil;
|
|
|
+import com.dragoninfo.duceap.core.response.Result;
|
|
|
+import com.dragonsoft.duceap.base.entity.http.ResponseStatus;
|
|
|
+import com.dragonsoft.duceap.base.entity.search.SearchDTO;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.data.domain.Page;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import javax.validation.Valid;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author mazq
|
|
|
+ * @date 2023/6/6
|
|
|
+ */
|
|
|
+@Api(tags = "机构角色授权管理")
|
|
|
+@RestController
|
|
|
+@RequestMapping("authsvr/v2/role-org-auth")
|
|
|
+public class AuthRoleOrgController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IAuthRoleOrgRelFacade authRoleOrgRelFacade;
|
|
|
+
|
|
|
+ @ApiOperation(value = "机构角色授权分页查询")
|
|
|
+ @ApiImplicitParam(name = "searchable", value = "[orgId eq] [appId eq] [roleName like]")
|
|
|
+ @PostMapping("page")
|
|
|
+ public Result<List<RoleOrgAuthVo>> roleAuthPage(SearchDTO searchDTO) {
|
|
|
+ Page<RoleOrgAuthVo> page = authRoleOrgRelFacade.roleAuthPage(searchDTO);
|
|
|
+ return Result.success(page.getTotalElements(), page.getContent());
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "机构角色授权保存")
|
|
|
+ @PostMapping("save")
|
|
|
+ public Result<Object> roleAuthSave(@Valid @RequestBody RoleOrgAuthSaveVo saveVo) {
|
|
|
+ ResponseStatus responseStatus = authRoleOrgRelFacade.roleAuthSave(saveVo);
|
|
|
+ return new Result<>(responseStatus.getStatusCode(), responseStatus.getMessage(), null, null);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|