reset !pr324 有逻辑性问题 暂时回滚

This commit is contained in:
疯狂的狮子Li 2023-03-30 22:53:00 +08:00
parent ae21e0c3d0
commit 92e15c2f16
12 changed files with 47 additions and 74 deletions

View File

@ -2,7 +2,6 @@ package com.ruoyi.web.controller;
import cn.dev33.satoken.annotation.SaIgnore; import cn.dev33.satoken.annotation.SaIgnore;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.convert.Convert;
import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.domain.model.EmailLoginBody; import com.ruoyi.common.core.domain.model.EmailLoginBody;
import com.ruoyi.common.core.domain.model.LoginBody; import com.ruoyi.common.core.domain.model.LoginBody;
@ -151,14 +150,4 @@ public class AuthController {
return R.ok(vo); return R.ok(vo);
} }
/**
* 注册开关
*
* @return ture打开 false关闭
*/
@GetMapping("/registerEnabled")
public R<Boolean> registerEnabled() {
return R.ok(Convert.toBool(configService.selectConfigByKey("sys.account.registerUser")));
}
} }

View File

@ -3,9 +3,9 @@ package com.ruoyi.web.controller;
import cn.dev33.satoken.annotation.SaIgnore; import cn.dev33.satoken.annotation.SaIgnore;
import cn.hutool.captcha.AbstractCaptcha; import cn.hutool.captcha.AbstractCaptcha;
import cn.hutool.captcha.generator.CodeGenerator; import cn.hutool.captcha.generator.CodeGenerator;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.RandomUtil; import cn.hutool.core.util.RandomUtil;
import com.ruoyi.common.core.constant.Constants;
import com.ruoyi.common.core.constant.GlobalConstants; import com.ruoyi.common.core.constant.GlobalConstants;
import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.utils.SpringUtils; import com.ruoyi.common.core.utils.SpringUtils;
@ -14,11 +14,11 @@ import com.ruoyi.common.core.utils.reflect.ReflectUtils;
import com.ruoyi.common.mail.config.properties.MailProperties; import com.ruoyi.common.mail.config.properties.MailProperties;
import com.ruoyi.common.mail.utils.MailUtils; import com.ruoyi.common.mail.utils.MailUtils;
import com.ruoyi.common.redis.utils.RedisUtils; import com.ruoyi.common.redis.utils.RedisUtils;
import com.ruoyi.common.sms.config.properties.SmsProperties;
import com.ruoyi.common.sms.core.SmsTemplate; import com.ruoyi.common.sms.core.SmsTemplate;
import com.ruoyi.common.sms.entity.SmsResult; import com.ruoyi.common.sms.entity.SmsResult;
import com.ruoyi.common.web.config.properties.CaptchaProperties; import com.ruoyi.common.web.config.properties.CaptchaProperties;
import com.ruoyi.common.web.enums.CaptchaType; import com.ruoyi.common.web.enums.CaptchaType;
import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.web.domain.vo.CaptchaVo; import com.ruoyi.web.domain.vo.CaptchaVo;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -47,9 +47,8 @@ import java.util.Map;
public class CaptchaController { public class CaptchaController {
private final CaptchaProperties captchaProperties; private final CaptchaProperties captchaProperties;
private final SmsProperties smsProperties;
private final MailProperties mailProperties; private final MailProperties mailProperties;
private final ISysConfigService configService;
/** /**
* 短信验证码 * 短信验证码
@ -58,15 +57,14 @@ public class CaptchaController {
*/ */
@GetMapping("/sms/code") @GetMapping("/sms/code")
public R<Void> smsCode(@NotBlank(message = "{user.phonenumber.not.blank}") String phonenumber) { public R<Void> smsCode(@NotBlank(message = "{user.phonenumber.not.blank}") String phonenumber) {
if (!Convert.toBool(configService.selectConfigByKey("sys.account.smsEnabled"))) { if (!smsProperties.getEnabled()) {
return R.fail("当前系统没有开启短信功能!"); return R.fail("当前系统没有开启短信功能!");
} }
String key = GlobalConstants.CAPTCHA_CODE_KEY + phonenumber; String key = GlobalConstants.CAPTCHA_CODE_KEY + phonenumber;
String code = RandomUtil.randomNumbers(4); String code = RandomUtil.randomNumbers(4);
Integer captchaExpired = Convert.toInt(configService.selectConfigByKey("sys.account.captchaExpired")); RedisUtils.setCacheObject(key, code, Duration.ofMinutes(Constants.CAPTCHA_EXPIRATION));
RedisUtils.setCacheObject(key, code, Duration.ofMinutes(captchaExpired));
// 验证码模板id 自行处理 (查数据库或写死均可) // 验证码模板id 自行处理 (查数据库或写死均可)
String templateId = configService.selectConfigByKey("sys.account.templateId"); String templateId = "";
Map<String, String> map = new HashMap<>(1); Map<String, String> map = new HashMap<>(1);
map.put("code", code); map.put("code", code);
SmsTemplate smsTemplate = SpringUtils.getBean(SmsTemplate.class); SmsTemplate smsTemplate = SpringUtils.getBean(SmsTemplate.class);
@ -90,10 +88,9 @@ public class CaptchaController {
} }
String key = GlobalConstants.CAPTCHA_CODE_KEY + email; String key = GlobalConstants.CAPTCHA_CODE_KEY + email;
String code = RandomUtil.randomNumbers(4); String code = RandomUtil.randomNumbers(4);
Integer captchaExpired = Convert.toInt(configService.selectConfigByKey("sys.account.captchaExpired")); RedisUtils.setCacheObject(key, code, Duration.ofMinutes(Constants.CAPTCHA_EXPIRATION));
RedisUtils.setCacheObject(key, code, Duration.ofMinutes(captchaExpired));
try { try {
MailUtils.sendText(email, "登录验证码", "您本次验证码为:%s有效性为%d分钟请尽快填写。".formatted(code, captchaExpired)); MailUtils.sendText(email, "登录验证码", "您本次验证码为:" + code + ",有效性为" + Constants.CAPTCHA_EXPIRATION + "分钟,请尽快填写。");
} catch (Exception e) { } catch (Exception e) {
log.error("验证码短信发送异常 => {}", e.getMessage()); log.error("验证码短信发送异常 => {}", e.getMessage());
return R.fail(e.getMessage()); return R.fail(e.getMessage());
@ -129,8 +126,7 @@ public class CaptchaController {
Expression exp = parser.parseExpression(StringUtils.remove(code, "=")); Expression exp = parser.parseExpression(StringUtils.remove(code, "="));
code = exp.getValue(String.class); code = exp.getValue(String.class);
} }
Integer captchaExpired = Convert.toInt(configService.selectConfigByKey("sys.account.captchaExpired")); RedisUtils.setCacheObject(verifyKey, code, Duration.ofMinutes(Constants.CAPTCHA_EXPIRATION));
RedisUtils.setCacheObject(verifyKey, code, Duration.ofMinutes(captchaExpired));
captchaVo.setUuid(uuid); captchaVo.setUuid(uuid);
captchaVo.setImg(captcha.getImageBase64()); captchaVo.setImg(captcha.getImageBase64());
return R.ok(captchaVo); return R.ok(captchaVo);

View File

@ -4,7 +4,6 @@ import cn.dev33.satoken.exception.NotLoginException;
import cn.dev33.satoken.secure.BCrypt; import cn.dev33.satoken.secure.BCrypt;
import cn.dev33.satoken.stp.StpUtil; import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.common.core.constant.Constants; import com.ruoyi.common.core.constant.Constants;
@ -31,11 +30,11 @@ import com.ruoyi.system.domain.SysUser;
import com.ruoyi.system.domain.vo.SysTenantVo; import com.ruoyi.system.domain.vo.SysTenantVo;
import com.ruoyi.system.domain.vo.SysUserVo; import com.ruoyi.system.domain.vo.SysUserVo;
import com.ruoyi.system.mapper.SysUserMapper; import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.system.service.ISysPermissionService; import com.ruoyi.system.service.ISysPermissionService;
import com.ruoyi.system.service.ISysTenantService; import com.ruoyi.system.service.ISysTenantService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.time.Duration; import java.time.Duration;
@ -57,7 +56,12 @@ public class SysLoginService {
private final CaptchaProperties captchaProperties; private final CaptchaProperties captchaProperties;
private final ISysPermissionService permissionService; private final ISysPermissionService permissionService;
private final ISysTenantService tenantService; private final ISysTenantService tenantService;
private final ISysConfigService configService;
@Value("${user.password.maxRetryCount}")
private Integer maxRetryCount;
@Value("${user.password.lockTime}")
private Integer lockTime;
/** /**
* 登录验证 * 登录验证
@ -336,10 +340,6 @@ public class SysLoginService {
// 获取用户登录错误次数(可自定义限制策略 例如: key + username + ip) // 获取用户登录错误次数(可自定义限制策略 例如: key + username + ip)
Integer errorNumber = RedisUtils.getCacheObject(errorKey); Integer errorNumber = RedisUtils.getCacheObject(errorKey);
//密码最大错误次数
Integer maxRetryCount = Convert.toInt(configService.selectConfigByKey("sys.user.maxRetryCount"));
//密码锁定时间
Integer lockTime = Convert.toInt(configService.selectConfigByKey("sys.user.lockTime"));
// 锁定时间内登录 则踢出 // 锁定时间内登录 则踢出
if (ObjectUtil.isNotNull(errorNumber) && errorNumber.equals(maxRetryCount)) { if (ObjectUtil.isNotNull(errorNumber) && errorNumber.equals(maxRetryCount)) {
recordLogininfor(tenantId, username, loginFail, MessageUtils.message(loginType.getRetryLimitExceed(), maxRetryCount, lockTime)); recordLogininfor(tenantId, username, loginFail, MessageUtils.message(loginType.getRetryLimitExceed(), maxRetryCount, lockTime));

View File

@ -52,6 +52,14 @@ logging:
org.springframework: warn org.springframework: warn
config: classpath:logback.xml config: classpath:logback.xml
# 用户配置
user:
password:
# 密码最大错误次数
maxRetryCount: 5
# 密码锁定时间默认10分钟
lockTime: 10
# Spring配置 # Spring配置
spring: spring:
application: application:

View File

@ -62,6 +62,11 @@ public interface Constants {
*/ */
String LOGIN_FAIL = "Error"; String LOGIN_FAIL = "Error";
/**
* 验证码有效期分钟
*/
Integer CAPTCHA_EXPIRATION = 2;
/** /**
* 令牌 * 令牌
*/ */

View File

@ -6,6 +6,7 @@ import com.ruoyi.common.sms.core.SmsTemplate;
import com.ruoyi.common.sms.core.TencentSmsTemplate; import com.ruoyi.common.sms.core.TencentSmsTemplate;
import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
@ -21,6 +22,7 @@ import org.springframework.context.annotation.Configuration;
public class SmsConfig { public class SmsConfig {
@Configuration @Configuration
@ConditionalOnProperty(value = "sms.enabled", havingValue = "true")
@ConditionalOnClass(com.aliyun.dysmsapi20170525.Client.class) @ConditionalOnClass(com.aliyun.dysmsapi20170525.Client.class)
static class AliyunSmsConfig { static class AliyunSmsConfig {
@ -32,6 +34,7 @@ public class SmsConfig {
} }
@Configuration @Configuration
@ConditionalOnProperty(value = "sms.enabled", havingValue = "true")
@ConditionalOnClass(com.tencentcloudapi.sms.v20190711.SmsClient.class) @ConditionalOnClass(com.tencentcloudapi.sms.v20190711.SmsClient.class)
static class TencentSmsConfig { static class TencentSmsConfig {

View File

@ -13,6 +13,8 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
@ConfigurationProperties(prefix = "sms") @ConfigurationProperties(prefix = "sms")
public class SmsProperties { public class SmsProperties {
private Boolean enabled;
/** /**
* 配置节点 * 配置节点
* 阿里云 dysmsapi.aliyuncs.com * 阿里云 dysmsapi.aliyuncs.com

View File

@ -1,9 +1,8 @@
package com.ruoyi.demo.controller; package com.ruoyi.demo.controller;
import cn.hutool.core.convert.Convert;
import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.service.ConfigService;
import com.ruoyi.common.core.utils.SpringUtils; import com.ruoyi.common.core.utils.SpringUtils;
import com.ruoyi.common.sms.config.properties.SmsProperties;
import com.ruoyi.common.sms.core.SmsTemplate; import com.ruoyi.common.sms.core.SmsTemplate;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@ -27,7 +26,7 @@ import java.util.Map;
@RequestMapping("/demo/sms") @RequestMapping("/demo/sms")
public class SmsController { public class SmsController {
private final ConfigService configService; private final SmsProperties smsProperties;
// private final SmsTemplate smsTemplate; // 可以使用spring注入 // private final SmsTemplate smsTemplate; // 可以使用spring注入
// private final AliyunSmsTemplate smsTemplate; // 也可以注入某个厂家的模板工具 // private final AliyunSmsTemplate smsTemplate; // 也可以注入某个厂家的模板工具
@ -39,7 +38,7 @@ public class SmsController {
*/ */
@GetMapping("/sendAliyun") @GetMapping("/sendAliyun")
public R<Object> sendAliyun(String phones, String templateId) { public R<Object> sendAliyun(String phones, String templateId) {
if (!Convert.toBool(configService.getConfigValue("sys.account.smsEnabled"))) { if (!smsProperties.getEnabled()) {
return R.fail("当前系统没有开启短信功能!"); return R.fail("当前系统没有开启短信功能!");
} }
if (!SpringUtils.containsBean("aliyunSmsTemplate")) { if (!SpringUtils.containsBean("aliyunSmsTemplate")) {
@ -60,7 +59,7 @@ public class SmsController {
*/ */
@GetMapping("/sendTencent") @GetMapping("/sendTencent")
public R<Object> sendTencent(String phones, String templateId) { public R<Object> sendTencent(String phones, String templateId) {
if (!Convert.toBool(configService.getConfigValue("sys.account.smsEnabled"))) { if (!smsProperties.getEnabled()) {
return R.fail("当前系统没有开启短信功能!"); return R.fail("当前系统没有开启短信功能!");
} }
if (!SpringUtils.containsBean("tencentSmsTemplate")) { if (!SpringUtils.containsBean("tencentSmsTemplate")) {

View File

@ -827,13 +827,7 @@ comment on column sys_config.remark is '备注';
insert into sys_config values(1, '000000', '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 103, 1, sysdate, null, null, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow' ); insert into sys_config values(1, '000000', '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 103, 1, sysdate, null, null, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow' );
insert into sys_config values(2, '000000', '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 103, 1, sysdate, null, null, '初始化密码 123456' ); insert into sys_config values(2, '000000', '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 103, 1, sysdate, null, null, '初始化密码 123456' );
insert into sys_config values(3, '000000', '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 103, 1, sysdate, null, null, '深色主题theme-dark浅色主题theme-light' ); insert into sys_config values(3, '000000', '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 103, 1, sysdate, null, null, '深色主题theme-dark浅色主题theme-light' );
insert into sys_config values(4, '000000', '用户配置-验证码有效期', 'sys.account.captchaExpired', '2', 'Y', 103, 1, sysdate, null, NULL, '验证码有效期(分钟)');
insert into sys_config values(5, '000000', '账号自助-是否开启用户注册功能', 'sys.account.registerUser', 'false', 'Y', 103, 1, sysdate, null, null, '是否开启注册用户功能true开启false关闭'); insert into sys_config values(5, '000000', '账号自助-是否开启用户注册功能', 'sys.account.registerUser', 'false', 'Y', 103, 1, sysdate, null, null, '是否开启注册用户功能true开启false关闭');
insert into sys_config values(6, '000000', '用户配置-密码最大错误次数', 'sys.user.maxRetryCount', '5', 'Y', 103, 1, sysdate, null, null, '密码最大错误次数');
insert into sys_config values(7, '000000', '用户配置-密码锁定时间', 'sys.user.lockTime', '10', 'Y', 103, 1, sysdate, null, null, '密码锁定时间(分钟)');
insert into sys_config values(8, '000000', '账号自助-短信开关', 'sys.account.smsEnabled', 'false', 'Y', 103, 1, sysdate, null, null, '是否开启短信功能true开启false关闭');
insert into sys_config values(9, '000000', '账号自助-验证码模板id', 'sys.account.templateId', '', 'Y', 103, 1, sysdate, null, null, '验证码模板id');
insert into sys_config values(10, '000000', '账号自助-邮件开关', 'sys.account.emailEnabled', 'false', 'Y', 103, 1, sysdate, null, NULL, '是否开启邮件功能true开启false关闭');
insert into sys_config values(11, '000000', 'OSS预览列表资源开关', 'sys.oss.previewListResource', 'true', 'Y', 103, 1, sysdate, null, null, 'true:开启, false:关闭'); insert into sys_config values(11, '000000', 'OSS预览列表资源开关', 'sys.oss.previewListResource', 'true', 'Y', 103, 1, sysdate, null, null, 'true:开启, false:关闭');

View File

@ -848,13 +848,7 @@ comment on column sys_config.remark is '备注';
insert into sys_config values(1, '000000', '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 103, 1, now(), null, null, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow' ); insert into sys_config values(1, '000000', '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 103, 1, now(), null, null, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow' );
insert into sys_config values(2, '000000', '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 103, 1, now(), null, null, '初始化密码 123456' ); insert into sys_config values(2, '000000', '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 103, 1, now(), null, null, '初始化密码 123456' );
insert into sys_config values(3, '000000', '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 103, 1, now(), null, null, '深色主题theme-dark浅色主题theme-light' ); insert into sys_config values(3, '000000', '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 103, 1, now(), null, null, '深色主题theme-dark浅色主题theme-light' );
insert into sys_config values(4, '000000', '用户配置-验证码有效期', 'sys.account.captchaExpired', '2', 'Y', 103, 1, now(), null, NULL, '验证码有效期(分钟)');
insert into sys_config values(5, '000000', '账号自助-是否开启用户注册功能', 'sys.account.registerUser', 'false', 'Y', 103, 1, now(), null, null, '是否开启注册用户功能true开启false关闭'); insert into sys_config values(5, '000000', '账号自助-是否开启用户注册功能', 'sys.account.registerUser', 'false', 'Y', 103, 1, now(), null, null, '是否开启注册用户功能true开启false关闭');
insert into sys_config values(6, '000000', '用户配置-密码最大错误次数', 'sys.user.maxRetryCount', '5', 'Y', 103, 1,now(), null, null, '密码最大错误次数');
insert into sys_config values(7, '000000', '用户配置-密码锁定时间', 'sys.user.lockTime', '10', 'Y', 103, 1, now(), null, null, '密码锁定时间(分钟)');
insert into sys_config values(8, '000000', '账号自助-短信开关', 'sys.account.smsEnabled', 'false', 'Y', 103, 1, now(), null, null, '是否开启短信功能true开启false关闭');
insert into sys_config values(9, '000000', '账号自助-验证码模板id', 'sys.account.templateId', '', 'Y', 103, 1, now(), null, null, '验证码模板id');
insert into sys_config values(10, '000000', '账号自助-邮件开关', 'sys.account.emailEnabled', 'false', 'Y', 103, 1, now(), null, NULL, '是否开启邮件功能true开启false关闭');
insert into sys_config values(11, '000000', 'OSS预览列表资源开关', 'sys.oss.previewListResource', 'true', 'Y', 103, 1, now(), null, null, 'true:开启, false:关闭'); insert into sys_config values(11, '000000', 'OSS预览列表资源开关', 'sys.oss.previewListResource', 'true', 'Y', 103, 1, now(), null, null, 'true:开启, false:关闭');

View File

@ -625,17 +625,12 @@ create table sys_config (
primary key (config_id) primary key (config_id)
) engine=innodb comment = '参数配置表'; ) engine=innodb comment = '参数配置表';
insert into sys_config values(1, '000000', '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 103, 1, sysdate(), null, NULL, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow'); insert into sys_config values(1, '000000', '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 103, 1, sysdate(), null, null, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow' );
insert into sys_config values(2, '000000', '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 103, 1, sysdate(), null, NULL, '初始化密码 123456'); insert into sys_config values(2, '000000', '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 103, 1, sysdate(), null, null, '初始化密码 123456' );
insert into sys_config values(3, '000000', '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 103, 1, sysdate(), null, NULL, '深色主题theme-dark浅色主题theme-light'); insert into sys_config values(3, '000000', '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 103, 1, sysdate(), null, null, '深色主题theme-dark浅色主题theme-light' );
insert into sys_config values(4, '000000', '用户配置-验证码有效期', 'sys.account.captchaExpired', '2', 'Y', 103, 1, sysdate(), null, NULL, '验证码有效期(分钟)'); insert into sys_config values(5, '000000', '账号自助-是否开启用户注册功能', 'sys.account.registerUser', 'false', 'Y', 103, 1, sysdate(), null, null, '是否开启注册用户功能true开启false关闭');
insert into sys_config values(5, '000000', '账号自助-是否开启用户注册功能', 'sys.account.registerUser', 'false', 'Y', 103, 1, sysdate(), null, NULL, '是否开启注册用户功能true开启false关闭'); insert into sys_config values(11, '000000', 'OSS预览列表资源开关', 'sys.oss.previewListResource', 'true', 'Y', 103, 1, sysdate(), null, null, 'true:开启, false:关闭');
insert into sys_config values(6, '000000', '用户配置-密码最大错误次数', 'sys.user.maxRetryCount', '5', 'Y', 103, 1, sysdate(), null, NULL, '密码最大错误次数');
insert into sys_config values(7, '000000', '用户配置-密码锁定时间', 'sys.user.lockTime', '10', 'Y', 103, 1, sysdate(), null, NULL, '密码锁定时间(分钟)');
insert into sys_config values(8, '000000', '账号自助-短信开关', 'sys.account.smsEnabled', 'false', 'Y', 103, 1, sysdate(), null, NULL, '是否开启短信功能true开启false关闭');
insert into sys_config values(9, '000000', '账号自助-短信验证码模板id', 'sys.account.templateId', '', 'Y', 103, 1, sysdate(), null, NULL, '验证码模板id');
insert into sys_config values(10, '000000', '账号自助-邮件开关', 'sys.account.emailEnabled', 'false', 'Y', 103, 1, sysdate(), null, NULL, '是否开启邮件功能true开启false关闭');
insert into sys_config values(11,'000000', 'OSS预览列表资源开关', 'sys.oss.previewListResource', 'true', 'Y', 103, 1, sysdate(), null, NULL, 'true:开启, false:关闭');
-- ---------------------------- -- ----------------------------
-- 14、系统访问记录 -- 14、系统访问记录

View File

@ -694,20 +694,8 @@ INSERT sys_config VALUES (2, N'000000', N'用户管理-账号初始密码', N'sy
GO GO
INSERT sys_config VALUES (3, N'000000', N'主框架页-侧边栏主题', N'sys.index.sideTheme', N'theme-dark', N'Y', 103, 1, getdate(), NULL, NULL, N'深色主题theme-dark浅色主题theme-light') INSERT sys_config VALUES (3, N'000000', N'主框架页-侧边栏主题', N'sys.index.sideTheme', N'theme-dark', N'Y', 103, 1, getdate(), NULL, NULL, N'深色主题theme-dark浅色主题theme-light')
GO GO
INSERT sys_config VALUES (4, N'000000', N'用户配置-验证码有效期', N'sys.account.captchaExpired', N'2', N'Y', 103, 1, sysdate(), null, NULL, N'验证码有效期(分钟)');
GO
INSERT sys_config VALUES (5, N'000000', N'账号自助-是否开启用户注册功能', N'sys.account.registerUser', N'false', N'Y', 103, 1, getdate(), NULL, NULL, N'是否开启注册用户功能true开启false关闭') INSERT sys_config VALUES (5, N'000000', N'账号自助-是否开启用户注册功能', N'sys.account.registerUser', N'false', N'Y', 103, 1, getdate(), NULL, NULL, N'是否开启注册用户功能true开启false关闭')
GO GO
INSERT sys_config VALUES (6, N'000000', N'用户配置-密码最大错误次数', N'sys.user.maxRetryCount', N'5', N'Y', 103, 1, getdate(), NULL, NULL, N'密码最大错误次数')
GO
INSERT sys_config VALUES (7, N'000000', N'用户配置-密码锁定时间', N'sys.user.lockTime', N'10', N'Y', 103, 1, getdate(), NULL, NULL, N'密码锁定时间(分钟)')
GO
INSERT sys_config VALUES (8, N'000000', N'账号自助-短信开关', N'sys.account.smsEnabled', N'false', N'Y', 103, 1, getdate(), NULL, NULL, N'是否开启短信功能true开启false关闭')
GO
INSERT sys_config VALUES (9, N'000000', N'账号自助-验证码模板id', N'sys.account.templateId', N'', N'Y', 103, 1, getdate(), NULL, NULL, N'验证码模板id')
GO
INSERT sys_config VALUES (10, N'000000', N'账号自助-邮件开关', N'sys.account.emailEnabled', N'false', N'Y', 103, 1, getdate(), NULL, NULL, N'是否开启邮件功能true开启false关闭')
GO
INSERT sys_config VALUES (11, N'000000', N'OSS预览列表资源开关', N'sys.oss.previewListResource', N'true', N'Y', 103, 1, getdate(), NULL, NULL, N'true:开启, false:关闭'); INSERT sys_config VALUES (11, N'000000', N'OSS预览列表资源开关', N'sys.oss.previewListResource', N'true', N'Y', 103, 1, getdate(), NULL, NULL, N'true:开启, false:关闭');
GO GO