Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
elunez committed Dec 21, 2019
1 parent a6e57e1 commit d32216d
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -11,7 +10,6 @@
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,6 @@ public ResponseEntity<Object> update(@Validated @RequestBody LocalStorage resour
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("多选删除")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

/**
* @author 郑杰
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ public interface LocalStorageService {
*/
void update(LocalStorage resources);

/**
* 根据ID删除
* @param id /
*/
void delete(Long id);

/**
* 多选删除
* @param ids /
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,6 @@ public void update(LocalStorage resources) {
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)
Expand Down

0 comments on commit d32216d

Please sign in to comment.