|
@@ -1,8 +1,13 @@
|
|
package com.dragoninfo.dcuc.authweb.restcontroller.attr.controller;
|
|
package com.dragoninfo.dcuc.authweb.restcontroller.attr.controller;
|
|
|
|
|
|
|
|
+import com.dragoninfo.dcuc.app.entity.ApplyInfo;
|
|
import com.dragoninfo.dcuc.auth.auth.dto.attr.AttrAcceptDTO;
|
|
import com.dragoninfo.dcuc.auth.auth.dto.attr.AttrAcceptDTO;
|
|
|
|
+import com.dragoninfo.dcuc.auth.auth.dto.attr.AttrRelAcceptDTO;
|
|
|
|
+import com.dragoninfo.dcuc.auth.auth.dto.attr.RelSearchDTO;
|
|
import com.dragoninfo.dcuc.auth.auth.facade.attr.IAttrFacade;
|
|
import com.dragoninfo.dcuc.auth.auth.facade.attr.IAttrFacade;
|
|
import com.dragoninfo.dcuc.authweb.restcontroller.attr.vo.AttrAcceptVo;
|
|
import com.dragoninfo.dcuc.authweb.restcontroller.attr.vo.AttrAcceptVo;
|
|
|
|
+import com.dragoninfo.dcuc.authweb.restcontroller.attr.vo.AttrRelAcceptVo;
|
|
|
|
+import com.dragoninfo.dcuc.authweb.restcontroller.attr.vo.RelSearchVo;
|
|
import com.dragoninfo.dcuc.authweb.util.VersionUtils;
|
|
import com.dragoninfo.dcuc.authweb.util.VersionUtils;
|
|
import com.dragoninfo.duceap.core.response.Result;
|
|
import com.dragoninfo.duceap.core.response.Result;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
@@ -12,6 +17,7 @@ import io.swagger.annotations.ApiOperation;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.data.domain.Page;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -50,7 +56,7 @@ public class AttrController {
|
|
@ApiImplicitParam(name = "parentId", value = "parentId属性父类id"),
|
|
@ApiImplicitParam(name = "parentId", value = "parentId属性父类id"),
|
|
@ApiImplicitParam(name = "attrType", value = "属性类别 SUB:主体属性 OBJ:客体属性")
|
|
@ApiImplicitParam(name = "attrType", value = "属性类别 SUB:主体属性 OBJ:客体属性")
|
|
})
|
|
})
|
|
- @PostMapping(value = "deleteByParentId")
|
|
|
|
|
|
+ @GetMapping(value = "deleteByParentId")
|
|
public Result deleteByParentId(@RequestParam("parentId") String parentId, @RequestParam("attrType") String attrType) {
|
|
public Result deleteByParentId(@RequestParam("parentId") String parentId, @RequestParam("attrType") String attrType) {
|
|
Boolean b = attrFacade.deleteByParentId(parentId,attrType);
|
|
Boolean b = attrFacade.deleteByParentId(parentId,attrType);
|
|
if (b) {
|
|
if (b) {
|
|
@@ -65,11 +71,47 @@ public class AttrController {
|
|
@ApiImplicitParam(name = "attrBelongType", value = "parentId属性父类id"),
|
|
@ApiImplicitParam(name = "attrBelongType", value = "parentId属性父类id"),
|
|
@ApiImplicitParam(name = "attrType", value = "属性类别 SUB:主体属性 OBJ:客体属性")
|
|
@ApiImplicitParam(name = "attrType", value = "属性类别 SUB:主体属性 OBJ:客体属性")
|
|
})
|
|
})
|
|
- @PostMapping(value = "getAttrTreeList")
|
|
|
|
|
|
+ @GetMapping(value = "getAttrTreeList")
|
|
public Result getAttrTreeList(@RequestParam("attrBelongType") String attrBelongType, @RequestParam("attrType") String attrType) {
|
|
public Result getAttrTreeList(@RequestParam("attrBelongType") String attrBelongType, @RequestParam("attrType") String attrType) {
|
|
List<AttrAcceptDTO> list = attrFacade.getAttrTreeList(attrBelongType,attrType);
|
|
List<AttrAcceptDTO> list = attrFacade.getAttrTreeList(attrBelongType,attrType);
|
|
return Result.success(list);
|
|
return Result.success(list);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "属性关联主客体关系添加")
|
|
|
|
+ @ApiImplicitParam(name = "attrRelAcceptVo", value = "主客体-属性关联关系添加对象")
|
|
|
|
+ @PostMapping(value = "attrRelAdd")
|
|
|
|
+ public Result attrRelAdd(@RequestBody AttrRelAcceptVo vo) {
|
|
|
|
+ AttrRelAcceptDTO dto = new AttrRelAcceptDTO();
|
|
|
|
+ BeanUtils.copyProperties(vo,dto);
|
|
|
|
+ Boolean b = attrFacade.relAdd(dto);
|
|
|
|
+ if (b) {
|
|
|
|
+ return Result.success();
|
|
|
|
+ } else {
|
|
|
|
+ return Result.fail();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "查询属性关联的id集合")
|
|
|
|
+ @ApiImplicitParams(value = {
|
|
|
|
+ @ApiImplicitParam(name = "attrId", value = "parentId属性父类id"),
|
|
|
|
+ @ApiImplicitParam(name = "attrType", value = "属性类别 SUB:主体属性 OBJ:客体属性"),
|
|
|
|
+ @ApiImplicitParam(name = "attrBelongType", value = "属性所属的主客体类别 USER:人员 ORG:机构 APP:应用")
|
|
|
|
+ })
|
|
|
|
+ @GetMapping(value = "attrRelToIds")
|
|
|
|
+ public Result<List<String>> attrRelToIds(@RequestParam("attrId") String attrId,
|
|
|
|
+ @RequestParam("attrType") String attrType,
|
|
|
|
+ @RequestParam("attrBelongType") String attrBelongType) {
|
|
|
|
+ List<String> relIds = attrFacade.attrRelToIds(attrId, attrType, attrBelongType);
|
|
|
|
+ return Result.success(relIds);
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "查询属性关联的应用列表")
|
|
|
|
+ @ApiImplicitParam(name = "RelSearchVo", value = "RelSearchVo 主客体属性关联列表查询")
|
|
|
|
+ @PostMapping(value = "relAppPage")
|
|
|
|
+ public Result relAppPage(@RequestBody RelSearchVo vo) {
|
|
|
|
+ RelSearchDTO dto = new RelSearchDTO();
|
|
|
|
+ BeanUtils.copyProperties(vo, dto);
|
|
|
|
+ Page<ApplyInfo> page = attrFacade.relAppPage(dto);
|
|
|
|
+ return Result.success(page);
|
|
|
|
+ }
|
|
}
|
|
}
|