浏览代码

feature(客体属性功能开发): 客体属性功能开发

客体属性功能开发
mazq 3 年之前
父节点
当前提交
bedc35766d
共有 1 个文件被更改,包括 10 次插入6 次删除
  1. 10 6
      src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/sub/AttrController.java

+ 10 - 6
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/sub/AttrController.java

@@ -81,29 +81,29 @@ public class AttrController {
 
     @ApiOperation(value = "查询属性关联的应用列表")
     @ApiImplicitParam(name = "RelSearchVo",
-            value = "searchable 应用列表查询条件[attrId: 属性id op: =] [name: 应用名称 op:like][status: 在用状态 op: =]")
+            value = "searchable 列表查询条件[attrId: 属性id op: =] [id: 应用id op:=] [code:应用code op:=] [status: 在用状态 op: =]")
     @PostMapping(value = "relAppPage")
     public Result relAppPage(Searchable searchable) {
         RelSearchDTO dto = new RelSearchDTO();
         setUpSearchValues(dto, searchable);
-        Page<ApplyInfo> page = (Page<ApplyInfo>) attrFacade.relAppPage(dto);
+        Page<ApplyInfoRelVo> page = attrFacade.relAppPage(dto);
         return Result.success(page.getTotalElements(),page.getContent());
     }
 
     @ApiOperation(value = "查询属性未关联的应用列表")
     @ApiImplicitParam(name = "RelSearchVo",
-            value = "searchable 应用列表查询条件[attrId: 属性id op: =] [name: 应用名称 op:like][status: 在用状态 op: =]")
+            value = "searchable 列表查询条件[attrId: 属性id op: =] [id: 应用id op:=] [code:应用code op:like] [status: 在用状态 op: =]")
     @PostMapping(value = "notRelAppPage")
     public Result notRelAppPage(Searchable searchable) {
         RelSearchDTO dto = new RelSearchDTO();
         setUpSearchValues(dto, searchable);
-        Page<ApplyInfo> page = (Page<ApplyInfo>) attrFacade.notRelAppPage(dto);
+        Page<ApplyInfoVo> page = attrFacade.notRelAppPage(dto);
         return Result.success(page.getTotalElements(),page.getContent());
     }
 
     @ApiOperation(value = "查询属性关联的服务列表")
     @ApiImplicitParam(name = "RelSearchVo",
-            value = "searchable 应用列表查询条件[attrId: 属性id op: =] [name: 应用名称 op:like] [appCode:应用code op: =] [status: 在用状态 op: =]")
+            value = "searchable 列表查询条件[attrId: 属性id op: =] [name: 服务名称 op:like] [code:服务code op:like] [appCode:应用code op: =] [status: 在用状态 op: =]")
     @PostMapping(value = "relServicePage")
     public Result<List<ServiceRelVo>> relServicePage(Searchable searchable) {
         ServiceRelSearchDTO dto = new ServiceRelSearchDTO();
@@ -115,7 +115,7 @@ public class AttrController {
 
     @ApiOperation(value = "查询属性未关联的服务列表")
     @ApiImplicitParam(name = "RelSearchVo",
-            value = "searchable 应用列表查询条件[attrId: 属性id op: =] [name: 应用名称 op:like] [appCode:应用code op: =] [status: 在用状态 op: =]")
+            value = "searchable 列表查询条件[attrId: 属性id op: =] [name: 服务名称 op:like] [code:服务code op:like] [appCode:应用code op: =] [status: 在用状态 op: =]")
     @PostMapping(value = "notRelServicePage")
     public Result<List<ServiceResourceVo>> notRelServicePage(Searchable searchable) {
         ServiceRelSearchDTO dto = new ServiceRelSearchDTO();
@@ -147,9 +147,13 @@ public class AttrController {
     }
 
     private <T extends RelSearchDTO>  void setUpSearchValues(T dto, Searchable searchable) {
+        Condition idCondition = searchable.getSearchFilterByKey("id_eq");
         Condition nameCondition = searchable.getSearchFilterByKey("name_like");
         Condition attrIdEq = searchable.getSearchFilterByKey("attrId_eq");
         dto.setAttrId(attrIdEq.getValue().toString());
+        if(null != idCondition) {
+            dto.setId(idCondition.getValue().toString());
+        }
         if(null != nameCondition) {
             dto.setName(nameCondition.getValue().toString());
         }