|
@@ -52,7 +52,11 @@ public class MetadataController extends BladeController {
|
|
|
@ApiOperationSupport(order = 3)
|
|
|
@ApiOperation(value = "逻辑删除", notes = "传入ids")
|
|
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
|
|
|
- return R.status(iMetadataClassificationService.deleteLogic(Func.toLongList(ids)));
|
|
|
+ boolean b = iMetadataClassificationService.deleteLogic(Func.toLongList(ids));
|
|
|
+ if(b){
|
|
|
+ return R.status(iMetadataClassificationService.deleteTableField(Func.toLongList(ids).get(0)));
|
|
|
+ }
|
|
|
+ return R.status(false);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -64,12 +68,32 @@ public class MetadataController extends BladeController {
|
|
|
public R allocation(@ApiParam(value = "主键集合", required = true) @RequestParam String ids,@RequestParam String type) {
|
|
|
return R.status(iMetadataClassificationService.updateMetadataBytype(Func.toLongList(ids),type));
|
|
|
}
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 取消捕获
|
|
|
+ */
|
|
|
+ @PostMapping("/cancelAllocation")
|
|
|
+ @ApiOperationSupport(order = 5)
|
|
|
+ @ApiOperation(value = "取消捕获", notes = "传入ids")
|
|
|
+ public R cancelAllocation(@ApiParam(value = "主键集合", required = true) @RequestParam String ids,@RequestParam String type) {
|
|
|
+ MetadataClassification byId = iMetadataClassificationService.getById(Func.toLongList(ids).get(0));
|
|
|
+ String[] split = byId.getFileStorageType().split(",");
|
|
|
+ StringBuffer str = new StringBuffer();
|
|
|
+ for(String s :split){
|
|
|
+ if(s.equals(type)){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ str.append(s+",");
|
|
|
+ }
|
|
|
+ String substring = str.toString().substring(0, str.lastIndexOf(","));
|
|
|
+ byId.setFileStorageType(substring);
|
|
|
+ iMetadataClassificationService.updateById(byId);
|
|
|
+ return R.status(iMetadataClassificationService.updateById(byId));
|
|
|
+ }
|
|
|
/**
|
|
|
* 查看没有设置当前分类的元数据容器
|
|
|
*/
|
|
|
@GetMapping("/allocation/detail")
|
|
|
- @ApiOperationSupport(order = 5)
|
|
|
+ @ApiOperationSupport(order = 6)
|
|
|
@ApiOperation(value = "元数据容器分类详情", notes = "传入分类类型")
|
|
|
public R<IPage<MetadataClassification>> allocationDetail(@ApiIgnore @RequestParam String fileStorage, Query query) {
|
|
|
QueryWrapper<MetadataClassification> metadata = new QueryWrapper<>();
|