From 50fbfe2cb4271e46f28eb53ea44e93671c7aef49 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期二, 20 六月 2023 12:11:12 +0800
Subject: [PATCH] !370 扩展第三方登录授权功能 * add 查看授权列表 * 优化第三方授权登录 * 第三方授权登录,加上配置 * 优化,第三方授权登录 * 新增加第三方登录授权功能
---
ruoyi-admin/pom.xml | 12
ruoyi-admin/src/main/java/org/dromara/web/controller/AuthController.java | 69 +
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SocialUserMapper.xml | 24
ruoyi-common/ruoyi-common-bom/pom.xml | 6
script/sql/ry_vue_5.X.sql | 1611 ++++++++++++++++++++-----------
ruoyi-admin/src/main/java/org/dromara/web/service/SysLoginService.java | 82 +
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/ISocialUserService.java | 46
ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/enums/DeviceType.java | 7
pom.xml | 8
ruoyi-common/pom.xml | 1
ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/config/SocialConfig.java | 24
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SocialUserVo.java | 162 +++
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/mapper/SocialUserMapper.java | 23
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SocialUserBo.java | 141 ++
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SocialUserController.java | 57 +
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/SocialUser.java | 136 ++
ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/utils/AuthRedisStateCache.java | 65 +
ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/utils/SocialUtils.java | 119 ++
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SocialUserServiceImpl.java | 92 +
ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/config/properties/SocialProperties.java | 39
ruoyi-common/ruoyi-common-social/pom.xml | 29
ruoyi-admin/src/main/resources/application-dev.yml | 149 ++
ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/config/properties/SocialLoginConfigProperties.java | 58 +
23 files changed, 2,365 insertions(+), 595 deletions(-)
diff --git a/pom.xml b/pom.xml
index 8a8ead1..919dc03 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,6 +39,7 @@
<mapstruct-plus.lombok.version>0.2.0</mapstruct-plus.lombok.version>
<lombok.version>1.18.26</lombok.version>
<bouncycastle.version>1.72</bouncycastle.version>
+ <justauth.version>1.16.5</justauth.version>
<!-- 绂荤嚎IP鍦板潃瀹氫綅搴� -->
<ip2region.version>2.7.0</ip2region.version>
@@ -110,6 +111,13 @@
<scope>import</scope>
</dependency>
+ <!-- JustAuth 鐨勪緷璧栭厤缃�-->
+ <dependency>
+ <groupId>me.zhyd.oauth</groupId>
+ <artifactId>JustAuth</artifactId>
+ <version>${justauth.version}</version>
+ </dependency>
+
<!-- common 鐨勪緷璧栭厤缃�-->
<dependency>
<groupId>org.dromara</groupId>
diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml
index af5f239..39731b1 100644
--- a/ruoyi-admin/pom.xml
+++ b/ruoyi-admin/pom.xml
@@ -45,6 +45,12 @@
<dependency>
<groupId>org.dromara</groupId>
+ <artifactId>ruoyi-common-social</artifactId>
+ </dependency>
+
+
+ <dependency>
+ <groupId>org.dromara</groupId>
<artifactId>ruoyi-system</artifactId>
</dependency>
@@ -76,6 +82,12 @@
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>me.zhyd.oauth</groupId>
+ <artifactId>JustAuth</artifactId>
+ </dependency>
+
+
<!-- skywalking 鏁村悎 logback -->
<!-- <dependency>-->
<!-- <groupId>org.apache.skywalking</groupId>-->
diff --git a/ruoyi-admin/src/main/java/org/dromara/web/controller/AuthController.java b/ruoyi-admin/src/main/java/org/dromara/web/controller/AuthController.java
index bba6113..515ec1b 100644
--- a/ruoyi-admin/src/main/java/org/dromara/web/controller/AuthController.java
+++ b/ruoyi-admin/src/main/java/org/dromara/web/controller/AuthController.java
@@ -2,9 +2,15 @@
import cn.dev33.satoken.annotation.SaIgnore;
import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.ObjectUtil;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.validation.constraints.NotBlank;
import lombok.RequiredArgsConstructor;
+import me.zhyd.oauth.model.AuthCallback;
+import me.zhyd.oauth.model.AuthResponse;
+import me.zhyd.oauth.model.AuthUser;
+import me.zhyd.oauth.request.AuthRequest;
+import me.zhyd.oauth.utils.AuthStateUtils;
import org.dromara.common.core.domain.R;
import org.dromara.common.core.domain.model.EmailLoginBody;
import org.dromara.common.core.domain.model.LoginBody;
@@ -13,9 +19,13 @@
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.social.config.properties.SocialLoginConfigProperties;
+import org.dromara.common.social.config.properties.SocialProperties;
+import org.dromara.common.social.utils.SocialUtils;
import org.dromara.common.tenant.helper.TenantHelper;
import org.dromara.system.domain.bo.SysTenantBo;
import org.dromara.system.domain.vo.SysTenantVo;
+import org.dromara.system.service.ISocialUserService;
import org.dromara.system.service.ISysConfigService;
import org.dromara.system.service.ISysTenantService;
import org.dromara.web.domain.vo.LoginTenantVo;
@@ -26,6 +36,7 @@
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
+import java.io.IOException;
import java.net.URL;
import java.util.List;
@@ -41,10 +52,14 @@
@RequestMapping("/auth")
public class AuthController {
+ private final SocialProperties socialProperties;
private final SysLoginService loginService;
private final SysRegisterService registerService;
private final ISysConfigService configService;
private final ISysTenantService tenantService;
+ private final ISocialUserService socialUserService;
+
+
/**
* 鐧诲綍鏂规硶
@@ -115,6 +130,60 @@
return R.ok(loginVo);
}
+
+ /**
+ * 璁よ瘉鎺堟潈
+ * @param source
+ */
+ @GetMapping("/binding/{source}")
+ @ResponseBody
+ public R<LoginVo> authBinding(@PathVariable("source") String source, HttpServletRequest request){
+ SocialLoginConfigProperties obj = socialProperties.getType().get(source);
+ if (ObjectUtil.isNull(obj)){
+ return R.fail(source + "骞冲彴璐﹀彿鏆備笉鏀寔");
+ }
+ AuthRequest authRequest = SocialUtils.getAuthRequest(source,
+ obj.getClientId(),
+ obj.getClientSecret(),
+ obj.getRedirectUri());
+ String authorizeUrl = authRequest.authorize(AuthStateUtils.createState());
+ return R.ok(authorizeUrl);
+ }
+
+ /**
+ * 绗笁鏂圭櫥褰曞洖璋冧笟鍔″鐞�
+ * @param source
+ * @param callback
+ * @param request
+ * @return
+ */
+ @SuppressWarnings("unchecked")
+ @GetMapping("/social-login/{source}")
+ public R<String> socialLogin(@PathVariable("source") String source, AuthCallback callback, HttpServletRequest request) throws IOException {
+ SocialLoginConfigProperties obj = socialProperties.getType().get(source);
+ if (ObjectUtil.isNull(obj)){
+ return R.fail(source + "骞冲彴璐﹀彿鏆備笉鏀寔");
+ }
+ AuthRequest authRequest = SocialUtils.getAuthRequest(source,
+ obj.getClientId(),
+ obj.getClientSecret(),
+ obj.getRedirectUri());
+ AuthResponse<AuthUser> response = authRequest.login(callback);
+ return loginService.socialLogin(source, response, request);
+ }
+
+ /**
+ * 鍙栨秷鎺堟潈
+ * @param socialId
+ */
+ @DeleteMapping(value = "/unlock/{socialId}")
+ public R<Void> unlockSocial(@PathVariable Long socialId)
+ {
+ Boolean rows = socialUserService.deleteWithValidById(socialId);
+ return rows ? R.ok() : R.fail("鍙栨秷鎺堟潈澶辫触");
+ }
+
+
/**
* 閫�鍑虹櫥褰�
*/
diff --git a/ruoyi-admin/src/main/java/org/dromara/web/service/SysLoginService.java b/ruoyi-admin/src/main/java/org/dromara/web/service/SysLoginService.java
index c035d12..e4aec24 100644
--- a/ruoyi-admin/src/main/java/org/dromara/web/service/SysLoginService.java
+++ b/ruoyi-admin/src/main/java/org/dromara/web/service/SysLoginService.java
@@ -6,11 +6,15 @@
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import jakarta.servlet.http.HttpServletRequest;
import lombok.RequiredArgsConstructor;
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.constant.GlobalConstants;
import org.dromara.common.core.constant.TenantConstants;
+import org.dromara.common.core.domain.R;
import org.dromara.common.core.domain.dto.RoleDTO;
import org.dromara.common.core.domain.model.LoginUser;
import org.dromara.common.core.domain.model.XcxLoginUser;
@@ -29,14 +33,20 @@
import org.dromara.common.tenant.helper.TenantHelper;
import org.dromara.common.web.config.properties.CaptchaProperties;
import org.dromara.system.domain.SysUser;
+import org.dromara.system.domain.bo.SocialUserBo;
+import org.dromara.system.domain.vo.SocialUserVo;
import org.dromara.system.domain.vo.SysTenantVo;
import org.dromara.system.domain.vo.SysUserVo;
import org.dromara.system.mapper.SysUserMapper;
+import org.dromara.system.service.ISocialUserService;
import org.dromara.system.service.ISysPermissionService;
import org.dromara.system.service.ISysTenantService;
+import org.dromara.system.service.ISysUserService;
+import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
+import java.io.IOException;
import java.time.Duration;
import java.util.Date;
import java.util.List;
@@ -53,6 +63,7 @@
public class SysLoginService {
private final SysUserMapper userMapper;
+ private final ISocialUserService socialUserService;
private final CaptchaProperties captchaProperties;
private final ISysPermissionService permissionService;
private final ISysTenantService tenantService;
@@ -155,6 +166,63 @@
}
/**
+ * 绀句氦鐧诲綍
+ *
+ * @param source 鐧诲綍鏉ユ簮
+ * @param authUser 鎺堟潈鍝嶅簲瀹炰綋
+ * @param request Http璇锋眰瀵硅薄
+ * @return 缁熶竴鍝嶅簲瀹炰綋
+ */
+ public R<String> socialLogin(String source, AuthResponse<AuthUser> authUser, HttpServletRequest request) {
+ // 鍒ゆ柇鎺堟潈鍝嶅簲鏄惁鎴愬姛
+ if (!authUser.ok()) {
+ return R.fail("瀵逛笉璧凤紝鎺堟潈淇℃伅楠岃瘉涓嶉�氳繃锛岃閫�鍑洪噸璇曪紒");
+ }
+ AuthUser authUserData = authUser.getData();
+ SocialUserVo user = socialUserService.selectSocialUserByAuthId(authUserData.getSource() + authUserData.getUuid());
+ if (ObjectUtil.isNotNull(user)) {
+ //鎵ц鐧诲綍鍜岃褰曠櫥褰曚俊鎭搷浣�
+ return loginAndRecord(user.getTenantId(), user.getUserName(), authUserData);
+ } else {
+ // 鍒ゆ柇鏄惁宸茬櫥褰�
+ if (LoginHelper.getUserId() == null) {
+ return R.fail("鎺堟潈澶辫触锛岃鍏堢櫥褰曟墠鑳界粦瀹�");
+ }
+ SocialUserBo socialUserBo = new SocialUserBo();
+ socialUserBo.setUserId(LoginHelper.getUserId());
+ socialUserBo.setAuthId(authUserData.getSource() + authUserData.getUuid());
+ socialUserBo.setSource(authUserData.getSource());
+ socialUserBo.setUserName(authUserData.getUsername());
+ socialUserBo.setNickName(authUserData.getNickname());
+ socialUserBo.setAvatar(authUserData.getAvatar());
+ socialUserBo.setOpenId(authUserData.getUuid());
+ BeanUtils.copyProperties(authUserData.getToken(), socialUserBo);
+
+ socialUserService.insertByBo(socialUserBo);
+ SysUserVo lodingData = loadUserByUsername(LoginHelper.getTenantId(), LoginHelper.getUsername());
+ //鎵ц鐧诲綍鍜岃褰曠櫥褰曚俊鎭搷浣�
+ return loginAndRecord(lodingData.getTenantId(), socialUserBo.getUserName(), authUserData);
+ }
+ }
+
+ /**
+ * 鎵ц鐧诲綍鍜岃褰曠櫥褰曚俊鎭搷浣�
+ *
+ * @param tenantId 绉熸埛ID
+ * @param userName 鐢ㄦ埛鍚�
+ * @param authUser 鎺堟潈鐢ㄦ埛淇℃伅
+ * @return 缁熶竴鍝嶅簲瀹炰綋
+ */
+ private R<String> loginAndRecord(String tenantId, String userName, AuthUser authUser) {
+ checkTenant(tenantId);
+ SysUserVo dbUser = loadUserByUsername(tenantId, userName);
+ LoginHelper.loginByDevice(buildLoginUser(dbUser), DeviceType.SOCIAL);
+ recordLogininfor(dbUser.getTenantId(), userName, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"));
+ recordLoginInfo(dbUser.getUserId());
+ return R.ok(StpUtil.getTokenValue());
+ }
+
+ /**
* 閫�鍑虹櫥褰�
*/
public void logout() {
@@ -235,9 +303,9 @@
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));
+ .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);
@@ -253,9 +321,9 @@
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));
+ .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);
@@ -382,7 +450,7 @@
log.info("鐧诲綍绉熸埛锛歿} 宸茶鍋滅敤.", tenantId);
throw new TenantException("tenant.blocked");
} else if (ObjectUtil.isNotNull(tenant.getExpireTime())
- && new Date().after(tenant.getExpireTime())) {
+ && new Date().after(tenant.getExpireTime())) {
log.info("鐧诲綍绉熸埛锛歿} 宸茶秴杩囨湁鏁堟湡.", tenantId);
throw new TenantException("tenant.expired");
}
diff --git a/ruoyi-admin/src/main/resources/application-dev.yml b/ruoyi-admin/src/main/resources/application-dev.yml
index 0d895fa..432607f 100644
--- a/ruoyi-admin/src/main/resources/application-dev.yml
+++ b/ruoyi-admin/src/main/resources/application-dev.yml
@@ -177,3 +177,152 @@
sdkAppId: appid
#鍦板煙淇℃伅榛樿涓� ap-guangzhou 濡傛棤鐗规畩鏀瑰彉鍙笉鐢ㄨ缃�
territory: ap-guangzhou
+
+
+
+justauth:
+ enabled: true
+ type:
+ QQ:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/qq/callback
+ union-id: false
+ WEIBO:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/weibo/callback
+ gitee:
+ client-id: 38eaaa1b77b5e064313057a2f5745ce3a9f3e7686d9bd302c7df2f308ef6db81
+ client-secret: 2e633af8780cb9fe002c4c7291b722db944402e271efb99b062811f52d7da1ff
+ redirect-uri: http://localhost:80/social-login?source=gitee
+ DINGTALK:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/dingtalk/callback
+ BAIDU:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/baidu/callback
+ CSDN:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/csdn/callback
+ CODING:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/coding/callback
+ coding-group-name: xx
+ OSCHINA:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/oschina/callback
+ ALIPAY:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/alipay/callback
+ alipay-public-key: MIIB**************DAQAB
+ WECHAT_OPEN:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/wechat_open/callback
+ WECHAT_MP:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/wechat_mp/callback
+ WECHAT_ENTERPRISE:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/wechat_enterprise/callback
+ agent-id: 1000002
+ TAOBAO:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/taobao/callback
+ GOOGLE:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/google/callback
+ FACEBOOK:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/facebook/callback
+ DOUYIN:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/douyin/callback
+ LINKEDIN:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/linkedin/callback
+ MICROSOFT:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/microsoft/callback
+ MI:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/mi/callback
+ TOUTIAO:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/toutiao/callback
+ TEAMBITION:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/teambition/callback
+ RENREN:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/renren/callback
+ PINTEREST:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/pinterest/callback
+ STACK_OVERFLOW:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/stack_overflow/callback
+ stack-overflow-key: asd*********asd
+ HUAWEI:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/huawei/callback
+ KUJIALE:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/kujiale/callback
+ GITLAB:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/gitlab/callback
+ MEITUAN:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/meituan/callback
+ ELEME:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/eleme/callback
+ TWITTER:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/twitter/callback
+ XMLY:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/xmly/callback
+ # 璁惧鍞竴鏍囪瘑ID
+ device-id: xxxxxxxxxxxxxx
+ # 瀹㈡埛绔搷浣滅郴缁熺被鍨嬶紝1-iOS绯荤粺锛�2-Android绯荤粺锛�3-Web
+ client-os-type: 3
+ # 瀹㈡埛绔寘鍚嶏紝濡傛灉 clientOsType 涓�1鎴�2鏃跺繀濉�傚Android瀹㈡埛绔槸鍖呭悕锛屽IOS瀹㈡埛绔槸Bundle ID
+ #pack-id: xxxx
+ FEISHU:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/feishu/callback
+ JD:
+ client-id: 10**********6
+ client-secret: 1f7d08**********5b7**********29e
+ redirect-uri: http://oauth.xkcoding.com/demo/oauth/jd/callback
diff --git a/ruoyi-common/pom.xml b/ruoyi-common/pom.xml
index 0428aea..45493d3 100644
--- a/ruoyi-common/pom.xml
+++ b/ruoyi-common/pom.xml
@@ -11,6 +11,7 @@
<modules>
<module>ruoyi-common-bom</module>
+ <module>ruoyi-common-social</module>
<module>ruoyi-common-core</module>
<module>ruoyi-common-doc</module>
<module>ruoyi-common-excel</module>
diff --git a/ruoyi-common/ruoyi-common-bom/pom.xml b/ruoyi-common/ruoyi-common-bom/pom.xml
index 8a9e25a..cac678c 100644
--- a/ruoyi-common/ruoyi-common-bom/pom.xml
+++ b/ruoyi-common/ruoyi-common-bom/pom.xml
@@ -117,6 +117,12 @@
<version>${revision}</version>
</dependency>
+ <dependency>
+ <groupId>org.dromara</groupId>
+ <artifactId>ruoyi-common-social</artifactId>
+ <version>${revision}</version>
+ </dependency>
+
<!-- web鏈嶅姟 -->
<dependency>
<groupId>org.dromara</groupId>
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/enums/DeviceType.java b/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/enums/DeviceType.java
index 09bf44b..dbadfc2 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/enums/DeviceType.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/enums/DeviceType.java
@@ -26,7 +26,12 @@
/**
* 灏忕▼搴忕
*/
- XCX("xcx");
+ XCX("xcx"),
+
+ /**
+ * social绗笁鏂圭
+ */
+ SOCIAL("social");
private final String device;
}
diff --git a/ruoyi-common/ruoyi-common-social/pom.xml b/ruoyi-common/ruoyi-common-social/pom.xml
new file mode 100644
index 0000000..77135a6
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-social/pom.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.dromara</groupId>
+ <artifactId>ruoyi-common</artifactId>
+ <version>${revision}</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>ruoyi-common-social</artifactId>
+
+ <description>
+ ruoyi-common-social 鎺堟潈璁よ瘉
+ </description>
+
+ <dependencies>
+ <dependency>
+ <groupId>me.zhyd.oauth</groupId>
+ <artifactId>JustAuth</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.dromara</groupId>
+ <artifactId>ruoyi-common-redis</artifactId>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/config/SocialConfig.java b/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/config/SocialConfig.java
new file mode 100644
index 0000000..7a9a166
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/config/SocialConfig.java
@@ -0,0 +1,24 @@
+package org.dromara.common.social.config;
+
+import me.zhyd.oauth.cache.AuthStateCache;
+import org.dromara.common.social.config.properties.SocialProperties;
+import org.dromara.common.social.utils.AuthRedisStateCache;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+
+/**
+ * Social 閰嶇疆灞炴��
+ * @author thiszhc
+ */
+@AutoConfiguration
+@EnableConfigurationProperties(SocialProperties.class)
+public class SocialConfig {
+
+ @Bean
+ public AuthStateCache authStateCache() {
+ return new AuthRedisStateCache();
+ }
+
+}
diff --git a/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/config/properties/SocialLoginConfigProperties.java b/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/config/properties/SocialLoginConfigProperties.java
new file mode 100644
index 0000000..2b63c1e
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/config/properties/SocialLoginConfigProperties.java
@@ -0,0 +1,58 @@
+package org.dromara.common.social.config.properties;
+
+import lombok.Data;
+
+@Data
+public class SocialLoginConfigProperties {
+
+ /**
+ * 搴旂敤 ID
+ */
+ private String clientId;
+
+ /**
+ * 搴旂敤瀵嗛挜
+ */
+ private String clientSecret;
+
+ /**
+ * 鍥炶皟鍦板潃
+ */
+ private String redirectUri;
+
+ /**
+ * 鏄惁鑾峰彇unionId
+ */
+ private boolean unionId;
+
+ /**
+ * Coding 浼佷笟鍚嶇О
+ */
+ private String codingGroupName;
+
+ /**
+ * 鏀粯瀹濆叕閽�
+ */
+ private String alipayPublicKey;
+
+ /**
+ * 浼佷笟寰俊搴旂敤ID
+ */
+ private String agentId;
+
+ /**
+ * stackoverflow api key
+ */
+ private String stackOverflowKey;
+
+ /**
+ * 璁惧ID
+ */
+ private String deviceId;
+
+ /**
+ * 瀹㈡埛绔郴缁熺被鍨�
+ */
+ private String clientOsType;
+
+}
diff --git a/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/config/properties/SocialProperties.java b/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/config/properties/SocialProperties.java
new file mode 100644
index 0000000..811d821
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/config/properties/SocialProperties.java
@@ -0,0 +1,39 @@
+package org.dromara.common.social.config.properties;
+
+import lombok.Data;
+import org.springframework.boot.autoconfigure.cache.CacheProperties;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * Social 閰嶇疆灞炴��
+ * @author thiszhc
+ */
+@Data
+@Component
+@ConfigurationProperties(prefix = "justauth")
+public class SocialProperties {
+
+ /**
+ * 鏄惁鍚敤
+ */
+ private boolean enabled;
+
+ /**
+ * 鎺堟潈绫诲瀷
+ */
+ private Map<String, SocialLoginConfigProperties> type;
+
+ /**
+ * 鎺堟潈杩囨湡鏃堕棿
+ */
+ private long timeout;
+
+ /**
+ * 鎺堟潈缂撳瓨閰嶇疆
+ */
+ private CacheProperties cache = new CacheProperties();
+
+}
diff --git a/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/utils/AuthRedisStateCache.java b/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/utils/AuthRedisStateCache.java
new file mode 100644
index 0000000..f7f2392
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/utils/AuthRedisStateCache.java
@@ -0,0 +1,65 @@
+package org.dromara.common.social.utils;
+
+import jakarta.annotation.PostConstruct;
+import me.zhyd.oauth.cache.AuthStateCache;
+import org.dromara.common.redis.utils.RedisUtils;
+import org.dromara.common.social.config.properties.SocialProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.core.ValueOperations;
+
+import java.time.Duration;
+
+public class AuthRedisStateCache implements AuthStateCache {
+
+ private SocialProperties socialProperties;
+
+ /**
+ * 瀛樺叆缂撳瓨
+ *
+ * @param key 缂撳瓨key
+ * @param value 缂撳瓨鍐呭
+ */
+ @Override
+ public void cache(String key, String value) {
+ // TODO: 鑷畾涔夊瓨鍏ョ紦瀛�
+ RedisUtils.setCacheObject(key, value, Duration.ofMillis(socialProperties.getTimeout()));
+ }
+
+ /**
+ * 瀛樺叆缂撳瓨
+ *
+ * @param key 缂撳瓨key
+ * @param value 缂撳瓨鍐呭
+ * @param timeout 鎸囧畾缂撳瓨杩囨湡鏃堕棿(姣)
+ */
+ @Override
+ public void cache(String key, String value, long timeout) {
+ // TODO: 鑷畾涔夊瓨鍏ョ紦瀛�
+ RedisUtils.setCacheObject(key, value, Duration.ofMillis(timeout));
+ }
+
+ /**
+ * 鑾峰彇缂撳瓨鍐呭
+ *
+ * @param key 缂撳瓨key
+ * @return 缂撳瓨鍐呭
+ */
+ @Override
+ public String get(String key) {
+ // TODO: 鑷畾涔夎幏鍙栫紦瀛樺唴瀹�
+ return RedisUtils.getCacheObject(key);
+ }
+
+ /**
+ * 鏄惁瀛樺湪key锛屽鏋滃搴攌ey鐨剉alue鍊煎凡杩囨湡锛屼篃杩斿洖false
+ *
+ * @param key 缂撳瓨key
+ * @return true锛氬瓨鍦╧ey锛屽苟涓攙alue娌¤繃鏈燂紱false锛歬ey涓嶅瓨鍦ㄦ垨鑰呭凡杩囨湡
+ */
+ @Override
+ public boolean containsKey(String key) {
+ // TODO: 鑷畾涔夊垽鏂璳ey鏄惁瀛樺湪
+ return RedisUtils.hasKey(key);
+ }
+}
diff --git a/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/utils/SocialUtils.java b/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/utils/SocialUtils.java
new file mode 100644
index 0000000..64e84e7
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/utils/SocialUtils.java
@@ -0,0 +1,119 @@
+package org.dromara.common.social.utils;
+
+import me.zhyd.oauth.cache.AuthStateCache;
+import me.zhyd.oauth.config.AuthConfig;
+import me.zhyd.oauth.exception.AuthException;
+import me.zhyd.oauth.request.*;
+
+/**
+ * 璁よ瘉鎺堟潈宸ュ叿绫�
+ *
+ * @author thiszhc
+ */
+public class SocialUtils {
+
+ public static AuthRequest getAuthRequest(String source,
+ String clientId,
+ String clientSecret,
+ String redirectUri) throws AuthException {
+ AuthRequest authRequest = null;
+ switch (source.toLowerCase()) {
+ case "dingtalk" ->
+ authRequest = new AuthDingTalkRequest(AuthConfig.builder()
+ .clientId(clientId)
+ .clientSecret(clientSecret)
+ .redirectUri(redirectUri)
+ .build());
+ case "baidu" ->
+ authRequest = new AuthBaiduRequest(AuthConfig.builder()
+ .clientId(clientId)
+ .clientSecret(clientSecret)
+ .redirectUri(redirectUri)
+ .build());
+ case "github" ->
+ authRequest = new AuthGithubRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
+ .redirectUri(redirectUri).build());
+ case "gitee" ->
+ authRequest = new AuthGiteeRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
+ .redirectUri(redirectUri).build());
+ case "weibo" ->
+ authRequest = new AuthWeiboRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
+ .redirectUri(redirectUri).build());
+ case "coding" ->
+ authRequest = new AuthCodingRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
+ .redirectUri(redirectUri).build());
+ case "oschina" ->
+ authRequest = new AuthOschinaRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
+ .redirectUri(redirectUri).build());
+ case "alipay" ->
+ // 鏀粯瀹濆湪鍒涘缓鍥炶皟鍦板潃鏃讹紝涓嶅厑璁镐娇鐢╨ocalhost鎴栬��127.0.0.1锛屾墍浠ヨ繖鍎跨殑鍥炶皟鍦板潃浣跨敤鐨勫眬鍩熺綉鍐呯殑ip
+ authRequest = new AuthAlipayRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
+ .alipayPublicKey("").redirectUri(redirectUri).build());
+ case "qq" ->
+ authRequest = new AuthQqRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
+ .redirectUri(redirectUri).build());
+ case "wechat_open" -> authRequest = new AuthWeChatOpenRequest(AuthConfig.builder().clientId(clientId)
+ .clientSecret(clientSecret).redirectUri(redirectUri).build());
+ case "csdn" ->
+ authRequest = new AuthCsdnRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
+ .redirectUri(redirectUri).build());
+ case "taobao" ->
+ authRequest = new AuthTaobaoRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
+ .redirectUri(redirectUri).build());
+ case "douyin" ->
+ authRequest = new AuthDouyinRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
+ .redirectUri(redirectUri).build());
+ case "linkedin" ->
+ authRequest = new AuthLinkedinRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
+ .redirectUri(redirectUri).build());
+ case "microsoft" -> authRequest = new AuthMicrosoftRequest(AuthConfig.builder().clientId(clientId)
+ .clientSecret(clientSecret).redirectUri(redirectUri).build());
+ case "mi" ->
+ authRequest = new AuthMiRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
+ .redirectUri(redirectUri).build());
+ case "toutiao" ->
+ authRequest = new AuthToutiaoRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
+ .redirectUri(redirectUri).build());
+ case "teambition" -> authRequest = new AuthTeambitionRequest(AuthConfig.builder().clientId(clientId)
+ .clientSecret(clientSecret).redirectUri(redirectUri).build());
+ case "pinterest" -> authRequest = new AuthPinterestRequest(AuthConfig.builder().clientId(clientId)
+ .clientSecret(clientSecret).redirectUri(redirectUri).build());
+ case "renren" ->
+ authRequest = new AuthRenrenRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
+ .redirectUri(redirectUri).build());
+ case "stack_overflow" -> authRequest = new AuthStackOverflowRequest(AuthConfig.builder().clientId(clientId)
+ .clientSecret(clientSecret).redirectUri(redirectUri).stackOverflowKey("").build());
+ case "huawei" ->
+ authRequest = new AuthHuaweiRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
+ .redirectUri(redirectUri).build());
+ case "wechat_enterprise" ->
+ authRequest = new AuthWeChatEnterpriseQrcodeRequest(AuthConfig.builder().clientId(clientId)
+ .clientSecret(clientSecret).redirectUri(redirectUri).agentId("").build());
+ case "kujiale" ->
+ authRequest = new AuthKujialeRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
+ .redirectUri(redirectUri).build());
+ case "gitlab" ->
+ authRequest = new AuthGitlabRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
+ .redirectUri(redirectUri).build());
+ case "meituan" ->
+ authRequest = new AuthMeituanRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
+ .redirectUri(redirectUri).build());
+ case "eleme" ->
+ authRequest = new AuthElemeRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
+ .redirectUri(redirectUri).build());
+ case "wechat_mp" ->
+ authRequest = new AuthWeChatMpRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
+ .redirectUri(redirectUri).build());
+ case "aliyun" ->
+ authRequest = new AuthAliyunRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
+ .redirectUri(redirectUri).build());
+ default -> {
+ }
+ }
+ if (null == authRequest) {
+ throw new AuthException("鏈幏鍙栧埌鏈夋晥鐨凙uth閰嶇疆");
+ }
+ return authRequest;
+ }
+}
+
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SocialUserController.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SocialUserController.java
new file mode 100644
index 0000000..38cc14c
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SocialUserController.java
@@ -0,0 +1,57 @@
+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.web.core.BaseController;
+import org.dromara.system.domain.vo.SocialUserVo;
+import org.dromara.system.service.ISocialUserService;
+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;
+
+import java.util.List;
+
+/**
+ * 绀句細鍖栧叧绯�
+ *
+ * @author thiszhc
+ * @date 2023-06-16
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/system/social")
+public class SocialUserController extends BaseController {
+
+ private final ISocialUserService socialUserService;
+
+ /**
+ * 鏌ヨ绀句細鍖栧叧绯诲垪琛�
+ */
+// 杩欓噷鏀规垚鐢ㄦ埛榛樿鐨勩�傚彧鑳芥煡鐪嬭嚜宸辩殑鏉冮檺鏇村ソ鍝�
+// @SaCheckPermission("system:user:list")
+ @GetMapping("/list")
+ public R<List<SocialUserVo>> list() {
+ return R.ok(socialUserService.queryList());
+ }
+
+
+ /**
+ * 鑾峰彇绀句細鍖栧叧绯昏缁嗕俊鎭�
+ *
+ * @param id 涓婚敭
+ */
+// 杩欓噷鏀规垚鐢ㄦ埛榛樿鐨勩�傚彧鑳芥煡鐪嬭嚜宸辩殑鏉冮檺鏇村ソ鍝�
+// @SaCheckPermission("system:user:query")
+ @GetMapping("/{id}")
+ public R<SocialUserVo> getInfo(@NotNull(message = "涓婚敭涓嶈兘涓虹┖")
+ @PathVariable String id) {
+ return R.ok(socialUserService.queryById(id));
+ }
+
+
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/SocialUser.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/SocialUser.java
new file mode 100644
index 0000000..5258b36
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/SocialUser.java
@@ -0,0 +1,136 @@
+package org.dromara.system.domain;
+
+import org.dromara.common.mybatis.core.domain.BaseEntity;
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+
+/**
+ * 绀句細鍖栧叧绯诲璞� social_user
+ *
+ * @author thiszhc
+ * @date 2023-06-12
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("social_user")
+public class SocialUser extends BaseEntity {
+
+ @Serial
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 涓婚敭
+ */
+ @TableId(value = "id")
+ private Long id;
+
+ /**
+ * 鐨勫敮涓�ID
+ */
+ private String authId;
+
+ /**
+ * 鐢ㄦ埛鏉ユ簮
+ */
+ private String source;
+
+ /**
+ * 鐢ㄦ埛鐨勬巿鏉冧护鐗�
+ */
+ private String accessToken;
+
+ /**
+ * 鐢ㄦ埛鐨勬巿鏉冧护鐗岀殑鏈夋晥鏈燂紝閮ㄥ垎骞冲彴鍙兘娌℃湁
+ */
+ private int expireIn;
+
+ /**
+ * 鍒锋柊浠ょ墝锛岄儴鍒嗗钩鍙板彲鑳芥病鏈�
+ */
+ private String refreshToken;
+
+ /**
+ * 鐢ㄦ埛鐨� open id
+ */
+ private String openId;
+
+ /**
+ * 鐢ㄦ埛鐨� ID
+ */
+ private Long userId;
+
+ /**
+ * 鎺堟潈鐨勭涓夋柟璐﹀彿
+ */
+ private String userName;
+
+ /**
+ * 鎺堟潈鐨勭涓夋柟鏄电О
+ */
+ private String nickName;
+
+ /**
+ * 鎺堟潈鐨勭涓夋柟閭
+ */
+ private String email;
+
+ /**
+ * 鎺堟潈鐨勭涓夋柟澶村儚鍦板潃
+ */
+ private String avatar;
+
+ /**
+ * 骞冲彴鐨勬巿鏉冧俊鎭紝閮ㄥ垎骞冲彴鍙兘娌℃湁
+ */
+ private String accessCode;
+
+ /**
+ * 鐢ㄦ埛鐨� unionid
+ */
+ private String unionId;
+
+ /**
+ * 鎺堜簣鐨勬潈闄愶紝閮ㄥ垎骞冲彴鍙兘娌℃湁
+ */
+ private String scope;
+
+ /**
+ * 涓埆骞冲彴鐨勬巿鏉冧俊鎭紝閮ㄥ垎骞冲彴鍙兘娌℃湁
+ */
+ private String tokenType;
+
+ /**
+ * id token锛岄儴鍒嗗钩鍙板彲鑳芥病鏈�
+ */
+ private String idToken;
+
+ /**
+ * 灏忕背骞冲彴鐢ㄦ埛鐨勯檮甯﹀睘鎬э紝閮ㄥ垎骞冲彴鍙兘娌℃湁
+ */
+ private String macAlgorithm;
+
+ /**
+ * 灏忕背骞冲彴鐢ㄦ埛鐨勯檮甯﹀睘鎬э紝閮ㄥ垎骞冲彴鍙兘娌℃湁
+ */
+ private String macKey;
+
+ /**
+ * 鐢ㄦ埛鐨勬巿鏉僣ode锛岄儴鍒嗗钩鍙板彲鑳芥病鏈�
+ */
+ private String code;
+
+ /**
+ * Twitter骞冲彴鐢ㄦ埛鐨勯檮甯﹀睘鎬э紝閮ㄥ垎骞冲彴鍙兘娌℃湁
+ */
+ private String oauthToken;
+
+ /**
+ * Twitter骞冲彴鐢ㄦ埛鐨勯檮甯﹀睘鎬э紝閮ㄥ垎骞冲彴鍙兘娌℃湁
+ */
+ private String oauthTokenSecret;
+
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SocialUserBo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SocialUserBo.java
new file mode 100644
index 0000000..8d9ae60
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SocialUserBo.java
@@ -0,0 +1,141 @@
+package org.dromara.system.domain.bo;
+
+import org.dromara.common.tenant.core.TenantEntity;
+import org.dromara.system.domain.SocialUser;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import jakarta.validation.constraints.*;
+
+/**
+ * 绀句細鍖栧叧绯讳笟鍔″璞� social_user
+ *
+ * @author Lion Li
+ * @date 2023-06-12
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = SocialUser.class, reverseConvertGenerate = false)
+public class SocialUserBo extends TenantEntity {
+
+ /**
+ * 涓婚敭
+ */
+ @NotNull(message = "涓婚敭涓嶈兘涓虹┖", groups = { EditGroup.class })
+ private Long id;
+
+ /**
+ * 鐨勫敮涓�ID
+ */
+ @NotBlank(message = "鐨勫敮涓�ID涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+ private String authId;
+
+ /**
+ * 鐢ㄦ埛鏉ユ簮
+ */
+ @NotBlank(message = "鐢ㄦ埛鏉ユ簮涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+ private String source;
+
+ /**
+ * 鐢ㄦ埛鐨勬巿鏉冧护鐗�
+ */
+ @NotBlank(message = "鐢ㄦ埛鐨勬巿鏉冧护鐗屼笉鑳戒负绌�", groups = { AddGroup.class, EditGroup.class })
+ private String accessToken;
+
+ /**
+ * 鐢ㄦ埛鐨勬巿鏉冧护鐗岀殑鏈夋晥鏈燂紝閮ㄥ垎骞冲彴鍙兘娌℃湁
+ */
+ private int expireIn;
+
+ /**
+ * 鍒锋柊浠ょ墝锛岄儴鍒嗗钩鍙板彲鑳芥病鏈�
+ */
+ private String refreshToken;
+
+ /**
+ * 鐢ㄦ埛鐨� open id
+ */
+ @NotBlank(message = "鐢ㄦ埛鐨� open id涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+ private String openId;
+
+ /**
+ * 鐢ㄦ埛鐨� ID
+ */
+ @NotBlank(message = "鐢ㄦ埛鐨� ID涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+ private Long userId;
+
+ /**
+ * 骞冲彴鐨勬巿鏉冧俊鎭紝閮ㄥ垎骞冲彴鍙兘娌℃湁
+ */
+ private String accessCode;
+
+ /**
+ * 鐢ㄦ埛鐨� unionid
+ */
+ private String unionId;
+
+ /**
+ * 鎺堜簣鐨勬潈闄愶紝閮ㄥ垎骞冲彴鍙兘娌℃湁
+ */
+ private String scope;
+
+ /**
+ * 鎺堟潈鐨勭涓夋柟璐﹀彿
+ */
+ private String userName;
+
+ /**
+ * 鎺堟潈鐨勭涓夋柟鏄电О
+ */
+ private String nickName;
+
+ /**
+ * 鎺堟潈鐨勭涓夋柟閭
+ */
+ private String email;
+
+ /**
+ * 鎺堟潈鐨勭涓夋柟澶村儚鍦板潃
+ */
+ private String avatar;
+
+ /**
+ * 涓埆骞冲彴鐨勬巿鏉冧俊鎭紝閮ㄥ垎骞冲彴鍙兘娌℃湁
+ */
+ private String tokenType;
+
+ /**
+ * id token锛岄儴鍒嗗钩鍙板彲鑳芥病鏈�
+ */
+ private String idToken;
+
+ /**
+ * 灏忕背骞冲彴鐢ㄦ埛鐨勯檮甯﹀睘鎬э紝閮ㄥ垎骞冲彴鍙兘娌℃湁
+ */
+ private String macAlgorithm;
+
+ /**
+ * 灏忕背骞冲彴鐢ㄦ埛鐨勯檮甯﹀睘鎬э紝閮ㄥ垎骞冲彴鍙兘娌℃湁
+ */
+ private String macKey;
+
+ /**
+ * 鐢ㄦ埛鐨勬巿鏉僣ode锛岄儴鍒嗗钩鍙板彲鑳芥病鏈�
+ */
+ private String code;
+
+ /**
+ * Twitter骞冲彴鐢ㄦ埛鐨勯檮甯﹀睘鎬э紝閮ㄥ垎骞冲彴鍙兘娌℃湁
+ */
+ private String oauthToken;
+
+ /**
+ * Twitter骞冲彴鐢ㄦ埛鐨勯檮甯﹀睘鎬э紝閮ㄥ垎骞冲彴鍙兘娌℃湁
+ */
+ private String oauthTokenSecret;
+
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SocialUserVo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SocialUserVo.java
new file mode 100644
index 0000000..77643ac
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SocialUserVo.java
@@ -0,0 +1,162 @@
+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.common.tenant.core.TenantEntity;
+import org.dromara.system.domain.SocialUser;
+
+import java.io.Serial;
+
+
+
+/**
+ * 绀句細鍖栧叧绯昏鍥惧璞� social_user
+ *
+ * @author thiszhc
+ * @date 2023-06-12
+ */
+@Data
+@ExcelIgnoreUnannotated
+@AutoMapper(target = SocialUser.class)
+public class SocialUserVo extends TenantEntity {
+
+ @Serial
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 涓婚敭
+ */
+ @ExcelProperty(value = "涓婚敭")
+ private Long id;
+
+ /**
+ * 鐨勫敮涓�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 = "鐢ㄦ埛鐨� open id")
+ private String openId;
+
+ /**
+ * 鐢ㄦ埛鐨� ID
+ */
+ @ExcelProperty(value = "鐢ㄦ埛鐨� ID")
+ private Long userId;
+
+ /**
+ * 鎺堟潈鐨勭涓夋柟璐﹀彿
+ */
+ @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;
+
+ /**
+ * 鐢ㄦ埛鐨勬巿鏉僣ode锛岄儴鍒嗗钩鍙板彲鑳芥病鏈�
+ */
+ @ExcelProperty(value = "鐢ㄦ埛鐨勬巿鏉僣ode锛岄儴鍒嗗钩鍙板彲鑳芥病鏈�")
+ private String code;
+
+ /**
+ * Twitter骞冲彴鐢ㄦ埛鐨勯檮甯﹀睘鎬э紝閮ㄥ垎骞冲彴鍙兘娌℃湁
+ */
+ @ExcelProperty(value = "Twitter骞冲彴鐢ㄦ埛鐨勯檮甯﹀睘鎬э紝閮ㄥ垎骞冲彴鍙兘娌℃湁")
+ private String oauthToken;
+
+ /**
+ * Twitter骞冲彴鐢ㄦ埛鐨勯檮甯﹀睘鎬э紝閮ㄥ垎骞冲彴鍙兘娌℃湁
+ */
+ @ExcelProperty(value = "Twitter骞冲彴鐢ㄦ埛鐨勯檮甯﹀睘鎬э紝閮ㄥ垎骞冲彴鍙兘娌℃湁")
+ private String oauthTokenSecret;
+
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/mapper/SocialUserMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/mapper/SocialUserMapper.java
new file mode 100644
index 0000000..f110d5d
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/mapper/SocialUserMapper.java
@@ -0,0 +1,23 @@
+package org.dromara.system.mapper;
+
+import org.dromara.system.domain.SocialUser;
+import org.dromara.system.domain.bo.SysUserBo;
+import org.dromara.system.domain.vo.SocialUserVo;
+import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
+
+/**
+ * 绀句細鍖栧叧绯籑apper鎺ュ彛
+ *
+ * @author thiszhc
+ * @date 2023-06-12
+ */
+public interface SocialUserMapper extends BaseMapperPlus<SocialUser, SocialUserVo> {
+
+ /**
+ * 鏍规嵁authId鏌ヨSocialUser琛ㄥ拰SysUser琛紝杩斿洖SocialUserAuthResult鏄犲皠鐨勫璞�
+ * @param authId 璁よ瘉ID
+ * @return SocialUser
+ */
+ SocialUserVo selectSocialUserByAuthId(String authId);
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/ISocialUserService.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/ISocialUserService.java
new file mode 100644
index 0000000..00c4a5f
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/ISocialUserService.java
@@ -0,0 +1,46 @@
+package org.dromara.system.service;
+
+import org.dromara.system.domain.bo.SocialUserBo;
+import org.dromara.system.domain.vo.SocialUserVo;
+
+import java.util.List;
+
+/**
+ * 绀句細鍖栧叧绯籗ervice鎺ュ彛
+ *
+ * @author thiszhc
+ * @date 2023-06-12
+ */
+public interface ISocialUserService {
+
+
+ /**
+ * 鏌ヨ绀句細鍖栧叧绯�
+ */
+ SocialUserVo queryById(String id);
+
+ /**
+ * 鏌ヨ绀句細鍖栧叧绯诲垪琛�
+ */
+ List<SocialUserVo> queryList();
+
+ /**
+ * 鏂板鎺堟潈鍏崇郴
+ */
+ Boolean insertByBo(SocialUserBo bo);
+
+
+ /**
+ * 鍒犻櫎绀句細鍖栧叧绯讳俊鎭�
+ */
+ Boolean deleteWithValidById(Long id);
+
+
+ /**
+ * 鏍规嵁authId鏌ヨSocialUser琛ㄥ拰SysUser琛紝杩斿洖SocialUserAuthResult鏄犲皠鐨勫璞�
+ * @param authId 璁よ瘉ID
+ * @return SocialUser
+ */
+ SocialUserVo selectSocialUserByAuthId(String authId);
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SocialUserServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SocialUserServiceImpl.java
new file mode 100644
index 0000000..df71064
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SocialUserServiceImpl.java
@@ -0,0 +1,92 @@
+package org.dromara.system.service.impl;
+
+import lombok.RequiredArgsConstructor;
+import org.dromara.common.core.utils.MapstructUtils;
+import org.dromara.system.domain.SocialUser;
+import org.dromara.system.domain.bo.SocialUserBo;
+import org.dromara.system.domain.vo.SocialUserVo;
+import org.dromara.system.mapper.SocialUserMapper;
+import org.dromara.system.service.ISocialUserService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 绀句細鍖栧叧绯籗ervice涓氬姟灞傚鐞�
+ *
+ * @author thiszhc
+ * @date 2023-06-12
+ */
+@RequiredArgsConstructor
+@Service
+public class SocialUserServiceImpl implements ISocialUserService {
+
+ private final SocialUserMapper baseMapper;
+
+
+ /**
+ * 鏌ヨ绀句細鍖栧叧绯�
+ */
+ @Override
+ public SocialUserVo queryById(String id){
+ return baseMapper.selectVoById(id);
+ }
+
+ /**
+ * 鎺堟潈鍒楄〃
+ */
+ @Override
+ public List<SocialUserVo> queryList() {
+ return baseMapper.selectVoList();
+ }
+
+
+
+ /**
+ * 鏂板绀句細鍖栧叧绯�
+ */
+ @Override
+ public Boolean insertByBo(SocialUserBo bo) {
+ SocialUser add = MapstructUtils.convert(bo, SocialUser.class);
+ validEntityBeforeSave(add);
+ boolean flag = baseMapper.insert(add) > 0;
+ if (flag) {
+ if (add != null) {
+ bo.setId(add.getId());
+ }else {
+ return false;
+ }
+ }
+ return flag;
+ }
+
+
+ /**
+ * 淇濆瓨鍓嶇殑鏁版嵁鏍¢獙
+ */
+ private void validEntityBeforeSave(SocialUser entity) {
+ //TODO 鍋氫竴浜涙暟鎹牎楠�,濡傚敮涓�绾︽潫
+ }
+
+
+ /**
+ * 鍒犻櫎绀句細鍖栧叧绯�
+ */
+ @Override
+ public Boolean deleteWithValidById(Long id) {
+ return baseMapper.deleteById(id) > 0;
+ }
+
+
+ /**
+ * 鏍规嵁authId鏌ヨ鐢ㄦ埛淇℃伅
+ *
+ * @param authId 鐢ㄦ埛id
+ * @return 鐢ㄦ埛淇℃伅
+ */
+ @Override
+ public SocialUserVo selectSocialUserByAuthId(String authId) {
+ return baseMapper.selectSocialUserByAuthId(authId);
+ }
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SocialUserMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SocialUserMapper.xml
new file mode 100644
index 0000000..0c50ee6
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SocialUserMapper.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.dromara.system.mapper.SocialUserMapper">
+
+ <resultMap type="org.dromara.system.domain.vo.SocialUserVo" id="SocialUserAuthResult">
+ <id property="id" column="id"/>
+ </resultMap>
+
+ <!-- 鏍规嵁authId鏌ヨSocialUser琛ㄥ拰SysUser琛紝杩斿洖SocialUserAuthResult鏄犲皠鐨勫璞� -->
+ <select id="selectSocialUserByAuthId" parameterType="String" resultMap="SocialUserAuthResult">
+ select b.user_id,
+ b.tenant_id,
+ b.user_name,
+ b.password,
+ a.auth_id,
+ a.source
+ from social_user a
+ left join sys_user b on a.user_id = b.user_id
+ where a.auth_id = #{authId}
+ </select>
+
+</mapper>
diff --git a/script/sql/ry_vue_5.X.sql b/script/sql/ry_vue_5.X.sql
index 258542b..e772d3b 100644
--- a/script/sql/ry_vue_5.X.sql
+++ b/script/sql/ry_vue_5.X.sql
@@ -1,136 +1,205 @@
-- ----------------------------
+-- 绗笁鏂瑰钩鍙版巿鏉冭〃
+-- ----------------------------
+DROP TABLE IF EXISTS social_user;
+CREATE TABLE social_user
+(
+ id BIGINT UNSIGNED NOT NULL COMMENT '涓婚敭',
+ user_id BIGINT NOT NULL COMMENT '鐢ㄦ埛ID',
+ tenant_id VARCHAR(20) DEFAULT NULL COMMENT '绉熸埛id',
+ auth_id VARCHAR(255) NOT NULL COMMENT '鎺堟潈+鎺堟潈openid',
+ source VARCHAR(255) NOT NULL COMMENT '鐢ㄦ埛鏉ユ簮',
+ open_id VARCHAR(255) DEFAULT NULL COMMENT '鍘熺敓open id',
+ user_name VARCHAR(30) NOT NULL COMMENT '鐧诲綍璐﹀彿',
+ nick_name VARCHAR(30) DEFAULT '' COMMENT '鐢ㄦ埛鏄电О',
+ email VARCHAR(255) DEFAULT '' COMMENT '鐢ㄦ埛閭',
+ avatar VARCHAR(500) DEFAULT '' COMMENT '澶村儚鍦板潃',
+ access_token VARCHAR(255) NOT NULL COMMENT '鐢ㄦ埛鐨勬巿鏉冧护鐗�',
+ expire_in INT DEFAULT NULL COMMENT '鐢ㄦ埛鐨勬巿鏉冧护鐗岀殑鏈夋晥鏈燂紝閮ㄥ垎骞冲彴鍙兘娌℃湁',
+ refresh_token VARCHAR(255) DEFAULT NULL COMMENT '鍒锋柊浠ょ墝锛岄儴鍒嗗钩鍙板彲鑳芥病鏈�',
+ access_code VARCHAR(255) DEFAULT NULL COMMENT '骞冲彴鐨勬巿鏉冧俊鎭紝閮ㄥ垎骞冲彴鍙兘娌℃湁',
+ union_id VARCHAR(255) DEFAULT NULL COMMENT '鐢ㄦ埛鐨� unionid',
+ scope VARCHAR(255) DEFAULT NULL COMMENT '鎺堜簣鐨勬潈闄愶紝閮ㄥ垎骞冲彴鍙兘娌℃湁',
+ token_type VARCHAR(255) DEFAULT NULL COMMENT '涓埆骞冲彴鐨勬巿鏉冧俊鎭紝閮ㄥ垎骞冲彴鍙兘娌℃湁',
+ id_token VARCHAR(255) DEFAULT NULL COMMENT 'id token锛岄儴鍒嗗钩鍙板彲鑳芥病鏈�',
+ mac_algorithm VARCHAR(255) DEFAULT NULL COMMENT '灏忕背骞冲彴鐢ㄦ埛鐨勯檮甯﹀睘鎬э紝閮ㄥ垎骞冲彴鍙兘娌℃湁',
+ mac_key VARCHAR(255) DEFAULT NULL COMMENT '灏忕背骞冲彴鐢ㄦ埛鐨勯檮甯﹀睘鎬э紝閮ㄥ垎骞冲彴鍙兘娌℃湁',
+ code VARCHAR(255) DEFAULT NULL COMMENT '鐢ㄦ埛鐨勬巿鏉僣ode锛岄儴鍒嗗钩鍙板彲鑳芥病鏈�',
+ oauth_token VARCHAR(255) DEFAULT NULL COMMENT 'Twitter骞冲彴鐢ㄦ埛鐨勯檮甯﹀睘鎬э紝閮ㄥ垎骞冲彴鍙兘娌℃湁',
+ oauth_token_secret VARCHAR(255) DEFAULT NULL COMMENT 'Twitter骞冲彴鐢ㄦ埛鐨勯檮甯﹀睘鎬э紝閮ㄥ垎骞冲彴鍙兘娌℃湁',
+ create_dept bigint(20) comment '鍒涘缓閮ㄩ棬',
+ create_by bigint(20) comment '鍒涘缓鑰�',
+ create_time datetime comment '鍒涘缓鏃堕棿',
+ update_by bigint(20) comment '鏇存柊鑰�',
+ update_time datetime comment '鏇存柊鏃堕棿',
+ del_flag char(1) default '0' comment '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�',
+ PRIMARY KEY (id)
+) ENGINE = InnoDB COMMENT ='绀句細鍖栧叧绯昏〃';
+
+-- ----------------------------
-- 绉熸埛琛�
-- ----------------------------
drop table if exists sys_tenant;
create table sys_tenant
(
- id bigint(20) not null comment 'id',
- tenant_id varchar(20) not null comment '绉熸埛缂栧彿',
- contact_user_name varchar(20) comment '鑱旂郴浜�',
- contact_phone varchar(20) comment '鑱旂郴鐢佃瘽',
- company_name varchar(50) comment '浼佷笟鍚嶇О',
- license_number varchar(30) comment '缁熶竴绀句細淇$敤浠g爜',
- address varchar(200) comment '鍦板潃',
- intro varchar(200) comment '浼佷笟绠�浠�',
- domain varchar(200) comment '鍩熷悕',
- remark varchar(200) comment '澶囨敞',
- package_id bigint(20) comment '绉熸埛濂楅缂栧彿',
- expire_time datetime comment '杩囨湡鏃堕棿',
- account_count int default -1 comment '鐢ㄦ埛鏁伴噺锛�-1涓嶉檺鍒讹級',
- status char(1) default '0' comment '绉熸埛鐘舵�侊紙0姝e父 1鍋滅敤锛�',
- del_flag char(1) default '0' comment '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�',
- create_dept bigint(20) comment '鍒涘缓閮ㄩ棬',
- create_by bigint(20) comment '鍒涘缓鑰�',
- create_time datetime comment '鍒涘缓鏃堕棿',
- update_by bigint(20) comment '鏇存柊鑰�',
- update_time datetime comment '鏇存柊鏃堕棿',
+ id bigint(20) not null comment 'id',
+ tenant_id varchar(20) not null comment '绉熸埛缂栧彿',
+ contact_user_name varchar(20) comment '鑱旂郴浜�',
+ contact_phone varchar(20) comment '鑱旂郴鐢佃瘽',
+ company_name varchar(50) comment '浼佷笟鍚嶇О',
+ license_number varchar(30) comment '缁熶竴绀句細淇$敤浠g爜',
+ address varchar(200) comment '鍦板潃',
+ intro varchar(200) comment '浼佷笟绠�浠�',
+ domain varchar(200) comment '鍩熷悕',
+ remark varchar(200) comment '澶囨敞',
+ package_id bigint(20) comment '绉熸埛濂楅缂栧彿',
+ expire_time datetime comment '杩囨湡鏃堕棿',
+ account_count int default -1 comment '鐢ㄦ埛鏁伴噺锛�-1涓嶉檺鍒讹級',
+ status char(1) default '0' comment '绉熸埛鐘舵�侊紙0姝e父 1鍋滅敤锛�',
+ del_flag char(1) default '0' comment '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�',
+ create_dept bigint(20) comment '鍒涘缓閮ㄩ棬',
+ create_by bigint(20) comment '鍒涘缓鑰�',
+ create_time datetime comment '鍒涘缓鏃堕棿',
+ update_by bigint(20) comment '鏇存柊鑰�',
+ update_time datetime comment '鏇存柊鏃堕棿',
primary key (id)
-) engine=innodb comment = '绉熸埛琛�';
+) engine = innodb comment = '绉熸埛琛�';
-- ----------------------------
-- 鍒濆鍖�-绉熸埛琛ㄦ暟鎹�
-- ----------------------------
-insert into sys_tenant values(1, '000000', '绠$悊缁�', '15888888888', 'XXX鏈夐檺鍏徃', NULL, NULL, '澶氱鎴烽�氱敤鍚庡彴绠$悊绠$悊绯荤粺', NULL, NULL, NULL, NULL, -1, '0', '0', 103, 1, sysdate(), NULL, NULL);
+insert into sys_tenant
+values (1, '000000', '绠$悊缁�', '15888888888', 'XXX鏈夐檺鍏徃', NULL, NULL, '澶氱鎴烽�氱敤鍚庡彴绠$悊绠$悊绯荤粺', NULL, NULL, NULL,
+ NULL, -1, '0', '0', 103, 1, sysdate(), NULL, NULL);
-- ----------------------------
-- 绉熸埛濂楅琛�
-- ----------------------------
drop table if exists sys_tenant_package;
-create table sys_tenant_package (
- package_id bigint(20) not null comment '绉熸埛濂楅id',
- package_name varchar(20) comment '濂楅鍚嶇О',
- menu_ids varchar(3000) comment '鍏宠仈鑿滃崟id',
- remark varchar(200) comment '澶囨敞',
- menu_check_strictly tinyint(1) default 1 comment '鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�',
- status char(1) default '0' comment '鐘舵�侊紙0姝e父 1鍋滅敤锛�',
- del_flag char(1) default '0' comment '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�',
- create_dept bigint(20) comment '鍒涘缓閮ㄩ棬',
- create_by bigint(20) comment '鍒涘缓鑰�',
- create_time datetime comment '鍒涘缓鏃堕棿',
- update_by bigint(20) comment '鏇存柊鑰�',
- update_time datetime comment '鏇存柊鏃堕棿',
+create table sys_tenant_package
+(
+ package_id bigint(20) not null comment '绉熸埛濂楅id',
+ package_name varchar(20) comment '濂楅鍚嶇О',
+ menu_ids varchar(3000) comment '鍏宠仈鑿滃崟id',
+ remark varchar(200) comment '澶囨敞',
+ menu_check_strictly tinyint(1) default 1 comment '鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�',
+ status char(1) default '0' comment '鐘舵�侊紙0姝e父 1鍋滅敤锛�',
+ del_flag char(1) default '0' comment '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�',
+ create_dept bigint(20) comment '鍒涘缓閮ㄩ棬',
+ create_by bigint(20) comment '鍒涘缓鑰�',
+ create_time datetime comment '鍒涘缓鏃堕棿',
+ update_by bigint(20) comment '鏇存柊鑰�',
+ update_time datetime comment '鏇存柊鏃堕棿',
primary key (package_id)
-) engine=innodb comment = '绉熸埛濂楅琛�';
+) engine = innodb comment = '绉熸埛濂楅琛�';
-- ----------------------------
-- 1銆侀儴闂ㄨ〃
-- ----------------------------
drop table if exists sys_dept;
-create table sys_dept (
- dept_id bigint(20) not null comment '閮ㄩ棬id',
- tenant_id varchar(20) default '000000' comment '绉熸埛缂栧彿',
- parent_id bigint(20) default 0 comment '鐖堕儴闂╥d',
- ancestors varchar(500) default '' comment '绁栫骇鍒楄〃',
- dept_name varchar(30) default '' comment '閮ㄩ棬鍚嶇О',
- order_num int(4) default 0 comment '鏄剧ず椤哄簭',
- leader varchar(20) default null comment '璐熻矗浜�',
- phone varchar(11) default null comment '鑱旂郴鐢佃瘽',
- email varchar(50) default null comment '閭',
- status char(1) default '0' comment '閮ㄩ棬鐘舵�侊紙0姝e父 1鍋滅敤锛�',
- del_flag char(1) default '0' comment '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�',
- create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
- create_by bigint(20) default null comment '鍒涘缓鑰�',
- create_time datetime comment '鍒涘缓鏃堕棿',
- update_by bigint(20) default null comment '鏇存柊鑰�',
- update_time datetime comment '鏇存柊鏃堕棿',
- primary key (dept_id)
-) engine=innodb comment = '閮ㄩ棬琛�';
+create table sys_dept
+(
+ dept_id bigint(20) not null comment '閮ㄩ棬id',
+ tenant_id varchar(20) default '000000' comment '绉熸埛缂栧彿',
+ parent_id bigint(20) default 0 comment '鐖堕儴闂╥d',
+ ancestors varchar(500) default '' comment '绁栫骇鍒楄〃',
+ dept_name varchar(30) default '' comment '閮ㄩ棬鍚嶇О',
+ order_num int(4) default 0 comment '鏄剧ず椤哄簭',
+ leader varchar(20) default null comment '璐熻矗浜�',
+ phone varchar(11) default null comment '鑱旂郴鐢佃瘽',
+ email varchar(50) default null comment '閭',
+ status char(1) default '0' comment '閮ㄩ棬鐘舵�侊紙0姝e父 1鍋滅敤锛�',
+ del_flag char(1) default '0' comment '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�',
+ create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
+ create_by bigint(20) default null comment '鍒涘缓鑰�',
+ create_time datetime comment '鍒涘缓鏃堕棿',
+ update_by bigint(20) default null comment '鏇存柊鑰�',
+ update_time datetime comment '鏇存柊鏃堕棿',
+ primary key (dept_id)
+) engine = innodb comment = '閮ㄩ棬琛�';
-- ----------------------------
-- 鍒濆鍖�-閮ㄩ棬琛ㄦ暟鎹�
-- ----------------------------
-insert into sys_dept values(100, '000000', 0, '0', 'XXX绉戞妧', 0, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
-insert into sys_dept values(101, '000000', 100, '0,100', '娣卞湷鎬诲叕鍙�', 1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
-insert into sys_dept values(102, '000000', 100, '0,100', '闀挎矙鍒嗗叕鍙�', 2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
-insert into sys_dept values(103, '000000', 101, '0,100,101', '鐮斿彂閮ㄩ棬', 1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
-insert into sys_dept values(104, '000000', 101, '0,100,101', '甯傚満閮ㄩ棬', 2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
-insert into sys_dept values(105, '000000', 101, '0,100,101', '娴嬭瘯閮ㄩ棬', 3, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
-insert into sys_dept values(106, '000000', 101, '0,100,101', '璐㈠姟閮ㄩ棬', 4, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
-insert into sys_dept values(107, '000000', 101, '0,100,101', '杩愮淮閮ㄩ棬', 5, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
-insert into sys_dept values(108, '000000', 102, '0,100,102', '甯傚満閮ㄩ棬', 1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
-insert into sys_dept values(109, '000000', 102, '0,100,102', '璐㈠姟閮ㄩ棬', 2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
+insert into sys_dept
+values (100, '000000', 0, '0', 'XXX绉戞妧', 0, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(),
+ null, null);
+insert into sys_dept
+values (101, '000000', 100, '0,100', '娣卞湷鎬诲叕鍙�', 1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1,
+ sysdate(), null, null);
+insert into sys_dept
+values (102, '000000', 100, '0,100', '闀挎矙鍒嗗叕鍙�', 2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1,
+ sysdate(), null, null);
+insert into sys_dept
+values (103, '000000', 101, '0,100,101', '鐮斿彂閮ㄩ棬', 1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1,
+ sysdate(), null, null);
+insert into sys_dept
+values (104, '000000', 101, '0,100,101', '甯傚満閮ㄩ棬', 2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1,
+ sysdate(), null, null);
+insert into sys_dept
+values (105, '000000', 101, '0,100,101', '娴嬭瘯閮ㄩ棬', 3, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1,
+ sysdate(), null, null);
+insert into sys_dept
+values (106, '000000', 101, '0,100,101', '璐㈠姟閮ㄩ棬', 4, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1,
+ sysdate(), null, null);
+insert into sys_dept
+values (107, '000000', 101, '0,100,101', '杩愮淮閮ㄩ棬', 5, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1,
+ sysdate(), null, null);
+insert into sys_dept
+values (108, '000000', 102, '0,100,102', '甯傚満閮ㄩ棬', 1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1,
+ sysdate(), null, null);
+insert into sys_dept
+values (109, '000000', 102, '0,100,102', '璐㈠姟閮ㄩ棬', 2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1,
+ sysdate(), null, null);
-- ----------------------------
-- 2銆佺敤鎴蜂俊鎭〃
-- ----------------------------
drop table if exists sys_user;
-create table sys_user (
- user_id bigint(20) not null comment '鐢ㄦ埛ID',
- tenant_id varchar(20) default '000000' comment '绉熸埛缂栧彿',
- dept_id bigint(20) default null comment '閮ㄩ棬ID',
- user_name varchar(30) not null comment '鐢ㄦ埛璐﹀彿',
- nick_name varchar(30) not null comment '鐢ㄦ埛鏄电О',
- user_type varchar(10) default 'sys_user' comment '鐢ㄦ埛绫诲瀷锛坰ys_user绯荤粺鐢ㄦ埛锛�',
- email varchar(50) default '' comment '鐢ㄦ埛閭',
- phonenumber varchar(11) default '' comment '鎵嬫満鍙风爜',
- sex char(1) default '0' comment '鐢ㄦ埛鎬у埆锛�0鐢� 1濂� 2鏈煡锛�',
- avatar bigint(20) comment '澶村儚鍦板潃',
- password varchar(100) default '' comment '瀵嗙爜',
- status char(1) default '0' comment '甯愬彿鐘舵�侊紙0姝e父 1鍋滅敤锛�',
- del_flag char(1) default '0' comment '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�',
- login_ip varchar(128) default '' comment '鏈�鍚庣櫥褰旾P',
- login_date datetime comment '鏈�鍚庣櫥褰曟椂闂�',
- create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
- create_by bigint(20) default null comment '鍒涘缓鑰�',
- create_time datetime comment '鍒涘缓鏃堕棿',
- update_by bigint(20) default null comment '鏇存柊鑰�',
- update_time datetime comment '鏇存柊鏃堕棿',
- remark varchar(500) default null comment '澶囨敞',
- primary key (user_id)
-) engine=innodb comment = '鐢ㄦ埛淇℃伅琛�';
+create table sys_user
+(
+ user_id bigint(20) not null comment '鐢ㄦ埛ID',
+ tenant_id varchar(20) default '000000' comment '绉熸埛缂栧彿',
+ dept_id bigint(20) default null comment '閮ㄩ棬ID',
+ user_name varchar(30) not null comment '鐢ㄦ埛璐﹀彿',
+ nick_name varchar(30) not null comment '鐢ㄦ埛鏄电О',
+ user_type varchar(10) default 'sys_user' comment '鐢ㄦ埛绫诲瀷锛坰ys_user绯荤粺鐢ㄦ埛锛�',
+ email varchar(50) default '' comment '鐢ㄦ埛閭',
+ phonenumber varchar(11) default '' comment '鎵嬫満鍙风爜',
+ sex char(1) default '0' comment '鐢ㄦ埛鎬у埆锛�0鐢� 1濂� 2鏈煡锛�',
+ avatar bigint(20) comment '澶村儚鍦板潃',
+ password varchar(100) default '' comment '瀵嗙爜',
+ status char(1) default '0' comment '甯愬彿鐘舵�侊紙0姝e父 1鍋滅敤锛�',
+ del_flag char(1) default '0' comment '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�',
+ login_ip varchar(128) default '' comment '鏈�鍚庣櫥褰旾P',
+ login_date datetime comment '鏈�鍚庣櫥褰曟椂闂�',
+ create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
+ create_by bigint(20) default null comment '鍒涘缓鑰�',
+ create_time datetime comment '鍒涘缓鏃堕棿',
+ update_by bigint(20) default null comment '鏇存柊鑰�',
+ update_time datetime comment '鏇存柊鏃堕棿',
+ remark varchar(500) default null comment '澶囨敞',
+ primary key (user_id)
+) engine = innodb comment = '鐢ㄦ埛淇℃伅琛�';
-- ----------------------------
-- 鍒濆鍖�-鐢ㄦ埛淇℃伅琛ㄦ暟鎹�
-- ----------------------------
-insert into sys_user values(1, '000000', 103, 'admin', '鐤媯鐨勭嫯瀛怢i', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), 103, 1, sysdate(), null, null, '绠$悊鍛�');
-insert into sys_user values(2, '000000', 105, 'lionli', '鐤媯鐨勭嫯瀛怢i', 'sys_user', 'crazyLionLi@qq.com', '15666666666', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), 103, 1, sysdate(), null, null, '娴嬭瘯鍛�');
+insert into sys_user
+values (1, '000000', 103, 'admin', '鐤媯鐨勭嫯瀛怢i', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', null,
+ '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), 103, 1,
+ sysdate(), null, null, '绠$悊鍛�');
+insert into sys_user
+values (2, '000000', 105, 'lionli', '鐤媯鐨勭嫯瀛怢i', 'sys_user', 'crazyLionLi@qq.com', '15666666666', '1', null,
+ '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), 103, 1,
+ sysdate(), null, null, '娴嬭瘯鍛�');
-- ----------------------------
@@ -139,339 +208,622 @@
drop table if exists sys_post;
create table sys_post
(
- post_id bigint(20) not null comment '宀椾綅ID',
- tenant_id varchar(20) default '000000' comment '绉熸埛缂栧彿',
- post_code varchar(64) not null comment '宀椾綅缂栫爜',
- post_name varchar(50) not null comment '宀椾綅鍚嶇О',
- post_sort int(4) not null comment '鏄剧ず椤哄簭',
- status char(1) not null comment '鐘舵�侊紙0姝e父 1鍋滅敤锛�',
- create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
- create_by bigint(20) default null comment '鍒涘缓鑰�',
- create_time datetime comment '鍒涘缓鏃堕棿',
- update_by bigint(20) default null comment '鏇存柊鑰�',
- update_time datetime comment '鏇存柊鏃堕棿',
- remark varchar(500) default null comment '澶囨敞',
- primary key (post_id)
-) engine=innodb comment = '宀椾綅淇℃伅琛�';
+ post_id bigint(20) not null comment '宀椾綅ID',
+ tenant_id varchar(20) default '000000' comment '绉熸埛缂栧彿',
+ post_code varchar(64) not null comment '宀椾綅缂栫爜',
+ post_name varchar(50) not null comment '宀椾綅鍚嶇О',
+ post_sort int(4) not null comment '鏄剧ず椤哄簭',
+ status char(1) not null comment '鐘舵�侊紙0姝e父 1鍋滅敤锛�',
+ create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
+ create_by bigint(20) default null comment '鍒涘缓鑰�',
+ create_time datetime comment '鍒涘缓鏃堕棿',
+ update_by bigint(20) default null comment '鏇存柊鑰�',
+ update_time datetime comment '鏇存柊鏃堕棿',
+ remark varchar(500) default null comment '澶囨敞',
+ primary key (post_id)
+) engine = innodb comment = '宀椾綅淇℃伅琛�';
-- ----------------------------
-- 鍒濆鍖�-宀椾綅淇℃伅琛ㄦ暟鎹�
-- ----------------------------
-insert into sys_post values(1, '000000', 'ceo', '钁d簨闀�', 1, '0', 103, 1, sysdate(), null, null, '');
-insert into sys_post values(2, '000000', 'se', '椤圭洰缁忕悊', 2, '0', 103, 1, sysdate(), null, null, '');
-insert into sys_post values(3, '000000', 'hr', '浜哄姏璧勬簮', 3, '0', 103, 1, sysdate(), null, null, '');
-insert into sys_post values(4, '000000', 'user', '鏅�氬憳宸�', 4, '0', 103, 1, sysdate(), null, null, '');
+insert into sys_post
+values (1, '000000', 'ceo', '钁d簨闀�', 1, '0', 103, 1, sysdate(), null, null, '');
+insert into sys_post
+values (2, '000000', 'se', '椤圭洰缁忕悊', 2, '0', 103, 1, sysdate(), null, null, '');
+insert into sys_post
+values (3, '000000', 'hr', '浜哄姏璧勬簮', 3, '0', 103, 1, sysdate(), null, null, '');
+insert into sys_post
+values (4, '000000', 'user', '鏅�氬憳宸�', 4, '0', 103, 1, sysdate(), null, null, '');
-- ----------------------------
-- 4銆佽鑹蹭俊鎭〃
-- ----------------------------
drop table if exists sys_role;
-create table sys_role (
- role_id bigint(20) not null comment '瑙掕壊ID',
- tenant_id varchar(20) default '000000' comment '绉熸埛缂栧彿',
- role_name varchar(30) not null comment '瑙掕壊鍚嶇О',
- role_key varchar(100) not null comment '瑙掕壊鏉冮檺瀛楃涓�',
- role_sort int(4) not null comment '鏄剧ず椤哄簭',
- data_scope char(1) default '1' comment '鏁版嵁鑼冨洿锛�1锛氬叏閮ㄦ暟鎹潈闄� 2锛氳嚜瀹氭暟鎹潈闄� 3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺 4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶級',
- menu_check_strictly tinyint(1) default 1 comment '鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�',
- dept_check_strictly tinyint(1) default 1 comment '閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�',
- status char(1) not null comment '瑙掕壊鐘舵�侊紙0姝e父 1鍋滅敤锛�',
- del_flag char(1) default '0' comment '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�',
- create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
- create_by bigint(20) default null comment '鍒涘缓鑰�',
- create_time datetime comment '鍒涘缓鏃堕棿',
- update_by bigint(20) default null comment '鏇存柊鑰�',
- update_time datetime comment '鏇存柊鏃堕棿',
- remark varchar(500) default null comment '澶囨敞',
- primary key (role_id)
-) engine=innodb comment = '瑙掕壊淇℃伅琛�';
+create table sys_role
+(
+ role_id bigint(20) not null comment '瑙掕壊ID',
+ tenant_id varchar(20) default '000000' comment '绉熸埛缂栧彿',
+ role_name varchar(30) not null comment '瑙掕壊鍚嶇О',
+ role_key varchar(100) not null comment '瑙掕壊鏉冮檺瀛楃涓�',
+ role_sort int(4) not null comment '鏄剧ず椤哄簭',
+ data_scope char(1) default '1' comment '鏁版嵁鑼冨洿锛�1锛氬叏閮ㄦ暟鎹潈闄� 2锛氳嚜瀹氭暟鎹潈闄� 3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺 4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶級',
+ menu_check_strictly tinyint(1) default 1 comment '鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�',
+ dept_check_strictly tinyint(1) default 1 comment '閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�',
+ status char(1) not null comment '瑙掕壊鐘舵�侊紙0姝e父 1鍋滅敤锛�',
+ del_flag char(1) default '0' comment '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�',
+ create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
+ create_by bigint(20) default null comment '鍒涘缓鑰�',
+ create_time datetime comment '鍒涘缓鏃堕棿',
+ update_by bigint(20) default null comment '鏇存柊鑰�',
+ update_time datetime comment '鏇存柊鏃堕棿',
+ remark varchar(500) default null comment '澶囨敞',
+ primary key (role_id)
+) engine = innodb comment = '瑙掕壊淇℃伅琛�';
-- ----------------------------
-- 鍒濆鍖�-瑙掕壊淇℃伅琛ㄦ暟鎹�
-- ----------------------------
-insert into sys_role values(1, '000000', '瓒呯骇绠$悊鍛�', 'superadmin', 1, 1, 1, 1, '0', '0', 103, 1, sysdate(), null, null, '瓒呯骇绠$悊鍛�');
-insert into sys_role values(2, '000000', '鏅�氳鑹�', 'common', 2, 2, 1, 1, '0', '0', 103, 1, sysdate(), null, null, '鏅�氳鑹�');
+insert into sys_role
+values (1, '000000', '瓒呯骇绠$悊鍛�', 'superadmin', 1, 1, 1, 1, '0', '0', 103, 1, sysdate(), null, null, '瓒呯骇绠$悊鍛�');
+insert into sys_role
+values (2, '000000', '鏅�氳鑹�', 'common', 2, 2, 1, 1, '0', '0', 103, 1, sysdate(), null, null, '鏅�氳鑹�');
-- ----------------------------
-- 5銆佽彍鍗曟潈闄愯〃
-- ----------------------------
drop table if exists sys_menu;
-create table sys_menu (
- menu_id bigint(20) not null comment '鑿滃崟ID',
- menu_name varchar(50) not null comment '鑿滃崟鍚嶇О',
- parent_id bigint(20) default 0 comment '鐖惰彍鍗旾D',
- order_num int(4) default 0 comment '鏄剧ず椤哄簭',
- path varchar(200) default '' comment '璺敱鍦板潃',
- component varchar(255) default null comment '缁勪欢璺緞',
- query_param varchar(255) default null comment '璺敱鍙傛暟',
- is_frame int(1) default 1 comment '鏄惁涓哄閾撅紙0鏄� 1鍚︼級',
- is_cache int(1) default 0 comment '鏄惁缂撳瓨锛�0缂撳瓨 1涓嶇紦瀛橈級',
- menu_type char(1) default '' comment '鑿滃崟绫诲瀷锛圡鐩綍 C鑿滃崟 F鎸夐挳锛�',
- visible char(1) default 0 comment '鏄剧ず鐘舵�侊紙0鏄剧ず 1闅愯棌锛�',
- status char(1) default 0 comment '鑿滃崟鐘舵�侊紙0姝e父 1鍋滅敤锛�',
- perms varchar(100) default null comment '鏉冮檺鏍囪瘑',
- icon varchar(100) default '#' comment '鑿滃崟鍥炬爣',
- create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
- create_by bigint(20) default null comment '鍒涘缓鑰�',
- create_time datetime comment '鍒涘缓鏃堕棿',
- update_by bigint(20) default null comment '鏇存柊鑰�',
- update_time datetime comment '鏇存柊鏃堕棿',
- remark varchar(500) default '' comment '澶囨敞',
- primary key (menu_id)
-) engine=innodb comment = '鑿滃崟鏉冮檺琛�';
+create table sys_menu
+(
+ menu_id bigint(20) not null comment '鑿滃崟ID',
+ menu_name varchar(50) not null comment '鑿滃崟鍚嶇О',
+ parent_id bigint(20) default 0 comment '鐖惰彍鍗旾D',
+ order_num int(4) default 0 comment '鏄剧ず椤哄簭',
+ path varchar(200) default '' comment '璺敱鍦板潃',
+ component varchar(255) default null comment '缁勪欢璺緞',
+ query_param varchar(255) default null comment '璺敱鍙傛暟',
+ is_frame int(1) default 1 comment '鏄惁涓哄閾撅紙0鏄� 1鍚︼級',
+ is_cache int(1) default 0 comment '鏄惁缂撳瓨锛�0缂撳瓨 1涓嶇紦瀛橈級',
+ menu_type char(1) default '' comment '鑿滃崟绫诲瀷锛圡鐩綍 C鑿滃崟 F鎸夐挳锛�',
+ visible char(1) default 0 comment '鏄剧ず鐘舵�侊紙0鏄剧ず 1闅愯棌锛�',
+ status char(1) default 0 comment '鑿滃崟鐘舵�侊紙0姝e父 1鍋滅敤锛�',
+ perms varchar(100) default null comment '鏉冮檺鏍囪瘑',
+ icon varchar(100) default '#' comment '鑿滃崟鍥炬爣',
+ create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
+ create_by bigint(20) default null comment '鍒涘缓鑰�',
+ create_time datetime comment '鍒涘缓鏃堕棿',
+ update_by bigint(20) default null comment '鏇存柊鑰�',
+ update_time datetime comment '鏇存柊鏃堕棿',
+ remark varchar(500) default '' comment '澶囨敞',
+ primary key (menu_id)
+) engine = innodb comment = '鑿滃崟鏉冮檺琛�';
-- ----------------------------
-- 鍒濆鍖�-鑿滃崟淇℃伅琛ㄦ暟鎹�
-- ----------------------------
-- 涓�绾ц彍鍗�
-insert into sys_menu values('1', '绯荤粺绠$悊', '0', '1', 'system', null, '', 1, 0, 'M', '0', '0', '', 'system', 103, 1, sysdate(), null, null, '绯荤粺绠$悊鐩綍');
-insert into sys_menu values('6', '绉熸埛绠$悊', '0', '2', 'tenant', null, '', 1, 0, 'M', '0', '0', '', 'chart', 103, 1, sysdate(), null, null, '绉熸埛绠$悊鐩綍');
-insert into sys_menu values('2', '绯荤粺鐩戞帶', '0', '3', 'monitor', null, '', 1, 0, 'M', '0', '0', '', 'monitor', 103, 1, sysdate(), null, null, '绯荤粺鐩戞帶鐩綍');
-insert into sys_menu values('3', '绯荤粺宸ュ叿', '0', '4', 'tool', null, '', 1, 0, 'M', '0', '0', '', 'tool', 103, 1, sysdate(), null, null, '绯荤粺宸ュ叿鐩綍');
-insert into sys_menu values('4', 'PLUS瀹樼綉', '0', '5', 'https://gitee.com/dromara/RuoYi-Vue-Plus', null, '', 0, 0, 'M', '0', '0', '', 'guide', 103, 1, sysdate(), null, null, 'RuoYi-Vue-Plus瀹樼綉鍦板潃');
+insert into sys_menu
+values ('1', '绯荤粺绠$悊', '0', '1', 'system', null, '', 1, 0, 'M', '0', '0', '', 'system', 103, 1, sysdate(), null, null,
+ '绯荤粺绠$悊鐩綍');
+insert into sys_menu
+values ('6', '绉熸埛绠$悊', '0', '2', 'tenant', null, '', 1, 0, 'M', '0', '0', '', 'chart', 103, 1, sysdate(), null, null,
+ '绉熸埛绠$悊鐩綍');
+insert into sys_menu
+values ('2', '绯荤粺鐩戞帶', '0', '3', 'monitor', null, '', 1, 0, 'M', '0', '0', '', 'monitor', 103, 1, sysdate(), null,
+ null, '绯荤粺鐩戞帶鐩綍');
+insert into sys_menu
+values ('3', '绯荤粺宸ュ叿', '0', '4', 'tool', null, '', 1, 0, 'M', '0', '0', '', 'tool', 103, 1, sysdate(), null, null,
+ '绯荤粺宸ュ叿鐩綍');
+insert into sys_menu
+values ('4', 'PLUS瀹樼綉', '0', '5', 'https://gitee.com/dromara/RuoYi-Vue-Plus', null, '', 0, 0, 'M', '0', '0', '',
+ 'guide', 103, 1, sysdate(), null, null, 'RuoYi-Vue-Plus瀹樼綉鍦板潃');
-- 浜岀骇鑿滃崟
-insert into sys_menu values('100', '鐢ㄦ埛绠$悊', '1', '1', 'user', 'system/user/index', '', 1, 0, 'C', '0', '0', 'system:user:list', 'user', 103, 1, sysdate(), null, null, '鐢ㄦ埛绠$悊鑿滃崟');
-insert into sys_menu values('101', '瑙掕壊绠$悊', '1', '2', 'role', 'system/role/index', '', 1, 0, 'C', '0', '0', 'system:role:list', 'peoples', 103, 1, sysdate(), null, null, '瑙掕壊绠$悊鑿滃崟');
-insert into sys_menu values('102', '鑿滃崟绠$悊', '1', '3', 'menu', 'system/menu/index', '', 1, 0, 'C', '0', '0', 'system:menu:list', 'tree-table', 103, 1, sysdate(), null, null, '鑿滃崟绠$悊鑿滃崟');
-insert into sys_menu values('103', '閮ㄩ棬绠$悊', '1', '4', 'dept', 'system/dept/index', '', 1, 0, 'C', '0', '0', 'system:dept:list', 'tree', 103, 1, sysdate(), null, null, '閮ㄩ棬绠$悊鑿滃崟');
-insert into sys_menu values('104', '宀椾綅绠$悊', '1', '5', 'post', 'system/post/index', '', 1, 0, 'C', '0', '0', 'system:post:list', 'post', 103, 1, sysdate(), null, null, '宀椾綅绠$悊鑿滃崟');
-insert into sys_menu values('105', '瀛楀吀绠$悊', '1', '6', 'dict', 'system/dict/index', '', 1, 0, 'C', '0', '0', 'system:dict:list', 'dict', 103, 1, sysdate(), null, null, '瀛楀吀绠$悊鑿滃崟');
-insert into sys_menu values('106', '鍙傛暟璁剧疆', '1', '7', 'config', 'system/config/index', '', 1, 0, 'C', '0', '0', 'system:config:list', 'edit', 103, 1, sysdate(), null, null, '鍙傛暟璁剧疆鑿滃崟');
-insert into sys_menu values('107', '閫氱煡鍏憡', '1', '8', 'notice', 'system/notice/index', '', 1, 0, 'C', '0', '0', 'system:notice:list', 'message', 103, 1, sysdate(), null, null, '閫氱煡鍏憡鑿滃崟');
-insert into sys_menu values('108', '鏃ュ織绠$悊', '1', '9', 'log', '', '', 1, 0, 'M', '0', '0', '', 'log', 103, 1, sysdate(), null, null, '鏃ュ織绠$悊鑿滃崟');
-insert into sys_menu values('109', '鍦ㄧ嚎鐢ㄦ埛', '2', '1', 'online', 'monitor/online/index', '', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 103, 1, sysdate(), null, null, '鍦ㄧ嚎鐢ㄦ埛鑿滃崟');
-insert into sys_menu values('113', '缂撳瓨鐩戞帶', '2', '5', 'cache', 'monitor/cache/index', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 103, 1, sysdate(), null, null, '缂撳瓨鐩戞帶鑿滃崟');
-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', '浠g爜鐢熸垚', '3', '2', 'gen', 'tool/gen/index', '', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 103, 1, sysdate(), null, null, '浠g爜鐢熸垚鑿滃崟');
-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 ('100', '鐢ㄦ埛绠$悊', '1', '1', 'user', 'system/user/index', '', 1, 0, 'C', '0', '0', 'system:user:list', 'user',
+ 103, 1, sysdate(), null, null, '鐢ㄦ埛绠$悊鑿滃崟');
+insert into sys_menu
+values ('101', '瑙掕壊绠$悊', '1', '2', 'role', 'system/role/index', '', 1, 0, 'C', '0', '0', 'system:role:list',
+ 'peoples', 103, 1, sysdate(), null, null, '瑙掕壊绠$悊鑿滃崟');
+insert into sys_menu
+values ('102', '鑿滃崟绠$悊', '1', '3', 'menu', 'system/menu/index', '', 1, 0, 'C', '0', '0', 'system:menu:list',
+ 'tree-table', 103, 1, sysdate(), null, null, '鑿滃崟绠$悊鑿滃崟');
+insert into sys_menu
+values ('103', '閮ㄩ棬绠$悊', '1', '4', 'dept', 'system/dept/index', '', 1, 0, 'C', '0', '0', 'system:dept:list', 'tree',
+ 103, 1, sysdate(), null, null, '閮ㄩ棬绠$悊鑿滃崟');
+insert into sys_menu
+values ('104', '宀椾綅绠$悊', '1', '5', 'post', 'system/post/index', '', 1, 0, 'C', '0', '0', 'system:post:list', 'post',
+ 103, 1, sysdate(), null, null, '宀椾綅绠$悊鑿滃崟');
+insert into sys_menu
+values ('105', '瀛楀吀绠$悊', '1', '6', 'dict', 'system/dict/index', '', 1, 0, 'C', '0', '0', 'system:dict:list', 'dict',
+ 103, 1, sysdate(), null, null, '瀛楀吀绠$悊鑿滃崟');
+insert into sys_menu
+values ('106', '鍙傛暟璁剧疆', '1', '7', 'config', 'system/config/index', '', 1, 0, 'C', '0', '0', 'system:config:list',
+ 'edit', 103, 1, sysdate(), null, null, '鍙傛暟璁剧疆鑿滃崟');
+insert into sys_menu
+values ('107', '閫氱煡鍏憡', '1', '8', 'notice', 'system/notice/index', '', 1, 0, 'C', '0', '0', 'system:notice:list',
+ 'message', 103, 1, sysdate(), null, null, '閫氱煡鍏憡鑿滃崟');
+insert into sys_menu
+values ('108', '鏃ュ織绠$悊', '1', '9', 'log', '', '', 1, 0, 'M', '0', '0', '', 'log', 103, 1, sysdate(), null, null,
+ '鏃ュ織绠$悊鑿滃崟');
+insert into sys_menu
+values ('109', '鍦ㄧ嚎鐢ㄦ埛', '2', '1', 'online', 'monitor/online/index', '', 1, 0, 'C', '0', '0', 'monitor:online:list',
+ 'online', 103, 1, sysdate(), null, null, '鍦ㄧ嚎鐢ㄦ埛鑿滃崟');
+insert into sys_menu
+values ('113', '缂撳瓨鐩戞帶', '2', '5', 'cache', 'monitor/cache/index', '', 1, 0, 'C', '0', '0', 'monitor:cache:list',
+ 'redis', 103, 1, sysdate(), null, null, '缂撳瓨鐩戞帶鑿滃崟');
+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', '浠g爜鐢熸垚', '3', '2', 'gen', 'tool/gen/index', '', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 103, 1,
+ sysdate(), null, null, '浠g爜鐢熸垚鑿滃崟');
+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, '绉熸埛濂楅绠$悊鑿滃崟');
-- springboot-admin鐩戞帶
-insert into sys_menu values('117', 'Admin鐩戞帶', '2', '5', 'Admin', 'monitor/admin/index', '', 1, 0, 'C', '0', '0', 'monitor:admin:list', 'dashboard', 103, 1, sysdate(), null, null, 'Admin鐩戞帶鑿滃崟');
+insert into sys_menu
+values ('117', 'Admin鐩戞帶', '2', '5', 'Admin', 'monitor/admin/index', '', 1, 0, 'C', '0', '0', 'monitor:admin:list',
+ 'dashboard', 103, 1, sysdate(), null, null, 'Admin鐩戞帶鑿滃崟');
-- oss鑿滃崟
insert into sys_menu values('118', '鏂囦欢绠$悊', '1', '10', 'oss', 'system/oss/index', '', 1, 0, 'C', '0', '0', 'system:oss:list', 'upload', 103, 1, sysdate(), null, null, '鏂囦欢绠$悊鑿滃崟');
-- powerjob server鎺у埗鍙�
insert into sys_menu values('120', '浠诲姟璋冨害涓績', '2', '5', 'powerjob', 'monitor/powerjob/index', '', 1, 0, 'C', '0', '0', 'monitor:powerjob:list', 'job', 103, 1, sysdate(), null, null, 'PowerJob鎺у埗鍙拌彍鍗�');
-- 涓夌骇鑿滃崟
-insert into sys_menu values('500', '鎿嶄綔鏃ュ織', '108', '1', 'operlog', 'monitor/operlog/index', '', 1, 0, 'C', '0', '0', 'monitor:operlog:list', 'form', 103, 1, sysdate(), null, null, '鎿嶄綔鏃ュ織鑿滃崟');
-insert into sys_menu values('501', '鐧诲綍鏃ュ織', '108', '2', 'logininfor', 'monitor/logininfor/index', '', 1, 0, 'C', '0', '0', 'monitor:logininfor:list', 'logininfor', 103, 1, sysdate(), null, null, '鐧诲綍鏃ュ織鑿滃崟');
+insert into sys_menu
+values ('500', '鎿嶄綔鏃ュ織', '108', '1', 'operlog', 'monitor/operlog/index', '', 1, 0, 'C', '0', '0',
+ 'monitor:operlog:list', 'form', 103, 1, sysdate(), null, null, '鎿嶄綔鏃ュ織鑿滃崟');
+insert into sys_menu
+values ('501', '鐧诲綍鏃ュ織', '108', '2', 'logininfor', 'monitor/logininfor/index', '', 1, 0, 'C', '0', '0',
+ 'monitor:logininfor:list', 'logininfor', 103, 1, sysdate(), null, null, '鐧诲綍鏃ュ織鑿滃崟');
-- 鐢ㄦ埛绠$悊鎸夐挳
-insert into sys_menu values('1001', '鐢ㄦ埛鏌ヨ', '100', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:user:query', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1002', '鐢ㄦ埛鏂板', '100', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:user:add', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1003', '鐢ㄦ埛淇敼', '100', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:user:edit', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1004', '鐢ㄦ埛鍒犻櫎', '100', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:user:remove', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1005', '鐢ㄦ埛瀵煎嚭', '100', '5', '', '', '', 1, 0, 'F', '0', '0', 'system:user:export', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1006', '鐢ㄦ埛瀵煎叆', '100', '6', '', '', '', 1, 0, 'F', '0', '0', 'system:user:import', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1007', '閲嶇疆瀵嗙爜', '100', '7', '', '', '', 1, 0, 'F', '0', '0', 'system:user:resetPwd', '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu
+values ('1001', '鐢ㄦ埛鏌ヨ', '100', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:user:query', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1002', '鐢ㄦ埛鏂板', '100', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:user:add', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1003', '鐢ㄦ埛淇敼', '100', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:user:edit', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1004', '鐢ㄦ埛鍒犻櫎', '100', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:user:remove', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1005', '鐢ㄦ埛瀵煎嚭', '100', '5', '', '', '', 1, 0, 'F', '0', '0', 'system:user:export', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1006', '鐢ㄦ埛瀵煎叆', '100', '6', '', '', '', 1, 0, 'F', '0', '0', 'system:user:import', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1007', '閲嶇疆瀵嗙爜', '100', '7', '', '', '', 1, 0, 'F', '0', '0', 'system:user:resetPwd', '#', 103, 1, sysdate(),
+ null, null, '');
-- 瑙掕壊绠$悊鎸夐挳
-insert into sys_menu values('1008', '瑙掕壊鏌ヨ', '101', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:role:query', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1009', '瑙掕壊鏂板', '101', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:role:add', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1010', '瑙掕壊淇敼', '101', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:role:edit', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1011', '瑙掕壊鍒犻櫎', '101', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:role:remove', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1012', '瑙掕壊瀵煎嚭', '101', '5', '', '', '', 1, 0, 'F', '0', '0', 'system:role:export', '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu
+values ('1008', '瑙掕壊鏌ヨ', '101', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:role:query', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1009', '瑙掕壊鏂板', '101', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:role:add', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1010', '瑙掕壊淇敼', '101', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:role:edit', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1011', '瑙掕壊鍒犻櫎', '101', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:role:remove', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1012', '瑙掕壊瀵煎嚭', '101', '5', '', '', '', 1, 0, 'F', '0', '0', 'system:role:export', '#', 103, 1, sysdate(),
+ null, null, '');
-- 鑿滃崟绠$悊鎸夐挳
-insert into sys_menu values('1013', '鑿滃崟鏌ヨ', '102', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:query', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1014', '鑿滃崟鏂板', '102', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:add', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1015', '鑿滃崟淇敼', '102', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:edit', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1016', '鑿滃崟鍒犻櫎', '102', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:remove', '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu
+values ('1013', '鑿滃崟鏌ヨ', '102', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:query', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1014', '鑿滃崟鏂板', '102', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:add', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1015', '鑿滃崟淇敼', '102', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:edit', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1016', '鑿滃崟鍒犻櫎', '102', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:remove', '#', 103, 1, sysdate(),
+ null, null, '');
-- 閮ㄩ棬绠$悊鎸夐挳
-insert into sys_menu values('1017', '閮ㄩ棬鏌ヨ', '103', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:query', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1018', '閮ㄩ棬鏂板', '103', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:add', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1019', '閮ㄩ棬淇敼', '103', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:edit', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1020', '閮ㄩ棬鍒犻櫎', '103', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:remove', '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu
+values ('1017', '閮ㄩ棬鏌ヨ', '103', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:query', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1018', '閮ㄩ棬鏂板', '103', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:add', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1019', '閮ㄩ棬淇敼', '103', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:edit', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1020', '閮ㄩ棬鍒犻櫎', '103', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:remove', '#', 103, 1, sysdate(),
+ null, null, '');
-- 宀椾綅绠$悊鎸夐挳
-insert into sys_menu values('1021', '宀椾綅鏌ヨ', '104', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:post:query', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1022', '宀椾綅鏂板', '104', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:post:add', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1023', '宀椾綅淇敼', '104', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:post:edit', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1024', '宀椾綅鍒犻櫎', '104', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:post:remove', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1025', '宀椾綅瀵煎嚭', '104', '5', '', '', '', 1, 0, 'F', '0', '0', 'system:post:export', '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu
+values ('1021', '宀椾綅鏌ヨ', '104', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:post:query', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1022', '宀椾綅鏂板', '104', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:post:add', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1023', '宀椾綅淇敼', '104', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:post:edit', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1024', '宀椾綅鍒犻櫎', '104', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:post:remove', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1025', '宀椾綅瀵煎嚭', '104', '5', '', '', '', 1, 0, 'F', '0', '0', 'system:post:export', '#', 103, 1, sysdate(),
+ null, null, '');
-- 瀛楀吀绠$悊鎸夐挳
-insert into sys_menu values('1026', '瀛楀吀鏌ヨ', '105', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:query', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1027', '瀛楀吀鏂板', '105', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:add', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1028', '瀛楀吀淇敼', '105', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:edit', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1029', '瀛楀吀鍒犻櫎', '105', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:remove', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1030', '瀛楀吀瀵煎嚭', '105', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:export', '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu
+values ('1026', '瀛楀吀鏌ヨ', '105', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:query', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1027', '瀛楀吀鏂板', '105', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:add', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1028', '瀛楀吀淇敼', '105', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:edit', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1029', '瀛楀吀鍒犻櫎', '105', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:remove', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1030', '瀛楀吀瀵煎嚭', '105', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:export', '#', 103, 1, sysdate(),
+ null, null, '');
-- 鍙傛暟璁剧疆鎸夐挳
-insert into sys_menu values('1031', '鍙傛暟鏌ヨ', '106', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:query', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1032', '鍙傛暟鏂板', '106', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:add', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1033', '鍙傛暟淇敼', '106', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:edit', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1034', '鍙傛暟鍒犻櫎', '106', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:remove', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1035', '鍙傛暟瀵煎嚭', '106', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:export', '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu
+values ('1031', '鍙傛暟鏌ヨ', '106', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:query', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1032', '鍙傛暟鏂板', '106', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:add', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1033', '鍙傛暟淇敼', '106', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:edit', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1034', '鍙傛暟鍒犻櫎', '106', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:remove', '#', 103, 1,
+ sysdate(), null, null, '');
+insert into sys_menu
+values ('1035', '鍙傛暟瀵煎嚭', '106', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:export', '#', 103, 1,
+ sysdate(), null, null, '');
-- 閫氱煡鍏憡鎸夐挳
-insert into sys_menu values('1036', '鍏憡鏌ヨ', '107', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:query', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1037', '鍏憡鏂板', '107', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:add', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1038', '鍏憡淇敼', '107', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:edit', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1039', '鍏憡鍒犻櫎', '107', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:remove', '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu
+values ('1036', '鍏憡鏌ヨ', '107', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:query', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1037', '鍏憡鏂板', '107', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:add', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1038', '鍏憡淇敼', '107', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:edit', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1039', '鍏憡鍒犻櫎', '107', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:remove', '#', 103, 1,
+ sysdate(), null, null, '');
-- 鎿嶄綔鏃ュ織鎸夐挳
-insert into sys_menu values('1040', '鎿嶄綔鏌ヨ', '500', '1', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:query', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1041', '鎿嶄綔鍒犻櫎', '500', '2', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:remove', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1042', '鏃ュ織瀵煎嚭', '500', '4', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:export', '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu
+values ('1040', '鎿嶄綔鏌ヨ', '500', '1', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:query', '#', 103, 1,
+ sysdate(), null, null, '');
+insert into sys_menu
+values ('1041', '鎿嶄綔鍒犻櫎', '500', '2', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:remove', '#', 103, 1,
+ sysdate(), null, null, '');
+insert into sys_menu
+values ('1042', '鏃ュ織瀵煎嚭', '500', '4', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:export', '#', 103, 1,
+ sysdate(), null, null, '');
-- 鐧诲綍鏃ュ織鎸夐挳
-insert into sys_menu values('1043', '鐧诲綍鏌ヨ', '501', '1', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:query', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1044', '鐧诲綍鍒犻櫎', '501', '2', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:remove', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1045', '鏃ュ織瀵煎嚭', '501', '3', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:export', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1050', '璐︽埛瑙i攣', '501', '4', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:unlock', '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu
+values ('1043', '鐧诲綍鏌ヨ', '501', '1', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:query', '#', 103, 1,
+ sysdate(), null, null, '');
+insert into sys_menu
+values ('1044', '鐧诲綍鍒犻櫎', '501', '2', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:remove', '#', 103, 1,
+ sysdate(), null, null, '');
+insert into sys_menu
+values ('1045', '鏃ュ織瀵煎嚭', '501', '3', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:export', '#', 103, 1,
+ sysdate(), null, null, '');
+insert into sys_menu
+values ('1050', '璐︽埛瑙i攣', '501', '4', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:unlock', '#', 103, 1,
+ sysdate(), null, null, '');
-- 鍦ㄧ嚎鐢ㄦ埛鎸夐挳
-insert into sys_menu values('1046', '鍦ㄧ嚎鏌ヨ', '109', '1', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:query', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1047', '鎵归噺寮洪��', '109', '2', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:batchLogout', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1048', '鍗曟潯寮洪��', '109', '3', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:forceLogout', '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu
+values ('1046', '鍦ㄧ嚎鏌ヨ', '109', '1', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:query', '#', 103, 1,
+ sysdate(), null, null, '');
+insert into sys_menu
+values ('1047', '鎵归噺寮洪��', '109', '2', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:batchLogout', '#', 103, 1,
+ sysdate(), null, null, '');
+insert into sys_menu
+values ('1048', '鍗曟潯寮洪��', '109', '3', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:forceLogout', '#', 103, 1,
+ sysdate(), null, null, '');
-- 浠g爜鐢熸垚鎸夐挳
-insert into sys_menu values('1055', '鐢熸垚鏌ヨ', '115', '1', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:query', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1056', '鐢熸垚淇敼', '115', '2', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:edit', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1057', '鐢熸垚鍒犻櫎', '115', '3', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:remove', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1058', '瀵煎叆浠g爜', '115', '2', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:import', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1059', '棰勮浠g爜', '115', '4', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:preview', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1060', '鐢熸垚浠g爜', '115', '5', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:code', '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu
+values ('1055', '鐢熸垚鏌ヨ', '115', '1', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:query', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1056', '鐢熸垚淇敼', '115', '2', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:edit', '#', 103, 1, sysdate(), null,
+ null, '');
+insert into sys_menu
+values ('1057', '鐢熸垚鍒犻櫎', '115', '3', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:remove', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1058', '瀵煎叆浠g爜', '115', '2', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:import', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1059', '棰勮浠g爜', '115', '4', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:preview', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1060', '鐢熸垚浠g爜', '115', '5', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:code', '#', 103, 1, sysdate(), null,
+ null, '');
-- oss鐩稿叧鎸夐挳
-insert into sys_menu values('1600', '鏂囦欢鏌ヨ', '118', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:query', '#', 103, 1, sysdate(), null, null, '');
-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 ('1600', '鏂囦欢鏌ヨ', '118', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:query', '#', 103, 1, sysdate(),
+ null, null, '');
+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 ('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, '');
-insert into sys_menu values ('1608', '绉熸埛淇敼', '121', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:edit', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values ('1609', '绉熸埛鍒犻櫎', '121', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:remove', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values ('1610', '绉熸埛瀵煎嚭', '121', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:export', '#', 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, '');
+insert into sys_menu
+values ('1608', '绉熸埛淇敼', '121', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:edit', '#', 103, 1, sysdate(),
+ null, null, '');
+insert into sys_menu
+values ('1609', '绉熸埛鍒犻櫎', '121', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:remove', '#', 103, 1,
+ sysdate(), null, null, '');
+insert into sys_menu
+values ('1610', '绉熸埛瀵煎嚭', '121', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:export', '#', 103, 1,
+ sysdate(), null, null, '');
-- 绉熸埛濂楅绠$悊鐩稿叧鎸夐挳
-insert into sys_menu values ('1611', '绉熸埛濂楅鏌ヨ', '122', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:query', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values ('1612', '绉熸埛濂楅鏂板', '122', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:add', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values ('1613', '绉熸埛濂楅淇敼', '122', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:edit', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values ('1614', '绉熸埛濂楅鍒犻櫎', '122', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:remove', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values ('1615', '绉熸埛濂楅瀵煎嚭', '122', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:export', '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu
+values ('1611', '绉熸埛濂楅鏌ヨ', '122', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:query', '#', 103, 1,
+ sysdate(), null, null, '');
+insert into sys_menu
+values ('1612', '绉熸埛濂楅鏂板', '122', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:add', '#', 103, 1,
+ sysdate(), null, null, '');
+insert into sys_menu
+values ('1613', '绉熸埛濂楅淇敼', '122', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:edit', '#', 103, 1,
+ sysdate(), null, null, '');
+insert into sys_menu
+values ('1614', '绉熸埛濂楅鍒犻櫎', '122', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:remove', '#', 103,
+ 1, sysdate(), null, null, '');
+insert into sys_menu
+values ('1615', '绉熸埛濂楅瀵煎嚭', '122', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:export', '#', 103,
+ 1, sysdate(), null, null, '');
-- ----------------------------
-- 6銆佺敤鎴峰拰瑙掕壊鍏宠仈琛� 鐢ㄦ埛N-1瑙掕壊
-- ----------------------------
drop table if exists sys_user_role;
-create table sys_user_role (
- user_id bigint(20) not null comment '鐢ㄦ埛ID',
- role_id bigint(20) not null comment '瑙掕壊ID',
- primary key(user_id, role_id)
-) engine=innodb comment = '鐢ㄦ埛鍜岃鑹插叧鑱旇〃';
+create table sys_user_role
+(
+ user_id bigint(20) not null comment '鐢ㄦ埛ID',
+ role_id bigint(20) not null comment '瑙掕壊ID',
+ primary key (user_id, role_id)
+) engine = innodb comment = '鐢ㄦ埛鍜岃鑹插叧鑱旇〃';
-- ----------------------------
-- 鍒濆鍖�-鐢ㄦ埛鍜岃鑹插叧鑱旇〃鏁版嵁
-- ----------------------------
-insert into sys_user_role values ('1', '1');
-insert into sys_user_role values ('2', '2');
+insert into sys_user_role
+values ('1', '1');
+insert into sys_user_role
+values ('2', '2');
-- ----------------------------
-- 7銆佽鑹插拰鑿滃崟鍏宠仈琛� 瑙掕壊1-N鑿滃崟
-- ----------------------------
drop table if exists sys_role_menu;
-create table sys_role_menu (
- role_id bigint(20) not null comment '瑙掕壊ID',
- menu_id bigint(20) not null comment '鑿滃崟ID',
- primary key(role_id, menu_id)
-) engine=innodb comment = '瑙掕壊鍜岃彍鍗曞叧鑱旇〃';
+create table sys_role_menu
+(
+ role_id bigint(20) not null comment '瑙掕壊ID',
+ menu_id bigint(20) not null comment '鑿滃崟ID',
+ primary key (role_id, menu_id)
+) engine = innodb comment = '瑙掕壊鍜岃彍鍗曞叧鑱旇〃';
-- ----------------------------
-- 鍒濆鍖�-瑙掕壊鍜岃彍鍗曞叧鑱旇〃鏁版嵁
-- ----------------------------
-insert into sys_role_menu values ('2', '1');
-insert into sys_role_menu values ('2', '2');
-insert into sys_role_menu values ('2', '3');
-insert into sys_role_menu values ('2', '4');
-insert into sys_role_menu values ('2', '100');
-insert into sys_role_menu values ('2', '101');
-insert into sys_role_menu values ('2', '102');
-insert into sys_role_menu values ('2', '103');
-insert into sys_role_menu values ('2', '104');
-insert into sys_role_menu values ('2', '105');
-insert into sys_role_menu values ('2', '106');
-insert into sys_role_menu values ('2', '107');
-insert into sys_role_menu values ('2', '108');
-insert into sys_role_menu values ('2', '109');
-insert into sys_role_menu values ('2', '110');
-insert into sys_role_menu values ('2', '111');
-insert into sys_role_menu values ('2', '112');
-insert into sys_role_menu values ('2', '113');
-insert into sys_role_menu values ('2', '114');
-insert into sys_role_menu values ('2', '115');
-insert into sys_role_menu values ('2', '116');
-insert into sys_role_menu values ('2', '500');
-insert into sys_role_menu values ('2', '501');
-insert into sys_role_menu values ('2', '1000');
-insert into sys_role_menu values ('2', '1001');
-insert into sys_role_menu values ('2', '1002');
-insert into sys_role_menu values ('2', '1003');
-insert into sys_role_menu values ('2', '1004');
-insert into sys_role_menu values ('2', '1005');
-insert into sys_role_menu values ('2', '1006');
-insert into sys_role_menu values ('2', '1007');
-insert into sys_role_menu values ('2', '1008');
-insert into sys_role_menu values ('2', '1009');
-insert into sys_role_menu values ('2', '1010');
-insert into sys_role_menu values ('2', '1011');
-insert into sys_role_menu values ('2', '1012');
-insert into sys_role_menu values ('2', '1013');
-insert into sys_role_menu values ('2', '1014');
-insert into sys_role_menu values ('2', '1015');
-insert into sys_role_menu values ('2', '1016');
-insert into sys_role_menu values ('2', '1017');
-insert into sys_role_menu values ('2', '1018');
-insert into sys_role_menu values ('2', '1019');
-insert into sys_role_menu values ('2', '1020');
-insert into sys_role_menu values ('2', '1021');
-insert into sys_role_menu values ('2', '1022');
-insert into sys_role_menu values ('2', '1023');
-insert into sys_role_menu values ('2', '1024');
-insert into sys_role_menu values ('2', '1025');
-insert into sys_role_menu values ('2', '1026');
-insert into sys_role_menu values ('2', '1027');
-insert into sys_role_menu values ('2', '1028');
-insert into sys_role_menu values ('2', '1029');
-insert into sys_role_menu values ('2', '1030');
-insert into sys_role_menu values ('2', '1031');
-insert into sys_role_menu values ('2', '1032');
-insert into sys_role_menu values ('2', '1033');
-insert into sys_role_menu values ('2', '1034');
-insert into sys_role_menu values ('2', '1035');
-insert into sys_role_menu values ('2', '1036');
-insert into sys_role_menu values ('2', '1037');
-insert into sys_role_menu values ('2', '1038');
-insert into sys_role_menu values ('2', '1039');
-insert into sys_role_menu values ('2', '1040');
-insert into sys_role_menu values ('2', '1041');
-insert into sys_role_menu values ('2', '1042');
-insert into sys_role_menu values ('2', '1043');
-insert into sys_role_menu values ('2', '1044');
-insert into sys_role_menu values ('2', '1045');
-insert into sys_role_menu values ('2', '1050');
-insert into sys_role_menu values ('2', '1046');
-insert into sys_role_menu values ('2', '1047');
-insert into sys_role_menu values ('2', '1048');
-insert into sys_role_menu values ('2', '1055');
-insert into sys_role_menu values ('2', '1056');
-insert into sys_role_menu values ('2', '1057');
-insert into sys_role_menu values ('2', '1058');
-insert into sys_role_menu values ('2', '1059');
-insert into sys_role_menu values ('2', '1060');
+insert into sys_role_menu
+values ('2', '1');
+insert into sys_role_menu
+values ('2', '2');
+insert into sys_role_menu
+values ('2', '3');
+insert into sys_role_menu
+values ('2', '4');
+insert into sys_role_menu
+values ('2', '100');
+insert into sys_role_menu
+values ('2', '101');
+insert into sys_role_menu
+values ('2', '102');
+insert into sys_role_menu
+values ('2', '103');
+insert into sys_role_menu
+values ('2', '104');
+insert into sys_role_menu
+values ('2', '105');
+insert into sys_role_menu
+values ('2', '106');
+insert into sys_role_menu
+values ('2', '107');
+insert into sys_role_menu
+values ('2', '108');
+insert into sys_role_menu
+values ('2', '109');
+insert into sys_role_menu
+values ('2', '110');
+insert into sys_role_menu
+values ('2', '111');
+insert into sys_role_menu
+values ('2', '112');
+insert into sys_role_menu
+values ('2', '113');
+insert into sys_role_menu
+values ('2', '114');
+insert into sys_role_menu
+values ('2', '115');
+insert into sys_role_menu
+values ('2', '116');
+insert into sys_role_menu
+values ('2', '500');
+insert into sys_role_menu
+values ('2', '501');
+insert into sys_role_menu
+values ('2', '1000');
+insert into sys_role_menu
+values ('2', '1001');
+insert into sys_role_menu
+values ('2', '1002');
+insert into sys_role_menu
+values ('2', '1003');
+insert into sys_role_menu
+values ('2', '1004');
+insert into sys_role_menu
+values ('2', '1005');
+insert into sys_role_menu
+values ('2', '1006');
+insert into sys_role_menu
+values ('2', '1007');
+insert into sys_role_menu
+values ('2', '1008');
+insert into sys_role_menu
+values ('2', '1009');
+insert into sys_role_menu
+values ('2', '1010');
+insert into sys_role_menu
+values ('2', '1011');
+insert into sys_role_menu
+values ('2', '1012');
+insert into sys_role_menu
+values ('2', '1013');
+insert into sys_role_menu
+values ('2', '1014');
+insert into sys_role_menu
+values ('2', '1015');
+insert into sys_role_menu
+values ('2', '1016');
+insert into sys_role_menu
+values ('2', '1017');
+insert into sys_role_menu
+values ('2', '1018');
+insert into sys_role_menu
+values ('2', '1019');
+insert into sys_role_menu
+values ('2', '1020');
+insert into sys_role_menu
+values ('2', '1021');
+insert into sys_role_menu
+values ('2', '1022');
+insert into sys_role_menu
+values ('2', '1023');
+insert into sys_role_menu
+values ('2', '1024');
+insert into sys_role_menu
+values ('2', '1025');
+insert into sys_role_menu
+values ('2', '1026');
+insert into sys_role_menu
+values ('2', '1027');
+insert into sys_role_menu
+values ('2', '1028');
+insert into sys_role_menu
+values ('2', '1029');
+insert into sys_role_menu
+values ('2', '1030');
+insert into sys_role_menu
+values ('2', '1031');
+insert into sys_role_menu
+values ('2', '1032');
+insert into sys_role_menu
+values ('2', '1033');
+insert into sys_role_menu
+values ('2', '1034');
+insert into sys_role_menu
+values ('2', '1035');
+insert into sys_role_menu
+values ('2', '1036');
+insert into sys_role_menu
+values ('2', '1037');
+insert into sys_role_menu
+values ('2', '1038');
+insert into sys_role_menu
+values ('2', '1039');
+insert into sys_role_menu
+values ('2', '1040');
+insert into sys_role_menu
+values ('2', '1041');
+insert into sys_role_menu
+values ('2', '1042');
+insert into sys_role_menu
+values ('2', '1043');
+insert into sys_role_menu
+values ('2', '1044');
+insert into sys_role_menu
+values ('2', '1045');
+insert into sys_role_menu
+values ('2', '1050');
+insert into sys_role_menu
+values ('2', '1046');
+insert into sys_role_menu
+values ('2', '1047');
+insert into sys_role_menu
+values ('2', '1048');
+insert into sys_role_menu
+values ('2', '1055');
+insert into sys_role_menu
+values ('2', '1056');
+insert into sys_role_menu
+values ('2', '1057');
+insert into sys_role_menu
+values ('2', '1058');
+insert into sys_role_menu
+values ('2', '1059');
+insert into sys_role_menu
+values ('2', '1060');
-- ----------------------------
-- 8銆佽鑹插拰閮ㄩ棬鍏宠仈琛� 瑙掕壊1-N閮ㄩ棬
-- ----------------------------
drop table if exists sys_role_dept;
-create table sys_role_dept (
- role_id bigint(20) not null comment '瑙掕壊ID',
- dept_id bigint(20) not null comment '閮ㄩ棬ID',
- primary key(role_id, dept_id)
-) engine=innodb comment = '瑙掕壊鍜岄儴闂ㄥ叧鑱旇〃';
+create table sys_role_dept
+(
+ role_id bigint(20) not null comment '瑙掕壊ID',
+ dept_id bigint(20) not null comment '閮ㄩ棬ID',
+ primary key (role_id, dept_id)
+) engine = innodb comment = '瑙掕壊鍜岄儴闂ㄥ叧鑱旇〃';
-- ----------------------------
-- 鍒濆鍖�-瑙掕壊鍜岄儴闂ㄥ叧鑱旇〃鏁版嵁
-- ----------------------------
-insert into sys_role_dept values ('2', '100');
-insert into sys_role_dept values ('2', '101');
-insert into sys_role_dept values ('2', '105');
+insert into sys_role_dept
+values ('2', '100');
+insert into sys_role_dept
+values ('2', '101');
+insert into sys_role_dept
+values ('2', '105');
-- ----------------------------
@@ -480,46 +832,49 @@
drop table if exists sys_user_post;
create table sys_user_post
(
- user_id bigint(20) not null comment '鐢ㄦ埛ID',
- post_id bigint(20) not null comment '宀椾綅ID',
- primary key (user_id, post_id)
-) engine=innodb comment = '鐢ㄦ埛涓庡矖浣嶅叧鑱旇〃';
+ user_id bigint(20) not null comment '鐢ㄦ埛ID',
+ post_id bigint(20) not null comment '宀椾綅ID',
+ primary key (user_id, post_id)
+) engine = innodb comment = '鐢ㄦ埛涓庡矖浣嶅叧鑱旇〃';
-- ----------------------------
-- 鍒濆鍖�-鐢ㄦ埛涓庡矖浣嶅叧鑱旇〃鏁版嵁
-- ----------------------------
-insert into sys_user_post values ('1', '1');
-insert into sys_user_post values ('2', '2');
+insert into sys_user_post
+values ('1', '1');
+insert into sys_user_post
+values ('2', '2');
-- ----------------------------
-- 10銆佹搷浣滄棩蹇楄褰�
-- ----------------------------
drop table if exists sys_oper_log;
-create table sys_oper_log (
- oper_id bigint(20) not null comment '鏃ュ織涓婚敭',
- tenant_id varchar(20) default '000000' comment '绉熸埛缂栧彿',
- title varchar(50) default '' comment '妯″潡鏍囬',
- business_type int(2) default 0 comment '涓氬姟绫诲瀷锛�0鍏跺畠 1鏂板 2淇敼 3鍒犻櫎锛�',
- method varchar(100) default '' comment '鏂规硶鍚嶇О',
- request_method varchar(10) default '' comment '璇锋眰鏂瑰紡',
- operator_type int(1) default 0 comment '鎿嶄綔绫诲埆锛�0鍏跺畠 1鍚庡彴鐢ㄦ埛 2鎵嬫満绔敤鎴凤級',
- oper_name varchar(50) default '' comment '鎿嶄綔浜哄憳',
- dept_name varchar(50) default '' comment '閮ㄩ棬鍚嶇О',
- oper_url varchar(255) default '' comment '璇锋眰URL',
- oper_ip varchar(128) default '' comment '涓绘満鍦板潃',
- oper_location varchar(255) default '' comment '鎿嶄綔鍦扮偣',
- oper_param varchar(2000) default '' comment '璇锋眰鍙傛暟',
- json_result varchar(2000) default '' comment '杩斿洖鍙傛暟',
- status int(1) default 0 comment '鎿嶄綔鐘舵�侊紙0姝e父 1寮傚父锛�',
- error_msg varchar(2000) default '' comment '閿欒娑堟伅',
- oper_time datetime comment '鎿嶄綔鏃堕棿',
- cost_time bigint(20) default 0 comment '娑堣�楁椂闂�',
- primary key (oper_id),
- key idx_sys_oper_log_bt (business_type),
- key idx_sys_oper_log_s (status),
- key idx_sys_oper_log_ot (oper_time)
-) engine=innodb comment = '鎿嶄綔鏃ュ織璁板綍';
+create table sys_oper_log
+(
+ oper_id bigint(20) not null comment '鏃ュ織涓婚敭',
+ tenant_id varchar(20) default '000000' comment '绉熸埛缂栧彿',
+ title varchar(50) default '' comment '妯″潡鏍囬',
+ business_type int(2) default 0 comment '涓氬姟绫诲瀷锛�0鍏跺畠 1鏂板 2淇敼 3鍒犻櫎锛�',
+ method varchar(100) default '' comment '鏂规硶鍚嶇О',
+ request_method varchar(10) default '' comment '璇锋眰鏂瑰紡',
+ operator_type int(1) default 0 comment '鎿嶄綔绫诲埆锛�0鍏跺畠 1鍚庡彴鐢ㄦ埛 2鎵嬫満绔敤鎴凤級',
+ oper_name varchar(50) default '' comment '鎿嶄綔浜哄憳',
+ dept_name varchar(50) default '' comment '閮ㄩ棬鍚嶇О',
+ oper_url varchar(255) default '' comment '璇锋眰URL',
+ oper_ip varchar(128) default '' comment '涓绘満鍦板潃',
+ oper_location varchar(255) default '' comment '鎿嶄綔鍦扮偣',
+ oper_param varchar(2000) default '' comment '璇锋眰鍙傛暟',
+ json_result varchar(2000) default '' comment '杩斿洖鍙傛暟',
+ status int(1) default 0 comment '鎿嶄綔鐘舵�侊紙0姝e父 1寮傚父锛�',
+ error_msg varchar(2000) default '' comment '閿欒娑堟伅',
+ oper_time datetime comment '鎿嶄綔鏃堕棿',
+ cost_time bigint(20) default 0 comment '娑堣�楁椂闂�',
+ primary key (oper_id),
+ key idx_sys_oper_log_bt (business_type),
+ key idx_sys_oper_log_s (status),
+ key idx_sys_oper_log_ot (oper_time)
+) engine = innodb comment = '鎿嶄綔鏃ュ織璁板綍';
-- ----------------------------
@@ -528,29 +883,37 @@
drop table if exists sys_dict_type;
create table sys_dict_type
(
- dict_id bigint(20) not null comment '瀛楀吀涓婚敭',
- tenant_id varchar(20) default '000000' comment '绉熸埛缂栧彿',
- dict_name varchar(100) default '' comment '瀛楀吀鍚嶇О',
- dict_type varchar(100) default '' comment '瀛楀吀绫诲瀷',
- status char(1) default '0' comment '鐘舵�侊紙0姝e父 1鍋滅敤锛�',
- create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
- create_by bigint(20) default null comment '鍒涘缓鑰�',
- create_time datetime comment '鍒涘缓鏃堕棿',
- update_by bigint(20) default null comment '鏇存柊鑰�',
- update_time datetime comment '鏇存柊鏃堕棿',
- remark varchar(500) default null comment '澶囨敞',
- primary key (dict_id),
- unique (tenant_id, dict_type)
-) engine=innodb comment = '瀛楀吀绫诲瀷琛�';
+ dict_id bigint(20) not null comment '瀛楀吀涓婚敭',
+ tenant_id varchar(20) default '000000' comment '绉熸埛缂栧彿',
+ dict_name varchar(100) default '' comment '瀛楀吀鍚嶇О',
+ dict_type varchar(100) default '' comment '瀛楀吀绫诲瀷',
+ status char(1) default '0' comment '鐘舵�侊紙0姝e父 1鍋滅敤锛�',
+ create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
+ create_by bigint(20) default null comment '鍒涘缓鑰�',
+ create_time datetime comment '鍒涘缓鏃堕棿',
+ update_by bigint(20) default null comment '鏇存柊鑰�',
+ update_time datetime comment '鏇存柊鏃堕棿',
+ remark varchar(500) default null comment '澶囨敞',
+ primary key (dict_id),
+ unique (tenant_id, dict_type)
+) engine = innodb comment = '瀛楀吀绫诲瀷琛�';
-insert into sys_dict_type values(1, '000000', '鐢ㄦ埛鎬у埆', 'sys_user_sex', '0', 103, 1, sysdate(), null, null, '鐢ㄦ埛鎬у埆鍒楄〃');
-insert into sys_dict_type values(2, '000000', '鑿滃崟鐘舵��', 'sys_show_hide', '0', 103, 1, sysdate(), null, null, '鑿滃崟鐘舵�佸垪琛�');
-insert into sys_dict_type values(3, '000000', '绯荤粺寮�鍏�', 'sys_normal_disable', '0', 103, 1, sysdate(), null, null, '绯荤粺寮�鍏冲垪琛�');
-insert into sys_dict_type values(6, '000000', '绯荤粺鏄惁', 'sys_yes_no', '0', 103, 1, sysdate(), null, null, '绯荤粺鏄惁鍒楄〃');
-insert into sys_dict_type values(7, '000000', '閫氱煡绫诲瀷', 'sys_notice_type', '0', 103, 1, sysdate(), null, null, '閫氱煡绫诲瀷鍒楄〃');
-insert into sys_dict_type values(8, '000000', '閫氱煡鐘舵��', 'sys_notice_status', '0', 103, 1, sysdate(), null, null, '閫氱煡鐘舵�佸垪琛�');
-insert into sys_dict_type values(9, '000000', '鎿嶄綔绫诲瀷', 'sys_oper_type', '0', 103, 1, sysdate(), null, null, '鎿嶄綔绫诲瀷鍒楄〃');
-insert into sys_dict_type values(10, '000000', '绯荤粺鐘舵��', 'sys_common_status', '0', 103, 1, sysdate(), null, null, '鐧诲綍鐘舵�佸垪琛�');
+insert into sys_dict_type
+values (1, '000000', '鐢ㄦ埛鎬у埆', 'sys_user_sex', '0', 103, 1, sysdate(), null, null, '鐢ㄦ埛鎬у埆鍒楄〃');
+insert into sys_dict_type
+values (2, '000000', '鑿滃崟鐘舵��', 'sys_show_hide', '0', 103, 1, sysdate(), null, null, '鑿滃崟鐘舵�佸垪琛�');
+insert into sys_dict_type
+values (3, '000000', '绯荤粺寮�鍏�', 'sys_normal_disable', '0', 103, 1, sysdate(), null, null, '绯荤粺寮�鍏冲垪琛�');
+insert into sys_dict_type
+values (6, '000000', '绯荤粺鏄惁', 'sys_yes_no', '0', 103, 1, sysdate(), null, null, '绯荤粺鏄惁鍒楄〃');
+insert into sys_dict_type
+values (7, '000000', '閫氱煡绫诲瀷', 'sys_notice_type', '0', 103, 1, sysdate(), null, null, '閫氱煡绫诲瀷鍒楄〃');
+insert into sys_dict_type
+values (8, '000000', '閫氱煡鐘舵��', 'sys_notice_status', '0', 103, 1, sysdate(), null, null, '閫氱煡鐘舵�佸垪琛�');
+insert into sys_dict_type
+values (9, '000000', '鎿嶄綔绫诲瀷', 'sys_oper_type', '0', 103, 1, sysdate(), null, null, '鎿嶄綔绫诲瀷鍒楄〃');
+insert into sys_dict_type
+values (10, '000000', '绯荤粺鐘舵��', 'sys_common_status', '0', 103, 1, sysdate(), null, null, '鐧诲綍鐘舵�佸垪琛�');
-- ----------------------------
@@ -559,239 +922,313 @@
drop table if exists sys_dict_data;
create table sys_dict_data
(
- dict_code bigint(20) not null comment '瀛楀吀缂栫爜',
- tenant_id varchar(20) default '000000' comment '绉熸埛缂栧彿',
- dict_sort int(4) default 0 comment '瀛楀吀鎺掑簭',
- dict_label varchar(100) default '' comment '瀛楀吀鏍囩',
- dict_value varchar(100) default '' comment '瀛楀吀閿��',
- dict_type varchar(100) default '' comment '瀛楀吀绫诲瀷',
- css_class varchar(100) default null comment '鏍峰紡灞炴�э紙鍏朵粬鏍峰紡鎵╁睍锛�',
- list_class varchar(100) default null comment '琛ㄦ牸鍥炴樉鏍峰紡',
- is_default char(1) default 'N' comment '鏄惁榛樿锛圷鏄� N鍚︼級',
- status char(1) default '0' comment '鐘舵�侊紙0姝e父 1鍋滅敤锛�',
- create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
- create_by bigint(20) default null comment '鍒涘缓鑰�',
- create_time datetime comment '鍒涘缓鏃堕棿',
- update_by bigint(20) default null comment '鏇存柊鑰�',
- update_time datetime comment '鏇存柊鏃堕棿',
- remark varchar(500) default null comment '澶囨敞',
- primary key (dict_code)
-) engine=innodb comment = '瀛楀吀鏁版嵁琛�';
+ dict_code bigint(20) not null comment '瀛楀吀缂栫爜',
+ tenant_id varchar(20) default '000000' comment '绉熸埛缂栧彿',
+ dict_sort int(4) default 0 comment '瀛楀吀鎺掑簭',
+ dict_label varchar(100) default '' comment '瀛楀吀鏍囩',
+ dict_value varchar(100) default '' comment '瀛楀吀閿��',
+ dict_type varchar(100) default '' comment '瀛楀吀绫诲瀷',
+ css_class varchar(100) default null comment '鏍峰紡灞炴�э紙鍏朵粬鏍峰紡鎵╁睍锛�',
+ list_class varchar(100) default null comment '琛ㄦ牸鍥炴樉鏍峰紡',
+ is_default char(1) default 'N' comment '鏄惁榛樿锛圷鏄� N鍚︼級',
+ status char(1) default '0' comment '鐘舵�侊紙0姝e父 1鍋滅敤锛�',
+ create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
+ create_by bigint(20) default null comment '鍒涘缓鑰�',
+ create_time datetime comment '鍒涘缓鏃堕棿',
+ update_by bigint(20) default null comment '鏇存柊鑰�',
+ update_time datetime comment '鏇存柊鏃堕棿',
+ remark varchar(500) default null comment '澶囨敞',
+ primary key (dict_code)
+) engine = innodb comment = '瀛楀吀鏁版嵁琛�';
-insert into sys_dict_data values(1, '000000', 1, '鐢�', '0', 'sys_user_sex', '', '', 'Y', '0', 103, 1, sysdate(), null, null, '鎬у埆鐢�');
-insert into sys_dict_data values(2, '000000', 2, '濂�', '1', 'sys_user_sex', '', '', 'N', '0', 103, 1, sysdate(), null, null, '鎬у埆濂�');
-insert into sys_dict_data values(3, '000000', 3, '鏈煡', '2', 'sys_user_sex', '', '', 'N', '0', 103, 1, sysdate(), null, null, '鎬у埆鏈煡');
-insert into sys_dict_data values(4, '000000', 1, '鏄剧ず', '0', 'sys_show_hide', '', 'primary', 'Y', '0', 103, 1, sysdate(), null, null, '鏄剧ず鑿滃崟');
-insert into sys_dict_data values(5, '000000', 2, '闅愯棌', '1', 'sys_show_hide', '', 'danger', 'N', '0', 103, 1, sysdate(), null, null, '闅愯棌鑿滃崟');
-insert into sys_dict_data values(6, '000000', 1, '姝e父', '0', 'sys_normal_disable', '', 'primary', 'Y', '0', 103, 1, sysdate(), null, null, '姝e父鐘舵��');
-insert into sys_dict_data values(7, '000000', 2, '鍋滅敤', '1', 'sys_normal_disable', '', 'danger', 'N', '0', 103, 1, sysdate(), null, null, '鍋滅敤鐘舵��');
-insert into sys_dict_data values(12, '000000', 1, '鏄�', 'Y', 'sys_yes_no', '', 'primary', 'Y', '0', 103, 1, sysdate(), null, null, '绯荤粺榛樿鏄�');
-insert into sys_dict_data values(13, '000000', 2, '鍚�', 'N', 'sys_yes_no', '', 'danger', 'N', '0', 103, 1, sysdate(), null, null, '绯荤粺榛樿鍚�');
-insert into sys_dict_data values(14, '000000', 1, '閫氱煡', '1', 'sys_notice_type', '', 'warning', 'Y', '0', 103, 1, sysdate(), null, null, '閫氱煡');
-insert into sys_dict_data values(15, '000000', 2, '鍏憡', '2', 'sys_notice_type', '', 'success', 'N', '0', 103, 1, sysdate(), null, null, '鍏憡');
-insert into sys_dict_data values(16, '000000', 1, '姝e父', '0', 'sys_notice_status', '', 'primary', 'Y', '0', 103, 1, sysdate(), null, null, '姝e父鐘舵��');
-insert into sys_dict_data values(17, '000000', 2, '鍏抽棴', '1', 'sys_notice_status', '', 'danger', 'N', '0', 103, 1, sysdate(), null, null, '鍏抽棴鐘舵��');
-insert into sys_dict_data values(29, '000000', 99, '鍏朵粬', '0', 'sys_oper_type', '', 'info', 'N', '0', 103, 1, sysdate(), null, null, '鍏朵粬鎿嶄綔');
-insert into sys_dict_data values(18, '000000', 1, '鏂板', '1', 'sys_oper_type', '', 'info', 'N', '0', 103, 1, sysdate(), null, null, '鏂板鎿嶄綔');
-insert into sys_dict_data values(19, '000000', 2, '淇敼', '2', 'sys_oper_type', '', 'info', 'N', '0', 103, 1, sysdate(), null, null, '淇敼鎿嶄綔');
-insert into sys_dict_data values(20, '000000', 3, '鍒犻櫎', '3', 'sys_oper_type', '', 'danger', 'N', '0', 103, 1, sysdate(), null, null, '鍒犻櫎鎿嶄綔');
-insert into sys_dict_data values(21, '000000', 4, '鎺堟潈', '4', 'sys_oper_type', '', 'primary', 'N', '0', 103, 1, sysdate(), null, null, '鎺堟潈鎿嶄綔');
-insert into sys_dict_data values(22, '000000', 5, '瀵煎嚭', '5', 'sys_oper_type', '', 'warning', 'N', '0', 103, 1, sysdate(), null, null, '瀵煎嚭鎿嶄綔');
-insert into sys_dict_data values(23, '000000', 6, '瀵煎叆', '6', 'sys_oper_type', '', 'warning', 'N', '0', 103, 1, sysdate(), null, null, '瀵煎叆鎿嶄綔');
-insert into sys_dict_data values(24, '000000', 7, '寮洪��', '7', 'sys_oper_type', '', 'danger', 'N', '0', 103, 1, sysdate(), null, null, '寮洪��鎿嶄綔');
-insert into sys_dict_data values(25, '000000', 8, '鐢熸垚浠g爜', '8', 'sys_oper_type', '', 'warning', 'N', '0', 103, 1, sysdate(), null, null, '鐢熸垚鎿嶄綔');
-insert into sys_dict_data values(26, '000000', 9, '娓呯┖鏁版嵁', '9', 'sys_oper_type', '', 'danger', 'N', '0', 103, 1, sysdate(), null, null, '娓呯┖鎿嶄綔');
-insert into sys_dict_data values(27, '000000', 1, '鎴愬姛', '0', 'sys_common_status', '', 'primary', 'N', '0', 103, 1, sysdate(), null, null, '姝e父鐘舵��');
-insert into sys_dict_data values(28, '000000', 2, '澶辫触', '1', 'sys_common_status', '', 'danger', 'N', '0', 103, 1, sysdate(), null, null, '鍋滅敤鐘舵��');
+insert into sys_dict_data
+values (1, '000000', 1, '鐢�', '0', 'sys_user_sex', '', '', 'Y', '0', 103, 1, sysdate(), null, null, '鎬у埆鐢�');
+insert into sys_dict_data
+values (2, '000000', 2, '濂�', '1', 'sys_user_sex', '', '', 'N', '0', 103, 1, sysdate(), null, null, '鎬у埆濂�');
+insert into sys_dict_data
+values (3, '000000', 3, '鏈煡', '2', 'sys_user_sex', '', '', 'N', '0', 103, 1, sysdate(), null, null, '鎬у埆鏈煡');
+insert into sys_dict_data
+values (4, '000000', 1, '鏄剧ず', '0', 'sys_show_hide', '', 'primary', 'Y', '0', 103, 1, sysdate(), null, null,
+ '鏄剧ず鑿滃崟');
+insert into sys_dict_data
+values (5, '000000', 2, '闅愯棌', '1', 'sys_show_hide', '', 'danger', 'N', '0', 103, 1, sysdate(), null, null,
+ '闅愯棌鑿滃崟');
+insert into sys_dict_data
+values (6, '000000', 1, '姝e父', '0', 'sys_normal_disable', '', 'primary', 'Y', '0', 103, 1, sysdate(), null, null,
+ '姝e父鐘舵��');
+insert into sys_dict_data
+values (7, '000000', 2, '鍋滅敤', '1', 'sys_normal_disable', '', 'danger', 'N', '0', 103, 1, sysdate(), null, null,
+ '鍋滅敤鐘舵��');
+insert into sys_dict_data
+values (12, '000000', 1, '鏄�', 'Y', 'sys_yes_no', '', 'primary', 'Y', '0', 103, 1, sysdate(), null, null, '绯荤粺榛樿鏄�');
+insert into sys_dict_data
+values (13, '000000', 2, '鍚�', 'N', 'sys_yes_no', '', 'danger', 'N', '0', 103, 1, sysdate(), null, null, '绯荤粺榛樿鍚�');
+insert into sys_dict_data
+values (14, '000000', 1, '閫氱煡', '1', 'sys_notice_type', '', 'warning', 'Y', '0', 103, 1, sysdate(), null, null,
+ '閫氱煡');
+insert into sys_dict_data
+values (15, '000000', 2, '鍏憡', '2', 'sys_notice_type', '', 'success', 'N', '0', 103, 1, sysdate(), null, null,
+ '鍏憡');
+insert into sys_dict_data
+values (16, '000000', 1, '姝e父', '0', 'sys_notice_status', '', 'primary', 'Y', '0', 103, 1, sysdate(), null, null,
+ '姝e父鐘舵��');
+insert into sys_dict_data
+values (17, '000000', 2, '鍏抽棴', '1', 'sys_notice_status', '', 'danger', 'N', '0', 103, 1, sysdate(), null, null,
+ '鍏抽棴鐘舵��');
+insert into sys_dict_data
+values (29, '000000', 99, '鍏朵粬', '0', 'sys_oper_type', '', 'info', 'N', '0', 103, 1, sysdate(), null, null,
+ '鍏朵粬鎿嶄綔');
+insert into sys_dict_data
+values (18, '000000', 1, '鏂板', '1', 'sys_oper_type', '', 'info', 'N', '0', 103, 1, sysdate(), null, null, '鏂板鎿嶄綔');
+insert into sys_dict_data
+values (19, '000000', 2, '淇敼', '2', 'sys_oper_type', '', 'info', 'N', '0', 103, 1, sysdate(), null, null, '淇敼鎿嶄綔');
+insert into sys_dict_data
+values (20, '000000', 3, '鍒犻櫎', '3', 'sys_oper_type', '', 'danger', 'N', '0', 103, 1, sysdate(), null, null,
+ '鍒犻櫎鎿嶄綔');
+insert into sys_dict_data
+values (21, '000000', 4, '鎺堟潈', '4', 'sys_oper_type', '', 'primary', 'N', '0', 103, 1, sysdate(), null, null,
+ '鎺堟潈鎿嶄綔');
+insert into sys_dict_data
+values (22, '000000', 5, '瀵煎嚭', '5', 'sys_oper_type', '', 'warning', 'N', '0', 103, 1, sysdate(), null, null,
+ '瀵煎嚭鎿嶄綔');
+insert into sys_dict_data
+values (23, '000000', 6, '瀵煎叆', '6', 'sys_oper_type', '', 'warning', 'N', '0', 103, 1, sysdate(), null, null,
+ '瀵煎叆鎿嶄綔');
+insert into sys_dict_data
+values (24, '000000', 7, '寮洪��', '7', 'sys_oper_type', '', 'danger', 'N', '0', 103, 1, sysdate(), null, null,
+ '寮洪��鎿嶄綔');
+insert into sys_dict_data
+values (25, '000000', 8, '鐢熸垚浠g爜', '8', 'sys_oper_type', '', 'warning', 'N', '0', 103, 1, sysdate(), null, null,
+ '鐢熸垚鎿嶄綔');
+insert into sys_dict_data
+values (26, '000000', 9, '娓呯┖鏁版嵁', '9', 'sys_oper_type', '', 'danger', 'N', '0', 103, 1, sysdate(), null, null,
+ '娓呯┖鎿嶄綔');
+insert into sys_dict_data
+values (27, '000000', 1, '鎴愬姛', '0', 'sys_common_status', '', 'primary', 'N', '0', 103, 1, sysdate(), null, null,
+ '姝e父鐘舵��');
+insert into sys_dict_data
+values (28, '000000', 2, '澶辫触', '1', 'sys_common_status', '', 'danger', 'N', '0', 103, 1, sysdate(), null, null,
+ '鍋滅敤鐘舵��');
-- ----------------------------
-- 13銆佸弬鏁伴厤缃〃
-- ----------------------------
drop table if exists sys_config;
-create table sys_config (
- config_id bigint(20) not null comment '鍙傛暟涓婚敭',
- tenant_id varchar(20) default '000000' comment '绉熸埛缂栧彿',
- config_name varchar(100) default '' comment '鍙傛暟鍚嶇О',
- config_key varchar(100) default '' comment '鍙傛暟閿悕',
- config_value varchar(500) default '' comment '鍙傛暟閿��',
- config_type char(1) default 'N' comment '绯荤粺鍐呯疆锛圷鏄� N鍚︼級',
- create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
- create_by bigint(20) default null comment '鍒涘缓鑰�',
- create_time datetime comment '鍒涘缓鏃堕棿',
- update_by bigint(20) default null comment '鏇存柊鑰�',
- update_time datetime comment '鏇存柊鏃堕棿',
- remark varchar(500) default null comment '澶囨敞',
- primary key (config_id)
-) engine=innodb comment = '鍙傛暟閰嶇疆琛�';
+create table sys_config
+(
+ config_id bigint(20) not null comment '鍙傛暟涓婚敭',
+ tenant_id varchar(20) default '000000' comment '绉熸埛缂栧彿',
+ config_name varchar(100) default '' comment '鍙傛暟鍚嶇О',
+ config_key varchar(100) default '' comment '鍙傛暟閿悕',
+ config_value varchar(500) default '' comment '鍙傛暟閿��',
+ config_type char(1) default 'N' comment '绯荤粺鍐呯疆锛圷鏄� N鍚︼級',
+ create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
+ create_by bigint(20) default null comment '鍒涘缓鑰�',
+ create_time datetime comment '鍒涘缓鏃堕棿',
+ update_by bigint(20) default null comment '鏇存柊鑰�',
+ update_time datetime comment '鏇存柊鏃堕棿',
+ remark varchar(500) default null comment '澶囨敞',
+ primary key (config_id)
+) 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(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锛屾祬鑹蹭富棰榯heme-light' );
-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 (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 (3, '000000', '涓绘鏋堕〉-渚ц竟鏍忎富棰�', 'sys.index.sideTheme', 'theme-dark', 'Y', 103, 1, sysdate(), null, null,
+ '娣辫壊涓婚theme-dark锛屾祬鑹蹭富棰榯heme-light');
+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:鍏抽棴');
-- ----------------------------
-- 14銆佺郴缁熻闂褰�
-- ----------------------------
drop table if exists sys_logininfor;
-create table sys_logininfor (
- info_id bigint(20) not null comment '璁块棶ID',
- tenant_id varchar(20) default '000000' comment '绉熸埛缂栧彿',
- user_name varchar(50) default '' comment '鐢ㄦ埛璐﹀彿',
- ipaddr varchar(128) default '' comment '鐧诲綍IP鍦板潃',
- login_location varchar(255) default '' comment '鐧诲綍鍦扮偣',
- browser varchar(50) default '' comment '娴忚鍣ㄧ被鍨�',
- os varchar(50) default '' comment '鎿嶄綔绯荤粺',
- status char(1) default '0' comment '鐧诲綍鐘舵�侊紙0鎴愬姛 1澶辫触锛�',
- msg varchar(255) default '' comment '鎻愮ず娑堟伅',
- login_time datetime comment '璁块棶鏃堕棿',
- primary key (info_id),
- key idx_sys_logininfor_s (status),
- key idx_sys_logininfor_lt (login_time)
-) engine=innodb comment = '绯荤粺璁块棶璁板綍';
+create table sys_logininfor
+(
+ info_id bigint(20) not null comment '璁块棶ID',
+ tenant_id varchar(20) default '000000' comment '绉熸埛缂栧彿',
+ user_name varchar(50) default '' comment '鐢ㄦ埛璐﹀彿',
+ ipaddr varchar(128) default '' comment '鐧诲綍IP鍦板潃',
+ login_location varchar(255) default '' comment '鐧诲綍鍦扮偣',
+ browser varchar(50) default '' comment '娴忚鍣ㄧ被鍨�',
+ os varchar(50) default '' comment '鎿嶄綔绯荤粺',
+ status char(1) default '0' comment '鐧诲綍鐘舵�侊紙0鎴愬姛 1澶辫触锛�',
+ msg varchar(255) default '' comment '鎻愮ず娑堟伅',
+ login_time datetime comment '璁块棶鏃堕棿',
+ primary key (info_id),
+ key idx_sys_logininfor_s (status),
+ key idx_sys_logininfor_lt (login_time)
+) engine = innodb comment = '绯荤粺璁块棶璁板綍';
-- ----------------------------
-- 17銆侀�氱煡鍏憡琛�
-- ----------------------------
drop table if exists sys_notice;
-create table sys_notice (
- notice_id bigint(20) not null comment '鍏憡ID',
- tenant_id varchar(20) default '000000' comment '绉熸埛缂栧彿',
- notice_title varchar(50) not null comment '鍏憡鏍囬',
- notice_type char(1) not null comment '鍏憡绫诲瀷锛�1閫氱煡 2鍏憡锛�',
- notice_content longblob default null comment '鍏憡鍐呭',
- status char(1) default '0' comment '鍏憡鐘舵�侊紙0姝e父 1鍏抽棴锛�',
- create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
- create_by bigint(20) default null comment '鍒涘缓鑰�',
- create_time datetime comment '鍒涘缓鏃堕棿',
- update_by bigint(20) default null comment '鏇存柊鑰�',
- update_time datetime comment '鏇存柊鏃堕棿',
- remark varchar(255) default null comment '澶囨敞',
- primary key (notice_id)
-) engine=innodb comment = '閫氱煡鍏憡琛�';
+create table sys_notice
+(
+ notice_id bigint(20) not null comment '鍏憡ID',
+ tenant_id varchar(20) default '000000' comment '绉熸埛缂栧彿',
+ notice_title varchar(50) not null comment '鍏憡鏍囬',
+ notice_type char(1) not null comment '鍏憡绫诲瀷锛�1閫氱煡 2鍏憡锛�',
+ notice_content longblob default null comment '鍏憡鍐呭',
+ status char(1) default '0' comment '鍏憡鐘舵�侊紙0姝e父 1鍏抽棴锛�',
+ create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
+ create_by bigint(20) default null comment '鍒涘缓鑰�',
+ create_time datetime comment '鍒涘缓鏃堕棿',
+ update_by bigint(20) default null comment '鏇存柊鑰�',
+ update_time datetime comment '鏇存柊鏃堕棿',
+ remark varchar(255) default null comment '澶囨敞',
+ primary key (notice_id)
+) engine = innodb comment = '閫氱煡鍏憡琛�';
-- ----------------------------
-- 鍒濆鍖�-鍏憡淇℃伅琛ㄦ暟鎹�
-- ----------------------------
-insert into sys_notice values('1', '000000', '娓╅Θ鎻愰啋锛�2018-07-01 鏂扮増鏈彂甯冨暒', '2', '鏂扮増鏈唴瀹�', '0', 103, 1, sysdate(), null, null, '绠$悊鍛�');
-insert into sys_notice values('2', '000000', '缁存姢閫氱煡锛�2018-07-01 绯荤粺鍑屾櫒缁存姢', '1', '缁存姢鍐呭', '0', 103, 1, sysdate(), null, null, '绠$悊鍛�');
+insert into sys_notice
+values ('1', '000000', '娓╅Θ鎻愰啋锛�2018-07-01 鏂扮増鏈彂甯冨暒', '2', '鏂扮増鏈唴瀹�', '0', 103, 1, sysdate(), null, null,
+ '绠$悊鍛�');
+insert into sys_notice
+values ('2', '000000', '缁存姢閫氱煡锛�2018-07-01 绯荤粺鍑屾櫒缁存姢', '1', '缁存姢鍐呭', '0', 103, 1, sysdate(), null, null,
+ '绠$悊鍛�');
-- ----------------------------
-- 18銆佷唬鐮佺敓鎴愪笟鍔¤〃
-- ----------------------------
drop table if exists gen_table;
-create table gen_table (
- table_id bigint(20) not null comment '缂栧彿',
- data_name varchar(200) default '' comment '鏁版嵁婧愬悕绉�',
- table_name varchar(200) default '' comment '琛ㄥ悕绉�',
- table_comment varchar(500) default '' comment '琛ㄦ弿杩�',
- sub_table_name varchar(64) default null comment '鍏宠仈瀛愯〃鐨勮〃鍚�',
- sub_table_fk_name varchar(64) default null comment '瀛愯〃鍏宠仈鐨勫閿悕',
- class_name varchar(100) default '' comment '瀹炰綋绫诲悕绉�',
- tpl_category varchar(200) default 'crud' comment '浣跨敤鐨勬ā鏉匡紙crud鍗曡〃鎿嶄綔 tree鏍戣〃鎿嶄綔锛�',
- package_name varchar(100) comment '鐢熸垚鍖呰矾寰�',
- module_name varchar(30) comment '鐢熸垚妯″潡鍚�',
- business_name varchar(30) comment '鐢熸垚涓氬姟鍚�',
- function_name varchar(50) comment '鐢熸垚鍔熻兘鍚�',
- function_author varchar(50) comment '鐢熸垚鍔熻兘浣滆��',
- gen_type char(1) default '0' comment '鐢熸垚浠g爜鏂瑰紡锛�0zip鍘嬬缉鍖� 1鑷畾涔夎矾寰勶級',
- gen_path varchar(200) default '/' comment '鐢熸垚璺緞锛堜笉濉粯璁ら」鐩矾寰勶級',
- options varchar(1000) comment '鍏跺畠鐢熸垚閫夐」',
- create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
- create_by bigint(20) default null comment '鍒涘缓鑰�',
- create_time datetime comment '鍒涘缓鏃堕棿',
- update_by bigint(20) default null comment '鏇存柊鑰�',
- update_time datetime comment '鏇存柊鏃堕棿',
- remark varchar(500) default null comment '澶囨敞',
- primary key (table_id)
-) engine=innodb comment = '浠g爜鐢熸垚涓氬姟琛�';
+create table gen_table
+(
+ table_id bigint(20) not null comment '缂栧彿',
+ data_name varchar(200) default '' comment '鏁版嵁婧愬悕绉�',
+ table_name varchar(200) default '' comment '琛ㄥ悕绉�',
+ table_comment varchar(500) default '' comment '琛ㄦ弿杩�',
+ sub_table_name varchar(64) default null comment '鍏宠仈瀛愯〃鐨勮〃鍚�',
+ sub_table_fk_name varchar(64) default null comment '瀛愯〃鍏宠仈鐨勫閿悕',
+ class_name varchar(100) default '' comment '瀹炰綋绫诲悕绉�',
+ tpl_category varchar(200) default 'crud' comment '浣跨敤鐨勬ā鏉匡紙crud鍗曡〃鎿嶄綔 tree鏍戣〃鎿嶄綔锛�',
+ package_name varchar(100) comment '鐢熸垚鍖呰矾寰�',
+ module_name varchar(30) comment '鐢熸垚妯″潡鍚�',
+ business_name varchar(30) comment '鐢熸垚涓氬姟鍚�',
+ function_name varchar(50) comment '鐢熸垚鍔熻兘鍚�',
+ function_author varchar(50) comment '鐢熸垚鍔熻兘浣滆��',
+ gen_type char(1) default '0' comment '鐢熸垚浠g爜鏂瑰紡锛�0zip鍘嬬缉鍖� 1鑷畾涔夎矾寰勶級',
+ gen_path varchar(200) default '/' comment '鐢熸垚璺緞锛堜笉濉粯璁ら」鐩矾寰勶級',
+ options varchar(1000) comment '鍏跺畠鐢熸垚閫夐」',
+ create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
+ create_by bigint(20) default null comment '鍒涘缓鑰�',
+ create_time datetime comment '鍒涘缓鏃堕棿',
+ update_by bigint(20) default null comment '鏇存柊鑰�',
+ update_time datetime comment '鏇存柊鏃堕棿',
+ remark varchar(500) default null comment '澶囨敞',
+ primary key (table_id)
+) engine = innodb comment = '浠g爜鐢熸垚涓氬姟琛�';
-- ----------------------------
-- 19銆佷唬鐮佺敓鎴愪笟鍔¤〃瀛楁
-- ----------------------------
drop table if exists gen_table_column;
-create table gen_table_column (
- column_id bigint(20) not null comment '缂栧彿',
- table_id bigint(20) comment '褰掑睘琛ㄧ紪鍙�',
- column_name varchar(200) comment '鍒楀悕绉�',
- column_comment varchar(500) comment '鍒楁弿杩�',
- column_type varchar(100) comment '鍒楃被鍨�',
- java_type varchar(500) comment 'JAVA绫诲瀷',
- java_field varchar(200) comment 'JAVA瀛楁鍚�',
- is_pk char(1) comment '鏄惁涓婚敭锛�1鏄級',
- is_increment char(1) comment '鏄惁鑷锛�1鏄級',
- is_required char(1) comment '鏄惁蹇呭~锛�1鏄級',
- is_insert char(1) comment '鏄惁涓烘彃鍏ュ瓧娈碉紙1鏄級',
- is_edit char(1) comment '鏄惁缂栬緫瀛楁锛�1鏄級',
- is_list char(1) comment '鏄惁鍒楄〃瀛楁锛�1鏄級',
- is_query char(1) comment '鏄惁鏌ヨ瀛楁锛�1鏄級',
- query_type varchar(200) default 'EQ' comment '鏌ヨ鏂瑰紡锛堢瓑浜庛�佷笉绛変簬銆佸ぇ浜庛�佸皬浜庛�佽寖鍥达級',
- html_type varchar(200) comment '鏄剧ず绫诲瀷锛堟枃鏈銆佹枃鏈煙銆佷笅鎷夋銆佸閫夋銆佸崟閫夋銆佹棩鏈熸帶浠讹級',
- dict_type varchar(200) default '' comment '瀛楀吀绫诲瀷',
- sort int comment '鎺掑簭',
- create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
- create_by bigint(20) default null comment '鍒涘缓鑰�',
- create_time datetime comment '鍒涘缓鏃堕棿',
- update_by bigint(20) default null comment '鏇存柊鑰�',
- update_time datetime comment '鏇存柊鏃堕棿',
- primary key (column_id)
-) engine=innodb comment = '浠g爜鐢熸垚涓氬姟琛ㄥ瓧娈�';
+create table gen_table_column
+(
+ column_id bigint(20) not null comment '缂栧彿',
+ table_id bigint(20) comment '褰掑睘琛ㄧ紪鍙�',
+ column_name varchar(200) comment '鍒楀悕绉�',
+ column_comment varchar(500) comment '鍒楁弿杩�',
+ column_type varchar(100) comment '鍒楃被鍨�',
+ java_type varchar(500) comment 'JAVA绫诲瀷',
+ java_field varchar(200) comment 'JAVA瀛楁鍚�',
+ is_pk char(1) comment '鏄惁涓婚敭锛�1鏄級',
+ is_increment char(1) comment '鏄惁鑷锛�1鏄級',
+ is_required char(1) comment '鏄惁蹇呭~锛�1鏄級',
+ is_insert char(1) comment '鏄惁涓烘彃鍏ュ瓧娈碉紙1鏄級',
+ is_edit char(1) comment '鏄惁缂栬緫瀛楁锛�1鏄級',
+ is_list char(1) comment '鏄惁鍒楄〃瀛楁锛�1鏄級',
+ is_query char(1) comment '鏄惁鏌ヨ瀛楁锛�1鏄級',
+ query_type varchar(200) default 'EQ' comment '鏌ヨ鏂瑰紡锛堢瓑浜庛�佷笉绛変簬銆佸ぇ浜庛�佸皬浜庛�佽寖鍥达級',
+ html_type varchar(200) comment '鏄剧ず绫诲瀷锛堟枃鏈銆佹枃鏈煙銆佷笅鎷夋銆佸閫夋銆佸崟閫夋銆佹棩鏈熸帶浠讹級',
+ dict_type varchar(200) default '' comment '瀛楀吀绫诲瀷',
+ sort int comment '鎺掑簭',
+ create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
+ create_by bigint(20) default null comment '鍒涘缓鑰�',
+ create_time datetime comment '鍒涘缓鏃堕棿',
+ update_by bigint(20) default null comment '鏇存柊鑰�',
+ update_time datetime comment '鏇存柊鏃堕棿',
+ primary key (column_id)
+) engine = innodb comment = '浠g爜鐢熸垚涓氬姟琛ㄥ瓧娈�';
-- ----------------------------
-- OSS瀵硅薄瀛樺偍琛�
-- ----------------------------
drop table if exists sys_oss;
-create table sys_oss (
- oss_id bigint(20) not null comment '瀵硅薄瀛樺偍涓婚敭',
- tenant_id varchar(20) default '000000' comment '绉熸埛缂栧彿',
- file_name varchar(255) not null default '' comment '鏂囦欢鍚�',
- original_name varchar(255) not null default '' comment '鍘熷悕',
- file_suffix varchar(10) not null default '' comment '鏂囦欢鍚庣紑鍚�',
- url varchar(500) not null comment 'URL鍦板潃',
- create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
- create_time datetime default null comment '鍒涘缓鏃堕棿',
- create_by bigint(20) default null comment '涓婁紶浜�',
- update_time datetime default null comment '鏇存柊鏃堕棿',
- update_by bigint(20) default null comment '鏇存柊浜�',
- service varchar(20) not null default 'minio' comment '鏈嶅姟鍟�',
- primary key (oss_id)
-) engine=innodb comment ='OSS瀵硅薄瀛樺偍琛�';
+create table sys_oss
+(
+ oss_id bigint(20) not null comment '瀵硅薄瀛樺偍涓婚敭',
+ tenant_id varchar(20) default '000000' comment '绉熸埛缂栧彿',
+ file_name varchar(255) not null default '' comment '鏂囦欢鍚�',
+ original_name varchar(255) not null default '' comment '鍘熷悕',
+ file_suffix varchar(10) not null default '' comment '鏂囦欢鍚庣紑鍚�',
+ url varchar(500) not null comment 'URL鍦板潃',
+ create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
+ create_time datetime default null comment '鍒涘缓鏃堕棿',
+ create_by bigint(20) default null comment '涓婁紶浜�',
+ update_time datetime default null comment '鏇存柊鏃堕棿',
+ update_by bigint(20) default null comment '鏇存柊浜�',
+ service varchar(20) not null default 'minio' comment '鏈嶅姟鍟�',
+ primary key (oss_id)
+) engine = innodb comment ='OSS瀵硅薄瀛樺偍琛�';
-- ----------------------------
-- OSS瀵硅薄瀛樺偍鍔ㄦ�侀厤缃〃
-- ----------------------------
drop table if exists sys_oss_config;
-create table sys_oss_config (
- oss_config_id bigint(20) not null comment '涓诲缓',
- tenant_id varchar(20) default '000000'comment '绉熸埛缂栧彿',
- config_key varchar(20) not null default '' comment '閰嶇疆key',
- access_key varchar(255) default '' comment 'accessKey',
- secret_key varchar(255) default '' comment '绉橀挜',
- bucket_name varchar(255) default '' comment '妗跺悕绉�',
- prefix varchar(255) default '' comment '鍓嶇紑',
- endpoint varchar(255) default '' comment '璁块棶绔欑偣',
- domain varchar(255) default '' comment '鑷畾涔夊煙鍚�',
- is_https char(1) default 'N' comment '鏄惁https锛圷=鏄�,N=鍚︼級',
- region varchar(255) default '' comment '鍩�',
- access_policy char(1) not null default '1' comment '妗舵潈闄愮被鍨�(0=private 1=public 2=custom)',
- status char(1) default '1' comment '鏄惁榛樿锛�0=鏄�,1=鍚︼級',
- ext1 varchar(255) default '' comment '鎵╁睍瀛楁',
- create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
- create_by bigint(20) default null comment '鍒涘缓鑰�',
- create_time datetime default null comment '鍒涘缓鏃堕棿',
- update_by bigint(20) default null comment '鏇存柊鑰�',
- update_time datetime default null comment '鏇存柊鏃堕棿',
- remark varchar(500) default null comment '澶囨敞',
- primary key (oss_config_id)
-) engine=innodb comment='瀵硅薄瀛樺偍閰嶇疆琛�';
+create table sys_oss_config
+(
+ oss_config_id bigint(20) not null comment '涓诲缓',
+ tenant_id varchar(20) default '000000' comment '绉熸埛缂栧彿',
+ config_key varchar(20) not null default '' comment '閰嶇疆key',
+ access_key varchar(255) default '' comment 'accessKey',
+ secret_key varchar(255) default '' comment '绉橀挜',
+ bucket_name varchar(255) default '' comment '妗跺悕绉�',
+ prefix varchar(255) default '' comment '鍓嶇紑',
+ endpoint varchar(255) default '' comment '璁块棶绔欑偣',
+ domain varchar(255) default '' comment '鑷畾涔夊煙鍚�',
+ is_https char(1) default 'N' comment '鏄惁https锛圷=鏄�,N=鍚︼級',
+ region varchar(255) default '' comment '鍩�',
+ access_policy char(1) not null default '1' comment '妗舵潈闄愮被鍨�(0=private 1=public 2=custom)',
+ status char(1) default '1' comment '鏄惁榛樿锛�0=鏄�,1=鍚︼級',
+ ext1 varchar(255) default '' comment '鎵╁睍瀛楁',
+ create_dept bigint(20) default null comment '鍒涘缓閮ㄩ棬',
+ create_by bigint(20) default null comment '鍒涘缓鑰�',
+ create_time datetime default null comment '鍒涘缓鏃堕棿',
+ update_by bigint(20) default null comment '鏇存柊鑰�',
+ update_time datetime default null comment '鏇存柊鏃堕棿',
+ remark varchar(500) default null comment '澶囨敞',
+ primary key (oss_config_id)
+) engine = innodb comment ='瀵硅薄瀛樺偍閰嶇疆琛�';
-insert into sys_oss_config values (1, '000000', 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', '127.0.0.1:9000', '','N', '', '1' ,'0', '', 103, 1, sysdate(), 1, sysdate(), NULL);
-insert into sys_oss_config values (2, '000000', 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 's3-cn-north-1.qiniucs.com', '','N', '', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL);
-insert into sys_oss_config values (3, '000000', 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '','N', '', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL);
-insert into sys_oss_config values (4, '000000', 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'cos.ap-beijing.myqcloud.com', '','N', 'ap-beijing', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL);
-insert into sys_oss_config values (5, '000000', 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '','N', '', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL);
+insert into sys_oss_config
+values (1, '000000', 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', '127.0.0.1:9000', '', 'N', '', '1', '0', '', 103, 1,
+ sysdate(), 1, sysdate(), NULL);
+insert into sys_oss_config
+values (2, '000000', 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 's3-cn-north-1.qiniucs.com', '', 'N',
+ '', '1', '1', '', 103, 1, sysdate(), 1, sysdate(), NULL);
+insert into sys_oss_config
+values (3, '000000', 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '',
+ 'N', '', '1', '1', '', 103, 1, sysdate(), 1, sysdate(), NULL);
+insert into sys_oss_config
+values (4, '000000', 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '',
+ 'cos.ap-beijing.myqcloud.com', '', 'N', 'ap-beijing', '1', '1', '', 103, 1, sysdate(), 1, sysdate(), NULL);
+insert into sys_oss_config
+values (5, '000000', 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '', 'N', '', '1', '1', '', 103,
+ 1, sysdate(), 1, sysdate(), NULL);
--
Gitblit v1.9.3