!464 发布 5.1.2 版本 2023 最后一版
Merge pull request !464 from 疯狂的狮子Li/dev
已修改83个文件
已添加8个文件
已重命名2个文件
已删除6个文件
| | |
| | | <configuration default="false" name="ruoyi-monitor-admin" type="docker-deploy" factoryName="dockerfile" server-name="Docker"> |
| | | <deployment type="dockerfile"> |
| | | <settings> |
| | | <option name="imageTag" value="ruoyi/ruoyi-monitor-admin:5.1.1" /> |
| | | <option name="imageTag" value="ruoyi/ruoyi-monitor-admin:5.1.2" /> |
| | | <option name="buildOnly" value="true" /> |
| | | <option name="sourceFilePath" value="ruoyi-extend/ruoyi-monitor-admin/Dockerfile" /> |
| | | </settings> |
| | |
| | | <configuration default="false" name="ruoyi-powerjob-server" type="docker-deploy" factoryName="dockerfile" server-name="Docker"> |
| | | <deployment type="dockerfile"> |
| | | <settings> |
| | | <option name="imageTag" value="ruoyi/ruoyi-powerjob-server:5.1.1" /> |
| | | <option name="imageTag" value="ruoyi/ruoyi-powerjob-server:5.1.2" /> |
| | | <option name="buildOnly" value="true" /> |
| | | <option name="sourceFilePath" value="ruoyi-extend/ruoyi-powerjob-server/Dockerfile" /> |
| | | </settings> |
| | |
| | | <configuration default="false" name="ruoyi-server" type="docker-deploy" factoryName="dockerfile" server-name="Docker"> |
| | | <deployment type="dockerfile"> |
| | | <settings> |
| | | <option name="imageTag" value="ruoyi/ruoyi-server:5.1.1" /> |
| | | <option name="imageTag" value="ruoyi/ruoyi-server:5.1.2" /> |
| | | <option name="buildOnly" value="true" /> |
| | | <option name="sourceFilePath" value="ruoyi-admin/Dockerfile" /> |
| | | </settings> |
| | |
| | | [](https://gitee.com/dromara/RuoYi-Vue-Plus/blob/master/LICENSE) |
| | | [](https://www.jetbrains.com/?from=RuoYi-Vue-Plus) |
| | | <br> |
| | | [](https://gitee.com/dromara/RuoYi-Vue-Plus) |
| | | [](https://gitee.com/dromara/RuoYi-Vue-Plus) |
| | | []() |
| | | []() |
| | | []() |
| | |
| | | | æéè®¤è¯ | éç¨ Sa-TokenãJwt éæä½¿ç¨åè½é½å
¨ ä½è¦å 髿©å± | Spring Security é
ç½®ç¹çæ©å±æ§æå·® | |
| | | | æé注解 | éç¨ Sa-Token æ¯ææ³¨è§£ ç»å½æ ¡éªãè§è²æ ¡éªãæéæ ¡éªãäºçº§è®¤è¯æ ¡éªãHttpBasicæ ¡éªãå¿½ç¥æ ¡éª<br/>è§è²ä¸æéæ ¡éªæ¯æå¤ç§æ¡ä»¶ å¦ `AND` `OR` æ `æé OR è§è²` çå¤æè¡¨è¾¾å¼ | åªæ¯ææ¯å¦åå¨å¹é
| |
| | | | 䏿¹é´æ | éç¨ JustAuth ç¬¬ä¸æ¹ç»å½ç»ä»¶ æ¯æå¾®ä¿¡ãééçæ°åç§ä¸æ¹è®¤è¯ | æ | |
| | | | å
³ç³»æ°æ®åºæ¯æ | åçæ¯æ MySQLãOracleãPostgreSQLãSQLServer<br/>å¯åæ¶ä½¿ç¨å¼æåæ¢ | æ¯æ MysqlãOracle 䏿¯æåæ¶ä½¿ç¨ã䏿¯æå¼æåæ¢ | |
| | | | å
³ç³»æ°æ®åºæ¯æ | åçæ¯æ MySQLãOracleãPostgreSQLãSQLServer<br/>å¯åæ¶ä½¿ç¨å¼æåæ¢(æ¯æå
¶ä» mybatis-plus æ¯æçæææ°æ®åº åªéè¦å¢å jdbcä¾èµå³å¯ä½¿ç¨ 达梦éä»çåææåæ¡ä¾) | æ¯æ MysqlãOracle 䏿¯æåæ¶ä½¿ç¨ã䏿¯æå¼æåæ¢ | |
| | | | ç¼åæ°æ®åº | æ¯æ Redis 5-7 æ¯æå¤§é¨åæ°åè½ç¹æ§ å¦ åå¸å¼éæµãåå¸å¼éå | Redis ç®å get set æ¯æ | |
| | | | Redis客æ·ç«¯ | éç¨ Redisson Redis宿¹æ¨è åºäºNettyç客æ·ç«¯å·¥å
·<br/>æ¯æRedis 90%以ä¸çå½ä»¤ åºå±ä¼åè§é¿å¾å¤ä¸æ£ç¡®çç¨æ³ ä¾å¦: keys被转æ¢ä¸ºscan<br/>æ¯æåæºãå¨å
µãå主é群ãå¤ä¸»éç¾¤çæ¨¡å¼ | Lettuce + RedisTemplate æ¯ææ¨¡å¼å° å·¥å
·ä½¿ç¨ç¹ç<br/>è¿æ¥æ± éç¨ common-pool Bugå¤ç»å¸¸æ§åºé®é¢ | |
| | | | ç¼å注解 | éç¨ Spring-Cache 注解 对å
¶æ©å±äºå®ç°æ¯æäºæ´å¤åè½<br/>ä¾å¦ è¿ææ¶é´ æå¤§ç©ºé²æ¶é´ ç»æå¤§é¿åº¦ç åªéä¸ä¸ªæ³¨è§£å³å¯å®ææ°æ®èªå¨ç¼å | éæå¨ç¼åRedis代ç é»è¾ | |
| | |
| | | <description>RuoYi-Vue-Pluså¤ç§æ·ç®¡çç³»ç»</description> |
| | | |
| | | <properties> |
| | | <revision>5.1.1</revision> |
| | | <spring-boot.version>3.1.5</spring-boot.version> |
| | | <revision>5.1.2</revision> |
| | | <spring-boot.version>3.1.7</spring-boot.version> |
| | | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| | | <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
| | | <java.version>17</java.version> |
| | | <spring-boot.mybatis>3.0.2</spring-boot.mybatis> |
| | | <spring-boot.mybatis>3.0.3</spring-boot.mybatis> |
| | | <springdoc.version>2.2.0</springdoc.version> |
| | | <therapi-javadoc.version>0.15.0</therapi-javadoc.version> |
| | | <poi.version>5.2.3</poi.version> |
| | | <easyexcel.version>3.3.2</easyexcel.version> |
| | | <easyexcel.version>3.3.3</easyexcel.version> |
| | | <velocity.version>2.3</velocity.version> |
| | | <satoken.version>1.37.0</satoken.version> |
| | | <mybatis-plus.version>3.5.4</mybatis-plus.version> |
| | | <p6spy.version>3.9.1</p6spy.version> |
| | | <hutool.version>5.8.22</hutool.version> |
| | | <okhttp.version>4.10.0</okhttp.version> |
| | | <spring-boot-admin.version>3.1.7</spring-boot-admin.version> |
| | | <redisson.version>3.24.1</redisson.version> |
| | | <spring-boot-admin.version>3.1.8</spring-boot-admin.version> |
| | | <redisson.version>3.24.3</redisson.version> |
| | | <lock4j.version>2.2.5</lock4j.version> |
| | | <dynamic-ds.version>4.2.0</dynamic-ds.version> |
| | | <alibaba-ttl.version>2.14.2</alibaba-ttl.version> |
| | | <powerjob.version>4.3.3</powerjob.version> |
| | | <alibaba-ttl.version>2.14.4</alibaba-ttl.version> |
| | | <powerjob.version>4.3.6</powerjob.version> |
| | | <mapstruct-plus.version>1.3.5</mapstruct-plus.version> |
| | | <mapstruct-plus.lombok.version>0.2.0</mapstruct-plus.lombok.version> |
| | | <lombok.version>1.18.30</lombok.version> |
| | | <bouncycastle.version>1.76</bouncycastle.version> |
| | | <justauth.version>1.16.5</justauth.version> |
| | | <justauth.version>1.16.6</justauth.version> |
| | | <!-- 离线IPå°åå®ä½åº --> |
| | | <ip2region.version>2.7.0</ip2region.version> |
| | | |
| | | <!-- OSS é
ç½® --> |
| | | <aws-java-sdk-s3.version>1.12.540</aws-java-sdk-s3.version> |
| | | <aws-java-sdk-s3.version>1.12.600</aws-java-sdk-s3.version> |
| | | <!-- SMS é
ç½® --> |
| | | <sms4j.version>2.2.0</sms4j.version> |
| | | <!-- éå¶æ¡æ¶ä¸çfastjsonçæ¬ --> |
| | |
| | | |
| | | WORKDIR /ruoyi/server |
| | | |
| | | ENV SERVER_PORT=8080 LANG=C.UTF-8 LC_ALL=C.UTF-8 |
| | | ENV SERVER_PORT=8080 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS="" |
| | | |
| | | EXPOSE ${SERVER_PORT} |
| | | |
| | | ADD ./target/ruoyi-admin.jar ./app.jar |
| | | |
| | | ENTRYPOINT ["java", \ |
| | | "-Djava.security.egd=file:/dev/./urandom", \ |
| | | "-Dserver.port=${SERVER_PORT}", \ |
| | | # åºç¨åç§° 妿æ³åºåé群èç¹çæ§ æ¹æä¸åçåç§°å³å¯ |
| | | # "-Dskywalking.agent.service_name=ruoyi-server", \ |
| | | # "-javaagent:/ruoyi/skywalking/agent/skywalking-agent.jar", \ |
| | | "-jar", "app.jar"] |
| | | ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -Dserver.port=${SERVER_PORT} \ |
| | | # åºç¨åç§° 妿æ³åºåé群èç¹çæ§ æ¹æä¸åçåç§°å³å¯ |
| | | #-Dskywalking.agent.service_name=ruoyi-server \ |
| | | #-javaagent:/ruoyi/skywalking/agent/skywalking-agent.jar \ |
| | | -jar app.jar \ |
| | | -XX:+HeapDumpOnOutOfMemoryError -Xlog:gc*,:time,tags,level -XX:+UseZGC ${JAVA_OPTS} |
| | | |
| | |
| | | <artifactId>ruoyi-common-social</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.dromara</groupId> |
| | | <artifactId>ruoyi-common-ratelimiter</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.dromara</groupId> |
| | |
| | | import org.dromara.common.core.domain.model.RegisterBody; |
| | | import org.dromara.common.core.domain.model.SocialLoginBody; |
| | | import org.dromara.common.core.utils.*; |
| | | import org.dromara.common.encrypt.annotation.ApiEncrypt; |
| | | import org.dromara.common.json.utils.JsonUtils; |
| | | import org.dromara.common.satoken.utils.LoginHelper; |
| | | import org.dromara.common.social.config.properties.SocialLoginConfigProperties; |
| | |
| | | */ |
| | | @Slf4j |
| | | @SaIgnore |
| | | @Validated |
| | | @RequiredArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/auth") |
| | |
| | | * @param body ç»å½ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @ApiEncrypt |
| | | @PostMapping("/login") |
| | | public R<LoginVo> login(@Validated @RequestBody String body) { |
| | | public R<LoginVo> login(@RequestBody String body) { |
| | | LoginBody loginBody = JsonUtils.parseObject(body, LoginBody.class); |
| | | ValidatorUtils.validate(loginBody); |
| | | // ææç±»åå客æ·ç«¯id |
| | |
| | | /** |
| | | * ç¨æ·æ³¨å |
| | | */ |
| | | @ApiEncrypt |
| | | @PostMapping("/register") |
| | | public R<Void> register(@Validated @RequestBody RegisterBody user) { |
| | | if (!configService.selectRegisterEnabled(user.getTenantId())) { |
| | |
| | | import org.dromara.common.core.utils.reflect.ReflectUtils; |
| | | import org.dromara.common.mail.config.properties.MailProperties; |
| | | import org.dromara.common.mail.utils.MailUtils; |
| | | import org.dromara.common.ratelimiter.annotation.RateLimiter; |
| | | import org.dromara.common.ratelimiter.enums.LimitType; |
| | | import org.dromara.common.redis.utils.RedisUtils; |
| | | import org.dromara.common.web.config.properties.CaptchaProperties; |
| | | import org.dromara.common.web.enums.CaptchaType; |
| | |
| | | * |
| | | * @param phonenumber ç¨æ·ææºå· |
| | | */ |
| | | @RateLimiter(key = "#phonenumber", time = 60, count = 1) |
| | | @GetMapping("/resource/sms/code") |
| | | public R<Void> smsCode(@NotBlank(message = "{user.phonenumber.not.blank}") String phonenumber) { |
| | | String key = GlobalConstants.CAPTCHA_CODE_KEY + phonenumber; |
| | |
| | | * |
| | | * @param email é®ç®± |
| | | */ |
| | | @RateLimiter(key = "#email", time = 60, count = 1) |
| | | @GetMapping("/resource/email/code") |
| | | public R<Void> emailCode(@NotBlank(message = "{user.email.not.blank}") String email) { |
| | | if (!mailProperties.getEnabled()) { |
| | |
| | | /** |
| | | * çæéªè¯ç |
| | | */ |
| | | @RateLimiter(time = 60, count = 10, limitType = LimitType.IP) |
| | | @GetMapping("/auth/code") |
| | | public R<CaptchaVo> getCode() { |
| | | CaptchaVo captchaVo = new CaptchaVo(); |
ÎļþÃû´Ó ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/listener/UserActionListener.java ÐÞ¸Ä |
| | |
| | | package org.dromara.common.satoken.listener; |
| | | package org.dromara.web.listener; |
| | | |
| | | import cn.dev33.satoken.config.SaTokenConfig; |
| | | import cn.dev33.satoken.listener.SaTokenListener; |
| | | import cn.dev33.satoken.stp.SaLoginModel; |
| | | import cn.hutool.http.useragent.UserAgent; |
| | | import cn.hutool.http.useragent.UserAgentUtil; |
| | | import org.dromara.common.core.constant.CacheConstants; |
| | | import org.dromara.common.core.domain.dto.UserOnlineDTO; |
| | | import org.dromara.common.core.domain.model.LoginUser; |
| | | import org.dromara.common.core.enums.UserType; |
| | | import org.dromara.common.redis.utils.RedisUtils; |
| | | import org.dromara.common.satoken.utils.LoginHelper; |
| | | import org.dromara.common.core.utils.ip.AddressUtils; |
| | | import org.dromara.common.core.utils.ServletUtils; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.dromara.common.core.constant.CacheConstants; |
| | | import org.dromara.common.core.constant.Constants; |
| | | import org.dromara.common.core.domain.dto.UserOnlineDTO; |
| | | import org.dromara.common.core.domain.model.LoginUser; |
| | | import org.dromara.common.core.utils.MessageUtils; |
| | | import org.dromara.common.core.utils.ServletUtils; |
| | | import org.dromara.common.core.utils.SpringUtils; |
| | | import org.dromara.common.core.utils.ip.AddressUtils; |
| | | import org.dromara.common.log.event.LogininforEvent; |
| | | import org.dromara.common.redis.utils.RedisUtils; |
| | | import org.dromara.common.satoken.utils.LoginHelper; |
| | | import org.dromara.web.service.SysLoginService; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.time.Duration; |
| | |
| | | public class UserActionListener implements SaTokenListener { |
| | | |
| | | private final SaTokenConfig tokenConfig; |
| | | private final SysLoginService loginService; |
| | | |
| | | /** |
| | | * æ¯æ¬¡ç»å½æ¶è§¦å |
| | | */ |
| | | @Override |
| | | public void doLogin(String loginType, Object loginId, String tokenValue, SaLoginModel loginModel) { |
| | | UserType userType = UserType.getUserType(loginId.toString()); |
| | | if (userType == UserType.SYS_USER) { |
| | | UserAgent userAgent = UserAgentUtil.parse(ServletUtils.getRequest().getHeader("User-Agent")); |
| | | String ip = ServletUtils.getClientIP(); |
| | | LoginUser user = LoginHelper.getLoginUser(); |
| | | UserOnlineDTO dto = new UserOnlineDTO(); |
| | | dto.setIpaddr(ip); |
| | | dto.setLoginLocation(AddressUtils.getRealAddressByIP(ip)); |
| | | dto.setBrowser(userAgent.getBrowser().getName()); |
| | | dto.setOs(userAgent.getOs().getName()); |
| | | dto.setLoginTime(System.currentTimeMillis()); |
| | | dto.setTokenId(tokenValue); |
| | | dto.setUserName(user.getUsername()); |
| | | dto.setClientKey(user.getClientKey()); |
| | | dto.setDeviceType(user.getDeviceType()); |
| | | dto.setDeptName(user.getDeptName()); |
| | | if(tokenConfig.getTimeout() == -1) { |
| | | RedisUtils.setCacheObject(CacheConstants.ONLINE_TOKEN_KEY + tokenValue, dto); |
| | | } else { |
| | | 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端 èªè¡æ ¹æ®ä¸å¡ç¼å |
| | | UserAgent userAgent = UserAgentUtil.parse(ServletUtils.getRequest().getHeader("User-Agent")); |
| | | String ip = ServletUtils.getClientIP(); |
| | | LoginUser user = LoginHelper.getLoginUser(); |
| | | UserOnlineDTO dto = new UserOnlineDTO(); |
| | | dto.setIpaddr(ip); |
| | | dto.setLoginLocation(AddressUtils.getRealAddressByIP(ip)); |
| | | dto.setBrowser(userAgent.getBrowser().getName()); |
| | | dto.setOs(userAgent.getOs().getName()); |
| | | dto.setLoginTime(System.currentTimeMillis()); |
| | | dto.setTokenId(tokenValue); |
| | | dto.setUserName(user.getUsername()); |
| | | dto.setClientKey(user.getClientKey()); |
| | | dto.setDeviceType(user.getDeviceType()); |
| | | dto.setDeptName(user.getDeptName()); |
| | | if(tokenConfig.getTimeout() == -1) { |
| | | RedisUtils.setCacheObject(CacheConstants.ONLINE_TOKEN_KEY + tokenValue, dto); |
| | | } else { |
| | | RedisUtils.setCacheObject(CacheConstants.ONLINE_TOKEN_KEY + tokenValue, dto, Duration.ofSeconds(tokenConfig.getTimeout())); |
| | | } |
| | | // è®°å½ç»å½æ¥å¿ |
| | | LogininforEvent logininforEvent = new LogininforEvent(); |
| | | logininforEvent.setTenantId(user.getTenantId()); |
| | | logininforEvent.setUsername(user.getUsername()); |
| | | logininforEvent.setStatus(Constants.LOGIN_SUCCESS); |
| | | logininforEvent.setMessage(MessageUtils.message("user.login.success")); |
| | | logininforEvent.setRequest(ServletUtils.getRequest()); |
| | | SpringUtils.context().publishEvent(logininforEvent); |
| | | // æ´æ°ç»å½ä¿¡æ¯ |
| | | loginService.recordLoginInfo(user.getUserId(), ip); |
| | | log.info("user doLogin, userId:{}, token:{}", loginId, tokenValue); |
| | | } |
| | | |
| | | /** |
| | |
| | | import cn.dev33.satoken.exception.NotLoginException; |
| | | import cn.dev33.satoken.stp.StpUtil; |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import org.dromara.common.core.exception.user.UserException; |
| | | import org.dromara.common.core.utils.*; |
| | | import org.dromara.common.log.event.LogininforEvent; |
| | | import org.dromara.common.mybatis.helper.DataPermissionHelper; |
| | | import org.dromara.common.redis.utils.RedisUtils; |
| | | import org.dromara.common.satoken.utils.LoginHelper; |
| | | import org.dromara.common.tenant.exception.TenantException; |
| | |
| | | bo.setUserName(authUserData.getUsername()); |
| | | bo.setNickName(authUserData.getNickname()); |
| | | // æ¥è¯¢æ¯å¦å·²ç»ç»å®ç¨æ· |
| | | SysSocialVo vo = sysSocialService.selectByAuthId(authId); |
| | | if (ObjectUtil.isEmpty(vo)) { |
| | | List<SysSocialVo> list = sysSocialService.selectByAuthId(authId); |
| | | if (CollUtil.isEmpty(list)) { |
| | | // 没æç»å®ç¨æ·, æ°å¢ç¨æ·ä¿¡æ¯ |
| | | sysSocialService.insertByBo(bo); |
| | | } else { |
| | | // æ´æ°ç¨æ·ä¿¡æ¯ |
| | | bo.setId(vo.getId()); |
| | | bo.setId(list.get(0).getId()); |
| | | sysSocialService.updateByBo(bo); |
| | | } |
| | | } |
| | |
| | | public void logout() { |
| | | try { |
| | | LoginUser loginUser = LoginHelper.getLoginUser(); |
| | | if (ObjectUtil.isNull(loginUser)) { |
| | | return; |
| | | } |
| | | if (TenantHelper.isEnable() && LoginHelper.isSuperAdmin()) { |
| | | // è¶
级管çå ç»åºæ¸
é¤å¨æç§æ· |
| | | TenantHelper.clearDynamic(); |
| | |
| | | * |
| | | * @param userId ç¨æ·ID |
| | | */ |
| | | public void recordLoginInfo(Long userId) { |
| | | public void recordLoginInfo(Long userId, String ip) { |
| | | SysUser sysUser = new SysUser(); |
| | | sysUser.setUserId(userId); |
| | | sysUser.setLoginIp(ServletUtils.getClientIP()); |
| | | sysUser.setLoginIp(ip); |
| | | sysUser.setLoginDate(DateUtils.getNowDate()); |
| | | sysUser.setUpdateBy(userId); |
| | | userMapper.updateById(sysUser); |
| | | DataPermissionHelper.ignore(() -> userMapper.updateById(sysUser)); |
| | | } |
| | | |
| | | /** |
| | |
| | | import cn.dev33.satoken.secure.BCrypt; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.dromara.common.core.constant.Constants; |
| | | import org.dromara.common.core.constant.GlobalConstants; |
| | | import org.dromara.common.core.domain.model.RegisterBody; |
| | |
| | | import org.dromara.system.domain.bo.SysUserBo; |
| | | import org.dromara.system.mapper.SysUserMapper; |
| | | import org.dromara.system.service.ISysUserService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | sysUser.setPassword(BCrypt.hashpw(password)); |
| | | sysUser.setUserType(userType); |
| | | |
| | | boolean exist = userMapper.exists(new LambdaQueryWrapper<SysUser>() |
| | | .eq(TenantHelper.isEnable(), SysUser::getTenantId, tenantId) |
| | | .eq(SysUser::getUserName, sysUser.getUserName()) |
| | | .ne(ObjectUtil.isNotNull(sysUser.getUserId()), SysUser::getUserId, sysUser.getUserId())); |
| | | boolean exist = TenantHelper.dynamic(tenantId, () -> { |
| | | return userMapper.exists(new LambdaQueryWrapper<SysUser>() |
| | | .eq(SysUser::getUserName, sysUser.getUserName()) |
| | | .ne(ObjectUtil.isNotNull(sysUser.getUserId()), SysUser::getUserId, sysUser.getUserId())); |
| | | }); |
| | | if (exist) { |
| | | throw new UserException("user.register.save.error", username); |
| | | } |
| | |
| | | // çætoken |
| | | LoginHelper.login(loginUser, model); |
| | | |
| | | loginService.recordLogininfor(loginUser.getTenantId(), user.getUserName(), Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")); |
| | | loginService.recordLoginInfo(user.getUserId()); |
| | | |
| | | LoginVo loginVo = new LoginVo(); |
| | | loginVo.setAccessToken(StpUtil.getTokenValue()); |
| | | loginVo.setExpireIn(StpUtil.getTokenTimeout()); |
| | |
| | | } |
| | | |
| | | private SysUserVo loadUserByEmail(String tenantId, String email) { |
| | | SysUser user = userMapper.selectOne(new LambdaQueryWrapper<SysUser>() |
| | | .select(SysUser::getEmail, SysUser::getStatus) |
| | | .eq(TenantHelper.isEnable(), SysUser::getTenantId, tenantId) |
| | | .eq(SysUser::getEmail, email)); |
| | | if (ObjectUtil.isNull(user)) { |
| | | log.info("ç»å½ç¨æ·ï¼{} ä¸åå¨.", email); |
| | | throw new UserException("user.not.exists", email); |
| | | } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { |
| | | log.info("ç»å½ç¨æ·ï¼{} 已被åç¨.", email); |
| | | throw new UserException("user.blocked", email); |
| | | } |
| | | if (TenantHelper.isEnable()) { |
| | | return userMapper.selectTenantUserByEmail(email, tenantId); |
| | | } |
| | | return userMapper.selectUserByEmail(email); |
| | | return TenantHelper.dynamic(tenantId, () -> { |
| | | SysUser user = userMapper.selectOne(new LambdaQueryWrapper<SysUser>() |
| | | .select(SysUser::getEmail, SysUser::getStatus) |
| | | .eq(SysUser::getEmail, email)); |
| | | if (ObjectUtil.isNull(user)) { |
| | | log.info("ç»å½ç¨æ·ï¼{} ä¸åå¨.", email); |
| | | throw new UserException("user.not.exists", email); |
| | | } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { |
| | | log.info("ç»å½ç¨æ·ï¼{} 已被åç¨.", email); |
| | | throw new UserException("user.blocked", email); |
| | | } |
| | | return userMapper.selectUserByEmail(email); |
| | | }); |
| | | } |
| | | |
| | | } |
| | |
| | | // çætoken |
| | | LoginHelper.login(loginUser, model); |
| | | |
| | | loginService.recordLogininfor(loginUser.getTenantId(), username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")); |
| | | loginService.recordLoginInfo(user.getUserId()); |
| | | |
| | | LoginVo loginVo = new LoginVo(); |
| | | loginVo.setAccessToken(StpUtil.getTokenValue()); |
| | | loginVo.setExpireIn(StpUtil.getTokenTimeout()); |
| | |
| | | } |
| | | |
| | | private SysUserVo loadUserByUsername(String tenantId, String username) { |
| | | SysUser user = userMapper.selectOne(new LambdaQueryWrapper<SysUser>() |
| | | .select(SysUser::getUserName, SysUser::getStatus) |
| | | .eq(TenantHelper.isEnable(), SysUser::getTenantId, tenantId) |
| | | .eq(SysUser::getUserName, username)); |
| | | if (ObjectUtil.isNull(user)) { |
| | | log.info("ç»å½ç¨æ·ï¼{} ä¸åå¨.", username); |
| | | throw new UserException("user.not.exists", username); |
| | | } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { |
| | | log.info("ç»å½ç¨æ·ï¼{} 已被åç¨.", username); |
| | | throw new UserException("user.blocked", username); |
| | | } |
| | | if (TenantHelper.isEnable()) { |
| | | return userMapper.selectTenantUserByUserName(username, tenantId); |
| | | } |
| | | return userMapper.selectUserByUserName(username); |
| | | return TenantHelper.dynamic(tenantId, () -> { |
| | | SysUser user = userMapper.selectOne(new LambdaQueryWrapper<SysUser>() |
| | | .select(SysUser::getUserName, SysUser::getStatus) |
| | | .eq(SysUser::getUserName, username)); |
| | | if (ObjectUtil.isNull(user)) { |
| | | log.info("ç»å½ç¨æ·ï¼{} ä¸åå¨.", username); |
| | | throw new UserException("user.not.exists", username); |
| | | } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { |
| | | log.info("ç»å½ç¨æ·ï¼{} 已被åç¨.", username); |
| | | throw new UserException("user.blocked", username); |
| | | } |
| | | return userMapper.selectUserByUserName(username); |
| | | }); |
| | | } |
| | | |
| | | } |
| | |
| | | // çætoken |
| | | LoginHelper.login(loginUser, model); |
| | | |
| | | loginService.recordLogininfor(loginUser.getTenantId(), user.getUserName(), Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")); |
| | | loginService.recordLoginInfo(user.getUserId()); |
| | | |
| | | LoginVo loginVo = new LoginVo(); |
| | | loginVo.setAccessToken(StpUtil.getTokenValue()); |
| | | loginVo.setExpireIn(StpUtil.getTokenTimeout()); |
| | |
| | | } |
| | | |
| | | private SysUserVo loadUserByPhonenumber(String tenantId, String phonenumber) { |
| | | SysUser user = userMapper.selectOne(new LambdaQueryWrapper<SysUser>() |
| | | .select(SysUser::getPhonenumber, SysUser::getStatus) |
| | | .eq(TenantHelper.isEnable(), SysUser::getTenantId, tenantId) |
| | | .eq(SysUser::getPhonenumber, phonenumber)); |
| | | if (ObjectUtil.isNull(user)) { |
| | | log.info("ç»å½ç¨æ·ï¼{} ä¸åå¨.", phonenumber); |
| | | throw new UserException("user.not.exists", phonenumber); |
| | | } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { |
| | | log.info("ç»å½ç¨æ·ï¼{} 已被åç¨.", phonenumber); |
| | | throw new UserException("user.blocked", phonenumber); |
| | | } |
| | | if (TenantHelper.isEnable()) { |
| | | return userMapper.selectTenantUserByPhonenumber(phonenumber, tenantId); |
| | | } |
| | | return userMapper.selectUserByPhonenumber(phonenumber); |
| | | return TenantHelper.dynamic(tenantId, () -> { |
| | | SysUser user = userMapper.selectOne(new LambdaQueryWrapper<SysUser>() |
| | | .select(SysUser::getPhonenumber, SysUser::getStatus) |
| | | .eq(SysUser::getPhonenumber, phonenumber)); |
| | | if (ObjectUtil.isNull(user)) { |
| | | log.info("ç»å½ç¨æ·ï¼{} ä¸åå¨.", phonenumber); |
| | | throw new UserException("user.not.exists", phonenumber); |
| | | } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { |
| | | log.info("ç»å½ç¨æ·ï¼{} 已被åç¨.", phonenumber); |
| | | throw new UserException("user.blocked", phonenumber); |
| | | } |
| | | return userMapper.selectUserByPhonenumber(phonenumber); |
| | | }); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import cn.dev33.satoken.stp.SaLoginModel; |
| | | import cn.dev33.satoken.stp.StpUtil; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.map.MapUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.http.HttpUtil; |
| | | import cn.hutool.http.Method; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import me.zhyd.oauth.model.AuthResponse; |
| | | import me.zhyd.oauth.model.AuthUser; |
| | | import org.dromara.common.core.constant.Constants; |
| | | import org.dromara.common.core.domain.model.LoginUser; |
| | | import org.dromara.common.core.domain.model.SocialLoginBody; |
| | | import org.dromara.common.core.enums.UserStatus; |
| | | import org.dromara.common.core.exception.ServiceException; |
| | | import org.dromara.common.core.exception.user.UserException; |
| | | import org.dromara.common.core.utils.MessageUtils; |
| | | import org.dromara.common.core.utils.ValidatorUtils; |
| | | import org.dromara.common.json.utils.JsonUtils; |
| | | import org.dromara.common.satoken.utils.LoginHelper; |
| | |
| | | import org.dromara.web.service.IAuthStrategy; |
| | | import org.dromara.web.service.SysLoginService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | |
| | | /** |
| | | * ç¬¬ä¸æ¹ææçç¥ |
| | |
| | | .executeAsync(); |
| | | } |
| | | |
| | | SysSocialVo social = sysSocialService.selectByAuthId(authUserData.getSource() + authUserData.getUuid()); |
| | | if (!ObjectUtil.isNotNull(social)) { |
| | | List<SysSocialVo> list = sysSocialService.selectByAuthId(authUserData.getSource() + authUserData.getUuid()); |
| | | if (CollUtil.isEmpty(list)) { |
| | | throw new ServiceException("ä½ è¿æ²¡æç»å®ç¬¬ä¸æ¹è´¦å·ï¼ç»å®åæå¯ä»¥ç»å½ï¼"); |
| | | } |
| | | // éªè¯ææè¡¨éé¢çç§æ·idæ¯å¦å
å«å½åç§æ·id |
| | | String tenantId = social.getTenantId(); |
| | | if (ObjectUtil.isNotNull(social) && StrUtil.isNotBlank(tenantId) |
| | | && !tenantId.contains(loginBody.getTenantId())) { |
| | | Optional<SysSocialVo> opt = list.stream().filter(x -> x.getTenantId().equals(loginBody.getTenantId())).findAny(); |
| | | if (opt.isEmpty()) { |
| | | throw new ServiceException("对ä¸èµ·ï¼ä½ 没ææéç»å½å½åç§æ·ï¼"); |
| | | } |
| | | |
| | | SysSocialVo social = opt.get(); |
| | | // æ¥æ¾ç¨æ· |
| | | SysUserVo user = loadUser(tenantId, social.getUserId()); |
| | | SysUserVo user = loadUser(social.getTenantId(), social.getUserId()); |
| | | |
| | | // æ¤å¤å¯æ ¹æ®ç»å½ç¨æ·çæ°æ®ä¸å èªè¡å建 loginUser 屿§ä¸å¤ç¨ç»§æ¿æ©å±å°±è¡äº |
| | | LoginUser loginUser = loginService.buildLoginUser(user); |
| | |
| | | // çætoken |
| | | LoginHelper.login(loginUser, model); |
| | | |
| | | loginService.recordLogininfor(loginUser.getTenantId(), user.getUserName(), Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")); |
| | | loginService.recordLoginInfo(user.getUserId()); |
| | | |
| | | LoginVo loginVo = new LoginVo(); |
| | | loginVo.setAccessToken(StpUtil.getTokenValue()); |
| | | loginVo.setExpireIn(StpUtil.getTokenTimeout()); |
| | |
| | | } |
| | | |
| | | private SysUserVo loadUser(String tenantId, Long userId) { |
| | | SysUser user = userMapper.selectOne(new LambdaQueryWrapper<SysUser>() |
| | | return TenantHelper.dynamic(tenantId, () -> { |
| | | SysUser user = userMapper.selectOne(new LambdaQueryWrapper<SysUser>() |
| | | .select(SysUser::getUserName, SysUser::getStatus) |
| | | .eq(TenantHelper.isEnable(), SysUser::getTenantId, tenantId) |
| | | .eq(SysUser::getUserId, userId)); |
| | | if (ObjectUtil.isNull(user)) { |
| | | log.info("ç»å½ç¨æ·ï¼{} ä¸åå¨.", ""); |
| | | throw new UserException("user.not.exists", ""); |
| | | } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { |
| | | log.info("ç»å½ç¨æ·ï¼{} 已被åç¨.", ""); |
| | | throw new UserException("user.blocked", ""); |
| | | } |
| | | if (TenantHelper.isEnable()) { |
| | | return userMapper.selectTenantUserByUserName(user.getUserName(), tenantId); |
| | | } |
| | | return userMapper.selectUserByUserName(user.getUserName()); |
| | | if (ObjectUtil.isNull(user)) { |
| | | log.info("ç»å½ç¨æ·ï¼{} ä¸åå¨.", ""); |
| | | throw new UserException("user.not.exists", ""); |
| | | } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { |
| | | log.info("ç»å½ç¨æ·ï¼{} 已被åç¨.", ""); |
| | | throw new UserException("user.blocked", ""); |
| | | } |
| | | return userMapper.selectUserByUserName(user.getUserName()); |
| | | }); |
| | | } |
| | | |
| | | } |
| | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.dromara.common.core.constant.Constants; |
| | | import org.dromara.common.core.domain.model.XcxLoginBody; |
| | | import org.dromara.common.core.domain.model.XcxLoginUser; |
| | | import org.dromara.common.core.enums.UserStatus; |
| | | import org.dromara.common.core.utils.MessageUtils; |
| | | import org.dromara.common.core.utils.ValidatorUtils; |
| | | import org.dromara.common.json.utils.JsonUtils; |
| | | import org.dromara.common.satoken.utils.LoginHelper; |
| | |
| | | model.setExtra(LoginHelper.CLIENT_KEY, client.getClientId()); |
| | | // çætoken |
| | | LoginHelper.login(loginUser, model); |
| | | |
| | | loginService.recordLogininfor(loginUser.getTenantId(), user.getUserName(), Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")); |
| | | loginService.recordLoginInfo(user.getUserId()); |
| | | |
| | | LoginVo loginVo = new LoginVo(); |
| | | loginVo.setAccessToken(StpUtil.getTokenValue()); |
| | |
| | | enabled: false |
| | | # éè¦å
å¨ powerjob ç»å½é¡µæ§è¡åºç¨æ³¨ååæè½ä½¿ç¨ |
| | | app-name: ruoyi-worker |
| | | enable-test-mode: false |
| | | allow-lazy-connect-server: false |
| | | max-appended-wf-context-length: 4096 |
| | | max-result-length: 4096 |
| | | # 28080 ç«¯å£ éç主åºç¨ç«¯å£é£é¸ é¿å
é群å²çª |
| | |
| | | # url: jdbc:oracle:thin:@//localhost:1521/XE |
| | | # username: ROOT |
| | | # password: root |
| | | # hikari: |
| | | # connectionTestQuery: SELECT 1 FROM DUAL |
| | | # postgres: |
| | | # type: ${spring.datasource.type} |
| | | # driverClassName: org.postgresql.Driver |
| | |
| | | idleTimeout: 600000 |
| | | # æ¤å±æ§æ§å¶æ± ä¸è¿æ¥çæé¿çå½å¨æï¼å¼0表示æ éçå½å¨æï¼é»è®¤30åé |
| | | maxLifetime: 1800000 |
| | | # è¿æ¥æµè¯queryï¼é
ç½®æ£æµè¿æ¥æ¯å¦ææï¼ |
| | | connectionTestQuery: SELECT 1 |
| | | # å¤ä¹
æ£æ¥ä¸æ¬¡è¿æ¥çæ´»æ§ |
| | | keepaliveTime: 30000 |
| | | |
| | |
| | | enabled: false |
| | | # éè¦å
å¨ powerjob ç»å½é¡µæ§è¡åºç¨æ³¨ååæè½ä½¿ç¨ |
| | | app-name: ruoyi-worker |
| | | enable-test-mode: false |
| | | allow-lazy-connect-server: false |
| | | max-appended-wf-context-length: 4096 |
| | | max-result-length: 4096 |
| | | # 28080 ç«¯å£ éç主åºç¨ç«¯å£é£é¸ é¿å
é群å²çª |
| | |
| | | # url: jdbc:oracle:thin:@//localhost:1521/XE |
| | | # username: ROOT |
| | | # password: root |
| | | # hikari: |
| | | # connectionTestQuery: SELECT 1 FROM DUAL |
| | | # postgres: |
| | | # type: ${spring.datasource.type} |
| | | # driverClassName: org.postgresql.Driver |
| | |
| | | idleTimeout: 600000 |
| | | # æ¤å±æ§æ§å¶æ± ä¸è¿æ¥çæé¿çå½å¨æï¼å¼0表示æ éçå½å¨æï¼é»è®¤30åé |
| | | maxLifetime: 1800000 |
| | | # è¿æ¥æµè¯queryï¼é
ç½®æ£æµè¿æ¥æ¯å¦ææï¼ |
| | | connectionTestQuery: SELECT 1 |
| | | # å¤ä¹
æ£æ¥ä¸æ¬¡è¿æ¥çæ´»æ§ |
| | | keepaliveTime: 30000 |
| | | |
| | |
| | | - sys_user_post |
| | | - sys_user_role |
| | | - sys_client |
| | | - sys_oss_config |
| | | |
| | | # MyBatisPlusé
ç½® |
| | | # https://baomidou.com/config/ |
| | |
| | | enabled: true |
| | | # AES å å¯å¤´æ è¯ |
| | | headerFlag: encrypt-key |
| | | # å
¬ç§é¥ éå¯¹ç§°ç®æ³çå
¬ç§é¥ å¦ï¼SM2ï¼RSA 使ç¨è
请èªè¡æ´æ¢ |
| | | publicKey: MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdHnzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ== |
| | | # ååºå å¯å
¬é¥ éå¯¹ç§°ç®æ³çå
¬ç§é¥ å¦ï¼SM2ï¼RSA 使ç¨è
请èªè¡æ´æ¢ |
| | | # 对åºå端解å¯ç§é¥ MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAmc3CuPiGL/LcIIm7zryCEIbl1SPzBkr75E2VMtxegyZ1lYRD+7TZGAPkvIsBcaMs6Nsy0L78n2qh+lIZMpLH8wIDAQABAkEAk82Mhz0tlv6IVCyIcw/s3f0E+WLmtPFyR9/WtV3Y5aaejUkU60JpX4m5xNR2VaqOLTZAYjW8Wy0aXr3zYIhhQQIhAMfqR9oFdYw1J9SsNc+CrhugAvKTi0+BF6VoL6psWhvbAiEAxPPNTmrkmrXwdm/pQQu3UOQmc2vCZ5tiKpW10CgJi8kCIFGkL6utxw93Ncj4exE/gPLvKcT+1Emnoox+O9kRXss5AiAMtYLJDaLEzPrAWcZeeSgSIzbL+ecokmFKSDDcRske6QIgSMkHedwND1olF8vlKsJUGK3BcdtM8w4Xq7BpSBwsloE= |
| | | publicKey: MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJnNwrj4hi/y3CCJu868ghCG5dUj8wZK++RNlTLcXoMmdZWEQ/u02RgD5LyLAXGjLOjbMtC+/J9qofpSGTKSx/MCAwEAAQ== |
| | | # 请æ±è§£å¯ç§é¥ éå¯¹ç§°ç®æ³çå
¬ç§é¥ å¦ï¼SM2ï¼RSA 使ç¨è
请èªè¡æ´æ¢ |
| | | # 对åºå端å å¯å
¬é¥ MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdHnzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ== |
| | | privateKey: MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAqhHyZfSsYourNxaY7Nt+PrgrxkiA50efORdI5U5lsW79MmFnusUA355oaSXcLhu5xxB38SMSyP2KvuKNPuH3owIDAQABAkAfoiLyL+Z4lf4Myxk6xUDgLaWGximj20CUf+5BKKnlrK+Ed8gAkM0HqoTt2UZwA5E2MzS4EI2gjfQhz5X28uqxAiEA3wNFxfrCZlSZHb0gn2zDpWowcSxQAgiCstxGUoOqlW8CIQDDOerGKH5OmCJ4Z21v+F25WaHYPxCFMvwxpcw99EcvDQIgIdhDTIqD2jfYjPTY8Jj3EDGPbH2HHuffvflECt3Ek60CIQCFRlCkHpi7hthhYhovyloRYsM+IS9h/0BzlEAuO0ktMQIgSPT3aFAgJYwKpqRYKlLDVcflZFCKY7u3UP8iWi1Qw0Y= |
| | | |
| | | springdoc: |
| | |
| | | email.code.not.blank=é®ç®±éªè¯ç ä¸è½ä¸ºç©º |
| | | email.code.retry.limit.count=é®ç®±éªè¯ç è¾å
¥é误{0}次 |
| | | email.code.retry.limit.exceed=é®ç®±éªè¯ç è¾å
¥é误{0}次ï¼å¸æ·éå®{1}åé |
| | | xcx.code.not.blank=å°ç¨åºcodeä¸è½ä¸ºç©º |
| | | xcx.code.not.blank=å°ç¨åº[code]ä¸è½ä¸ºç©º |
| | | social.source.not.blank=ç¬¬ä¸æ¹ç»å½å¹³å°[source]ä¸è½ä¸ºç©º |
| | | social.code.not.blank=ç¬¬ä¸æ¹ç»å½å¹³å°[code]ä¸è½ä¸ºç©º |
| | | social.state.not.blank=ç¬¬ä¸æ¹ç»å½å¹³å°[state]ä¸è½ä¸ºç©º |
| | | ##ç§æ· |
| | | tenant.number.not.blank=ç§æ·ç¼å·ä¸è½ä¸ºç©º |
| | | tenant.not.exists=对ä¸èµ·, æ¨çç§æ·ä¸åå¨ï¼è¯·è系管çå |
| | |
| | | email.code.not.blank=Email code cannot be blank |
| | | email.code.retry.limit.count=Email code input error {0} times |
| | | email.code.retry.limit.exceed=Email code input error {0} times, account locked for {1} minutes |
| | | xcx.code.not.blank=Mini program code cannot be blank |
| | | xcx.code.not.blank=Mini program [code] cannot be blank |
| | | social.source.not.blank=Social login platform [source] cannot be blank |
| | | social.code.not.blank=Social login platform [code] cannot be blank |
| | | social.state.not.blank=Social login platform [state] cannot be blank |
| | | ##ç§æ· |
| | | tenant.number.not.blank=Tenant number cannot be blank |
| | | tenant.not.exists=Sorry, your tenant does not exist. Please contact the administrator |
| | |
| | | email.code.not.blank=é®ç®±éªè¯ç ä¸è½ä¸ºç©º |
| | | email.code.retry.limit.count=é®ç®±éªè¯ç è¾å
¥é误{0}次 |
| | | email.code.retry.limit.exceed=é®ç®±éªè¯ç è¾å
¥é误{0}次ï¼å¸æ·éå®{1}åé |
| | | xcx.code.not.blank=å°ç¨åºcodeä¸è½ä¸ºç©º |
| | | xcx.code.not.blank=å°ç¨åº[code]ä¸è½ä¸ºç©º |
| | | social.source.not.blank=ç¬¬ä¸æ¹ç»å½å¹³å°[source]ä¸è½ä¸ºç©º |
| | | social.code.not.blank=ç¬¬ä¸æ¹ç»å½å¹³å°[code]ä¸è½ä¸ºç©º |
| | | social.state.not.blank=ç¬¬ä¸æ¹ç»å½å¹³å°[state]ä¸è½ä¸ºç©º |
| | | ##ç§æ· |
| | | tenant.number.not.blank=ç§æ·ç¼å·ä¸è½ä¸ºç©º |
| | | tenant.not.exists=对ä¸èµ·, æ¨çç§æ·ä¸åå¨ï¼è¯·è系管çå |
| | |
| | | </description> |
| | | |
| | | <properties> |
| | | <revision>5.1.1</revision> |
| | | <revision>5.1.2</revision> |
| | | </properties> |
| | | |
| | | <dependencyManagement> |
| | |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-json</artifactId> |
| | | <scope>provided</scope> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.projectlombok</groupId> |
| | | <artifactId>lombok</artifactId> |
| | | </dependency> |
| | |
| | | String SYS_USER_NAME = "sys_user_name#30d"; |
| | | |
| | | /** |
| | | * ç¨æ·åç§° |
| | | */ |
| | | String SYS_NICKNAME = "sys_nickname#30d"; |
| | | |
| | | /** |
| | | * é¨é¨ |
| | | */ |
| | | String SYS_DEPT = "sys_dept#30d"; |
| | |
| | | /** |
| | | * OSSé
ç½® |
| | | */ |
| | | String SYS_OSS_CONFIG = "sys_oss_config"; |
| | | String SYS_OSS_CONFIG = GlobalConstants.GLOBAL_REDIS_KEY + "sys_oss_config"; |
| | | |
| | | /** |
| | | * å¨çº¿ç¨æ· |
| | |
| | | */ |
| | | String selectUserNameById(Long userId); |
| | | |
| | | /** |
| | | * éè¿ç¨æ·IDæ¥è¯¢ç¨æ·è´¦æ· |
| | | * |
| | | * @param userId ç¨æ·ID |
| | | * @return ç¨æ·è´¦æ· |
| | | */ |
| | | String selectNicknameById(Long userId); |
| | | |
| | | } |
| | |
| | | package org.dromara.common.core.utils.sql; |
| | | |
| | | import org.dromara.common.core.exception.UtilException; |
| | | import org.dromara.common.core.utils.StringUtils; |
| | | import lombok.AccessLevel; |
| | | import lombok.NoArgsConstructor; |
| | | import org.dromara.common.core.utils.StringUtils; |
| | | |
| | | /** |
| | | * sqlæä½å·¥å
·ç±» |
| | |
| | | */ |
| | | public static String escapeOrderBySql(String value) { |
| | | if (StringUtils.isNotEmpty(value) && !isValidOrderBySql(value)) { |
| | | throw new UtilException("åæ°ä¸ç¬¦åè§èï¼ä¸è½è¿è¡æ¥è¯¢"); |
| | | throw new IllegalArgumentException("åæ°ä¸ç¬¦åè§èï¼ä¸è½è¿è¡æ¥è¯¢"); |
| | | } |
| | | return value; |
| | | } |
| | |
| | | String[] sqlKeywords = StringUtils.split(SQL_REGEX, "\\|"); |
| | | for (String sqlKeyword : sqlKeywords) { |
| | | if (StringUtils.indexOfIgnoreCase(value, sqlKeyword) > -1) { |
| | | throw new UtilException("åæ°åå¨SQL注å
¥é£é©"); |
| | | throw new IllegalArgumentException("åæ°åå¨SQL注å
¥é£é©"); |
| | | } |
| | | } |
| | | } |
| | |
| | | <artifactId>hutool-crypto</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.springframework</groupId> |
| | | <artifactId>spring-webmvc</artifactId> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | |
| | | </project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.dromara.common.encrypt.annotation; |
| | | |
| | | import java.lang.annotation.*; |
| | | |
| | | /** |
| | | * 强å¶å 坿³¨è§£ |
| | | * |
| | | * @author Michelle.Chung |
| | | */ |
| | | @Documented |
| | | @Target({ElementType.METHOD}) |
| | | @Retention(RetentionPolicy.RUNTIME) |
| | | public @interface ApiEncrypt { |
| | | |
| | | /** |
| | | * ååºå å¯å¿½ç¥ï¼é»è®¤ä¸å å¯ï¼ä¸º true æ¶å å¯ |
| | | */ |
| | | boolean response() default false; |
| | | |
| | | } |
| | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import jakarta.servlet.*; |
| | | import jakarta.servlet.http.HttpServletRequest; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.dromara.common.core.constant.HttpStatus; |
| | | import org.dromara.common.core.exception.ServiceException; |
| | | import org.dromara.common.core.utils.SpringUtils; |
| | | import org.dromara.common.core.utils.StringUtils; |
| | | import org.dromara.common.encrypt.annotation.ApiEncrypt; |
| | | import org.dromara.common.encrypt.properties.ApiDecryptProperties; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.web.method.HandlerMethod; |
| | | import org.springframework.web.servlet.HandlerExceptionResolver; |
| | | import org.springframework.web.servlet.HandlerExecutionChain; |
| | | import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping; |
| | | |
| | | import java.io.IOException; |
| | | |
| | |
| | | |
| | | @Override |
| | | public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { |
| | | ServletRequest requestWrapper = null; |
| | | HttpServletRequest servletRequest = (HttpServletRequest) request; |
| | | HttpServletResponse servletResponse = (HttpServletResponse) response; |
| | | |
| | | boolean encryptFlag = false; |
| | | ServletRequest requestWrapper = null; |
| | | ServletResponse responseWrapper = null; |
| | | EncryptResponseBodyWrapper responseBodyWrapper = null; |
| | | |
| | | // æ¯å¦ä¸º json è¯·æ± |
| | | if (StringUtils.startsWithIgnoreCase(request.getContentType(), MediaType.APPLICATION_JSON_VALUE)) { |
| | | // æ¯å¦ä¸º put æè
post è¯·æ± |
| | |
| | | // æ¯å¦åå¨å 坿 头 |
| | | String headerValue = servletRequest.getHeader(properties.getHeaderFlag()); |
| | | if (StringUtils.isNotBlank(headerValue)) { |
| | | requestWrapper = new DecryptRequestBodyWrapper(servletRequest, properties.getPublicKey(), properties.getPrivateKey(), properties.getHeaderFlag()); |
| | | // 请æ±è§£å¯ |
| | | requestWrapper = new DecryptRequestBodyWrapper(servletRequest, properties.getPrivateKey(), properties.getHeaderFlag()); |
| | | // è·åå 坿³¨è§£ |
| | | ApiEncrypt apiEncrypt = this.getApiEncryptAnnotation(servletRequest); |
| | | if (ObjectUtil.isNotNull(apiEncrypt)) { |
| | | // ååºå 坿 å¿ |
| | | encryptFlag = apiEncrypt.response(); |
| | | } else { |
| | | // æ¯å¦ææ³¨è§£ï¼æå°±æ¥éï¼æ²¡ææ¾è¡ |
| | | HandlerExceptionResolver exceptionResolver = SpringUtils.getBean(HandlerExceptionResolver.class); |
| | | exceptionResolver.resolveException( |
| | | servletRequest, servletResponse, null, |
| | | new ServiceException("没æè®¿é®æéï¼è¯·è系管çåææ", HttpStatus.FORBIDDEN)); |
| | | } |
| | | } |
| | | // 夿æ¯å¦ååºå å¯ |
| | | if (encryptFlag) { |
| | | responseBodyWrapper = new EncryptResponseBodyWrapper(servletResponse); |
| | | responseWrapper = responseBodyWrapper; |
| | | } |
| | | } |
| | | } |
| | | |
| | | chain.doFilter(ObjectUtil.defaultIfNull(requestWrapper, request), response); |
| | | chain.doFilter( |
| | | ObjectUtil.defaultIfNull(requestWrapper, request), |
| | | ObjectUtil.defaultIfNull(responseWrapper, response)); |
| | | |
| | | if (encryptFlag) { |
| | | servletResponse.reset(); |
| | | // 对åå§å
容å å¯ |
| | | String encryptContent = responseBodyWrapper.getEncryptContent( |
| | | servletResponse, properties.getPublicKey(), properties.getHeaderFlag()); |
| | | // 对å å¯åçå
容ååº |
| | | servletResponse.getWriter().write(encryptContent); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è·å ApiEncrypt 注解 |
| | | */ |
| | | private ApiEncrypt getApiEncryptAnnotation(HttpServletRequest servletRequest) { |
| | | RequestMappingHandlerMapping handlerMapping = SpringUtils.getBean("requestMappingHandlerMapping", RequestMappingHandlerMapping.class); |
| | | // è·å注解 |
| | | try { |
| | | HandlerExecutionChain mappingHandler = handlerMapping.getHandler(servletRequest); |
| | | if (ObjectUtil.isNotNull(mappingHandler)) { |
| | | Object handler = mappingHandler.getHandler(); |
| | | if (ObjectUtil.isNotNull(handler)) { |
| | | // ä»handlerè·å注解 |
| | | if (handler instanceof HandlerMethod handlerMethod) { |
| | | return handlerMethod.getMethodAnnotation(ApiEncrypt.class); |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public void destroy() { |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | private final byte[] body; |
| | | |
| | | public DecryptRequestBodyWrapper(HttpServletRequest request, String publicKey, String privateKey, String headerFlag) throws IOException { |
| | | public DecryptRequestBodyWrapper(HttpServletRequest request, String privateKey, String headerFlag) throws IOException { |
| | | super(request); |
| | | // è·å AES å¯ç éç¨ RSA å å¯ |
| | | String headerRsa = request.getHeader(headerFlag); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.dromara.common.encrypt.filter; |
| | | |
| | | import cn.hutool.core.util.RandomUtil; |
| | | import jakarta.servlet.ServletOutputStream; |
| | | import jakarta.servlet.WriteListener; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import jakarta.servlet.http.HttpServletResponseWrapper; |
| | | import org.dromara.common.encrypt.utils.EncryptUtils; |
| | | |
| | | import java.io.*; |
| | | import java.nio.charset.StandardCharsets; |
| | | |
| | | /** |
| | | * å å¯ååºåæ°å
è£
ç±» |
| | | * |
| | | * @author Michelle.Chung |
| | | */ |
| | | public class EncryptResponseBodyWrapper extends HttpServletResponseWrapper { |
| | | |
| | | private final ByteArrayOutputStream byteArrayOutputStream; |
| | | private final ServletOutputStream servletOutputStream; |
| | | private final PrintWriter printWriter; |
| | | |
| | | public EncryptResponseBodyWrapper(HttpServletResponse response) throws IOException { |
| | | super(response); |
| | | this.byteArrayOutputStream = new ByteArrayOutputStream(); |
| | | this.servletOutputStream = this.getOutputStream(); |
| | | this.printWriter = new PrintWriter(new OutputStreamWriter(byteArrayOutputStream)); |
| | | } |
| | | |
| | | @Override |
| | | public PrintWriter getWriter() { |
| | | return printWriter; |
| | | } |
| | | |
| | | @Override |
| | | public void flushBuffer() throws IOException { |
| | | if (servletOutputStream != null) { |
| | | servletOutputStream.flush(); |
| | | } |
| | | if (printWriter != null) { |
| | | printWriter.flush(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void reset() { |
| | | byteArrayOutputStream.reset(); |
| | | } |
| | | |
| | | public byte[] getResponseData() throws IOException { |
| | | flushBuffer(); |
| | | return byteArrayOutputStream.toByteArray(); |
| | | } |
| | | |
| | | public String getContent() throws IOException { |
| | | flushBuffer(); |
| | | return byteArrayOutputStream.toString(); |
| | | } |
| | | |
| | | /** |
| | | * è·åå å¯å
容 |
| | | * |
| | | * @param servletResponse response |
| | | * @param publicKey RSAå
¬é¥ (ç¨äºå å¯ AES ç§é¥) |
| | | * @param headerFlag 请æ±å¤´æ å¿ |
| | | * @return å å¯å
容 |
| | | * @throws IOException |
| | | */ |
| | | public String getEncryptContent(HttpServletResponse servletResponse, String publicKey, String headerFlag) throws IOException { |
| | | // çæç§é¥ |
| | | String aesPassword = RandomUtil.randomString(32); |
| | | // ç§é¥ä½¿ç¨ Base64 ç¼ç |
| | | String encryptAes = EncryptUtils.encryptByBase64(aesPassword); |
| | | // Rsa å
¬é¥å å¯ Base64 ç¼ç |
| | | String encryptPassword = EncryptUtils.encryptByRsa(encryptAes, publicKey); |
| | | |
| | | // 设置ååºå¤´ |
| | | servletResponse.setHeader(headerFlag, encryptPassword); |
| | | servletResponse.setHeader("Access-Control-Allow-Origin", "*"); |
| | | servletResponse.setHeader("Access-Control-Allow-Methods", "*"); |
| | | servletResponse.setCharacterEncoding(StandardCharsets.UTF_8.toString()); |
| | | |
| | | // è·ååå§å
容 |
| | | String originalBody = this.getContent(); |
| | | // 对å
容è¿è¡å å¯ |
| | | return EncryptUtils.encryptByAes(originalBody, aesPassword); |
| | | } |
| | | |
| | | @Override |
| | | public ServletOutputStream getOutputStream() throws IOException { |
| | | return new ServletOutputStream() { |
| | | @Override |
| | | public boolean isReady() { |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public void setWriteListener(WriteListener writeListener) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void write(int b) throws IOException { |
| | | byteArrayOutputStream.write(b); |
| | | } |
| | | |
| | | @Override |
| | | public void write(byte[] b) throws IOException { |
| | | byteArrayOutputStream.write(b); |
| | | } |
| | | |
| | | @Override |
| | | public void write(byte[] b, int off, int len) throws IOException { |
| | | byteArrayOutputStream.write(b, off, len); |
| | | } |
| | | }; |
| | | } |
| | | |
| | | } |
| | |
| | | */ |
| | | private String headerFlag; |
| | | |
| | | |
| | | /** |
| | | * å
¬é¥ |
| | | * ååºå å¯å
¬é¥ |
| | | */ |
| | | private String publicKey; |
| | | |
| | | /** |
| | | * ç§é¥ |
| | | * 请æ±è§£å¯ç§é¥ |
| | | */ |
| | | private String privateKey; |
| | | |
| | | } |
| | |
| | | cellList.add(new CellRangeAddress(repeatCell.getCurrent() + rowIndex, i + rowIndex - 1, colNum, colNum)); |
| | | } |
| | | map.put(field, new RepeatCell(val, i)); |
| | | } else if (i == list.size() - 1) { |
| | | if (i > repeatCell.getCurrent()) { |
| | | cellList.add(new CellRangeAddress(repeatCell.getCurrent() + rowIndex, i + rowIndex, colNum, colNum)); |
| | | } else if (j == 0) { |
| | | if (i == list.size() - 1) { |
| | | if (i > repeatCell.getCurrent()) { |
| | | cellList.add(new CellRangeAddress(repeatCell.getCurrent() + rowIndex, i + rowIndex, colNum, colNum)); |
| | | } |
| | | } |
| | | } else { |
| | | // 夿åé¢çæ¯å¦åå¹¶äº |
| | | RepeatCell firstCell = map.get(mergeFields.get(0)); |
| | | if (repeatCell.getCurrent() != firstCell.getCurrent()) { |
| | | if (i == list.size() - 1) { |
| | | if (i > repeatCell.getCurrent()) { |
| | | cellList.add(new CellRangeAddress(repeatCell.getCurrent() + rowIndex, i + rowIndex, colNum, colNum)); |
| | | } |
| | | } else if (repeatCell.getCurrent() < firstCell.getCurrent()) { |
| | | if (i - repeatCell.getCurrent() > 1) { |
| | | cellList.add(new CellRangeAddress(repeatCell.getCurrent() + rowIndex, i + rowIndex - 1, colNum, colNum)); |
| | | } |
| | | map.put(field, new RepeatCell(val, i)); |
| | | } |
| | | } else if (i == list.size() - 1) { |
| | | if (i > repeatCell.getCurrent()) { |
| | | cellList.add(new CellRangeAddress(repeatCell.getCurrent() + rowIndex, i + rowIndex, colNum, colNum)); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * å¤sheet模æ¿å¯¼åº æ¨¡æ¿æ ¼å¼ä¸º {key.屿§} |
| | | * |
| | | * @param filename æä»¶å |
| | | * @param templatePath 模æ¿è·¯å¾ resource ç®å½ä¸çè·¯å¾å
æ¬æ¨¡æ¿æä»¶å |
| | | * ä¾å¦: excel/temp.xlsx |
| | | * éç¹: æ¨¡æ¿æä»¶å¿
é¡»æ¾ç½®å°å¯å¨ç±»å¯¹åºç resource ç®å½ä¸ |
| | | * @param data 模æ¿éè¦çæ°æ® |
| | | * @param response ååºä½ |
| | | */ |
| | | public static void exportTemplateMultiSheet(List<Map<String, Object>> data, String filename, String templatePath, HttpServletResponse response) { |
| | | try { |
| | | resetResponse(filename, response); |
| | | ServletOutputStream os = response.getOutputStream(); |
| | | exportTemplateMultiSheet(data, templatePath, os); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException("导åºExcelå¼å¸¸"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å¤è¡¨å¤æ°æ®æ¨¡æ¿å¯¼åº æ¨¡æ¿æ ¼å¼ä¸º {key.屿§} |
| | | * |
| | | * @param templatePath 模æ¿è·¯å¾ resource ç®å½ä¸çè·¯å¾å
æ¬æ¨¡æ¿æä»¶å |
| | |
| | | } |
| | | |
| | | /** |
| | | * å¤sheet模æ¿å¯¼åº æ¨¡æ¿æ ¼å¼ä¸º {key.屿§} |
| | | * |
| | | * @param templatePath 模æ¿è·¯å¾ resource ç®å½ä¸çè·¯å¾å
æ¬æ¨¡æ¿æä»¶å |
| | | * ä¾å¦: excel/temp.xlsx |
| | | * éç¹: æ¨¡æ¿æä»¶å¿
é¡»æ¾ç½®å°å¯å¨ç±»å¯¹åºç resource ç®å½ä¸ |
| | | * @param data 模æ¿éè¦çæ°æ® |
| | | * @param os è¾åºæµ |
| | | */ |
| | | public static void exportTemplateMultiSheet(List<Map<String, Object>> data, String templatePath, OutputStream os) { |
| | | ClassPathResource templateResource = new ClassPathResource(templatePath); |
| | | ExcelWriter excelWriter = EasyExcel.write(os) |
| | | .withTemplate(templateResource.getStream()) |
| | | .autoCloseStream(false) |
| | | // 大æ°å¼èªå¨è½¬æ¢ 鲿¢å¤±ç |
| | | .registerConverter(new ExcelBigNumberConvert()) |
| | | .build(); |
| | | if (CollUtil.isEmpty(data)) { |
| | | throw new IllegalArgumentException("æ°æ®ä¸ºç©º"); |
| | | } |
| | | for (int i = 0; i < data.size(); i++) { |
| | | WriteSheet writeSheet = EasyExcel.writerSheet(i).build(); |
| | | for (Map.Entry<String, Object> map : data.get(i).entrySet()) { |
| | | // 设置å表åç»è¿ææ°æ® |
| | | FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build(); |
| | | if (map.getValue() instanceof Collection) { |
| | | // å¤è¡¨å¯¼åºå¿
é¡»ä½¿ç¨ FillWrapper |
| | | excelWriter.fill(new FillWrapper(map.getKey(), (Collection<?>) map.getValue()), fillConfig, writeSheet); |
| | | } else { |
| | | excelWriter.fill(map.getValue(), writeSheet); |
| | | } |
| | | } |
| | | } |
| | | excelWriter.finish(); |
| | | } |
| | | |
| | | /** |
| | | * éç½®ååºä½ |
| | | */ |
| | | private static void resetResponse(String sheetName, HttpServletResponse response) throws UnsupportedEncodingException { |
| | |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.mybatis.spring.boot</groupId> |
| | | <artifactId>mybatis-spring-boot-starter</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.baomidou</groupId> |
| | | <artifactId>mybatis-plus-boot-starter</artifactId> |
| | | <exclusions> |
| | | <exclusion> |
| | | <groupId>org.mybatis</groupId> |
| | | <artifactId>mybatis-spring</artifactId> |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | |
| | | <!-- sqlæ§è½åææä»¶ --> |
| | |
| | | public R<Void> handleCannotFindDataSourceException(MyBatisSystemException e, HttpServletRequest request) { |
| | | String requestURI = request.getRequestURI(); |
| | | String message = e.getMessage(); |
| | | if (message.contains("CannotFindDataSourceException")) { |
| | | if ("CannotFindDataSourceException".contains(message)) { |
| | | log.error("请æ±å°å'{}', æªæ¾å°æ°æ®æº", requestURI); |
| | | return R.fail("æªæ¾å°æ°æ®æºï¼è¯·è系管çå确认"); |
| | | } |
| | |
| | | int index = sb.lastIndexOf("."); |
| | | String clazzName = sb.substring(0, index); |
| | | String methodName = sb.substring(index + 1, sb.length()); |
| | | Class<?> clazz = ClassUtil.loadClass(clazzName); |
| | | Class<?> clazz; |
| | | try { |
| | | clazz = ClassUtil.loadClass(clazzName); |
| | | } catch (Exception e) { |
| | | return null; |
| | | } |
| | | List<Method> methods = Arrays.stream(ClassUtil.getDeclaredMethods(clazz)) |
| | | .filter(method -> method.getName().equals(methodName)).toList(); |
| | | DataPermission dataPermission; |
| | |
| | | package org.dromara.common.oss.constant; |
| | | |
| | | import org.dromara.common.core.constant.GlobalConstants; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | |
| | | /** |
| | | * é»è®¤é
ç½®KEY |
| | | */ |
| | | String DEFAULT_CONFIG_KEY = "sys_oss:default_config"; |
| | | String DEFAULT_CONFIG_KEY = GlobalConstants.GLOBAL_REDIS_KEY + "sys_oss:default_config"; |
| | | |
| | | /** |
| | | * é¢è§åè¡¨èµæºå¼å
³Key |
| | |
| | | /** |
| | | * æ ¹æ®ç±»åè·åå®ä¾ |
| | | */ |
| | | public static OssClient instance(String configKey) { |
| | | public static synchronized OssClient instance(String configKey) { |
| | | String json = CacheUtils.get(CacheNames.SYS_OSS_CONFIG, configKey); |
| | | if (json == null) { |
| | | throw new OssException("ç³»ç»å¼å¸¸, '" + configKey + "'é
置信æ¯ä¸åå¨!"); |
| | |
| | | CompositeCodec codec = new CompositeCodec(StringCodec.INSTANCE, jsonCodec, jsonCodec); |
| | | config.setThreads(redissonProperties.getThreads()) |
| | | .setNettyThreads(redissonProperties.getNettyThreads()) |
| | | // ç¼å Lua èæ¬ åå°ç½ç»ä¼ è¾(redisson 大é¨åçåè½é½æ¯åºäº Lua èæ¬å®ç°) |
| | | .setUseScriptCache(true) |
| | | .setCodec(codec); |
| | | RedissonProperties.SingleServerConfig singleServerConfig = redissonProperties.getSingleServerConfig(); |
| | | if (ObjectUtil.isNotNull(singleServerConfig)) { |
| | |
| | | /** |
| | | * 订é
é»å¡éå(å¯è®¢é
ææå®ç°ç±» ä¾å¦: å»¶è¿ ä¼å
æç ç) |
| | | */ |
| | | public static <T> void subscribeBlockingQueue(String queueName, Consumer<T> consumer) { |
| | | public static <T> void subscribeBlockingQueue(String queueName, Consumer<T> consumer, boolean isDelayed) { |
| | | RBlockingQueue<T> queue = CLIENT.getBlockingQueue(queueName); |
| | | if (isDelayed) { |
| | | // 订é
å»¶è¿éå |
| | | CLIENT.getDelayedQueue(queue); |
| | | } |
| | | queue.subscribeOnElements(consumer); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 妿åå¨å设置 å¹¶è¿å true 妿åå¨åè¿å false |
| | | * |
| | | * @param key ç¼åçé®å¼ |
| | | * @param value ç¼åçå¼ |
| | | * @return setæåæå¤±è´¥ |
| | | */ |
| | | public static <T> boolean setObjectIfExists(final String key, final T value, final Duration duration) { |
| | | RBucket<T> bucket = CLIENT.getBucket(key); |
| | | return bucket.setIfExists(value, duration); |
| | | } |
| | | |
| | | /** |
| | | * 注å对象çå¬å¨ |
| | | * <p> |
| | | * key çå¬å¨éå¼å¯ `notify-keyspace-events` ç redis ç¸å
³é
ç½® |
| | |
| | | } |
| | | |
| | | /** |
| | | * 追å ç¼åListæ°æ® |
| | | * |
| | | * @param key ç¼åçé®å¼ |
| | | * @param data å¾
ç¼åçæ°æ® |
| | | * @return ç¼åç对象 |
| | | */ |
| | | public static <T> boolean addCacheList(final String key, final T data) { |
| | | RList<T> rList = CLIENT.getList(key); |
| | | return rList.add(data); |
| | | } |
| | | |
| | | /** |
| | | * 注åListçå¬å¨ |
| | | * <p> |
| | | * key çå¬å¨éå¼å¯ `notify-keyspace-events` ç redis ç¸å
³é
ç½® |
| | |
| | | } |
| | | |
| | | /** |
| | | * è·å¾ç¼åçlist对象(èå´) |
| | | * |
| | | * @param key ç¼åçé®å¼ |
| | | * @param form èµ·å§ä¸æ |
| | | * @param to æªæ¢ä¸æ |
| | | * @return ç¼åé®å¼å¯¹åºçæ°æ® |
| | | */ |
| | | public static <T> List<T> getCacheListRange(final String key, int form, int to) { |
| | | RList<T> rList = CLIENT.getList(key); |
| | | return rList.range(form, to); |
| | | } |
| | | |
| | | /** |
| | | * ç¼åSet |
| | | * |
| | | * @param key ç¼åé®å¼ |
| | |
| | | } |
| | | |
| | | /** |
| | | * 追å ç¼åSetæ°æ® |
| | | * |
| | | * @param key ç¼åçé®å¼ |
| | | * @param data å¾
ç¼åçæ°æ® |
| | | * @return ç¼åç对象 |
| | | */ |
| | | public static <T> boolean addCacheSet(final String key, final T data) { |
| | | RSet<T> rSet = CLIENT.getSet(key); |
| | | return rSet.add(data); |
| | | } |
| | | |
| | | /** |
| | | * 注åSetçå¬å¨ |
| | | * <p> |
| | | * key çå¬å¨éå¼å¯ `notify-keyspace-events` ç redis ç¸å
³é
ç½® |
| | |
| | | import org.springframework.boot.autoconfigure.AutoConfiguration; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.PropertySource; |
| | | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
| | | |
| | | /** |
| | | * sa-token é
ç½® |
| | |
| | | */ |
| | | @AutoConfiguration |
| | | @PropertySource(value = "classpath:common-satoken.yml", factory = YmlPropertySourceFactory.class) |
| | | public class SaTokenConfig implements WebMvcConfigurer { |
| | | public class SaTokenConfig { |
| | | |
| | | @Bean |
| | | public StpLogic getStpLogicJwt() { |
| | |
| | | */ |
| | | @Override |
| | | public void update(String key, String value) { |
| | | long expire = getTimeout(key); |
| | | // -2 = æ æ¤é® |
| | | if (expire == NOT_VALUE_EXPIRE) { |
| | | return; |
| | | if (RedisUtils.hasKey(key)) { |
| | | RedisUtils.setCacheObject(key, value, true); |
| | | } |
| | | this.set(key, value, expire); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public void updateTimeout(String key, long timeout) { |
| | | // 夿æ¯å¦æ³è¦è®¾ç½®ä¸ºæ°¸ä¹
|
| | | if (timeout == NEVER_EXPIRE) { |
| | | long expire = getTimeout(key); |
| | | if (expire == NEVER_EXPIRE) { |
| | | // 妿å
¶å·²ç»è¢«è®¾ç½®ä¸ºæ°¸ä¹
ï¼åä¸ä½ä»»ä½å¤ç |
| | | } else { |
| | | // 妿尿ªè¢«è®¾ç½®ä¸ºæ°¸ä¹
ï¼é£ä¹å次set䏿¬¡ |
| | | this.set(key, this.get(key), timeout); |
| | | } |
| | | return; |
| | | } |
| | | RedisUtils.expire(key, Duration.ofSeconds(timeout)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public void updateObject(String key, Object object) { |
| | | long expire = getObjectTimeout(key); |
| | | // -2 = æ æ¤é® |
| | | if (expire == NOT_VALUE_EXPIRE) { |
| | | return; |
| | | if (RedisUtils.hasKey(key)) { |
| | | RedisUtils.setCacheObject(key, object, true); |
| | | } |
| | | this.setObject(key, object, expire); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public void updateObjectTimeout(String key, long timeout) { |
| | | // 夿æ¯å¦æ³è¦è®¾ç½®ä¸ºæ°¸ä¹
|
| | | if (timeout == NEVER_EXPIRE) { |
| | | long expire = getObjectTimeout(key); |
| | | if (expire == NEVER_EXPIRE) { |
| | | // 妿å
¶å·²ç»è¢«è®¾ç½®ä¸ºæ°¸ä¹
ï¼åä¸ä½ä»»ä½å¤ç |
| | | } else { |
| | | // 妿尿ªè¢«è®¾ç½®ä¸ºæ°¸ä¹
ï¼é£ä¹å次set䏿¬¡ |
| | | this.setObject(key, this.getObject(key), timeout); |
| | | } |
| | | return; |
| | | } |
| | | RedisUtils.expire(key, Duration.ofSeconds(timeout)); |
| | | } |
| | | |
| | |
| | | import org.dromara.common.core.enums.UserType; |
| | | |
| | | import java.util.Set; |
| | | import java.util.function.Supplier; |
| | | |
| | | /** |
| | | * ç»å½é´æå©æ |
| | |
| | | public static final String USER_KEY = "userId"; |
| | | public static final String DEPT_KEY = "deptId"; |
| | | public static final String CLIENT_KEY = "clientid"; |
| | | public static final String TENANT_ADMIN_KEY = "isTenantAdmin"; |
| | | |
| | | /** |
| | | * ç»å½ç³»ç» åºäº 设å¤ç±»å |
| | |
| | | model.setExtra(TENANT_KEY, loginUser.getTenantId()) |
| | | .setExtra(USER_KEY, loginUser.getUserId()) |
| | | .setExtra(DEPT_KEY, loginUser.getDeptId())); |
| | | StpUtil.getSession().set(LOGIN_USER_KEY, loginUser); |
| | | StpUtil.getTokenSession().set(LOGIN_USER_KEY, loginUser); |
| | | } |
| | | |
| | | /** |
| | | * è·åç¨æ·(å¤çº§ç¼å) |
| | | */ |
| | | public static LoginUser getLoginUser() { |
| | | LoginUser loginUser = (LoginUser) SaHolder.getStorage().get(LOGIN_USER_KEY); |
| | | if (loginUser != null) { |
| | | return loginUser; |
| | | } |
| | | SaSession session = StpUtil.getSession(); |
| | | if (ObjectUtil.isNull(session)) { |
| | | return null; |
| | | } |
| | | loginUser = (LoginUser) session.get(LOGIN_USER_KEY); |
| | | SaHolder.getStorage().set(LOGIN_USER_KEY, loginUser); |
| | | return loginUser; |
| | | return (LoginUser) getStorageIfAbsentSet(LOGIN_USER_KEY, () -> { |
| | | SaSession session = StpUtil.getTokenSession(); |
| | | if (ObjectUtil.isNull(session)) { |
| | | return null; |
| | | } |
| | | return session.get(LOGIN_USER_KEY); |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * è·åç¨æ·åºäºtoken |
| | | */ |
| | | public static LoginUser getLoginUser(String token) { |
| | | Object loginId = StpUtil.getLoginIdByToken(token); |
| | | SaSession session = StpUtil.getSessionByLoginId(loginId); |
| | | SaSession session = StpUtil.getTokenSessionByToken(token); |
| | | if (ObjectUtil.isNull(session)) { |
| | | return null; |
| | | } |
| | |
| | | } |
| | | |
| | | private static Object getExtra(String key) { |
| | | Object obj; |
| | | try { |
| | | obj = SaHolder.getStorage().get(key); |
| | | if (ObjectUtil.isNull(obj)) { |
| | | obj = StpUtil.getExtra(key); |
| | | SaHolder.getStorage().set(key, obj); |
| | | } |
| | | } catch (Exception e) { |
| | | return null; |
| | | } |
| | | return obj; |
| | | return getStorageIfAbsentSet(key, () -> StpUtil.getExtra(key)); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | public static boolean isTenantAdmin() { |
| | | return isTenantAdmin(getLoginUser().getRolePermission()); |
| | | Object value = getStorageIfAbsentSet(TENANT_ADMIN_KEY, () -> { |
| | | return isTenantAdmin(getLoginUser().getRolePermission()); |
| | | }); |
| | | return Convert.toBool(value); |
| | | } |
| | | |
| | | public static boolean isLogin() { |
| | | return getLoginUser() != null; |
| | | } |
| | | |
| | | public static Object getStorageIfAbsentSet(String key, Supplier<Object> handle) { |
| | | try { |
| | | Object obj = SaHolder.getStorage().get(key); |
| | | if (ObjectUtil.isNull(obj)) { |
| | | obj = handle.get(); |
| | | SaHolder.getStorage().set(key, obj); |
| | | } |
| | | return obj; |
| | | } catch (Exception e) { |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | |
| | | import jakarta.validation.ConstraintViolationException; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.dromara.common.core.domain.R; |
| | | import org.dromara.common.core.exception.DemoModeException; |
| | | import org.dromara.common.core.exception.ServiceException; |
| | | import org.dromara.common.core.exception.base.BaseException; |
| | | import org.dromara.common.core.utils.StreamUtils; |
| | |
| | | return R.fail(message); |
| | | } |
| | | |
| | | /** |
| | | * æ¼ç¤ºæ¨¡å¼å¼å¸¸ |
| | | */ |
| | | @ExceptionHandler(DemoModeException.class) |
| | | public R<Void> handleDemoModeException(DemoModeException e) { |
| | | return R.fail("æ¼ç¤ºæ¨¡å¼ï¼ä¸å
许æä½"); |
| | | } |
| | | } |
ÎļþÃû´Ó ruoyi-common/ruoyi-common-sms/src/main/java/org/dromara/common/sms/config/SmsConfig.java ÐÞ¸Ä |
| | |
| | | import org.springframework.boot.autoconfigure.AutoConfiguration; |
| | | |
| | | /** |
| | | * çä¿¡é
置类 |
| | | * çä¿¡é
置类(ææ¶æ²¡ç¨ é¢çæ©å±) |
| | | * |
| | | * @author Lion Li |
| | | * @version 4.2.0 |
| | | */ |
| | | @AutoConfiguration |
| | | //@EnableConfigurationProperties(SmsProperties.class) |
| | | public class SmsConfig { |
| | | public class SmsAutoConfiguration { |
| | | |
| | | } |
| | |
| | | org.dromara.common.sms.config.SmsConfig |
| | | org.dromara.common.sms.config.SmsAutoConfiguration |
| | |
| | | if (ObjectUtil.isNull(obj)) { |
| | | throw new AuthException("䏿¯æçç¬¬ä¸æ¹ç»å½ç±»å"); |
| | | } |
| | | String clientId = obj.getClientId(); |
| | | String clientSecret = obj.getClientSecret(); |
| | | String redirectUri = obj.getRedirectUri(); |
| | | AuthConfig.AuthConfigBuilder builder = AuthConfig.builder() |
| | | .clientId(obj.getClientId()) |
| | | .clientSecret(obj.getClientSecret()) |
| | | .redirectUri(obj.getRedirectUri()); |
| | | return switch (source.toLowerCase()) { |
| | | case "dingtalk" -> new AuthDingTalkRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); |
| | | case "baidu" -> new AuthBaiduRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); |
| | | case "github" -> new AuthGithubRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); |
| | | case "gitee" -> new AuthGiteeRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); |
| | | case "weibo" -> new AuthWeiboRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); |
| | | case "coding" -> new AuthCodingRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); |
| | | case "oschina" -> new AuthOschinaRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); |
| | | case "dingtalk" -> new AuthDingTalkRequest(builder.build(), STATE_CACHE); |
| | | case "baidu" -> new AuthBaiduRequest(builder.build(), STATE_CACHE); |
| | | case "github" -> new AuthGithubRequest(builder.build(), STATE_CACHE); |
| | | case "gitee" -> new AuthGiteeRequest(builder.build(), STATE_CACHE); |
| | | case "weibo" -> new AuthWeiboRequest(builder.build(), STATE_CACHE); |
| | | case "coding" -> new AuthCodingRequest(builder.build(), STATE_CACHE); |
| | | case "oschina" -> new AuthOschinaRequest(builder.build(), STATE_CACHE); |
| | | // æ¯ä»å®å¨å建åè°å°åæ¶ï¼ä¸å
许使ç¨localhostæè
127.0.0.1ï¼æä»¥è¿å¿çåè°å°å使ç¨çå±åç½å
çip |
| | | case "alipay_wallet" -> new AuthAlipayRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), socialProperties.getType().get("alipay_wallet").getAlipayPublicKey(), STATE_CACHE); |
| | | case "qq" -> new AuthQqRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); |
| | | case "wechat_open" -> new AuthWeChatOpenRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); |
| | | case "taobao" -> new AuthTaobaoRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); |
| | | case "douyin" -> new AuthDouyinRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); |
| | | case "linkedin" -> new AuthLinkedinRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); |
| | | case "microsoft" -> new AuthMicrosoftRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); |
| | | case "renren" -> new AuthRenrenRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); |
| | | case "stack_overflow" -> new AuthStackOverflowRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).stackOverflowKey("").build(), STATE_CACHE); |
| | | case "huawei" -> new AuthHuaweiRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); |
| | | case "wechat_enterprise" -> new AuthWeChatEnterpriseQrcodeRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).agentId("").build(), STATE_CACHE); |
| | | case "gitlab" -> new AuthGitlabRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); |
| | | case "wechat_mp" -> new AuthWeChatMpRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); |
| | | case "aliyun" -> new AuthAliyunRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); |
| | | case "maxkey" -> new AuthMaxKeyRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret).redirectUri(redirectUri).build(), STATE_CACHE); |
| | | case "alipay_wallet" -> new AuthAlipayRequest(builder.build(), socialProperties.getType().get("alipay_wallet").getAlipayPublicKey(), STATE_CACHE); |
| | | case "qq" -> new AuthQqRequest(builder.build(), STATE_CACHE); |
| | | case "wechat_open" -> new AuthWeChatOpenRequest(builder.build(), STATE_CACHE); |
| | | case "taobao" -> new AuthTaobaoRequest(builder.build(), STATE_CACHE); |
| | | case "douyin" -> new AuthDouyinRequest(builder.build(), STATE_CACHE); |
| | | case "linkedin" -> new AuthLinkedinRequest(builder.build(), STATE_CACHE); |
| | | case "microsoft" -> new AuthMicrosoftRequest(builder.build(), STATE_CACHE); |
| | | case "renren" -> new AuthRenrenRequest(builder.build(), STATE_CACHE); |
| | | case "stack_overflow" -> new AuthStackOverflowRequest(builder.stackOverflowKey("").build(), STATE_CACHE); |
| | | case "huawei" -> new AuthHuaweiRequest(builder.build(), STATE_CACHE); |
| | | case "wechat_enterprise" -> new AuthWeChatEnterpriseQrcodeRequest(builder.agentId("").build(), STATE_CACHE); |
| | | case "gitlab" -> new AuthGitlabRequest(builder.build(), STATE_CACHE); |
| | | case "wechat_mp" -> new AuthWeChatMpRequest(builder.build(), STATE_CACHE); |
| | | case "aliyun" -> new AuthAliyunRequest(builder.build(), STATE_CACHE); |
| | | case "maxkey" -> new AuthMaxKeyRequest(builder.build(), STATE_CACHE); |
| | | default -> throw new AuthException("æªè·åå°ææçAuthé
ç½®"); |
| | | }; |
| | | } |
| | |
| | | package org.dromara.common.tenant.helper; |
| | | |
| | | import cn.dev33.satoken.context.SaHolder; |
| | | import cn.dev33.satoken.spring.SpringMVCUtil; |
| | | import cn.dev33.satoken.stp.StpUtil; |
| | | import cn.hutool.core.convert.Convert; |
| | | import com.alibaba.ttl.TransmittableThreadLocal; |
| | | import com.baomidou.mybatisplus.core.plugins.IgnoreStrategy; |
| | |
| | | /** |
| | | * è®¾ç½®å¨æç§æ·(ä¸ç´ææ éè¦æå¨æ¸
ç) |
| | | * <p> |
| | | * å¦æä¸ºéwebç¯å¢ é£ä¹åªå¨å½å线ç¨å
çæ |
| | | * å¦æä¸ºæªç»å½ç¶æä¸ é£ä¹åªå¨å½å线ç¨å
çæ |
| | | */ |
| | | public static void setDynamic(String tenantId) { |
| | | if (!SpringMVCUtil.isWeb()) { |
| | | if (!isEnable()) { |
| | | return; |
| | | } |
| | | if (!isLogin()) { |
| | | TEMP_DYNAMIC_TENANT.set(tenantId); |
| | | return; |
| | | } |
| | |
| | | /** |
| | | * è·åå¨æç§æ·(ä¸ç´ææ éè¦æå¨æ¸
ç) |
| | | * <p> |
| | | * å¦æä¸ºéwebç¯å¢ é£ä¹åªå¨å½å线ç¨å
çæ |
| | | * å¦æä¸ºæªç»å½ç¶æä¸ é£ä¹åªå¨å½å线ç¨å
çæ |
| | | */ |
| | | public static String getDynamic() { |
| | | if (!SpringMVCUtil.isWeb()) { |
| | | if (!isEnable()) { |
| | | return null; |
| | | } |
| | | if (!isLogin()) { |
| | | return TEMP_DYNAMIC_TENANT.get(); |
| | | } |
| | | String cacheKey = DYNAMIC_TENANT_KEY + ":" + LoginHelper.getUserId(); |
| | |
| | | * æ¸
é¤å¨æç§æ· |
| | | */ |
| | | public static void clearDynamic() { |
| | | if (!SpringMVCUtil.isWeb()) { |
| | | if (!isEnable()) { |
| | | return; |
| | | } |
| | | if (!isLogin()) { |
| | | TEMP_DYNAMIC_TENANT.remove(); |
| | | return; |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * å¨å¨æç§æ·ä¸æ§è¡ |
| | | * |
| | | * @param handle å¤çæ§è¡æ¹æ³ |
| | | */ |
| | | public static void dynamic(String tenantId, Runnable handle) { |
| | | setDynamic(tenantId); |
| | | try { |
| | | handle.run(); |
| | | } finally { |
| | | clearDynamic(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å¨å¨æç§æ·ä¸æ§è¡ |
| | | * |
| | | * @param handle å¤çæ§è¡æ¹æ³ |
| | | */ |
| | | public static <T> T dynamic(String tenantId, Supplier<T> handle) { |
| | | setDynamic(tenantId); |
| | | try { |
| | | return handle.get(); |
| | | } finally { |
| | | clearDynamic(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è·åå½åç§æ·id(å¨æç§æ·ä¼å
) |
| | | */ |
| | | public static String getTenantId() { |
| | | if (!isEnable()) { |
| | | return null; |
| | | } |
| | | String tenantId = TenantHelper.getDynamic(); |
| | | if (StringUtils.isBlank(tenantId)) { |
| | | tenantId = LoginHelper.getTenantId(); |
| | |
| | | return tenantId; |
| | | } |
| | | |
| | | private static boolean isLogin() { |
| | | try { |
| | | StpUtil.checkLogin(); |
| | | return true; |
| | | } catch (Exception e) { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | String USER_ID_TO_NAME = "user_id_to_name"; |
| | | |
| | | /** |
| | | * ç¨æ·idè½¬ç¨æ·åç§° |
| | | */ |
| | | String USER_ID_TO_NICKNAME = "user_id_to_nickname"; |
| | | |
| | | /** |
| | | * é¨é¨id转åç§° |
| | | */ |
| | | String DEPT_ID_TO_NAME = "dept_id_to_name"; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.dromara.common.translation.core.impl; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import org.dromara.common.core.service.UserService; |
| | | import org.dromara.common.translation.annotation.TranslationType; |
| | | import org.dromara.common.translation.constant.TransConstant; |
| | | import org.dromara.common.translation.core.TranslationInterface; |
| | | |
| | | /** |
| | | * ç¨æ·åç§°ç¿»è¯å®ç° |
| | | * |
| | | * @author may |
| | | */ |
| | | @AllArgsConstructor |
| | | @TranslationType(type = TransConstant.USER_ID_TO_NICKNAME) |
| | | public class NicknameTranslationImpl implements TranslationInterface<String> { |
| | | |
| | | private final UserService userService; |
| | | |
| | | @Override |
| | | public String translation(Object key, String other) { |
| | | if (key instanceof Long id) { |
| | | return userService.selectNicknameById(id); |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | |
| | | org.dromara.common.translation.core.impl.DictTypeTranslationImpl |
| | | org.dromara.common.translation.core.impl.OssUrlTranslationImpl |
| | | org.dromara.common.translation.core.impl.UserNameTranslationImpl |
| | | org.dromara.common.translation.core.impl.NicknameTranslationImpl |
| | |
| | | |
| | | private static void sendMessage(WebSocketSession session, WebSocketMessage<?> message) { |
| | | if (session == null || !session.isOpen()) { |
| | | log.error("[send] sessionä¼è¯å·²ç»å
³é"); |
| | | log.warn("[send] sessionä¼è¯å·²ç»å
³é"); |
| | | } else { |
| | | try { |
| | | session.sendMessage(message); |
| | |
| | | |
| | | WORKDIR /ruoyi/monitor |
| | | |
| | | ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 |
| | | ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS="" |
| | | |
| | | EXPOSE 9090 |
| | | |
| | | ADD ./target/ruoyi-monitor-admin.jar ./app.jar |
| | | |
| | | ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] |
| | | ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -jar app.jar \ |
| | | -XX:+HeapDumpOnOutOfMemoryError -Xlog:gc*,:time,tags,level -XX:+UseZGC ${JAVA_OPTS} |
| | |
| | | |
| | | WORKDIR /ruoyi/powerjob |
| | | |
| | | ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 |
| | | ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS="-Xms512m -Xmx1024m" |
| | | |
| | | EXPOSE 7700 |
| | | |
| | | ADD ./target/ruoyi-powerjob-server.jar ./app.jar |
| | | |
| | | ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] |
| | | ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -jar app.jar \ |
| | | -XX:+HeapDumpOnOutOfMemoryError -Xlog:gc*,:time,tags,level -XX:+UseZGC ${JAVA_OPTS} |
| | |
| | | <artifactId>ruoyi-powerjob-server</artifactId> |
| | | |
| | | <properties> |
| | | <spring-boot.version>2.7.17</spring-boot.version> |
| | | <spring-boot.version>2.7.18</spring-boot.version> |
| | | <spring-boot-admin.version>2.7.11</spring-boot-admin.version> |
| | | </properties> |
| | | <dependencyManagement> |
| | |
| | | } |
| | | |
| | | /** |
| | | * å¤ä¸ªsheetå¯¼åº |
| | | */ |
| | | @GetMapping("/exportTemplateMultiSheet") |
| | | public void exportTemplateMultiSheet(HttpServletResponse response) { |
| | | List<TestObj1> list1 = new ArrayList<>(); |
| | | list1.add(new TestObj1("list1æµè¯1", "list1æµè¯2", "list1æµè¯3")); |
| | | list1.add(new TestObj1("list1æµè¯4", "list1æµè¯5", "list1æµè¯6")); |
| | | List<TestObj1> list2 = new ArrayList<>(); |
| | | list2.add(new TestObj1("list2æµè¯1", "list2æµè¯2", "list2æµè¯3")); |
| | | list2.add(new TestObj1("list2æµè¯4", "list2æµè¯5", "list2æµè¯6")); |
| | | List<TestObj1> list3 = new ArrayList<>(); |
| | | list3.add(new TestObj1("list3æµè¯1", "list3æµè¯2", "list3æµè¯3")); |
| | | list3.add(new TestObj1("list3æµè¯4", "list3æµè¯5", "list3æµè¯6")); |
| | | List<TestObj1> list4 = new ArrayList<>(); |
| | | list4.add(new TestObj1("list4æµè¯1", "list4æµè¯2", "list4æµè¯3")); |
| | | list4.add(new TestObj1("list4æµè¯4", "list4æµè¯5", "list4æµè¯6")); |
| | | |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | Map<String, Object> sheetMap1 = new HashMap<>(); |
| | | sheetMap1.put("data1", list1); |
| | | Map<String, Object> sheetMap2 = new HashMap<>(); |
| | | sheetMap2.put("data2", list2); |
| | | Map<String, Object> sheetMap3 = new HashMap<>(); |
| | | sheetMap3.put("data3", list3); |
| | | Map<String, Object> sheetMap4 = new HashMap<>(); |
| | | sheetMap4.put("data4", list4); |
| | | |
| | | list.add(sheetMap1); |
| | | list.add(sheetMap2); |
| | | list.add(sheetMap3); |
| | | list.add(sheetMap4); |
| | | ExcelUtil.exportTemplateMultiSheet(list, "å¤sheetå表", "excel/å¤sheetå表.xlsx", response); |
| | | } |
| | | |
| | | /** |
| | | * 导å
¥è¡¨æ ¼ |
| | | */ |
| | | @PostMapping(value = "/importWithOptions", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) |
| | |
| | | package org.dromara.demo.controller.queue; |
| | | |
| | | import cn.dev33.satoken.annotation.SaIgnore; |
| | | import org.dromara.common.core.domain.R; |
| | | import org.dromara.common.redis.utils.QueueUtils; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | * @author Lion Li |
| | | * @version 3.6.0 |
| | | */ |
| | | @SaIgnore |
| | | @Slf4j |
| | | @RequiredArgsConstructor |
| | | @RestController |
| | |
| | | QueueUtils.subscribeBlockingQueue(queueName, (String orderNum) -> { |
| | | // è§å¯æ¥æ¶æ¶é´ |
| | | log.info("éé: {}, æ¶å°æ°æ®: {}", queueName, orderNum); |
| | | }); |
| | | }, true); |
| | | return R.ok("æä½æå"); |
| | | } |
| | | |
| | |
| | | /** |
| | | * æ¥è¯¢å¯¹è±¡åå¨é
ç½®å表 |
| | | */ |
| | | @SaCheckPermission("system:oss:list") |
| | | @SaCheckPermission("system:ossConfig:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo<SysOssConfigVo> list(@Validated(QueryGroup.class) SysOssConfigBo bo, PageQuery pageQuery) { |
| | | return ossConfigService.queryPageList(bo, pageQuery); |
| | |
| | | * |
| | | * @param ossConfigId OSSé
ç½®ID |
| | | */ |
| | | @SaCheckPermission("system:oss:query") |
| | | @SaCheckPermission("system:ossConfig:list") |
| | | @GetMapping("/{ossConfigId}") |
| | | public R<SysOssConfigVo> getInfo(@NotNull(message = "主é®ä¸è½ä¸ºç©º") |
| | | @PathVariable Long ossConfigId) { |
| | |
| | | /** |
| | | * æ°å¢å¯¹è±¡åå¨é
ç½® |
| | | */ |
| | | @SaCheckPermission("system:oss:add") |
| | | @SaCheckPermission("system:ossConfig:add") |
| | | @Log(title = "对象åå¨é
ç½®", businessType = BusinessType.INSERT) |
| | | @RepeatSubmit() |
| | | @PostMapping() |
| | |
| | | /** |
| | | * ä¿®æ¹å¯¹è±¡åå¨é
ç½® |
| | | */ |
| | | @SaCheckPermission("system:oss:edit") |
| | | @SaCheckPermission("system:ossConfig:edit") |
| | | @Log(title = "对象åå¨é
ç½®", businessType = BusinessType.UPDATE) |
| | | @RepeatSubmit() |
| | | @PutMapping() |
| | |
| | | * |
| | | * @param ossConfigIds OSSé
置ID串 |
| | | */ |
| | | @SaCheckPermission("system:oss:remove") |
| | | @SaCheckPermission("system:ossConfig:remove") |
| | | @Log(title = "对象åå¨é
ç½®", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ossConfigIds}") |
| | | public R<Void> remove(@NotEmpty(message = "主é®ä¸è½ä¸ºç©º") |
| | |
| | | /** |
| | | * ç¶æä¿®æ¹ |
| | | */ |
| | | @SaCheckPermission("system:oss:edit") |
| | | @SaCheckPermission("system:ossConfig:edit") |
| | | @Log(title = "对象åå¨ç¶æä¿®æ¹", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/changeStatus") |
| | | public R<Void> changeStatus(@RequestBody SysOssConfigBo bo) { |
| | |
| | | import org.dromara.common.core.domain.R; |
| | | import org.dromara.common.core.utils.StringUtils; |
| | | import org.dromara.common.core.utils.file.MimeTypeUtils; |
| | | import org.dromara.common.encrypt.annotation.ApiEncrypt; |
| | | import org.dromara.common.log.annotation.Log; |
| | | import org.dromara.common.log.enums.BusinessType; |
| | | import org.dromara.common.satoken.utils.LoginHelper; |
| | |
| | | @PutMapping |
| | | public R<Void> updateProfile(@RequestBody SysUserProfileBo profile) { |
| | | SysUserBo user = BeanUtil.toBean(profile, SysUserBo.class); |
| | | String username = LoginHelper.getUsername(); |
| | | if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user)) { |
| | | return R.fail("ä¿®æ¹ç¨æ·'" + user.getUserName() + "'å¤±è´¥ï¼ææºå·ç å·²åå¨"); |
| | | return R.fail("ä¿®æ¹ç¨æ·'" + username + "'å¤±è´¥ï¼ææºå·ç å·²åå¨"); |
| | | } |
| | | if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(user)) { |
| | | return R.fail("ä¿®æ¹ç¨æ·'" + user.getUserName() + "'失败ï¼é®ç®±è´¦å·å·²åå¨"); |
| | | return R.fail("ä¿®æ¹ç¨æ·'" + username + "'失败ï¼é®ç®±è´¦å·å·²åå¨"); |
| | | } |
| | | user.setUserId(LoginHelper.getUserId()); |
| | | if (userService.updateUserProfile(user) > 0) { |
| | |
| | | * |
| | | * @param bo æ°æ§å¯ç |
| | | */ |
| | | @ApiEncrypt |
| | | @Log(title = "个人信æ¯", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/updatePwd") |
| | | public R<Void> updatePwd(@Validated @RequestBody SysUserPasswordBo bo) { |
| | |
| | | package org.dromara.system.controller.system; |
| | | |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.dromara.common.core.domain.R; |
| | | import org.dromara.common.satoken.utils.LoginHelper; |
| | |
| | | import org.dromara.system.service.ISysSocialService; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | @GetMapping("/list") |
| | | public R<List<SysSocialVo>> list() { |
| | | return R.ok(socialUserService.queryListByUserId(LoginHelper.getUserId())); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è·å社ä¼åå
³ç³»è¯¦ç»ä¿¡æ¯ |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | @GetMapping("/{id}") |
| | | public R<SysSocialVo> getInfo(@NotNull(message = "主é®ä¸è½ä¸ºç©º") |
| | | @PathVariable String id) { |
| | | return R.ok(socialUserService.queryById(id)); |
| | | } |
| | | |
| | | } |
| | |
| | | import cn.dev33.satoken.annotation.SaCheckRole; |
| | | import com.baomidou.lock.annotation.Lock4j; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import jakarta.validation.constraints.Min; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.NotEmpty; |
| | | import jakarta.validation.constraints.NotNull; |
| | |
| | | import org.dromara.common.core.domain.R; |
| | | import org.dromara.common.core.validate.AddGroup; |
| | | import org.dromara.common.core.validate.EditGroup; |
| | | import org.dromara.common.encrypt.annotation.ApiEncrypt; |
| | | import org.dromara.common.excel.utils.ExcelUtil; |
| | | import org.dromara.common.idempotent.annotation.RepeatSubmit; |
| | | import org.dromara.common.log.annotation.Log; |
| | |
| | | import org.dromara.system.domain.vo.SysTenantVo; |
| | | import org.dromara.system.service.ISysTenantService; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | /** |
| | | * æ°å¢ç§æ· |
| | | */ |
| | | @ApiEncrypt |
| | | @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) |
| | | @SaCheckPermission("system:tenant:add") |
| | | @Log(title = "ç§æ·", businessType = BusinessType.INSERT) |
| | |
| | | import org.dromara.common.core.utils.MapstructUtils; |
| | | import org.dromara.common.core.utils.StreamUtils; |
| | | import org.dromara.common.core.utils.StringUtils; |
| | | import org.dromara.common.encrypt.annotation.ApiEncrypt; |
| | | import org.dromara.common.excel.core.ExcelResult; |
| | | import org.dromara.common.excel.utils.ExcelUtil; |
| | | import org.dromara.common.log.annotation.Log; |
| | |
| | | /** |
| | | * éç½®å¯ç |
| | | */ |
| | | @ApiEncrypt |
| | | @SaCheckPermission("system:user:resetPwd") |
| | | @Log(title = "ç¨æ·ç®¡ç", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/resetPwd") |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import org.dromara.common.tenant.core.TenantEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.dromara.common.mybatis.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * 对象åå¨é
置对象 sys_oss_config |
| | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @TableName("sys_oss_config") |
| | | public class SysOssConfig extends TenantEntity { |
| | | public class SysOssConfig extends BaseEntity { |
| | | |
| | | /** |
| | | * 主建 |
| | |
| | | package org.dromara.system.domain.vo; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import io.github.linpeilie.annotations.AutoMapper; |
| | | import lombok.Data; |
| | | import org.dromara.system.domain.SysSocial; |
| | | |
| | | import java.io.Serial; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | |
| | | * @author thiszhc |
| | | */ |
| | | @Data |
| | | @ExcelIgnoreUnannotated |
| | | @AutoMapper(target = SysSocial.class) |
| | | public class SysSocialVo implements Serializable { |
| | | |
| | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @ExcelProperty(value = "主é®") |
| | | private Long id; |
| | | |
| | | /** |
| | | * ç¨æ·ID |
| | | */ |
| | | @ExcelProperty(value = "ç¨æ·ID") |
| | | private Long userId; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * çå¯ä¸ID |
| | | */ |
| | | @ExcelProperty(value = "ææUUID") |
| | | private String authId; |
| | | |
| | | /** |
| | | * ç¨æ·æ¥æº |
| | | */ |
| | | @ExcelProperty(value = "ç¨æ·æ¥æº") |
| | | private String source; |
| | | |
| | | /** |
| | | * ç¨æ·çææä»¤ç |
| | | */ |
| | | @ExcelProperty(value = "ç¨æ·çææä»¤ç") |
| | | private String accessToken; |
| | | |
| | | /** |
| | | * ç¨æ·çææä»¤ççæææï¼é¨åå¹³å°å¯è½æ²¡æ |
| | | */ |
| | | @ExcelProperty(value = "ç¨æ·çææä»¤ççæææï¼é¨åå¹³å°å¯è½æ²¡æ") |
| | | private int expireIn; |
| | | |
| | | /** |
| | | * å·æ°ä»¤çï¼é¨åå¹³å°å¯è½æ²¡æ |
| | | */ |
| | | @ExcelProperty(value = "å·æ°ä»¤çï¼é¨åå¹³å°å¯è½æ²¡æ") |
| | | private String refreshToken; |
| | | |
| | | /** |
| | | * ç¨æ·ç open id |
| | | */ |
| | | @ExcelProperty(value = "å¹³å°çå¯ä¸id") |
| | | private String openId; |
| | | |
| | | /** |
| | | * ææçç¬¬ä¸æ¹è´¦å· |
| | | */ |
| | | @ExcelProperty(value = "ææçç¬¬ä¸æ¹è´¦å·") |
| | | private String userName; |
| | | |
| | | /** |
| | | * ææçç¬¬ä¸æ¹æµç§° |
| | | */ |
| | | @ExcelProperty(value = "ææçç¬¬ä¸æ¹æµç§°") |
| | | private String nickName; |
| | | |
| | | /** |
| | | * ææçç¬¬ä¸æ¹é®ç®± |
| | | */ |
| | | @ExcelProperty(value = "ææçç¬¬ä¸æ¹é®ç®±") |
| | | private String email; |
| | | |
| | | /** |
| | | * ææçç¬¬ä¸æ¹å¤´åå°å |
| | | */ |
| | | @ExcelProperty(value = "ææçç¬¬ä¸æ¹å¤´åå°å") |
| | | private String avatar; |
| | | |
| | | |
| | | /** |
| | | * å¹³å°çææä¿¡æ¯ï¼é¨åå¹³å°å¯è½æ²¡æ |
| | | */ |
| | | @ExcelProperty(value = "å¹³å°çææä¿¡æ¯ï¼é¨åå¹³å°å¯è½æ²¡æ") |
| | | private String accessCode; |
| | | |
| | | /** |
| | | * ç¨æ·ç unionid |
| | | */ |
| | | @ExcelProperty(value = "ç¨æ·ç unionid") |
| | | private String unionId; |
| | | |
| | | /** |
| | | * æäºçæéï¼é¨åå¹³å°å¯è½æ²¡æ |
| | | */ |
| | | @ExcelProperty(value = "æäºçæéï¼é¨åå¹³å°å¯è½æ²¡æ") |
| | | private String scope; |
| | | |
| | | /** |
| | | * 个å«å¹³å°çææä¿¡æ¯ï¼é¨åå¹³å°å¯è½æ²¡æ |
| | | */ |
| | | @ExcelProperty(value = "个å«å¹³å°çææä¿¡æ¯ï¼é¨åå¹³å°å¯è½æ²¡æ") |
| | | private String tokenType; |
| | | |
| | | /** |
| | | * id tokenï¼é¨åå¹³å°å¯è½æ²¡æ |
| | | */ |
| | | @ExcelProperty(value = "id tokenï¼é¨åå¹³å°å¯è½æ²¡æ") |
| | | private String idToken; |
| | | |
| | | /** |
| | | * å°ç±³å¹³å°ç¨æ·çé另屿§ï¼é¨åå¹³å°å¯è½æ²¡æ |
| | | */ |
| | | @ExcelProperty(value = "å°ç±³å¹³å°ç¨æ·çé另屿§ï¼é¨åå¹³å°å¯è½æ²¡æ") |
| | | private String macAlgorithm; |
| | | |
| | | /** |
| | | * å°ç±³å¹³å°ç¨æ·çé另屿§ï¼é¨åå¹³å°å¯è½æ²¡æ |
| | | */ |
| | | @ExcelProperty(value = "å°ç±³å¹³å°ç¨æ·çé另屿§ï¼é¨åå¹³å°å¯è½æ²¡æ") |
| | | private String macKey; |
| | | |
| | | /** |
| | | * ç¨æ·çææcodeï¼é¨åå¹³å°å¯è½æ²¡æ |
| | | */ |
| | | @ExcelProperty(value = "ç¨æ·çææcodeï¼é¨åå¹³å°å¯è½æ²¡æ") |
| | | private String code; |
| | | |
| | | /** |
| | | * Twitterå¹³å°ç¨æ·çé另屿§ï¼é¨åå¹³å°å¯è½æ²¡æ |
| | | */ |
| | | @ExcelProperty(value = "Twitterå¹³å°ç¨æ·çé另屿§ï¼é¨åå¹³å°å¯è½æ²¡æ") |
| | | private String oauthToken; |
| | | |
| | | /** |
| | | * Twitterå¹³å°ç¨æ·çé另屿§ï¼é¨åå¹³å°å¯è½æ²¡æ |
| | | */ |
| | | @ExcelProperty(value = "Twitterå¹³å°ç¨æ·çé另屿§ï¼é¨åå¹³å°å¯è½æ²¡æ") |
| | | private String oauthTokenSecret; |
| | | |
| | | |
| | | /** |
| | | * å建æ¶é´ |
| | | */ |
| | | private Date createTime; |
| | | } |
| | |
| | | package org.dromara.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.InterceptorIgnore; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Constants; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.dromara.common.mybatis.annotation.DataColumn; |
| | | import org.dromara.common.mybatis.annotation.DataPermission; |
| | | import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; |
| | | import org.dromara.system.domain.SysUser; |
| | | import org.dromara.system.domain.vo.SysUserVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @return ç¨æ·å¯¹è±¡ä¿¡æ¯ |
| | | */ |
| | | SysUserVo selectUserByEmail(String email); |
| | | |
| | | /** |
| | | * éè¿ç¨æ·åæ¥è¯¢ç¨æ·(ä¸èµ°ç§æ·æä»¶) |
| | | * |
| | | * @param userName ç¨æ·å |
| | | * @param tenantId ç§æ·id |
| | | * @return ç¨æ·å¯¹è±¡ä¿¡æ¯ |
| | | */ |
| | | @InterceptorIgnore(tenantLine = "true") |
| | | SysUserVo selectTenantUserByUserName(@Param("userName") String userName, @Param("tenantId") String tenantId); |
| | | |
| | | /** |
| | | * éè¿ææºå·æ¥è¯¢ç¨æ·(ä¸èµ°ç§æ·æä»¶) |
| | | * |
| | | * @param phonenumber ææºå· |
| | | * @param tenantId ç§æ·id |
| | | * @return ç¨æ·å¯¹è±¡ä¿¡æ¯ |
| | | */ |
| | | @InterceptorIgnore(tenantLine = "true") |
| | | SysUserVo selectTenantUserByPhonenumber(@Param("phonenumber") String phonenumber, @Param("tenantId") String tenantId); |
| | | |
| | | /** |
| | | * éè¿é®ç®±æ¥è¯¢ç¨æ·(ä¸èµ°ç§æ·æä»¶) |
| | | * |
| | | * @param email é®ç®± |
| | | * @param tenantId ç§æ·id |
| | | * @return ç¨æ·å¯¹è±¡ä¿¡æ¯ |
| | | */ |
| | | @InterceptorIgnore(tenantLine = "true") |
| | | SysUserVo selectTenantUserByEmail(@Param("email") String email, @Param("tenantId") String tenantId); |
| | | |
| | | |
| | | /** |
| | | * éè¿ç¨æ·IDæ¥è¯¢ç¨æ· |
| | |
| | | * @param authId 认è¯ID |
| | | * @return SysSocial |
| | | */ |
| | | SysSocialVo selectByAuthId(String authId); |
| | | List<SysSocialVo> selectByAuthId(String authId); |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public boolean selectRegisterEnabled(String tenantId) { |
| | | SysConfig retConfig = baseMapper.selectOne(new LambdaQueryWrapper<SysConfig>() |
| | | .eq(SysConfig::getConfigKey, "sys.account.registerUser") |
| | | .eq(TenantHelper.isEnable(),SysConfig::getTenantId, tenantId)); |
| | | SysConfig retConfig = TenantHelper.dynamic(tenantId, () -> { |
| | | return baseMapper.selectOne(new LambdaQueryWrapper<SysConfig>() |
| | | .eq(SysConfig::getConfigKey, "sys.account.registerUser")); |
| | | }); |
| | | if (ObjectUtil.isNull(retConfig)) { |
| | | return false; |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public SysDictTypeVo selectDictTypeByType(String dictType) { |
| | | return baseMapper.selectVoById(new LambdaQueryWrapper<SysDictType>().eq(SysDictType::getDictType, dictType)); |
| | | return baseMapper.selectVoOne(new LambdaQueryWrapper<SysDictType>().eq(SysDictType::getDictType, dictType)); |
| | | } |
| | | |
| | | /** |
| | |
| | | import org.dromara.common.core.constant.CacheNames; |
| | | import org.dromara.common.core.exception.ServiceException; |
| | | import org.dromara.common.core.utils.MapstructUtils; |
| | | import org.dromara.common.core.utils.StreamUtils; |
| | | import org.dromara.common.core.utils.StringUtils; |
| | | import org.dromara.common.json.utils.JsonUtils; |
| | | import org.dromara.common.mybatis.core.page.PageQuery; |
| | |
| | | import org.dromara.common.oss.constant.OssConstant; |
| | | import org.dromara.common.redis.utils.CacheUtils; |
| | | import org.dromara.common.redis.utils.RedisUtils; |
| | | import org.dromara.common.tenant.core.TenantEntity; |
| | | import org.dromara.common.tenant.helper.TenantHelper; |
| | | import org.dromara.system.domain.SysOssConfig; |
| | | import org.dromara.system.domain.bo.SysOssConfigBo; |
| | | import org.dromara.system.domain.vo.SysOssConfigVo; |
| | |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 对象åå¨é
ç½®Serviceä¸å¡å±å¤ç |
| | |
| | | */ |
| | | @Override |
| | | public void init() { |
| | | List<SysOssConfig> list = TenantHelper.ignore(() -> |
| | | baseMapper.selectList( |
| | | new LambdaQueryWrapper<SysOssConfig>().orderByAsc(TenantEntity::getTenantId)) |
| | | ); |
| | | Map<String, List<SysOssConfig>> map = StreamUtils.groupByKey(list, SysOssConfig::getTenantId); |
| | | try { |
| | | for (String tenantId : map.keySet()) { |
| | | TenantHelper.setDynamic(tenantId); |
| | | // å è½½OSSåå§åé
ç½® |
| | | for (SysOssConfig config : map.get(tenantId)) { |
| | | String configKey = config.getConfigKey(); |
| | | if ("0".equals(config.getStatus())) { |
| | | RedisUtils.setCacheObject(OssConstant.DEFAULT_CONFIG_KEY, configKey); |
| | | } |
| | | CacheUtils.put(CacheNames.SYS_OSS_CONFIG, config.getConfigKey(), JsonUtils.toJsonString(config)); |
| | | } |
| | | List<SysOssConfig> list = baseMapper.selectList(); |
| | | // å è½½OSSåå§åé
ç½® |
| | | for (SysOssConfig config : list) { |
| | | String configKey = config.getConfigKey(); |
| | | if ("0".equals(config.getStatus())) { |
| | | RedisUtils.setCacheObject(OssConstant.DEFAULT_CONFIG_KEY, configKey); |
| | | } |
| | | } finally { |
| | | TenantHelper.clearDynamic(); |
| | | CacheUtils.put(CacheNames.SYS_OSS_CONFIG, config.getConfigKey(), JsonUtils.toJsonString(config)); |
| | | } |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public boolean isSensitive(String roleKey, String perms) { |
| | | if (!StpUtil.isLogin()) { |
| | | if (!LoginHelper.isLogin()) { |
| | | return true; |
| | | } |
| | | boolean roleExist = StringUtils.isNotBlank(roleKey); |
| | |
| | | * @return ææä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public SysSocialVo selectByAuthId(String authId) { |
| | | return baseMapper.selectVoOne(new LambdaQueryWrapper<SysSocial>().eq(SysSocial::getAuthId, authId)); |
| | | public List<SysSocialVo> selectByAuthId(String authId) { |
| | | return baseMapper.selectVoList(new LambdaQueryWrapper<SysSocial>().eq(SysSocial::getAuthId, authId)); |
| | | } |
| | | |
| | | } |
| | |
| | | .select(SysUser::getUserName).eq(SysUser::getUserId, userId)); |
| | | return ObjectUtil.isNull(sysUser) ? null : sysUser.getUserName(); |
| | | } |
| | | |
| | | @Override |
| | | @Cacheable(cacheNames = CacheNames.SYS_NICKNAME, key = "#userId") |
| | | public String selectNicknameById(Long userId) { |
| | | SysUser sysUser = baseMapper.selectOne(new LambdaQueryWrapper<SysUser>() |
| | | .select(SysUser::getNickName).eq(SysUser::getUserId, userId)); |
| | | return ObjectUtil.isNull(sysUser) ? null : sysUser.getNickName(); |
| | | } |
| | | } |
| | |
| | | where u.del_flag = '0' and u.email = #{email} |
| | | </select> |
| | | |
| | | <select id="selectTenantUserByUserName" parameterType="String" resultMap="SysUserResult"> |
| | | <include refid="selectUserVo"/> |
| | | where u.del_flag = '0' and u.user_name = #{userName} and u.tenant_id = #{tenantId} |
| | | </select> |
| | | |
| | | <select id="selectTenantUserByPhonenumber" parameterType="String" resultMap="SysUserResult"> |
| | | <include refid="selectUserVo"/> |
| | | where u.del_flag = '0' and u.phonenumber = #{phonenumber} and u.tenant_id = #{tenantId} |
| | | </select> |
| | | |
| | | <select id="selectTenantUserByEmail" parameterType="String" resultMap="SysUserResult"> |
| | | <include refid="selectUserVo"/> |
| | | where u.del_flag = '0' and u.email = #{email} and u.tenant_id = #{tenantId} |
| | | </select> |
| | | |
| | | <select id="selectUserById" parameterType="Long" resultMap="SysUserResult"> |
| | | <include refid="selectUserVo"/> |
| | | where u.del_flag = '0' and u.user_id = #{userId} |
| | |
| | | set AppName=ruoyi-admin.jar |
| | | |
| | | rem JVMåæ° |
| | | set JVM_OPTS="-Dname=%AppName% -Duser.timezone=Asia/Shanghai -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC" |
| | | set JVM_OPTS="-Dname=%AppName% -Duser.timezone=Asia/Shanghai -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Xlog:gc*,:time,tags,level -XX:+UseZGC" |
| | | |
| | | |
| | | ECHO. |
| | |
| | | AppName=ruoyi-admin.jar |
| | | |
| | | # JVMåæ° |
| | | JVM_OPTS="-Dname=$AppName -Duser.timezone=Asia/Shanghai -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC" |
| | | JVM_OPTS="-Dname=$AppName -Duser.timezone=Asia/Shanghai -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Xlog:gc*,:time,tags,level -XX:+UseZGC" |
| | | APP_HOME=`pwd` |
| | | LOG_PATH=$APP_HOME/logs/$AppName.log |
| | | |
| | |
| | | network_mode: "host" |
| | | |
| | | ruoyi-server1: |
| | | image: ruoyi/ruoyi-server:5.1.1 |
| | | image: ruoyi/ruoyi-server:5.1.2 |
| | | container_name: ruoyi-server1 |
| | | environment: |
| | | # æ¶åºä¸æµ· |
| | |
| | | network_mode: "host" |
| | | |
| | | ruoyi-server2: |
| | | image: ruoyi/ruoyi-server:5.1.1 |
| | | image: ruoyi/ruoyi-server:5.1.2 |
| | | container_name: ruoyi-server2 |
| | | environment: |
| | | # æ¶åºä¸æµ· |
| | |
| | | network_mode: "host" |
| | | |
| | | ruoyi-monitor-admin: |
| | | image: ruoyi/ruoyi-monitor-admin:5.1.1 |
| | | image: ruoyi/ruoyi-monitor-admin:5.1.2 |
| | | container_name: ruoyi-monitor-admin |
| | | environment: |
| | | # æ¶åºä¸æµ· |
| | |
| | | network_mode: "host" |
| | | |
| | | ruoyi-powerjob-server: |
| | | image: ruoyi/ruoyi-powerjob-server:5.1.1 |
| | | image: ruoyi/ruoyi-powerjob-server:5.1.2 |
| | | container_name: ruoyi-powerjob-server |
| | | environment: |
| | | # æ¶åºä¸æµ· |
| | |
| | | } |
| | | |
| | | # è§£å³ powerjob 代çä¹åéææä»¶æ æ³è®¿é®çé®é¢ 请å¿ä¿®æ¹ä¹±å¨ |
| | | location .*\.(js|css|jpg|png|svg|woff|ttf|ico)?$ { |
| | | location ~ ^/(js|css|jpg|png|svg|woff|ttf|ico|img)/ { |
| | | proxy_pass http://powerjob-server; |
| | | } |
| | | |
| | |
| | | insert into sys_menu values('1601', 'æä»¶ä¸ä¼ ', '118', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:upload', '#', 103, 1, sysdate, null, null, ''); |
| | | insert into sys_menu values('1602', 'æä»¶ä¸è½½', '118', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:download', '#', 103, 1, sysdate, null, null, ''); |
| | | insert into sys_menu values('1603', 'æä»¶å é¤', '118', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:remove', '#', 103, 1, sysdate, null, null, ''); |
| | | insert into sys_menu values('1604', 'é
置添å ', '118', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:add', '#', 103, 1, sysdate, null, null, ''); |
| | | insert into sys_menu values('1605', 'é
ç½®ç¼è¾', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:edit', '#', 103, 1, sysdate, null, null, ''); |
| | | insert into sys_menu values('1620', 'é
ç½®å表', '118', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:list', '#', 103, 1, sysdate, null, null, ''); |
| | | insert into sys_menu values('1621', 'é
置添å ', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:add', '#', 103, 1, sysdate, null, null, ''); |
| | | insert into sys_menu values('1622', 'é
ç½®ç¼è¾', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:edit', '#', 103, 1, sysdate, null, null, ''); |
| | | insert into sys_menu values('1623', 'é
ç½®å é¤', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:remove', '#', 103, 1, sysdate, null, null, ''); |
| | | -- ç§æ·ç®¡çç¸å
³æé® |
| | | insert into sys_menu values('1606', 'ç§æ·æ¥è¯¢', '121', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:query', '#', 103, 1, sysdate, null, null, ''); |
| | | insert into sys_menu values('1607', 'ç§æ·æ°å¢', '121', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:add', '#', 103, 1, sysdate, null, null, ''); |
| | |
| | | -- ---------------------------- |
| | | -- Records of "PJ_JOB_INFO" |
| | | -- ---------------------------- |
| | | INSERT INTO "PJ_JOB_INFO" VALUES ('1', '{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', '1', '5', NULL, '2', '1', NULL, NULL, NULL, '1', '0', NULL, 'åæºå¤ç卿§è¡æµè¯', NULL, '{}', '{\"type\":1}', '0', '0', '0.0000000000000000', '0.0000000000000000', '0.0000000000000000', NULL, NULL, 'org.dromara.job.processors.StandaloneProcessorDemo', '1', '2', NULL, '1', '30000', '3'); |
| | | INSERT INTO "PJ_JOB_INFO" VALUES ('2', '{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', '1', '5', NULL, '1', '2', NULL, NULL, NULL, '0', '0', NULL, '广æå¤ç卿µè¯', NULL, '{}', '{\"type\":1}', '0', '0', '0.0000000000000000', '0.0000000000000000', '0.0000000000000000', NULL, NULL, 'org.dromara.job.processors.BroadcastProcessorDemo', '1', '2', NULL, '1', '30000', '3'); |
| | | INSERT INTO "PJ_JOB_INFO" VALUES ('3', '{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', '1', '5', NULL, '1', '4', NULL, NULL, NULL, '0', '0', NULL, 'Mapå¤ç卿µè¯', NULL, '{}', '{\"type\":1}', '0', '0', '0.0000000000000000', '0.0000000000000000', '0.0000000000000000', NULL, NULL, 'org.dromara.job.processors.MapProcessorDemo', '1', '2', NULL, '1', '1000', '3'); |
| | | INSERT INTO "PJ_JOB_INFO" VALUES ('4', '{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', '1', '5', NULL, '1', '3', NULL, NULL, NULL, '0', '0', NULL, 'MapReduceå¤ç卿µè¯', NULL, '{}', '{\"type\":1}', '0', '0', '0.0000000000000000', '0.0000000000000000', '0.0000000000000000', NULL, NULL, 'org.dromara.job.processors.MapReduceProcessorDemo', '1', '2', NULL, '1', '1000', '3'); |
| | | INSERT INTO "PJ_JOB_INFO" VALUES ('1', '{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', '1', '5', NULL, '2', '1', NULL, NULL, NULL, '1', '0', NULL, 'åæºå¤ç卿§è¡æµè¯', NULL, '{}', '{"type":1}', '0', '0', '0.0000000000000000', '0.0000000000000000', '0.0000000000000000', NULL, NULL, 'org.dromara.job.processors.StandaloneProcessorDemo', '1', '2', NULL, '1', '30000', '3'); |
| | | INSERT INTO "PJ_JOB_INFO" VALUES ('2', '{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', '1', '5', NULL, '1', '2', NULL, NULL, NULL, '0', '0', NULL, '广æå¤ç卿µè¯', NULL, '{}', '{"type":1}', '0', '0', '0.0000000000000000', '0.0000000000000000', '0.0000000000000000', NULL, NULL, 'org.dromara.job.processors.BroadcastProcessorDemo', '1', '2', NULL, '1', '30000', '3'); |
| | | INSERT INTO "PJ_JOB_INFO" VALUES ('3', '{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', '1', '5', NULL, '1', '4', NULL, NULL, NULL, '0', '0', NULL, 'Mapå¤ç卿µè¯', NULL, '{}', '{"type":1}', '0', '0', '0.0000000000000000', '0.0000000000000000', '0.0000000000000000', NULL, NULL, 'org.dromara.job.processors.MapProcessorDemo', '1', '2', NULL, '1', '1000', '3'); |
| | | INSERT INTO "PJ_JOB_INFO" VALUES ('4', '{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', '1', '5', NULL, '1', '3', NULL, NULL, NULL, '0', '0', NULL, 'MapReduceå¤ç卿µè¯', NULL, '{}', '{"type":1}', '0', '0', '0.0000000000000000', '0.0000000000000000', '0.0000000000000000', NULL, NULL, 'org.dromara.job.processors.MapReduceProcessorDemo', '1', '2', NULL, '1', '1000', '3'); |
| | | |
| | | -- ---------------------------- |
| | | -- Table structure for PJ_OMS_LOCK |
| | |
| | | insert into sys_menu values('1601', 'æä»¶ä¸ä¼ ', '118', '2', '#', '', '', '1', '0', 'F', '0', '0', 'system:oss:upload', '#', 103, 1, now(), null, null, ''); |
| | | insert into sys_menu values('1602', 'æä»¶ä¸è½½', '118', '3', '#', '', '', '1', '0', 'F', '0', '0', 'system:oss:download', '#', 103, 1, now(), null, null, ''); |
| | | insert into sys_menu values('1603', 'æä»¶å é¤', '118', '4', '#', '', '', '1', '0', 'F', '0', '0', 'system:oss:remove', '#', 103, 1, now(), null, null, ''); |
| | | insert into sys_menu values('1604', 'é
置添å ', '118', '5', '#', '', '', '1', '0', 'F', '0', '0', 'system:oss:add', '#', 103, 1, now(), null, null, ''); |
| | | insert into sys_menu values('1605', 'é
ç½®ç¼è¾', '118', '6', '#', '', '', '1', '0', 'F', '0', '0', 'system:oss:edit', '#', 103, 1, now(), null, null, ''); |
| | | insert into sys_menu values('1620', 'é
ç½®å表', '118', '5', '#', '', '', '1', '0', 'F', '0', '0', 'system:ossConfig:list', '#', 103, 1, now(), null, null, ''); |
| | | insert into sys_menu values('1621', 'é
置添å ', '118', '6', '#', '', '', '1', '0', 'F', '0', '0', 'system:ossConfig:add', '#', 103, 1, now(), null, null, ''); |
| | | insert into sys_menu values('1622', 'é
ç½®ç¼è¾', '118', '6', '#', '', '', '1', '0', 'F', '0', '0', 'system:ossConfig:edit', '#', 103, 1, now(), null, null, ''); |
| | | insert into sys_menu values('1623', 'é
ç½®å é¤', '118', '6', '#', '', '', '1', '0', 'F', '0', '0', 'system:ossConfig:remove', '#', 103, 1, now(), null, null, ''); |
| | | -- ç§æ·ç®¡çç¸å
³æé® |
| | | insert into sys_menu values('1606', 'ç§æ·æ¥è¯¢', '121', '1', '#', '', '', '1', '0', 'F', '0', '0', 'system:tenant:query', '#', 103, 1, now(), null, null, ''); |
| | | insert into sys_menu values('1607', 'ç§æ·æ°å¢', '121', '2', '#', '', '', '1', '0', 'F', '0', '0', 'system:tenant:add', '#', 103, 1, now(), null, null, ''); |
| | |
| | | CREATE INDEX idx01_job_info ON pj_job_info USING btree (app_id, status, time_expression_type, next_trigger_time); |
| | | |
| | | |
| | | INSERT INTO pj_job_info VALUES(1, '{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', 1, 5, '', 2, 1, NULL, '2023-06-02 15:01:27.717', '2023-07-04 17:22:12.374', 1, 0, '', 'åæºå¤ç卿§è¡æµè¯', NULL, '{}', '{\"type\":1}', 0, 0, 0.0, 0.0, 0.0, NULL, NULL, 'org.dromara.job.processors.StandaloneProcessorDemo', 1, 2, NULL, 1, '30000', 3); |
| | | INSERT INTO pj_job_info VALUES(2, '{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', 1, 5, '', 1, 2, NULL, '2023-06-02 15:04:45.342', '2023-07-04 17:22:12.816', 0, 0, NULL, '广æå¤ç卿µè¯', NULL, '{}', '{\"type\":1}', 0, 0, 0.0, 0.0, 0.0, NULL, NULL, 'org.dromara.job.processors.BroadcastProcessorDemo', 1, 2, NULL, 1, '30000', 3); |
| | | INSERT INTO pj_job_info VALUES(3, '{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', 1, 5, '', 1, 4, NULL, '2023-06-02 15:13:23.519', '2023-06-02 16:03:22.421', 0, 0, NULL, 'Mapå¤ç卿µè¯', NULL, '{}', '{\"type\":1}', 0, 0, 0.0, 0.0, 0.0, NULL, NULL, 'org.dromara.job.processors.MapProcessorDemo', 1, 2, NULL, 1, '1000', 3); |
| | | INSERT INTO pj_job_info VALUES(4, '{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', 1, 5, '', 1, 3, NULL, '2023-06-02 15:45:25.896', '2023-06-02 16:03:23.125', 0, 0, NULL, 'MapReduceå¤ç卿µè¯', NULL, '{}', '{\"type\":1}', 0, 0, 0.0, 0.0, 0.0, NULL, NULL, 'org.dromara.job.processors.MapReduceProcessorDemo', 1, 2, NULL, 1, '1000', 3); |
| | | INSERT INTO pj_job_info VALUES(1, '{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', 1, 5, '', 2, 1, NULL, '2023-06-02 15:01:27.717', '2023-07-04 17:22:12.374', 1, 0, '', 'åæºå¤ç卿§è¡æµè¯', NULL, '{}', '{"type":1}', 0, 0, 0.0, 0.0, 0.0, NULL, NULL, 'org.dromara.job.processors.StandaloneProcessorDemo', 1, 2, NULL, 1, '30000', 3); |
| | | INSERT INTO pj_job_info VALUES(2, '{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', 1, 5, '', 1, 2, NULL, '2023-06-02 15:04:45.342', '2023-07-04 17:22:12.816', 0, 0, NULL, '广æå¤ç卿µè¯', NULL, '{}', '{"type":1}', 0, 0, 0.0, 0.0, 0.0, NULL, NULL, 'org.dromara.job.processors.BroadcastProcessorDemo', 1, 2, NULL, 1, '30000', 3); |
| | | INSERT INTO pj_job_info VALUES(3, '{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', 1, 5, '', 1, 4, NULL, '2023-06-02 15:13:23.519', '2023-06-02 16:03:22.421', 0, 0, NULL, 'Mapå¤ç卿µè¯', NULL, '{}', '{"type":1}', 0, 0, 0.0, 0.0, 0.0, NULL, NULL, 'org.dromara.job.processors.MapProcessorDemo', 1, 2, NULL, 1, '1000', 3); |
| | | INSERT INTO pj_job_info VALUES(4, '{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', 1, 5, '', 1, 3, NULL, '2023-06-02 15:45:25.896', '2023-06-02 16:03:23.125', 0, 0, NULL, 'MapReduceå¤ç卿µè¯', NULL, '{}', '{"type":1}', 0, 0, 0.0, 0.0, 0.0, NULL, NULL, 'org.dromara.job.processors.MapReduceProcessorDemo', 1, 2, NULL, 1, '1000', 3); |
| | | |
| | | |
| | | -- pj_oms_lock definition |
| | |
| | | insert into sys_menu values('114', '表åæå»º', '3', '1', 'build', 'tool/build/index', '', 1, 0, 'C', '0', '0', 'tool:build:list', 'build', 103, 1, sysdate(), null, null, '表åæå»ºèå'); |
| | | insert into sys_menu values('115', '代ç çæ', '3', '2', 'gen', 'tool/gen/index', '', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 103, 1, sysdate(), null, null, '代ç çæèå'); |
| | | insert into sys_menu values('121', 'ç§æ·ç®¡ç', '6', '1', 'tenant', 'system/tenant/index', '', 1, 0, 'C', '0', '0', 'system:tenant:list', 'list', 103, 1, sysdate(), null, null, 'ç§æ·ç®¡çèå'); |
| | | insert into sys_menu values('122', 'ç§æ·å¥é¤ç®¡ç', '6', '2', 'tenantPackage', 'system/tenantPackage/index', '', 1, 0, 'C', '0', '0', 'system:tenantPackage:list', 'form', 103, 1, sysdate(), null, null, 'ç§æ·å¥é¤ç®¡çèå'); |
| | | insert into sys_menu values('122', 'ç§æ·å¥é¤ç®¡ç', '6', '2', 'tenantPackage', 'system/tenantPackage/index', '', 1, 0, 'C', '0', '0', 'system:tenantPackage:list', 'form', 103, 1, sysdate(), null, null, 'ç§æ·å¥é¤ç®¡çèå'); |
| | | insert into sys_menu values('123', '客æ·ç«¯ç®¡ç', '1', '11', 'client', 'system/client/index', '', 1, 0, 'C', '0', '0', 'system:client:list', 'international', 103, 1, sysdate(), null, null, '客æ·ç«¯ç®¡çèå'); |
| | | |
| | | -- springboot-adminçæ§ |
| | |
| | | insert into sys_menu values('1601', 'æä»¶ä¸ä¼ ', '118', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:upload', '#', 103, 1, sysdate(), null, null, ''); |
| | | insert into sys_menu values('1602', 'æä»¶ä¸è½½', '118', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:download', '#', 103, 1, sysdate(), null, null, ''); |
| | | insert into sys_menu values('1603', 'æä»¶å é¤', '118', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:remove', '#', 103, 1, sysdate(), null, null, ''); |
| | | insert into sys_menu values('1604', 'é
置添å ', '118', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:add', '#', 103, 1, sysdate(), null, null, ''); |
| | | insert into sys_menu values('1605', 'é
ç½®ç¼è¾', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:edit', '#', 103, 1, sysdate(), null, null, ''); |
| | | insert into sys_menu values('1620', 'é
ç½®å表', '118', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:list', '#', 103, 1, sysdate(), null, null, ''); |
| | | insert into sys_menu values('1621', 'é
置添å ', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:add', '#', 103, 1, sysdate(), null, null, ''); |
| | | insert into sys_menu values('1622', 'é
ç½®ç¼è¾', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:edit', '#', 103, 1, sysdate(), null, null, ''); |
| | | insert into sys_menu values('1623', 'é
ç½®å é¤', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:remove', '#', 103, 1, sysdate(), null, null, ''); |
| | | |
| | | -- ç§æ·ç®¡çç¸å
³æé® |
| | | insert into sys_menu values ('1606', 'ç§æ·æ¥è¯¢', '121', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:query', '#', 103, 1, sysdate(), null, null, ''); |
| | | insert into sys_menu values ('1607', 'ç§æ·æ°å¢', '121', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:add', '#', 103, 1, sysdate(), null, null, ''); |
| | |
| | | SET IDENTITY_INSERT [pj_job_info] ON |
| | | GO |
| | | |
| | | INSERT INTO [pj_job_info] ([id], [alarm_config], [app_id], [concurrency], [designated_workers], [dispatch_strategy], [execute_type], [extra], [gmt_create], [gmt_modified], [instance_retry_num], [instance_time_limit], [job_description], [job_name], [job_params], [lifecycle], [log_config], [max_instance_num], [max_worker_count], [min_cpu_cores], [min_disk_space], [min_memory_space], [next_trigger_time], [notify_user_ids], [processor_info], [processor_type], [status], [tag], [task_retry_num], [time_expression], [time_expression_type]) VALUES (N'1', N'{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', N'1', N'5', N'', N'2', N'1', NULL, N'2023-06-02 15:01:27.7170000', N'2023-07-04 17:22:12.3740000', N'1', N'0', N'', N'?????????', NULL, N'{}', N'{\"type\":1}', N'0', N'0', N'0.000000000000000', N'0.000000000000000', N'0.000000000000000', NULL, NULL, N'org.dromara.job.processors.StandaloneProcessorDemo', N'1', N'2', NULL, N'1', N'30000', N'3') |
| | | INSERT INTO [pj_job_info] ([id], [alarm_config], [app_id], [concurrency], [designated_workers], [dispatch_strategy], [execute_type], [extra], [gmt_create], [gmt_modified], [instance_retry_num], [instance_time_limit], [job_description], [job_name], [job_params], [lifecycle], [log_config], [max_instance_num], [max_worker_count], [min_cpu_cores], [min_disk_space], [min_memory_space], [next_trigger_time], [notify_user_ids], [processor_info], [processor_type], [status], [tag], [task_retry_num], [time_expression], [time_expression_type]) VALUES (N'1', N'{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', N'1', N'5', N'', N'2', N'1', NULL, N'2023-06-02 15:01:27.7170000', N'2023-07-04 17:22:12.3740000', N'1', N'0', N'', N'?????????', NULL, N'{}', N'{"type":1}', N'0', N'0', N'0.000000000000000', N'0.000000000000000', N'0.000000000000000', NULL, NULL, N'org.dromara.job.processors.StandaloneProcessorDemo', N'1', N'2', NULL, N'1', N'30000', N'3') |
| | | GO |
| | | |
| | | INSERT INTO [pj_job_info] ([id], [alarm_config], [app_id], [concurrency], [designated_workers], [dispatch_strategy], [execute_type], [extra], [gmt_create], [gmt_modified], [instance_retry_num], [instance_time_limit], [job_description], [job_name], [job_params], [lifecycle], [log_config], [max_instance_num], [max_worker_count], [min_cpu_cores], [min_disk_space], [min_memory_space], [next_trigger_time], [notify_user_ids], [processor_info], [processor_type], [status], [tag], [task_retry_num], [time_expression], [time_expression_type]) VALUES (N'2', N'{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', N'1', N'5', N'', N'1', N'2', NULL, N'2023-06-02 15:04:45.3420000', N'2023-07-04 17:22:12.8160000', N'0', N'0', NULL, N'???????', NULL, N'{}', N'{\"type\":1}', N'0', N'0', N'0.000000000000000', N'0.000000000000000', N'0.000000000000000', NULL, NULL, N'org.dromara.job.processors.BroadcastProcessorDemo', N'1', N'2', NULL, N'1', N'30000', N'3') |
| | | INSERT INTO [pj_job_info] ([id], [alarm_config], [app_id], [concurrency], [designated_workers], [dispatch_strategy], [execute_type], [extra], [gmt_create], [gmt_modified], [instance_retry_num], [instance_time_limit], [job_description], [job_name], [job_params], [lifecycle], [log_config], [max_instance_num], [max_worker_count], [min_cpu_cores], [min_disk_space], [min_memory_space], [next_trigger_time], [notify_user_ids], [processor_info], [processor_type], [status], [tag], [task_retry_num], [time_expression], [time_expression_type]) VALUES (N'2', N'{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', N'1', N'5', N'', N'1', N'2', NULL, N'2023-06-02 15:04:45.3420000', N'2023-07-04 17:22:12.8160000', N'0', N'0', NULL, N'???????', NULL, N'{}', N'{"type":1}', N'0', N'0', N'0.000000000000000', N'0.000000000000000', N'0.000000000000000', NULL, NULL, N'org.dromara.job.processors.BroadcastProcessorDemo', N'1', N'2', NULL, N'1', N'30000', N'3') |
| | | GO |
| | | |
| | | INSERT INTO [pj_job_info] ([id], [alarm_config], [app_id], [concurrency], [designated_workers], [dispatch_strategy], [execute_type], [extra], [gmt_create], [gmt_modified], [instance_retry_num], [instance_time_limit], [job_description], [job_name], [job_params], [lifecycle], [log_config], [max_instance_num], [max_worker_count], [min_cpu_cores], [min_disk_space], [min_memory_space], [next_trigger_time], [notify_user_ids], [processor_info], [processor_type], [status], [tag], [task_retry_num], [time_expression], [time_expression_type]) VALUES (N'3', N'{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', N'1', N'5', N'', N'1', N'4', NULL, N'2023-06-02 15:13:23.5190000', N'2023-06-02 16:03:22.4210000', N'0', N'0', NULL, N'Map?????', NULL, N'{}', N'{\"type\":1}', N'0', N'0', N'0.000000000000000', N'0.000000000000000', N'0.000000000000000', NULL, NULL, N'org.dromara.job.processors.MapProcessorDemo', N'1', N'2', NULL, N'1', N'1000', N'3') |
| | | INSERT INTO [pj_job_info] ([id], [alarm_config], [app_id], [concurrency], [designated_workers], [dispatch_strategy], [execute_type], [extra], [gmt_create], [gmt_modified], [instance_retry_num], [instance_time_limit], [job_description], [job_name], [job_params], [lifecycle], [log_config], [max_instance_num], [max_worker_count], [min_cpu_cores], [min_disk_space], [min_memory_space], [next_trigger_time], [notify_user_ids], [processor_info], [processor_type], [status], [tag], [task_retry_num], [time_expression], [time_expression_type]) VALUES (N'3', N'{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', N'1', N'5', N'', N'1', N'4', NULL, N'2023-06-02 15:13:23.5190000', N'2023-06-02 16:03:22.4210000', N'0', N'0', NULL, N'Map?????', NULL, N'{}', N'{"type":1}', N'0', N'0', N'0.000000000000000', N'0.000000000000000', N'0.000000000000000', NULL, NULL, N'org.dromara.job.processors.MapProcessorDemo', N'1', N'2', NULL, N'1', N'1000', N'3') |
| | | GO |
| | | |
| | | INSERT INTO [pj_job_info] ([id], [alarm_config], [app_id], [concurrency], [designated_workers], [dispatch_strategy], [execute_type], [extra], [gmt_create], [gmt_modified], [instance_retry_num], [instance_time_limit], [job_description], [job_name], [job_params], [lifecycle], [log_config], [max_instance_num], [max_worker_count], [min_cpu_cores], [min_disk_space], [min_memory_space], [next_trigger_time], [notify_user_ids], [processor_info], [processor_type], [status], [tag], [task_retry_num], [time_expression], [time_expression_type]) VALUES (N'4', N'{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', N'1', N'5', N'', N'1', N'3', NULL, N'2023-06-02 15:45:25.8960000', N'2023-06-02 16:03:23.1250000', N'0', N'0', NULL, N'MapReduce?????', NULL, N'{}', N'{\"type\":1}', N'0', N'0', N'0.000000000000000', N'0.000000000000000', N'0.000000000000000', NULL, NULL, N'org.dromara.job.processors.MapReduceProcessorDemo', N'1', N'2', NULL, N'1', N'1000', N'3') |
| | | INSERT INTO [pj_job_info] ([id], [alarm_config], [app_id], [concurrency], [designated_workers], [dispatch_strategy], [execute_type], [extra], [gmt_create], [gmt_modified], [instance_retry_num], [instance_time_limit], [job_description], [job_name], [job_params], [lifecycle], [log_config], [max_instance_num], [max_worker_count], [min_cpu_cores], [min_disk_space], [min_memory_space], [next_trigger_time], [notify_user_ids], [processor_info], [processor_type], [status], [tag], [task_retry_num], [time_expression], [time_expression_type]) VALUES (N'4', N'{"alertThreshold":0,"silenceWindowLen":0,"statisticWindowLen":0}', N'1', N'5', N'', N'1', N'3', NULL, N'2023-06-02 15:45:25.8960000', N'2023-06-02 16:03:23.1250000', N'0', N'0', NULL, N'MapReduce?????', NULL, N'{}', N'{"type":1}', N'0', N'0', N'0.000000000000000', N'0.000000000000000', N'0.000000000000000', NULL, NULL, N'org.dromara.job.processors.MapReduceProcessorDemo', N'1', N'2', NULL, N'1', N'1000', N'3') |
| | | GO |
| | | |
| | | SET IDENTITY_INSERT [pj_job_info] OFF |
| | |
| | | GO |
| | | INSERT sys_menu VALUES (1603, N'æä»¶å é¤', 118, 4, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:oss:remove', N'#', 103, 1, getdate(), NULL, NULL, N''); |
| | | GO |
| | | INSERT sys_menu VALUES (1604, N'é
置添å ', 118, 5, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:oss:add', N'#', 103, 1, getdate(), NULL, NULL, N''); |
| | | INSERT sys_menu VALUES (1620, N'é
ç½®å表', 118, 5, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:ossConfig:list', N'#', 103, 1, getdate(), NULL, NULL, N''); |
| | | GO |
| | | INSERT sys_menu VALUES (1605, N'é
ç½®ç¼è¾', 118, 6, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:oss:edit', N'#', 103, 1, getdate(), NULL, NULL, N''); |
| | | INSERT sys_menu VALUES (1621, N'é
置添å ', 118, 6, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:ossConfig:add', N'#', 103, 1, getdate(), NULL, NULL, N''); |
| | | GO |
| | | INSERT sys_menu VALUES (1622, N'é
ç½®ç¼è¾', 118, 6, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:ossConfig:edit', N'#', 103, 1, getdate(), NULL, NULL, N''); |
| | | GO |
| | | INSERT sys_menu VALUES (1623, N'é
ç½®å é¤', 118, 6, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:ossConfig:remove', N'#', 103, 1, getdate(), NULL, NULL, N''); |
| | | GO |
| | | -- ç§æ·ç®¡çç¸å
³æé® |
| | | INSERT sys_menu VALUES (1606, N'ç§æ·æ¥è¯¢', 121, 1, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:tenant:query', N'#', 103, 1, getdate(), NULL, NULL, N''); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | delete from sys_menu where menu_id in (1604, 1605); |
| | | insert into sys_menu values('1620', 'é
ç½®å表', '118', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:list', '#', 103, 1, sysdate, null, null, ''); |
| | | insert into sys_menu values('1621', 'é
置添å ', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:add', '#', 103, 1, sysdate, null, null, ''); |
| | | insert into sys_menu values('1622', 'é
ç½®ç¼è¾', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:edit', '#', 103, 1, sysdate, null, null, ''); |
| | | insert into sys_menu values('1623', 'é
ç½®å é¤', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:remove', '#', 103, 1, sysdate, null, null, ''); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | delete from sys_menu where menu_id in (1604, 1605); |
| | | insert into sys_menu values('1620', 'é
ç½®å表', '118', '5', '#', '', '', '1', '0', 'F', '0', '0', 'system:ossConfig:list', '#', 103, 1, now(), null, null, ''); |
| | | insert into sys_menu values('1621', 'é
置添å ', '118', '6', '#', '', '', '1', '0', 'F', '0', '0', 'system:ossConfig:add', '#', 103, 1, now(), null, null, ''); |
| | | insert into sys_menu values('1622', 'é
ç½®ç¼è¾', '118', '6', '#', '', '', '1', '0', 'F', '0', '0', 'system:ossConfig:edit', '#', 103, 1, now(), null, null, ''); |
| | | insert into sys_menu values('1623', 'é
ç½®å é¤', '118', '6', '#', '', '', '1', '0', 'F', '0', '0', 'system:ossConfig:remove', '#', 103, 1, now(), null, null, ''); |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | DELETE FROM sys_menu WHERE menu_id IN (1604, 1605); |
| | | GO |
| | | INSERT sys_menu VALUES (1620, N'é
ç½®å表', 118, 5, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:ossConfig:list', N'#', 103, 1, getdate(), NULL, NULL, N''); |
| | | GO |
| | | INSERT sys_menu VALUES (1621, N'é
置添å ', 118, 6, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:ossConfig:add', N'#', 103, 1, getdate(), NULL, NULL, N''); |
| | | GO |
| | | INSERT sys_menu VALUES (1622, N'é
ç½®ç¼è¾', 118, 6, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:ossConfig:edit', N'#', 103, 1, getdate(), NULL, NULL, N''); |
| | | GO |
| | | INSERT sys_menu VALUES (1623, N'é
ç½®å é¤', 118, 6, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:ossConfig:remove', N'#', 103, 1, getdate(), NULL, NULL, N''); |
| | | GO |
¶Ô±ÈÐÂÎļþ |
| | |
| | | delete from sys_menu where menu_id in (1604, 1605); |
| | | insert into sys_menu values('1620', 'é
ç½®å表', '118', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:list', '#', 103, 1, sysdate(), null, null, ''); |
| | | insert into sys_menu values('1621', 'é
置添å ', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:add', '#', 103, 1, sysdate(), null, null, ''); |
| | | insert into sys_menu values('1622', 'é
ç½®ç¼è¾', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:edit', '#', 103, 1, sysdate(), null, null, ''); |
| | | insert into sys_menu values('1623', 'é
ç½®å é¤', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:remove', '#', 103, 1, sysdate(), null, null, ''); |
| | | |