delete 演示

This commit is contained in:
hupeng
2019-12-03 10:12:58 +08:00
parent a5db7e4a76
commit 7fb6f36016
15 changed files with 43 additions and 38 deletions

View File

@ -60,7 +60,7 @@ public class YxArticleController {
@DeleteMapping(value = "/yxArticle/{id}")
@PreAuthorize("hasAnyRole('ADMIN','YXARTICLE_ALL','YXARTICLE_DELETE')")
public ResponseEntity delete(@PathVariable Integer id){
if(id > 0) throw new BadRequestException("演示环境禁止操作");
//if(id > 0) throw new BadRequestException("演示环境禁止操作");
yxArticleService.delete(id);
return new ResponseEntity(HttpStatus.OK);
}
@ -69,7 +69,7 @@ public class YxArticleController {
@GetMapping(value = "/yxArticle/publish/{id}")
@PreAuthorize("hasAnyRole('ADMIN','YXARTICLE_ALL','YXARTICLE_DELETE')")
public ResponseEntity publish(@PathVariable Integer id) throws Exception{
if(id > 0) throw new BadRequestException("演示环境禁止操作");
//if(id > 0) throw new BadRequestException("演示环境禁止操作");
YxArticleDTO yxArticleDTO= yxArticleService.findById(id);
yxArticleService.uploadNews(yxArticleDTO);
return new ResponseEntity(HttpStatus.OK);

View File

@ -47,7 +47,7 @@ public class YxCacheController {
@PostMapping(value = "/yxCache")
@PreAuthorize("hasAnyRole('ADMIN','YXCACHE_ALL','YXCACHE_CREATE')")
public ResponseEntity create( @RequestBody String jsonStr){
if(StrUtil.isNotEmpty(jsonStr)) throw new BadRequestException("演示环境禁止操作");
//if(StrUtil.isNotEmpty(jsonStr)) throw new BadRequestException("演示环境禁止操作");
JSONObject jsonObject = JSON.parseObject(jsonStr);
String jsonButton = jsonObject.get("buttons").toString();
YxCache yxCache = new YxCache();

View File

@ -41,7 +41,7 @@ public class YxWechatReplyController {
@PostMapping(value = "/yxWechatReply")
@PreAuthorize("hasAnyRole('ADMIN','YXWECHATREPLY_ALL','YXWECHATREPLY_CREATE')")
public ResponseEntity create(@RequestBody String jsonStr){
if(StrUtil.isNotEmpty(jsonStr)) throw new BadRequestException("演示环境禁止操作");
//if(StrUtil.isNotEmpty(jsonStr)) throw new BadRequestException("演示环境禁止操作");
JSONObject jsonObject = JSON.parseObject(jsonStr);
YxWechatReply yxWechatReply = new YxWechatReply();
YxWechatReply isExist = yxWechatReplyService.isExist(jsonObject.get("key").toString());