修复 redis存时间的问题

This commit is contained in:
hupeng
2019-11-30 18:14:59 +08:00
parent 33a592b833
commit a5db7e4a76
17 changed files with 55 additions and 55 deletions

View File

@ -40,7 +40,7 @@ public class QiniuController {
@Log("配置七牛云存储")
@PutMapping(value = "/qiNiuConfig")
public ResponseEntity emailConfig(@Validated @RequestBody QiniuConfig qiniuConfig){
//if(ObjectUtil.isNotNull(qiniuConfig)) throw new BadRequestException("演示环境禁止操作");
if(ObjectUtil.isNotNull(qiniuConfig)) throw new BadRequestException("演示环境禁止操作");
qiNiuService.update(qiniuConfig);
qiNiuService.update(qiniuConfig.getType());
return new ResponseEntity(HttpStatus.OK);
@ -60,6 +60,7 @@ public class QiniuController {
@Log("上传文件")
@PostMapping(value = "/qiNiuContent")
public ResponseEntity upload(@RequestParam MultipartFile file){
if(ObjectUtil.isNotNull(file)) throw new BadRequestException("演示环境禁止操作");
QiniuContent qiniuContent = qiNiuService.upload(file,qiNiuService.find());
Map map = new HashMap(3);
map.put("id",qiniuContent.getId());
@ -89,7 +90,7 @@ public class QiniuController {
@Log("下载文件")
@GetMapping(value = "/qiNiuContent/download/{id}")
public ResponseEntity download(@PathVariable Long id){
//if(id > 0) throw new BadRequestException("演示环境禁止操作");
if(id > 0) throw new BadRequestException("演示环境禁止操作");
Map map = new HashMap(1);
map.put("url", qiNiuService.download(qiNiuService.findByContentId(id),qiNiuService.find()));
return new ResponseEntity(map,HttpStatus.OK);
@ -104,7 +105,7 @@ public class QiniuController {
@Log("删除文件")
@DeleteMapping(value = "/qiNiuContent/{id}")
public ResponseEntity delete(@PathVariable Long id){
//if(id > 0) throw new BadRequestException("演示环境禁止操作");
if(id > 0) throw new BadRequestException("演示环境禁止操作");
qiNiuService.delete(qiNiuService.findByContentId(id),qiNiuService.find());
return new ResponseEntity(HttpStatus.OK);
}
@ -117,7 +118,7 @@ public class QiniuController {
@Log("删除图片")
@DeleteMapping(value = "/qiNiuContent")
public ResponseEntity deleteAll(@RequestBody Long[] ids) {
//if(ArrayUtil.isNotEmpty(ids)) throw new BadRequestException("演示环境禁止操作");
if(ArrayUtil.isNotEmpty(ids)) throw new BadRequestException("演示环境禁止操作");
qiNiuService.deleteAll(ids, qiNiuService.find());
return new ResponseEntity(HttpStatus.OK);
}