yshop1.4版本发布,新增积分会员功能等,详细看文档介绍
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>yshop</artifactId>
|
||||
<groupId>co.yixiang</groupId>
|
||||
<version>1.3</version>
|
||||
<version>1.4</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
<dependency>
|
||||
<groupId>co.yixiang</groupId>
|
||||
<artifactId>yshop-logging</artifactId>
|
||||
<version>1.3</version>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
|
||||
<!--邮件依赖-->
|
||||
|
@ -2,6 +2,7 @@ package co.yixiang.rest;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.exception.BadRequestException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import co.yixiang.aop.log.Log;
|
||||
@ -40,7 +41,7 @@ public class QiniuController {
|
||||
@Log("配置七牛云存储")
|
||||
@PutMapping(value = "/qiNiuConfig")
|
||||
public ResponseEntity emailConfig(@Validated @RequestBody QiniuConfig qiniuConfig){
|
||||
//if(ObjectUtil.isNotNull(qiniuConfig)) throw new BadRequestException("演示环境禁止操作");
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
qiNiuService.update(qiniuConfig);
|
||||
qiNiuService.update(qiniuConfig.getType());
|
||||
return new ResponseEntity(HttpStatus.OK);
|
||||
@ -60,7 +61,7 @@ public class QiniuController {
|
||||
@Log("上传文件")
|
||||
@PostMapping(value = "/qiNiuContent")
|
||||
public ResponseEntity upload(@RequestParam MultipartFile file){
|
||||
//if(ObjectUtil.isNotNull(file)) throw new BadRequestException("演示环境禁止操作");
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
QiniuContent qiniuContent = qiNiuService.upload(file,qiNiuService.find());
|
||||
Map map = new HashMap(3);
|
||||
map.put("id",qiniuContent.getId());
|
||||
@ -90,7 +91,7 @@ public class QiniuController {
|
||||
@Log("下载文件")
|
||||
@GetMapping(value = "/qiNiuContent/download/{id}")
|
||||
public ResponseEntity download(@PathVariable Long id){
|
||||
//if(id > 0) throw new BadRequestException("演示环境禁止操作");
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
Map map = new HashMap(1);
|
||||
map.put("url", qiNiuService.download(qiNiuService.findByContentId(id),qiNiuService.find()));
|
||||
return new ResponseEntity(map,HttpStatus.OK);
|
||||
@ -105,7 +106,7 @@ public class QiniuController {
|
||||
@Log("删除文件")
|
||||
@DeleteMapping(value = "/qiNiuContent/{id}")
|
||||
public ResponseEntity delete(@PathVariable Long id){
|
||||
//if(id > 0) throw new BadRequestException("演示环境禁止操作");
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
qiNiuService.delete(qiNiuService.findByContentId(id),qiNiuService.find());
|
||||
return new ResponseEntity(HttpStatus.OK);
|
||||
}
|
||||
@ -118,7 +119,7 @@ public class QiniuController {
|
||||
@Log("删除图片")
|
||||
@DeleteMapping(value = "/qiNiuContent")
|
||||
public ResponseEntity deleteAll(@RequestBody Long[] ids) {
|
||||
// if(ArrayUtil.isNotEmpty(ids)) throw new BadRequestException("演示环境禁止操作");
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
qiNiuService.deleteAll(ids, qiNiuService.find());
|
||||
return new ResponseEntity(HttpStatus.OK);
|
||||
}
|
||||
|
Reference in New Issue
Block a user