修复 redis存时间的问题
This commit is contained in:
@ -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);
|
||||
|
@ -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();
|
||||
|
@ -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());
|
||||
|
@ -31,13 +31,12 @@ public class SubscribeHandler extends AbstractHandler {
|
||||
WxSessionManager sessionManager) throws WxErrorException {
|
||||
|
||||
|
||||
String str = "你好,欢迎关注yshop!";
|
||||
YxWechatReply wechatReply = yxWechatReplyService.isExist("subscribe");
|
||||
if(ObjectUtil.isNull(wechatReply)){
|
||||
|
||||
if(!ObjectUtil.isNull(wechatReply)){
|
||||
str = JSONObject.parseObject(wechatReply.getData()).getString("content");
|
||||
}
|
||||
|
||||
|
||||
String str = JSONObject.parseObject(wechatReply.getData()).getString("content");
|
||||
try {
|
||||
WxMpXmlOutMessage msg= WxMpXmlOutMessage.TEXT()
|
||||
.content(str)
|
||||
|
Reference in New Issue
Block a user