| | |
| | | import cn.hutool.core.util.IdUtil; |
| | | import cn.hutool.core.util.RandomUtil; |
| | | import com.ruoyi.common.annotation.Anonymous; |
| | | import com.ruoyi.common.constant.CacheConstants; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.enums.CaptchaType; |
| | |
| | | if (smsProperties.getEnabled()) { |
| | | R.fail("å½åç³»ç»æ²¡æå¼å¯çä¿¡åè½ï¼"); |
| | | } |
| | | String key = Constants.CAPTCHA_CODE_KEY + phonenumber; |
| | | String key = CacheConstants.CAPTCHA_CODE_KEY + phonenumber; |
| | | String code = RandomUtil.randomNumbers(4); |
| | | RedisUtils.setCacheObject(key, code, Duration.ofMinutes(Constants.CAPTCHA_EXPIRATION)); |
| | | // éªè¯ç 模æ¿id èªè¡å¤ç (æ¥æ°æ®åºæåæ»åå¯) |
| | |
| | | } |
| | | // ä¿åéªè¯ç ä¿¡æ¯ |
| | | String uuid = IdUtil.simpleUUID(); |
| | | String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid; |
| | | String verifyKey = CacheConstants.CAPTCHA_CODE_KEY + uuid; |
| | | // çæéªè¯ç |
| | | CaptchaType captchaType = captchaProperties.getType(); |
| | | boolean isMath = CaptchaType.MATH == captchaType; |
| | |
| | | package com.ruoyi.web.controller.monitor; |
| | | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.ruoyi.common.constant.CacheConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.domain.SysCache; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.data.redis.connection.RedisServerCommands; |
| | | import org.springframework.data.redis.core.RedisCallback; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | |
| | |
| | | public class CacheController { |
| | | |
| | | private final RedisTemplate<String, String> redisTemplate; |
| | | |
| | | private final static List<SysCache> CACHES = new ArrayList<>(); |
| | | |
| | | static { |
| | | CACHES.add(new SysCache(CacheConstants.LOGIN_TOKEN_KEY, "ç¨æ·ä¿¡æ¯")); |
| | | CACHES.add(new SysCache(CacheConstants.ONLINE_TOKEN_KEY, "å¨çº¿ç¨æ·")); |
| | | CACHES.add(new SysCache(CacheConstants.LOGIN_ERROR, "ç»éé误")); |
| | | CACHES.add(new SysCache(CacheConstants.SYS_CONFIG_KEY, "é
置信æ¯")); |
| | | CACHES.add(new SysCache(CacheConstants.SYS_DICT_KEY, "æ°æ®åå
¸")); |
| | | CACHES.add(new SysCache(CacheConstants.CAPTCHA_CODE_KEY, "éªè¯ç ")); |
| | | CACHES.add(new SysCache(CacheConstants.REPEAT_SUBMIT_KEY, "é²éæäº¤")); |
| | | CACHES.add(new SysCache(CacheConstants.RATE_LIMIT_KEY, "éæµå¤ç")); |
| | | } |
| | | |
| | | @ApiOperation("è·åç¼åçæ§è¯¦ç»ä¿¡æ¯") |
| | | @SaCheckPermission("monitor:cache:list") |
| | |
| | | result.put("commandStats", pieList); |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @ApiOperation("è·åç¼ååç§°å表") |
| | | @SaCheckPermission("monitor:cache:list") |
| | | @GetMapping("/getNames") |
| | | public R<List<SysCache>> cache() { |
| | | return R.ok(CACHES); |
| | | } |
| | | |
| | | @ApiOperation("è·åKEYSåºäºç¼åå") |
| | | @SaCheckPermission("monitor:cache:list") |
| | | @GetMapping("/getKeys/{cacheName}") |
| | | public R<Set<String>> getCacheKeys(@PathVariable String cacheName) { |
| | | Set<String> cacheKyes = redisTemplate.keys(cacheName + "*"); |
| | | return R.ok(cacheKyes); |
| | | } |
| | | |
| | | @ApiOperation("è·åå¼åºäºç¼ååä¸KEY") |
| | | @SaCheckPermission("monitor:cache:list") |
| | | @GetMapping("/getValue/{cacheName}/{cacheKey}") |
| | | public R<SysCache> getCacheValue(@PathVariable String cacheName, @PathVariable String cacheKey) { |
| | | String cacheValue = redisTemplate.opsForValue().get(cacheKey); |
| | | SysCache sysCache = new SysCache(cacheName, cacheKey, cacheValue); |
| | | return R.ok(sysCache); |
| | | } |
| | | |
| | | @ApiOperation("æ¸
空ç¼åå") |
| | | @SaCheckPermission("monitor:cache:list") |
| | | @DeleteMapping("/clearCacheName/{cacheName}") |
| | | public R<Void> clearCacheName(@PathVariable String cacheName) { |
| | | Collection<String> cacheKeys = redisTemplate.keys(cacheName + "*"); |
| | | redisTemplate.delete(cacheKeys); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation("æ¸
空ç¼åKEY") |
| | | @SaCheckPermission("monitor:cache:list") |
| | | @DeleteMapping("/clearCacheKey/{cacheKey}") |
| | | public R<Void> clearCacheKey(@PathVariable String cacheKey) { |
| | | redisTemplate.delete(cacheKey); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation("æ¸
空ææç¼å") |
| | | @SaCheckPermission("monitor:cache:list") |
| | | @DeleteMapping("/clearCacheAll") |
| | | public R<Void> clearCacheAll() { |
| | | Collection<String> cacheKeys = redisTemplate.keys("*"); |
| | | redisTemplate.delete(cacheKeys); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | import cn.dev33.satoken.stp.StpUtil; |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.constant.CacheConstants; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.domain.dto.UserOnlineDTO; |
| | |
| | | List<String> keys = StpUtil.searchTokenValue("", -1, 0); |
| | | List<UserOnlineDTO> userOnlineDTOList = new ArrayList<>(); |
| | | for (String key : keys) { |
| | | String token = key.replace(Constants.LOGIN_TOKEN_KEY, ""); |
| | | String token = key.replace(CacheConstants.LOGIN_TOKEN_KEY, ""); |
| | | // 妿已ç»è¿æå踢ä¸çº¿ |
| | | if (StpUtil.stpLogic.getTokenActivityTimeoutByToken(token) < 0) { |
| | | continue; |
| | | } |
| | | userOnlineDTOList.add(RedisUtils.getCacheObject(Constants.ONLINE_TOKEN_KEY + token)); |
| | | userOnlineDTOList.add(RedisUtils.getCacheObject(CacheConstants.ONLINE_TOKEN_KEY + token)); |
| | | } |
| | | if (StringUtils.isNotEmpty(ipaddr) && StringUtils.isNotEmpty(userName)) { |
| | | userOnlineDTOList = StreamUtils.filter(userOnlineDTOList, userOnline -> |
| | |
| | | package com.ruoyi.common.annotation;
|
| | |
|
| | | import com.ruoyi.common.constant.Constants;
|
| | | import com.ruoyi.common.enums.LimitType;
|
| | |
|
| | | import java.lang.annotation.*;
|
| | |
|
| | | /**
|
| | | * éæµæ³¨è§£
|
| | | *
|
| | | * @author Lion Li
|
| | | */
|
| | | @Target(ElementType.METHOD)
|
| | | @Retention(RetentionPolicy.RUNTIME)
|
| | | @Documented
|
| | | public @interface RateLimiter {
|
| | | /**
|
| | | * éæµkey
|
| | | */
|
| | | String key() default Constants.RATE_LIMIT_KEY;
|
| | |
|
| | | /**
|
| | | * éæµæ¶é´,åä½ç§
|
| | | */
|
| | | int time() default 60;
|
| | |
|
| | | /**
|
| | | * éæµæ¬¡æ°
|
| | | */
|
| | | int count() default 100;
|
| | |
|
| | | /**
|
| | | * éæµç±»å
|
| | | */
|
| | | LimitType limitType() default LimitType.DEFAULT;
|
| | | }
|
| | | package com.ruoyi.common.annotation; |
| | | |
| | | import com.ruoyi.common.constant.CacheConstants; |
| | | import com.ruoyi.common.enums.LimitType; |
| | | |
| | | import java.lang.annotation.*; |
| | | |
| | | /** |
| | | * éæµæ³¨è§£ |
| | | * |
| | | * @author Lion Li |
| | | */ |
| | | @Target(ElementType.METHOD) |
| | | @Retention(RetentionPolicy.RUNTIME) |
| | | @Documented |
| | | public @interface RateLimiter { |
| | | /** |
| | | * éæµkey |
| | | */ |
| | | String key() default CacheConstants.RATE_LIMIT_KEY; |
| | | |
| | | /** |
| | | * éæµæ¶é´,åä½ç§ |
| | | */ |
| | | int time() default 60; |
| | | |
| | | /** |
| | | * éæµæ¬¡æ° |
| | | */ |
| | | int count() default 100; |
| | | |
| | | /** |
| | | * éæµç±»å |
| | | */ |
| | | LimitType limitType() default LimitType.DEFAULT; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.constant; |
| | | |
| | | /** |
| | | * ç¼åçkey 常é |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface CacheConstants { |
| | | |
| | | /** |
| | | * ç»å½ç¨æ· redis key |
| | | */ |
| | | String LOGIN_TOKEN_KEY = "Authorization:login:token:"; |
| | | |
| | | /** |
| | | * å¨çº¿ç¨æ· redis key |
| | | */ |
| | | String ONLINE_TOKEN_KEY = "online_tokens:"; |
| | | |
| | | /** |
| | | * ç»éé误 redis key |
| | | */ |
| | | String LOGIN_ERROR = "login_error:"; |
| | | |
| | | /** |
| | | * éªè¯ç redis key |
| | | */ |
| | | String CAPTCHA_CODE_KEY = "captcha_codes:"; |
| | | |
| | | /** |
| | | * åæ°ç®¡ç cache key |
| | | */ |
| | | String SYS_CONFIG_KEY = "sys_config:"; |
| | | |
| | | /** |
| | | * åå
¸ç®¡ç cache key |
| | | */ |
| | | String SYS_DICT_KEY = "sys_dict:"; |
| | | |
| | | /** |
| | | * é²éæäº¤ redis key |
| | | */ |
| | | String REPEAT_SUBMIT_KEY = "repeat_submit:"; |
| | | |
| | | /** |
| | | * éæµ redis key |
| | | */ |
| | | String RATE_LIMIT_KEY = "rate_limit:"; |
| | | } |
| | |
| | | String LOGIN_FAIL = "Error"; |
| | | |
| | | /** |
| | | * éªè¯ç redis key |
| | | */ |
| | | String CAPTCHA_CODE_KEY = "captcha_codes:"; |
| | | |
| | | /** |
| | | * ç»å½ç¨æ· redis key |
| | | */ |
| | | String LOGIN_TOKEN_KEY = "Authorization:login:token:"; |
| | | |
| | | /** |
| | | * å¨çº¿ç¨æ· redis key |
| | | */ |
| | | String ONLINE_TOKEN_KEY = "online_tokens:"; |
| | | |
| | | /** |
| | | * é²éæäº¤ redis key |
| | | */ |
| | | String REPEAT_SUBMIT_KEY = "repeat_submit:"; |
| | | |
| | | /** |
| | | * éæµ redis key |
| | | */ |
| | | String RATE_LIMIT_KEY = "rate_limit:"; |
| | | |
| | | /** |
| | | * éªè¯ç æææï¼åéï¼ |
| | | */ |
| | | Integer CAPTCHA_EXPIRATION = 2; |
| | | |
| | | /** |
| | | * ç»éé误 redis key |
| | | */ |
| | | String LOGIN_ERROR = "login_error:"; |
| | | |
| | | /** |
| | | * ç»å½éè¯¯æ¬¡æ° |
| | |
| | | * 令ç |
| | | */ |
| | | String TOKEN = "token"; |
| | | |
| | | /** |
| | | * 令çåç¼ |
| | | */ |
| | | String LOGIN_USER_KEY = "login_user_key"; |
| | | |
| | | /** |
| | | * åæ°ç®¡ç cache key |
| | | */ |
| | | String SYS_CONFIG_KEY = "sys_config:"; |
| | | |
| | | /** |
| | | * åå
¸ç®¡ç cache key |
| | | */ |
| | | String SYS_DICT_KEY = "sys_dict:"; |
| | | |
| | | } |
| | | |
| | |
| | | import cn.hutool.core.convert.Convert; |
| | | import cn.hutool.extra.servlet.ServletUtil; |
| | | import cn.hutool.http.HttpStatus; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import lombok.AccessLevel; |
| | | import lombok.NoArgsConstructor; |
| | | import org.springframework.http.MediaType; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.servlet.http.HttpSession; |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLDecoder; |
| | | import java.net.URLEncoder; |
| | | import java.nio.charset.StandardCharsets; |
| | | |
| | | /** |
| | |
| | | return getClientIP(getRequest()); |
| | | } |
| | | |
| | | /** |
| | | * å
容ç¼ç |
| | | * |
| | | * @param str å
容 |
| | | * @return ç¼ç åçå
容 |
| | | */ |
| | | public static String urlEncode(String str) { |
| | | try { |
| | | return URLEncoder.encode(str, Constants.UTF8); |
| | | } catch (UnsupportedEncodingException e) { |
| | | return StringUtils.EMPTY; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å
容解ç |
| | | * |
| | | * @param str å
容 |
| | | * @return è§£ç åçå
容 |
| | | */ |
| | | public static String urlDecode(String str) { |
| | | try { |
| | | return URLDecoder.decode(str, Constants.UTF8); |
| | | } catch (UnsupportedEncodingException e) { |
| | | return StringUtils.EMPTY; |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.ruoyi.common.annotation.RepeatSubmit; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.constant.CacheConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.JsonUtils; |
| | |
| | | |
| | | submitKey = SecureUtil.md5(submitKey + ":" + nowParams); |
| | | // å¯ä¸æ è¯ï¼æå®key + url + æ¶æ¯å¤´ï¼ |
| | | String cacheRepeatKey = Constants.REPEAT_SUBMIT_KEY + url + submitKey; |
| | | String cacheRepeatKey = CacheConstants.REPEAT_SUBMIT_KEY + url + submitKey; |
| | | String key = RedisUtils.getCacheObject(cacheRepeatKey); |
| | | if (key == null) { |
| | | RedisUtils.setCacheObject(cacheRepeatKey, "", Duration.ofMillis(interval)); |
| | |
| | | import cn.dev33.satoken.stp.SaLoginModel; |
| | | import cn.hutool.http.useragent.UserAgent; |
| | | import cn.hutool.http.useragent.UserAgentUtil; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.constant.CacheConstants; |
| | | import com.ruoyi.common.core.domain.dto.UserOnlineDTO; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.common.enums.UserType; |
| | |
| | | dto.setTokenId(tokenValue); |
| | | dto.setUserName(user.getUsername()); |
| | | dto.setDeptName(user.getDeptName()); |
| | | RedisUtils.setCacheObject(Constants.ONLINE_TOKEN_KEY + tokenValue, dto, Duration.ofSeconds(tokenConfig.getTimeout())); |
| | | RedisUtils.setCacheObject(CacheConstants.ONLINE_TOKEN_KEY + tokenValue, dto, Duration.ofSeconds(tokenConfig.getTimeout())); |
| | | log.info("user doLogin, userId:{}, token:{}", loginId, tokenValue); |
| | | } else if (userType == UserType.APP_USER) { |
| | | // app端 èªè¡æ ¹æ®ä¸å¡ç¼å |
| | |
| | | */ |
| | | @Override |
| | | public void doLogout(String loginType, Object loginId, String tokenValue) { |
| | | RedisUtils.deleteObject(Constants.ONLINE_TOKEN_KEY + tokenValue); |
| | | RedisUtils.deleteObject(CacheConstants.ONLINE_TOKEN_KEY + tokenValue); |
| | | log.info("user doLogout, userId:{}, token:{}", loginId, tokenValue); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public void doKickout(String loginType, Object loginId, String tokenValue) { |
| | | RedisUtils.deleteObject(Constants.ONLINE_TOKEN_KEY + tokenValue); |
| | | RedisUtils.deleteObject(CacheConstants.ONLINE_TOKEN_KEY + tokenValue); |
| | | log.info("user doLogoutByLoginId, userId:{}, token:{}", loginId, tokenValue); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public void doReplaced(String loginType, Object loginId, String tokenValue) { |
| | | RedisUtils.deleteObject(Constants.ONLINE_TOKEN_KEY + tokenValue); |
| | | RedisUtils.deleteObject(CacheConstants.ONLINE_TOKEN_KEY + tokenValue); |
| | | log.info("user doReplaced, userId:{}, token:{}", loginId, tokenValue); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.system.domain; |
| | | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | /** |
| | | * ç¼åä¿¡æ¯ |
| | | * |
| | | * @author Lion Li |
| | | */ |
| | | @Data |
| | | @NoArgsConstructor |
| | | @ApiModel("ç¼åä¿¡æ¯") |
| | | public class SysCache { |
| | | |
| | | /** |
| | | * ç¼ååç§° |
| | | */ |
| | | @ApiModelProperty(value = "ç¼ååç§°") |
| | | private String cacheName = ""; |
| | | |
| | | /** |
| | | * ç¼åé®å |
| | | */ |
| | | @ApiModelProperty(value = "ç¼åé®å") |
| | | private String cacheKey = ""; |
| | | |
| | | /** |
| | | * ç¼åå
容 |
| | | */ |
| | | @ApiModelProperty(value = "ç¼åå
容") |
| | | private String cacheValue = ""; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark = ""; |
| | | |
| | | public SysCache(String cacheName, String remark) { |
| | | this.cacheName = cacheName; |
| | | this.remark = remark; |
| | | } |
| | | |
| | | public SysCache(String cacheName, String cacheKey, String cacheValue) { |
| | | this.cacheName = StringUtils.replace(cacheName, ":", ""); |
| | | this.cacheKey = StringUtils.replace(cacheKey, cacheName, ""); |
| | | this.cacheValue = cacheValue; |
| | | } |
| | | |
| | | } |
| | |
| | | import cn.dev33.satoken.stp.StpUtil; |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.ruoyi.common.constant.CacheConstants; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.core.domain.dto.RoleDTO; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | |
| | | * æ ¡éªçä¿¡éªè¯ç |
| | | */ |
| | | private boolean validateSmsCode(String phonenumber, String smsCode, HttpServletRequest request) { |
| | | String code = RedisUtils.getCacheObject(Constants.CAPTCHA_CODE_KEY + phonenumber); |
| | | String code = RedisUtils.getCacheObject(CacheConstants.CAPTCHA_CODE_KEY + phonenumber); |
| | | if (StringUtils.isBlank(code)) { |
| | | asyncService.recordLogininfor(phonenumber, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire"), request); |
| | | throw new CaptchaExpireException(); |
| | |
| | | * @param uuid å¯ä¸æ è¯ |
| | | */ |
| | | public void validateCaptcha(String username, String code, String uuid, HttpServletRequest request) { |
| | | String verifyKey = Constants.CAPTCHA_CODE_KEY + StringUtils.defaultString(uuid, ""); |
| | | String verifyKey = CacheConstants.CAPTCHA_CODE_KEY + StringUtils.defaultString(uuid, ""); |
| | | String captcha = RedisUtils.getCacheObject(verifyKey); |
| | | RedisUtils.deleteObject(verifyKey); |
| | | if (captcha == null) { |
| | |
| | | */ |
| | | private void checkLogin(LoginType loginType, String username, Supplier<Boolean> supplier) { |
| | | HttpServletRequest request = ServletUtils.getRequest(); |
| | | String errorKey = Constants.LOGIN_ERROR + username; |
| | | String errorKey = CacheConstants.LOGIN_ERROR + username; |
| | | Integer errorLimitTime = Constants.LOGIN_ERROR_LIMIT_TIME; |
| | | Integer setErrorNumber = Constants.LOGIN_ERROR_NUMBER; |
| | | String loginFail = Constants.LOGIN_FAIL; |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import cn.dev33.satoken.secure.BCrypt; |
| | | import com.ruoyi.common.constant.CacheConstants; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | |
| | | * @return ç»æ |
| | | */ |
| | | public void validateCaptcha(String username, String code, String uuid, HttpServletRequest request) { |
| | | String verifyKey = Constants.CAPTCHA_CODE_KEY + StringUtils.defaultString(uuid, ""); |
| | | String verifyKey = CacheConstants.CAPTCHA_CODE_KEY + StringUtils.defaultString(uuid, ""); |
| | | String captcha = RedisUtils.getCacheObject(verifyKey); |
| | | RedisUtils.deleteObject(verifyKey); |
| | | if (captcha == null) { |
| | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.constant.CacheConstants; |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.core.domain.PageQuery; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | |
| | | */ |
| | | @Override |
| | | public void clearConfigCache() { |
| | | Collection<String> keys = RedisUtils.keys(Constants.SYS_CONFIG_KEY + "*"); |
| | | Collection<String> keys = RedisUtils.keys(CacheConstants.SYS_CONFIG_KEY + "*"); |
| | | RedisUtils.deleteObject(keys); |
| | | } |
| | | |
| | |
| | | * @return ç¼åé®key |
| | | */ |
| | | private String getCacheKey(String configKey) { |
| | | return Constants.SYS_CONFIG_KEY + configKey; |
| | | return CacheConstants.SYS_CONFIG_KEY + configKey; |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.constant.CacheConstants; |
| | | import com.ruoyi.common.core.domain.PageQuery; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | |
| | | * @return ç¼åé®key |
| | | */ |
| | | String getCacheKey(String configKey) { |
| | | return Constants.SYS_DICT_KEY + configKey; |
| | | return CacheConstants.SYS_DICT_KEY + configKey; |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.constant.CacheConstants; |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.core.domain.PageQuery; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | |
| | | */ |
| | | @Override |
| | | public void clearDictCache() { |
| | | Collection<String> keys = RedisUtils.keys(Constants.SYS_DICT_KEY + "*"); |
| | | Collection<String> keys = RedisUtils.keys(CacheConstants.SYS_DICT_KEY + "*"); |
| | | RedisUtils.deleteObject(keys); |
| | | } |
| | | |
| | |
| | | * @return ç¼åé®key |
| | | */ |
| | | String getCacheKey(String configKey) { |
| | | return Constants.SYS_DICT_KEY + configKey; |
| | | return CacheConstants.SYS_DICT_KEY + configKey; |
| | | } |
| | | } |
| | |
| | | method: 'get'
|
| | | })
|
| | | }
|
| | |
|
| | | // æ¥è¯¢ç¼ååç§°å表
|
| | | export function listCacheName() {
|
| | | return request({
|
| | | url: '/monitor/cache/getNames',
|
| | | method: 'get'
|
| | | })
|
| | | }
|
| | |
|
| | | // æ¥è¯¢ç¼åé®åå表
|
| | | export function listCacheKey(cacheName) {
|
| | | return request({
|
| | | url: '/monitor/cache/getKeys/' + cacheName,
|
| | | method: 'get'
|
| | | })
|
| | | }
|
| | |
|
| | | // æ¥è¯¢ç¼åå
容
|
| | | export function getCacheValue(cacheName, cacheKey) {
|
| | | return request({
|
| | | url: '/monitor/cache/getValue/' + cacheName + '/' + cacheKey,
|
| | | method: 'get'
|
| | | })
|
| | | }
|
| | |
|
| | | // æ¸
çæå®åç§°ç¼å
|
| | | export function clearCacheName(cacheName) {
|
| | | return request({
|
| | | url: '/monitor/cache/clearCacheName/' + cacheName,
|
| | | method: 'delete'
|
| | | })
|
| | | }
|
| | |
|
| | | // æ¸
çæå®é®åç¼å
|
| | | export function clearCacheKey(cacheKey) {
|
| | | return request({
|
| | | url: '/monitor/cache/clearCacheKey/' + cacheKey,
|
| | | method: 'delete'
|
| | | })
|
| | | }
|
| | |
|
| | | // æ¸
çå
¨é¨ç¼å
|
| | | export function clearCacheAll() {
|
| | | return request({
|
| | | url: '/monitor/cache/clearCacheAll',
|
| | | method: 'delete'
|
| | | })
|
| | | }
|
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1656035183065" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3395" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); } |
| | | </style></defs><path d="M958.88 730.06H65.12c-18.28 0-33.12-14.82-33.12-33.12V68.91c0-18.29 14.83-33.12 33.12-33.12h893.77c18.28 0 33.12 14.82 33.12 33.12v628.03c-0.01 18.3-14.84 33.12-33.13 33.12zM98.23 663.83h827.53v-561.8H98.23v561.8z" p-id="3396"></path><path d="M512 954.55c-18.28 0-33.12-14.82-33.12-33.12V733.92c0-18.29 14.83-33.12 33.12-33.12s33.12 14.82 33.12 33.12v187.51c0 18.3-14.84 33.12-33.12 33.12z" p-id="3397"></path><path d="M762.01 988.21H261.99c-18.28 0-33.12-14.82-33.12-33.12 0-18.29 14.83-33.12 33.12-33.12h500.03c18.28 0 33.12 14.82 33.12 33.12-0.01 18.29-14.84 33.12-33.13 33.12zM514.74 578.55c-21.63 0-43.31-3.87-64.21-11.65-45.95-17.13-82.49-51.13-102.86-95.74-5.07-11.08-0.19-24.19 10.89-29.26 11.08-5.09 24.19-0.18 29.26 10.91 15.5 33.88 43.25 59.7 78.14 72.71 34.93 12.99 72.79 11.64 106.66-3.85 33.22-15.17 58.8-42.26 72.03-76.3 4.42-11.37 17.21-17.01 28.57-12.58 11.36 4.42 16.99 17.22 12.57 28.58-17.42 44.82-51.1 80.5-94.82 100.47-24.34 11.12-50.25 16.71-76.23 16.71z" p-id="3398"></path><path d="M325.27 528.78c-1.66 0-3.34-0.18-5.02-0.57-11.88-2.77-19.28-14.63-16.49-26.51l18.84-81c1.34-5.82 5-10.84 10.13-13.92 5.09-3.09 11.3-3.96 17.03-2.41l80.51 21.43c11.79 3.14 18.8 15.23 15.67 27.02-3.15 11.79-15.42 18.75-27.02 15.65l-58.49-15.57-13.69 58.81c-2.37 10.2-11.45 17.07-21.47 17.07zM360.8 351.01c-2.65 0-5.37-0.49-8-1.51-11.36-4.41-16.99-17.21-12.59-28.57 17.4-44.79 51.06-80.47 94.8-100.48 92.15-42.06 201.25-1.39 243.31 90.68 5.07 11.08 0.19 24.19-10.89 29.26-11.13 5.07-24.19 0.17-29.26-10.91-31.97-69.91-114.9-100.82-184.79-68.86-33.22 15.19-58.8 42.28-71.99 76.29-3.41 8.74-11.75 14.1-20.59 14.1z" p-id="3399"></path><path d="M684.68 376.74c-1.47 0-2.95-0.15-4.42-0.44l-81.61-16.68c-11.94-2.45-19.64-14.11-17.21-26.06 2.44-11.96 14.1-19.64 26.04-17.22l59.29 12.12 10.23-59.5c2.05-12 13.52-20.19 25.48-18.01 12.03 2.06 20.09 13.48 18.02 25.5l-14.08 81.96a22.089 22.089 0 0 1-9.29 14.49c-3.7 2.51-8.03 3.84-12.45 3.84z" p-id="3400"></path></svg> |
| | |
| | | import echarts from "echarts";
|
| | |
|
| | | export default {
|
| | | name: "Server",
|
| | | name: "Cache",
|
| | | data() {
|
| | | return {
|
| | | // ç»è®¡å½ä»¤ä¿¡æ¯
|
| | |
| | | // 使ç¨å
å
|
| | | usedmemory: null,
|
| | | // cacheä¿¡æ¯
|
| | | cache: [],
|
| | | };
|
| | | cache: []
|
| | | }
|
| | | },
|
| | | created() {
|
| | | this.getList();
|
| | |
| | | data: response.data.commandStats,
|
| | | animationEasing: "cubicInOut",
|
| | | animationDuration: 1000,
|
| | | },
|
| | | ],
|
| | | }
|
| | | ]
|
| | | });
|
| | | this.usedmemory = echarts.init(this.$refs.usedmemory, "macarons");
|
| | | this.usedmemory.setOption({
|
| | |
| | | {
|
| | | value: parseFloat(this.cache.info.used_memory_human),
|
| | | name: "å
åæ¶è",
|
| | | },
|
| | | ],
|
| | | },
|
| | | ],
|
| | | }
|
| | | ]
|
| | | }
|
| | | ]
|
| | | });
|
| | | });
|
| | | },
|
| | | // æå¼å è½½å±
|
| | | openLoading() {
|
| | | this.$modal.loading("æ£å¨å è½½ç¼åçæ§æ°æ®ï¼è¯·ç¨åï¼");
|
| | | },
|
| | | },
|
| | | }
|
| | | }
|
| | | };
|
| | | </script>
|
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-row :gutter="10"> |
| | | <el-col :span="8"> |
| | | <el-card style="height: calc(100vh - 125px)"> |
| | | <div slot="header"> |
| | | <span>ç¼åå表</span> |
| | | <el-button |
| | | style="float: right; padding: 3px 0" |
| | | type="text" |
| | | icon="el-icon-refresh-right" |
| | | @click="refreshCacheNames()" |
| | | ></el-button> |
| | | </div> |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="cacheNames" |
| | | :height="tableHeight" |
| | | highlight-current-row |
| | | @row-click="getCacheKeys" |
| | | style="width: 100%" |
| | | > |
| | | <el-table-column |
| | | label="åºå·" |
| | | width="60" |
| | | type="index" |
| | | ></el-table-column> |
| | | |
| | | <el-table-column |
| | | label="ç¼ååç§°" |
| | | align="center" |
| | | prop="cacheName" |
| | | :show-overflow-tooltip="true" |
| | | :formatter="nameFormatter" |
| | | ></el-table-column> |
| | | |
| | | <el-table-column |
| | | label="夿³¨" |
| | | align="center" |
| | | prop="remark" |
| | | :show-overflow-tooltip="true" |
| | | /> |
| | | <el-table-column |
| | | label="æä½" |
| | | width="60" |
| | | align="center" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleClearCacheName(scope.row)" |
| | | ></el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-card> |
| | | </el-col> |
| | | |
| | | <el-col :span="8"> |
| | | <el-card style="height: calc(100vh - 125px)"> |
| | | <div slot="header"> |
| | | <span>é®åå表</span> |
| | | <el-button |
| | | style="float: right; padding: 3px 0" |
| | | type="text" |
| | | icon="el-icon-refresh-right" |
| | | @click="refreshCacheKeys()" |
| | | ></el-button> |
| | | </div> |
| | | <el-table |
| | | v-loading="subLoading" |
| | | :data="cacheKeys" |
| | | :height="tableHeight" |
| | | highlight-current-row |
| | | @row-click="handleCacheValue" |
| | | style="width: 100%" |
| | | > |
| | | <el-table-column |
| | | label="åºå·" |
| | | width="60" |
| | | type="index" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | label="ç¼åé®å" |
| | | align="center" |
| | | :show-overflow-tooltip="true" |
| | | :formatter="keyFormatter" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="æä½" |
| | | width="60" |
| | | align="center" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleClearCacheKey(scope.row)" |
| | | ></el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-card> |
| | | </el-col> |
| | | |
| | | <el-col :span="8"> |
| | | <el-card :bordered="false" style="height: calc(100vh - 125px)"> |
| | | <div slot="header"> |
| | | <span>ç¼åå
容</span> |
| | | <el-button |
| | | style="float: right; padding: 3px 0" |
| | | type="text" |
| | | icon="el-icon-refresh-right" |
| | | @click="handleClearCacheAll()" |
| | | >æ¸
çå
¨é¨</el-button |
| | | > |
| | | </div> |
| | | <el-form :model="cacheForm"> |
| | | <el-row :gutter="32"> |
| | | <el-col :offset="1" :span="22"> |
| | | <el-form-item label="ç¼ååç§°:" prop="cacheName"> |
| | | <el-input v-model="cacheForm.cacheName" :readOnly="true" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :offset="1" :span="22"> |
| | | <el-form-item label="ç¼åé®å:" prop="cacheKey"> |
| | | <el-input v-model="cacheForm.cacheKey" :readOnly="true" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :offset="1" :span="22"> |
| | | <el-form-item label="ç¼åå
容:" prop="cacheValue"> |
| | | <el-input |
| | | v-model="cacheForm.cacheValue" |
| | | type="textarea" |
| | | :rows="8" |
| | | :readOnly="true" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listCacheName, listCacheKey, getCacheValue, clearCacheName, clearCacheKey, clearCacheAll } from "@/api/monitor/cache"; |
| | | |
| | | export default { |
| | | name: "CacheList", |
| | | data() { |
| | | return { |
| | | cacheNames: [], |
| | | cacheKeys: [], |
| | | cacheForm: {}, |
| | | loading: true, |
| | | subLoading: false, |
| | | nowCacheName: "", |
| | | tableHeight: window.innerHeight - 200 |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getCacheNames(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢ç¼ååç§°å表 */ |
| | | getCacheNames() { |
| | | this.loading = true; |
| | | listCacheName().then(response => { |
| | | this.cacheNames = response.data; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | /** å·æ°ç¼ååç§°å表 */ |
| | | refreshCacheNames() { |
| | | this.getCacheNames(); |
| | | this.$modal.msgSuccess("å·æ°ç¼åå表æå"); |
| | | }, |
| | | /** æ¸
çæå®åç§°ç¼å */ |
| | | handleClearCacheName(row) { |
| | | clearCacheName(row.cacheName).then(response => { |
| | | this.$modal.msgSuccess("æ¸
çç¼ååç§°[" + this.nowCacheName + "]æå"); |
| | | this.getCacheKeys(); |
| | | }); |
| | | }, |
| | | /** æ¥è¯¢ç¼åé®åå表 */ |
| | | getCacheKeys(row) { |
| | | const cacheName = row !== undefined ? row.cacheName : this.nowCacheName; |
| | | if (cacheName === "") { |
| | | return; |
| | | } |
| | | this.subLoading = true; |
| | | listCacheKey(cacheName).then(response => { |
| | | this.cacheKeys = response.data; |
| | | this.subLoading = false; |
| | | this.nowCacheName = cacheName; |
| | | }); |
| | | }, |
| | | /** å·æ°ç¼åé®åå表 */ |
| | | refreshCacheKeys() { |
| | | this.getCacheKeys(); |
| | | this.$modal.msgSuccess("å·æ°é®åå表æå"); |
| | | }, |
| | | /** æ¸
çæå®é®åç¼å */ |
| | | handleClearCacheKey(cacheKey) { |
| | | clearCacheKey(cacheKey).then(response => { |
| | | this.$modal.msgSuccess("æ¸
çç¼åé®å[" + cacheKey + "]æå"); |
| | | this.getCacheKeys(); |
| | | }); |
| | | }, |
| | | /** å表åç¼å»é¤ */ |
| | | nameFormatter(row) { |
| | | return row.cacheName.replace(":", ""); |
| | | }, |
| | | /** é®ååç¼å»é¤ */ |
| | | keyFormatter(cacheKey) { |
| | | return cacheKey.replace(this.nowCacheName, ""); |
| | | }, |
| | | /** æ¥è¯¢ç¼åå
å®¹è¯¦ç» */ |
| | | handleCacheValue(cacheKey) { |
| | | getCacheValue(this.nowCacheName, cacheKey).then(response => { |
| | | this.cacheForm = response.data; |
| | | }); |
| | | }, |
| | | /** æ¸
çå
¨é¨ç¼å */ |
| | | handleClearCacheAll() { |
| | | clearCacheAll().then(response => { |
| | | this.$modal.msgSuccess("æ¸
çå
¨é¨ç¼åæå"); |
| | | }); |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | <el-option |
| | | v-for="item in listClassOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :label="item.label + '(' + item.value + ')'" |
| | | :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | |
| | | plugins: [ |
| | | // http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使ç¨gzipè§£åç¼©éææä»¶ |
| | | new CompressionPlugin({ |
| | | cache: false, // ä¸å¯ç¨æä»¶ç¼å |
| | | test: /\.(js|css|html)?$/i, // å缩æä»¶æ ¼å¼ |
| | | filename: '[path].gz[query]', // å缩åçæä»¶å |
| | | algorithm: 'gzip', // 使ç¨gzipå缩 |
| | |
| | | insert into sys_menu values('108', 'æ¥å¿ç®¡ç', '1', '9', 'log', '', '', 1, 0, 'M', '0', '0', '', 'log', 'admin', sysdate, '', null, 'æ¥å¿ç®¡çèå'); |
| | | insert into sys_menu values('109', 'å¨çº¿ç¨æ·', '2', '1', 'online', 'monitor/online/index', '', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 'admin', sysdate, '', null, 'å¨çº¿ç¨æ·èå'); |
| | | insert into sys_menu values('111', 'æ°æ®çæ§', '2', '3', 'druid', 'monitor/druid/index', '', 1, 0, 'C', '0', '0', 'monitor:druid:list', 'druid', 'admin', sysdate, '', null, 'æ°æ®çæ§èå'); |
| | | insert into sys_menu values('112', 'ç¼åå表', '2', '6', 'cacheList', 'monitor/cache/list', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis-list', 'admin', sysdate, '', null, 'ç¼åå表èå'); |
| | | insert into sys_menu values('113', 'ç¼åçæ§', '2', '5', 'cache', 'monitor/cache/index', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 'admin', sysdate, '', null, 'ç¼åçæ§èå'); |
| | | insert into sys_menu values('114', '表åæå»º', '3', '1', 'build', 'tool/build/index', '', 1, 0, 'C', '0', '0', 'tool:build:list', 'build', 'admin', sysdate, '', null, '表åæå»ºèå'); |
| | | insert into sys_menu values('115', '代ç çæ', '3', '2', 'gen', 'tool/gen/index', '', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 'admin', sysdate, '', null, '代ç çæèå'); |
| | |
| | | insert into sys_menu values('108', 'æ¥å¿ç®¡ç', '1', '9', 'log', '', '', '1', '0', 'M', '0', '0', '', 'log', 'admin', now(), '', null, 'æ¥å¿ç®¡çèå'); |
| | | insert into sys_menu values('109', 'å¨çº¿ç¨æ·', '2', '1', 'online', 'monitor/online/index', '', '1', '0', 'C', '0', '0', 'monitor:online:list', 'online', 'admin', now(), '', null, 'å¨çº¿ç¨æ·èå'); |
| | | insert into sys_menu values('111', 'æ°æ®çæ§', '2', '3', 'druid', 'monitor/druid/index', '', '1', '0', 'C', '0', '0', 'monitor:druid:list', 'druid', 'admin', now(), '', null, 'æ°æ®çæ§èå'); |
| | | insert into sys_menu values('112', 'ç¼åå表', '2', '6', 'cacheList', 'monitor/cache/list', '', '1', '0', 'C', '0', '0', 'monitor:cache:list', 'redis-list', 'admin', now(), '', null, 'ç¼åå表èå'); |
| | | insert into sys_menu values('113', 'ç¼åçæ§', '2', '5', 'cache', 'monitor/cache/index', '', '1', '0', 'C', '0', '0', 'monitor:cache:list', 'redis', 'admin', now(), '', null, 'ç¼åçæ§èå'); |
| | | insert into sys_menu values('114', '表åæå»º', '3', '1', 'build', 'tool/build/index', '', '1', '0', 'C', '0', '0', 'tool:build:list', 'build', 'admin', now(), '', null, '表åæå»ºèå'); |
| | | insert into sys_menu values('115', '代ç çæ', '3', '2', 'gen', 'tool/gen/index', '', '1', '0', 'C', '0', '0', 'tool:gen:list', 'code', 'admin', now(), '', null, '代ç çæèå'); |
| | |
| | | insert into sys_menu values('108', 'æ¥å¿ç®¡ç', '1', '9', 'log', '', '', 1, 0, 'M', '0', '0', '', 'log', 'admin', sysdate(), '', null, 'æ¥å¿ç®¡çèå'); |
| | | insert into sys_menu values('109', 'å¨çº¿ç¨æ·', '2', '1', 'online', 'monitor/online/index', '', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 'admin', sysdate(), '', null, 'å¨çº¿ç¨æ·èå'); |
| | | insert into sys_menu values('111', 'æ°æ®çæ§', '2', '3', 'druid', 'monitor/druid/index', '', 1, 0, 'C', '0', '0', 'monitor:druid:list', 'druid', 'admin', sysdate(), '', null, 'æ°æ®çæ§èå'); |
| | | insert into sys_menu values('112', 'ç¼åå表', '2', '6', 'cacheList', 'monitor/cache/list', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis-list', 'admin', sysdate(), '', null, 'ç¼åå表èå'); |
| | | insert into sys_menu values('113', 'ç¼åçæ§', '2', '5', 'cache', 'monitor/cache/index', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 'admin', sysdate(), '', null, 'ç¼åçæ§èå'); |
| | | insert into sys_menu values('114', '表åæå»º', '3', '1', 'build', 'tool/build/index', '', 1, 0, 'C', '0', '0', 'tool:build:list', 'build', 'admin', sysdate(), '', null, '表åæå»ºèå'); |
| | | insert into sys_menu values('115', '代ç çæ', '3', '2', 'gen', 'tool/gen/index', '', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 'admin', sysdate(), '', null, '代ç çæèå'); |
| | |
| | | GO |
| | | INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (111, N'æ°æ®çæ§', 2, 3, N'druid', N'monitor/druid/index', N'', 1, 0, N'C', N'0', N'0', N'monitor:druid:list', N'druid', N'admin', getdate(), N'', NULL, N'æ°æ®çæ§èå') |
| | | GO |
| | | INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (112, N'ç¼åå表', 2, 6, N'cacheList', N'monitor/cache/list', N'', 1, 0, N'C', N'0', N'0', N'monitor:cache:list', N'redis-list', N'admin', getdate(), N'', NULL, N'ç¼åå表èå') |
| | | GO |
| | | INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (113, N'ç¼åçæ§', 2, 5, N'cache', N'monitor/cache/index', N'', 1, 0, N'C', N'0', N'0', N'monitor:cache:list', N'redis', N'admin', getdate(), N'', NULL, N'ç¼åçæ§èå') |
| | | GO |
| | | INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (114, N'表åæå»º', 3, 1, N'build', N'tool/build/index', N'', 1, 0, N'C', N'0', N'0', N'tool:build:list', N'build', N'admin', getdate(), N'', NULL, N'表åæå»ºèå') |
¶Ô±ÈÐÂÎļþ |
| | |
| | | insert into sys_menu values('112', 'ç¼åå表', '2', '6', 'cacheList', 'monitor/cache/list', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis-list', 'admin', sysdate, '', null, 'ç¼åå表èå'); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | insert into sys_menu values('112', 'ç¼åå表', '2', '6', 'cacheList', 'monitor/cache/list', '', '1', '0', 'C', '0', '0', 'monitor:cache:list', 'redis-list', 'admin', now(), '', null, 'ç¼åå表èå'); |
| | |
| | | ALTER TABLE [sys_oss_config] ADD [domain] nvarchar(255) DEFAULT '' NULL |
| | | GO |
| | | |
| | | EXEC sp_addextendedproperty |
| | | 'MS_Description', N'èªå®ä¹åå', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'sys_oss_config', |
| | | 'COLUMN', N'domain' |
| | | GO |
| | | |
| | | UPDATE [sys_oss_config] SET [access_key] = N'ruoyi', [secret_key] = N'ruoyi123', [endpoint] = N'127.0.0.1:9000' WHERE [oss_config_id] = 1 |
| | | GO |
| | | |
| | | UPDATE [sys_oss_config] SET [endpoint] = N's3-cn-north-1.qiniucs.com' WHERE [oss_config_id] = 2 |
| | | GO |
| | | |
| | | UPDATE [sys_oss_config] SET [endpoint] = N'oss-cn-beijing.aliyuncs.com' WHERE [oss_config_id] = 3 |
| | | GO |
| | | |
| | | UPDATE [sys_oss_config] SET [endpoint] = N'cos.ap-beijing.myqcloud.com' WHERE [oss_config_id] = 4 |
| | | GO |
| | | |
| | | INSERT INTO [sys_oss_config] ([oss_config_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [domain], [is_https], [region], [status], [ext1], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'5', N'image', N'ruoyi', N'ruoyi123', N'ruoyi', N'image', N'127.0.0.1:9000', N'',N'N', N'', N'1', N'', N'admin', getdate(), N'admin', getdate(), NULL) |
| | | GO |
| | | |
| | | ALTER TABLE [gen_table_column] ALTER COLUMN [table_id] bigint NULL |
| | | INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (112, N'ç¼åå表', 2, 6, N'cacheList', N'monitor/cache/list', N'', 1, 0, N'C', N'0', N'0', N'monitor:cache:list', N'redis-list', N'admin', getdate(), N'', NULL, N'ç¼åå表èå') |
| | | GO |
¶Ô±ÈÐÂÎļþ |
| | |
| | | insert into sys_menu values('112', 'ç¼åå表', '2', '6', 'cacheList', 'monitor/cache/list', '', '1', '0', 'C', '0', '0', 'monitor:cache:list', 'redis-list', 'admin', now(), '', null, 'ç¼åå表èå'); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | insert into sys_menu values('112', 'ç¼åå表', '2', '6', 'cacheList', 'monitor/cache/list', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis-list', 'admin', sysdate(), '', null, 'ç¼åå表èå'); |
| | | |