修复 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

@ -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());

View File

@ -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)