From a33898c2a0374c249862a2b996e33352e30c8caf Mon Sep 17 00:00:00 2001 From: KonBAI <1527468660@qq.com> Date: 星期六, 02 四月 2022 13:02:56 +0800 Subject: [PATCH] !167 update 修改角色"菜单树选择项"和"部门树选择项"是否关联显示字段为Boolean类型 * fix 修改 postgres sql脚本,处理角色表字段类型错误问题。 * fix 修复postgreSQL新增或更新角色信息报错。修改角色"菜单树选择项"和"部门树选择项"是否关联显示字段为Boolean类型。 --- ruoyi-demo/src/main/java/com/ruoyi/demo/controller/RedisPubSubController.java | 42 ++++++++++++++++++++---------------------- 1 files changed, 20 insertions(+), 22 deletions(-) diff --git a/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/RedisPubSubController.java b/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/RedisPubSubController.java index d49d6ee..99c3131 100644 --- a/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/RedisPubSubController.java +++ b/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/RedisPubSubController.java @@ -1,11 +1,11 @@ package com.ruoyi.demo.controller; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.redis.RedisCache; +import com.ruoyi.common.core.domain.R; +import com.ruoyi.common.utils.redis.RedisUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; import lombok.RequiredArgsConstructor; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -16,29 +16,27 @@ * @author Lion Li */ @Api(value = "Redis鍙戝竷璁㈤槄 婕旂ず妗堜緥", tags = {"Redis鍙戝竷璁㈤槄"}) -@RequiredArgsConstructor(onConstructor_ = @Autowired) +@RequiredArgsConstructor @RestController @RequestMapping("/demo/redis/pubsub") public class RedisPubSubController { - private final RedisCache redisCache; + @ApiOperation("鍙戝竷娑堟伅") + @GetMapping("/pub") + public R<Void> pub(@ApiParam("閫氶亾Key") String key, @ApiParam("鍙戦�佸唴瀹�") String value) { + RedisUtils.publish(key, value, consumer -> { + System.out.println("鍙戝竷閫氶亾 => " + key + ", 鍙戦�佸�� => " + value); + }); + return R.ok("鎿嶄綔鎴愬姛"); + } - @ApiOperation("鍙戝竷娑堟伅") - @GetMapping("/pub") - public AjaxResult<Void> pub(String key, String value){ - redisCache.publish(key, value, consumer -> { - System.out.println("鍙戝竷閫氶亾 => " + key + ", 鍙戦�佸�� => " + value); - }); - return AjaxResult.success("鎿嶄綔鎴愬姛"); - } - - @ApiOperation("璁㈤槄娑堟伅") - @GetMapping("/sub") - public AjaxResult<Void> sub(String key){ - redisCache.subscribe(key, String.class, msg -> { - System.out.println("璁㈤槄閫氶亾 => " + key + ", 鎺ユ敹鍊� => " + msg); - }); - return AjaxResult.success("鎿嶄綔鎴愬姛"); - } + @ApiOperation("璁㈤槄娑堟伅") + @GetMapping("/sub") + public R<Void> sub(@ApiParam("閫氶亾Key") String key) { + RedisUtils.subscribe(key, String.class, msg -> { + System.out.println("璁㈤槄閫氶亾 => " + key + ", 鎺ユ敹鍊� => " + msg); + }); + return R.ok("鎿嶄綔鎴愬姛"); + } } -- Gitblit v1.9.3