|
@@ -79,12 +79,18 @@ public class MetadataController extends BladeController {
|
|
|
String[] split = byId.getFileStorageType().split(",");
|
|
|
StringBuffer str = new StringBuffer();
|
|
|
for(String s :split){
|
|
|
+ if(s.isEmpty()){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
if(s.equals(type)){
|
|
|
continue;
|
|
|
}
|
|
|
str.append(s+",");
|
|
|
}
|
|
|
- String substring = str.toString().substring(0, str.lastIndexOf(","));
|
|
|
+ String substring = str.toString();
|
|
|
+ if(str.lastIndexOf(",") > 0){
|
|
|
+ substring = str.toString().substring(0, str.lastIndexOf(","));
|
|
|
+ }
|
|
|
byId.setFileStorageType(substring);
|
|
|
iMetadataClassificationService.updateById(byId);
|
|
|
return R.status(iMetadataClassificationService.updateById(byId));
|