|
@@ -4,9 +4,7 @@ import com.dragoninfo.dcuc.app.entity.ApplyInfo;
|
|
|
import com.dragoninfo.dcuc.auth.sub.dto.RelSearchDTO;
|
|
|
import com.dragoninfo.dcuc.auth.sub.dto.ServiceRelSearchDTO;
|
|
|
import com.dragoninfo.dcuc.auth.sub.facade.IAttrFacade;
|
|
|
-import com.dragoninfo.dcuc.auth.sub.vo.AttrInfoAddVo;
|
|
|
-import com.dragoninfo.dcuc.auth.sub.vo.AttrInfoTreeVo;
|
|
|
-import com.dragoninfo.dcuc.auth.sub.vo.AttrRelAcceptVo;
|
|
|
+import com.dragoninfo.dcuc.auth.sub.vo.*;
|
|
|
import com.dragoninfo.dcuc.authweb.util.VersionUtils;
|
|
|
import com.dragoninfo.duceap.core.response.Result;
|
|
|
import com.dragonsoft.duceap.base.entity.http.ResponseStatus;
|
|
@@ -88,7 +86,7 @@ public class AttrController {
|
|
|
public Result relAppPage(Searchable searchable) {
|
|
|
RelSearchDTO dto = new RelSearchDTO();
|
|
|
setUpSearchValues(dto, searchable);
|
|
|
- Page<ApplyInfo> page = attrFacade.relAppPage(dto);
|
|
|
+ Page<ApplyInfo> page = (Page<ApplyInfo>) attrFacade.relAppPage(dto);
|
|
|
return Result.success(page.getTotalElements(),page.getContent());
|
|
|
}
|
|
|
|
|
@@ -99,7 +97,7 @@ public class AttrController {
|
|
|
public Result notRelAppPage(Searchable searchable) {
|
|
|
RelSearchDTO dto = new RelSearchDTO();
|
|
|
setUpSearchValues(dto, searchable);
|
|
|
- Page<ApplyInfo> page = attrFacade.notRelAppPage(dto);
|
|
|
+ Page<ApplyInfo> page = (Page<ApplyInfo>) attrFacade.notRelAppPage(dto);
|
|
|
return Result.success(page.getTotalElements(),page.getContent());
|
|
|
}
|
|
|
|
|
@@ -107,10 +105,11 @@ public class AttrController {
|
|
|
@ApiImplicitParam(name = "RelSearchVo",
|
|
|
value = "searchable 应用列表查询条件[attrId: 属性id op: =] [name: 应用名称 op:like] [appCode:应用code op: =] [status: 在用状态 op: =]")
|
|
|
@PostMapping(value = "relServicePage")
|
|
|
- public Result relServicePage(Searchable searchable) {
|
|
|
+ public Result<List<ServiceRelVo>> relServicePage(Searchable searchable) {
|
|
|
ServiceRelSearchDTO dto = new ServiceRelSearchDTO();
|
|
|
setUpServiceSearchValues(dto, searchable);
|
|
|
- Page page = attrFacade.relServicePage(dto);
|
|
|
+ Page<ServiceRelVo> page = attrFacade.relServicePage(dto);
|
|
|
+ attrFacade.relServicePage(dto);
|
|
|
return Result.success(page.getTotalElements(),page.getContent());
|
|
|
}
|
|
|
|
|
@@ -118,13 +117,27 @@ public class AttrController {
|
|
|
@ApiImplicitParam(name = "RelSearchVo",
|
|
|
value = "searchable 应用列表查询条件[attrId: 属性id op: =] [name: 应用名称 op:like] [appCode:应用code op: =] [status: 在用状态 op: =]")
|
|
|
@PostMapping(value = "notRelServicePage")
|
|
|
- public Result notRelServicePage(Searchable searchable) {
|
|
|
+ public Result<List<ServiceResourceVo>> notRelServicePage(Searchable searchable) {
|
|
|
ServiceRelSearchDTO dto = new ServiceRelSearchDTO();
|
|
|
setUpServiceSearchValues(dto, searchable);
|
|
|
- Page page = attrFacade.notRelServicePage(dto);
|
|
|
+ Page<ServiceResourceVo> page = attrFacade.notRelServicePage(dto);
|
|
|
return Result.success(page.getTotalElements(),page.getContent());
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "删除单个被关联的记录")
|
|
|
+ @ApiImplicitParam(name = "attrRelId",
|
|
|
+ value = "attrRelId 关联记录的id")
|
|
|
+ @GetMapping(value = "delAttrRelResource")
|
|
|
+ public Result<List<ServiceResourceVo>> delAttrRelResource(@RequestParam("attrRelId") String attrRelId) {
|
|
|
+ Boolean b = attrFacade.delAttrRelResource(attrRelId);
|
|
|
+ if (b) {
|
|
|
+ return Result.success();
|
|
|
+ } else {
|
|
|
+ return Result.fail();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
private <T extends ServiceRelSearchDTO> void setUpServiceSearchValues(T dto, Searchable searchable) {
|
|
|
setUpSearchValues(dto, searchable);
|
|
|
Condition appCodeCondition = searchable.getSearchFilterByKey("appCode_eq");
|