pull/302/head
Elune 2019-12-21 15:42:39 +08:00
parent a6e57e160f
commit d32216d513
5 changed files with 0 additions and 27 deletions

View File

@ -1,7 +1,6 @@
package me.zhengjie.modules.system.rest;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.IdUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import me.zhengjie.aop.log.Log;
@ -11,7 +10,6 @@ import me.zhengjie.modules.system.domain.Dept;
import me.zhengjie.modules.system.service.DeptService;
import me.zhengjie.modules.system.service.dto.DeptDto;
import me.zhengjie.modules.system.service.dto.DeptQueryCriteria;
import me.zhengjie.utils.RedisUtils;
import me.zhengjie.utils.ThrowableUtil;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;

View File

@ -61,14 +61,6 @@ public class LocalStorageController {
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@ApiOperation("删除文件")
@DeleteMapping(value = "/{id}")
@PreAuthorize("@el.check('storage:del')")
public ResponseEntity<Object> delete(@PathVariable Long id){
localStorageService.delete(id);
return new ResponseEntity<>(HttpStatus.OK);
}
@Log("多选删除")
@DeleteMapping
@ApiOperation("多选删除")

View File

@ -15,8 +15,6 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
/**
* @author

View File

@ -51,12 +51,6 @@ public interface LocalStorageService {
*/
void update(LocalStorage resources);
/**
* ID
* @param id /
*/
void delete(Long id);
/**
*
* @param ids /

View File

@ -113,15 +113,6 @@ public class LocalStorageServiceImpl implements LocalStorageService {
localStorageRepository.save(localStorage);
}
@Override
@CacheEvict(allEntries = true)
@Transactional(rollbackFor = Exception.class)
public void delete(Long id) {
LocalStorage storage = localStorageRepository.findById(id).orElseGet(LocalStorage::new);
FileUtil.del(storage.getPath());
localStorageRepository.delete(storage);
}
@Override
@CacheEvict(allEntries = true)
@Transactional(rollbackFor = Exception.class)