diff --git a/ruoyi-admin/src/main/resources/templates/main.html b/ruoyi-admin/src/main/resources/templates/main.html
index 48b834082..8a791272d 100644
--- a/ruoyi-admin/src/main/resources/templates/main.html
+++ b/ruoyi-admin/src/main/resources/templates/main.html
@@ -16,911 +16,11 @@
-
-
-
-
-
-
-
-
捐赠
-
-
-
- 请作者喝杯咖啡(点击图片放大)
-
-
-
-
-
-
-
-
-
-
diff --git a/ruoyi-admin/src/main/resources/templates/sso/ssoApplication/add.html b/ruoyi-admin/src/main/resources/templates/sso/ssoApplication/add.html
new file mode 100644
index 000000000..a7a36ee2f
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/templates/sso/ssoApplication/add.html
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/templates/sso/ssoApplication/edit.html b/ruoyi-admin/src/main/resources/templates/sso/ssoApplication/edit.html
new file mode 100644
index 000000000..7d645495f
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/templates/sso/ssoApplication/edit.html
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/templates/sso/ssoApplication/ssoApplication.html b/ruoyi-admin/src/main/resources/templates/sso/ssoApplication/ssoApplication.html
new file mode 100644
index 000000000..c9ad5aa63
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/templates/sso/ssoApplication/ssoApplication.html
@@ -0,0 +1,106 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/DES3Utils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/DES3Utils.java
new file mode 100644
index 000000000..cdada0d6f
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/DES3Utils.java
@@ -0,0 +1,126 @@
+package com.ruoyi.common.utils;
+
+
+import java.net.URLEncoder;
+import java.nio.ByteBuffer;
+import java.security.NoSuchAlgorithmException;
+import java.security.SecureRandom;
+import java.util.UUID;
+
+import javax.crypto.Cipher;
+import javax.crypto.KeyGenerator;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+
+import org.apache.commons.codec.binary.Base64;
+/**
+ * des3加密
+ * @author wudetian
+ *
+ */
+public class DES3Utils {
+ private static byte[] defaultIV = { 0x23, (byte)0xf2, (byte)0xa3, (byte)0xc6, 0x3e, 0x2b, (byte)0xe7, 0x28 };
+ //加密算法
+ private static final String Algorithm = "DESede";
+ // 加解密统一使用的编码方式
+ private static final String encoding = "utf-8";
+ // 密钥
+ public static final String key="key自写";
+
+ /**
+ * des加密
+ *
+ * @param
+ * @param src
+ * @return
+ * @throws Exception
+ */
+ public static String desEncrypt(String src) throws Exception {
+ return URLEncoder.encode(Base64.encodeBase64String(desEncryptBytes(key, src)),"UTF-8");
+ }
+
+ public static String desEncryptNOUrl(String src) throws Exception {
+ return Base64.encodeBase64String(desEncryptBytes(key, src));
+ }
+
+ /**
+ * des加密
+ *
+ * @param key
+ * @param src
+ * @param
+ * @return
+ */
+ private static byte[] desEncryptBytes(String key, String src) throws Exception{
+ SecretKey deskey = new SecretKeySpec(Base64.decodeBase64(key), Algorithm); // 加密
+ Cipher c1 = Cipher.getInstance(Algorithm +"/CBC/PKCS5Padding");
+ IvParameterSpec IVSpec = IvGenerator(defaultIV);
+ c1.init(Cipher.ENCRYPT_MODE, deskey, IVSpec);
+ return c1.doFinal(regularCryptStr(src, encoding));
+ }
+
+
+ /**
+ * des解密
+ *
+ * @param
+ * @param src
+ * @return
+ * @throws Exception
+ */
+ public static String desDecrypt(String src) throws Exception {
+ return desDecryptBytes(key, Base64.decodeBase64(src));
+ }
+
+ /**
+ * des解密
+ *
+ * @param
+ * @param srcBytes
+ * @return
+ * @throws
+ * @throws Exception
+ */
+ private static String desDecryptBytes(String key, byte[] srcBytes) throws Exception {
+ SecretKey deskey = new SecretKeySpec(Base64.decodeBase64(key), Algorithm); // 解密
+ IvParameterSpec IVSpec = IvGenerator(defaultIV);
+ Cipher c1 = Cipher.getInstance(Algorithm +"/CBC/PKCS5Padding");
+ c1.init(Cipher.DECRYPT_MODE, deskey, IVSpec);
+ return new String(c1.doFinal(srcBytes), encoding).trim();
+ }
+
+
+
+
+ /**
+ * 格式化待加密字符串,使其长度为8的倍数
+ *
+ * @param strIn
+ * @return
+ */
+ private static byte[] regularCryptStr(String strIn, String charSet) throws Exception {
+ ByteBuffer buffer = null;
+ int iLen = 8 - strIn.getBytes(charSet).length % 8;
+ if (iLen != 8) {
+ buffer = ByteBuffer.allocate(strIn.getBytes(charSet).length + iLen);
+ buffer.put(strIn.getBytes(charSet));
+ return buffer.array();
+ } else {
+ return strIn.getBytes(charSet);
+ }
+ }
+
+ public static String genKey() throws NoSuchAlgorithmException{
+ byte[] keyBytes = UUID.randomUUID().toString().getBytes();
+ KeyGenerator generator = KeyGenerator.getInstance("DESede");
+ generator.init( new SecureRandom( keyBytes ) );
+ SecretKey key = generator.generateKey();
+ return Base64.encodeBase64String(key.getEncoded());
+ }
+
+ private static IvParameterSpec IvGenerator(byte b[]) throws Exception {
+ IvParameterSpec IV = new IvParameterSpec(b);
+ return IV;
+ }
+}
\ No newline at end of file
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/DESUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/DESUtil.java
new file mode 100644
index 000000000..fda9827c4
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/DESUtil.java
@@ -0,0 +1,107 @@
+package com.ruoyi.common.utils;
+
+import java.security.InvalidKeyException;
+import java.security.Key;
+import java.security.NoSuchAlgorithmException;
+import java.security.SecureRandom;
+import java.security.spec.InvalidKeySpecException;
+
+import javax.crypto.Cipher;
+import javax.crypto.SecretKey;
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.spec.DESKeySpec;
+
+import org.apache.commons.codec.binary.Base64;
+
+public class DESUtil {
+ //算法名称
+ public static final String KEY_ALGORITHM = "DES";
+ //算法名称/加密模式/填充方式
+ //DES共有四种工作模式-->>ECB:电子密码本模式、CBC:加密分组链接模式、CFB:加密反馈模式、OFB:输出反馈模式
+ public static final String CIPHER_ALGORITHM = "DES/ECB/PKCS5Padding";
+
+ /**
+ *
+ * 生成密钥key对象
+ * @param KeyStr 密钥字符串
+ * @return 密钥对象
+ * @throws InvalidKeyException
+ * @throws NoSuchAlgorithmException
+ * @throws InvalidKeySpecException
+ * @throws Exception
+ */
+ private static SecretKey keyGenerator(String keyStr) throws Exception {
+ byte input[] = HexString2Bytes(keyStr);
+ DESKeySpec desKey = new DESKeySpec(input);
+ //创建一个密匙工厂,然后用它把DESKeySpec转换成
+ SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
+ SecretKey securekey = keyFactory.generateSecret(desKey);
+ return securekey;
+ }
+
+ private static int parse(char c) {
+ if (c >= 'a') return (c - 'a' + 10) & 0x0f;
+ if (c >= 'A') return (c - 'A' + 10) & 0x0f;
+ return (c - '0') & 0x0f;
+ }
+
+ // 从十六进制字符串到字节数组转换
+ public static byte[] HexString2Bytes(String hexstr) {
+ byte[] b = new byte[hexstr.length() / 2];
+ int j = 0;
+ for (int i = 0; i < b.length; i++) {
+ char c0 = hexstr.charAt(j++);
+ char c1 = hexstr.charAt(j++);
+ b[i] = (byte) ((parse(c0) << 4) | parse(c1));
+ }
+ return b;
+ }
+
+ /**
+ * 加密数据
+ * @param data 待加密数据
+ * @param key 密钥
+ * @return 加密后的数据
+ */
+ public static String encrypt(String data, String key) throws Exception {
+ Key deskey = keyGenerator(key);
+ // 实例化Cipher对象,它用于完成实际的加密操作
+ Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM);
+ SecureRandom random = new SecureRandom();
+ // 初始化Cipher对象,设置为加密模式
+ cipher.init(Cipher.ENCRYPT_MODE, deskey, random);
+ byte[] results = cipher.doFinal(data.getBytes());
+ // 该部分是为了与加解密在线测试网站(http://tripledes.online-domain-tools.com/)的十六进制结果进行核对
+ for (int i = 0; i < results.length; i++) {
+ System.out.print(results[i] + " ");
+ }
+ System.out.println();
+ // 执行加密操作。加密后的结果通常都会用Base64编码进行传输
+ return Base64.encodeBase64String(results);
+ }
+
+ /**
+ * 解密数据
+ * @param data 待解密数据
+ * @param key 密钥
+ * @return 解密后的数据
+ */
+ public static String decrypt(String data, String key) throws Exception {
+ Key deskey = keyGenerator(key);
+ Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM);
+ //初始化Cipher对象,设置为解密模式
+ cipher.init(Cipher.DECRYPT_MODE, deskey);
+ // 执行解密操作
+ return new String(cipher.doFinal(Base64.decodeBase64(data)));
+ }
+
+ public static void main(String[] args) throws Exception {
+ String source = "amigoxie";
+ System.out.println("原文: " + source);
+ String key = "A1B2C3D4E5F60708";
+ String encryptData = encrypt(source, key);
+ System.out.println("加密后: " + encryptData);
+ String decryptData = decrypt(encryptData, key);
+ System.out.println("解密后: " + decryptData);
+ }
+}
\ No newline at end of file
diff --git a/ruoyi-framework/pom.xml b/ruoyi-framework/pom.xml
index fc5266d4b..84ff62505 100644
--- a/ruoyi-framework/pom.xml
+++ b/ruoyi-framework/pom.xml
@@ -71,11 +71,18 @@
UserAgentUtils
-
-
- com.ruoyi
- ruoyi-system
-
+
+
+ com.ruoyi
+ ruoyi-system
+
+
+
+
+ com.ruoyi
+ ruoyi-sso
+ 4.2.0
+
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java
index 25eef6136..efc783fc0 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java
@@ -249,6 +249,7 @@ public class ShiroConfig
filterChainDefinitionMap.put("/ajax/**", "anon");
filterChainDefinitionMap.put("/js/**", "anon");
filterChainDefinitionMap.put("/ruoyi/**", "anon");
+ filterChainDefinitionMap.put("/api/**", "anon");
filterChainDefinitionMap.put("/captcha/captchaImage**", "anon");
// 退出 logout地址,shiro去清除session
filterChainDefinitionMap.put("/logout", "logout");
diff --git a/ruoyi-sso/pom.xml b/ruoyi-sso/pom.xml
new file mode 100644
index 000000000..7108598a0
--- /dev/null
+++ b/ruoyi-sso/pom.xml
@@ -0,0 +1,35 @@
+
+
+
+ ruoyi
+ com.ruoyi
+ 4.2.0
+
+ 4.0.0
+
+ ruoyi-sso
+
+
+ sso单点登录管理模块
+
+
+
+
+
+
+ mysql
+ mysql-connector-java
+
+
+
+
+ com.ruoyi
+ ruoyi-common
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ruoyi-sso/src/main/java/com/ruoyi/sso/domain/SsoApplication.java b/ruoyi-sso/src/main/java/com/ruoyi/sso/domain/SsoApplication.java
new file mode 100644
index 000000000..5cad7f2b6
--- /dev/null
+++ b/ruoyi-sso/src/main/java/com/ruoyi/sso/domain/SsoApplication.java
@@ -0,0 +1,125 @@
+package com.ruoyi.sso.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 单点登录应用对象 sso_application
+ *
+ * @author shixueshu
+ * @date 2020-03-23
+ */
+public class SsoApplication extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 应用id */
+ private Long appId;
+
+ /** 应用名称 */
+ @Excel(name = "应用名称")
+ private String appName;
+
+ /** 应用描述 */
+ @Excel(name = "应用描述")
+ private String appDesc;
+
+ /** 应用标识 */
+ @Excel(name = "应用标识")
+ private String appKey;
+
+ /** 应用密钥 */
+ @Excel(name = "应用密钥")
+ private String appSecret;
+
+ /** 应用回调地址 */
+ @Excel(name = "应用回调地址")
+ private String appCallBackUrl;
+
+ /** 是否启用:0禁用,1启用 */
+ @Excel(name = "是否启用:0禁用,1启用")
+ private String status;
+
+ public void setAppId(Long appId)
+ {
+ this.appId = appId;
+ }
+
+ public Long getAppId()
+ {
+ return appId;
+ }
+ public void setAppName(String appName)
+ {
+ this.appName = appName;
+ }
+
+ public String getAppName()
+ {
+ return appName;
+ }
+ public void setAppDesc(String appDesc)
+ {
+ this.appDesc = appDesc;
+ }
+
+ public String getAppDesc()
+ {
+ return appDesc;
+ }
+ public void setAppKey(String appKey)
+ {
+ this.appKey = appKey;
+ }
+
+ public String getAppKey()
+ {
+ return appKey;
+ }
+ public void setAppSecret(String appSecret)
+ {
+ this.appSecret = appSecret;
+ }
+
+ public String getAppSecret()
+ {
+ return appSecret;
+ }
+ public void setAppCallBackUrl(String appCallBackUrl)
+ {
+ this.appCallBackUrl = appCallBackUrl;
+ }
+
+ public String getAppCallBackUrl()
+ {
+ return appCallBackUrl;
+ }
+ public void setStatus(String status)
+ {
+ this.status = status;
+ }
+
+ public String getStatus()
+ {
+ return status;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("appId", getAppId())
+ .append("appName", getAppName())
+ .append("appDesc", getAppDesc())
+ .append("appKey", getAppKey())
+ .append("appSecret", getAppSecret())
+ .append("appCallBackUrl", getAppCallBackUrl())
+ .append("createBy", getCreateBy())
+ .append("updateBy", getUpdateBy())
+ .append("createTime", getCreateTime())
+ .append("updateTime", getUpdateTime())
+ .append("status", getStatus())
+ .toString();
+ }
+}
diff --git a/ruoyi-sso/src/main/java/com/ruoyi/sso/mapper/SsoApplicationMapper.java b/ruoyi-sso/src/main/java/com/ruoyi/sso/mapper/SsoApplicationMapper.java
new file mode 100644
index 000000000..cf90d493f
--- /dev/null
+++ b/ruoyi-sso/src/main/java/com/ruoyi/sso/mapper/SsoApplicationMapper.java
@@ -0,0 +1,70 @@
+package com.ruoyi.sso.mapper;
+
+import java.util.List;
+import com.ruoyi.sso.domain.SsoApplication;
+import org.springframework.stereotype.Repository;
+
+/**
+ * 单点登录应用Mapper接口
+ *
+ * @author shixueshu
+ * @date 2020-03-23
+ */
+@Repository
+public interface SsoApplicationMapper
+{
+ /**
+ * 查询单点登录应用
+ *
+ * @param appId 单点登录应用ID
+ * @return 单点登录应用
+ */
+ public SsoApplication selectSsoApplicationById(Long appId);
+
+ /**
+ * 查询单点登录应用列表
+ *
+ * @param ssoApplication 单点登录应用
+ * @return 单点登录应用集合
+ */
+ public List selectSsoApplicationList(SsoApplication ssoApplication);
+
+ /**
+ * 新增单点登录应用
+ *
+ * @param ssoApplication 单点登录应用
+ * @return 结果
+ */
+ public int insertSsoApplication(SsoApplication ssoApplication);
+
+ /**
+ * 修改单点登录应用
+ *
+ * @param ssoApplication 单点登录应用
+ * @return 结果
+ */
+ public int updateSsoApplication(SsoApplication ssoApplication);
+
+ /**
+ * 删除单点登录应用
+ *
+ * @param appId 单点登录应用ID
+ * @return 结果
+ */
+ public int deleteSsoApplicationById(Long appId);
+
+ /**
+ * 批量删除单点登录应用
+ *
+ * @param appIds 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteSsoApplicationByIds(String[] appIds);
+
+ /**
+ * 根据应用标识与应用密钥查找应用
+ * @param ssoApplication
+ * @return
+ */
+ List querySsoApplicationByAppKeyAndSecret(SsoApplication ssoApplication);
+}
diff --git a/ruoyi-sso/src/main/java/com/ruoyi/sso/service/ISsoApplicationService.java b/ruoyi-sso/src/main/java/com/ruoyi/sso/service/ISsoApplicationService.java
new file mode 100644
index 000000000..4afd69a27
--- /dev/null
+++ b/ruoyi-sso/src/main/java/com/ruoyi/sso/service/ISsoApplicationService.java
@@ -0,0 +1,69 @@
+package com.ruoyi.sso.service;
+
+import java.util.List;
+import com.ruoyi.sso.domain.SsoApplication;
+
+/**
+ * 单点登录应用Service接口
+ *
+ * @author shixueshu
+ * @date 2020-03-23
+ */
+public interface ISsoApplicationService
+{
+ /**
+ * 查询单点登录应用
+ *
+ * @param appId 单点登录应用ID
+ * @return 单点登录应用
+ */
+ public SsoApplication selectSsoApplicationById(Long appId);
+
+ /**
+ * 查询单点登录应用列表
+ *
+ * @param ssoApplication 单点登录应用
+ * @return 单点登录应用集合
+ */
+ public List selectSsoApplicationList(SsoApplication ssoApplication);
+
+ /**
+ * 新增单点登录应用
+ *
+ * @param ssoApplication 单点登录应用
+ * @return 结果
+ */
+ public int insertSsoApplication(SsoApplication ssoApplication);
+
+ /**
+ * 修改单点登录应用
+ *
+ * @param ssoApplication 单点登录应用
+ * @return 结果
+ */
+ public int updateSsoApplication(SsoApplication ssoApplication);
+
+ /**
+ * 批量删除单点登录应用
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ public int deleteSsoApplicationByIds(String ids);
+
+ /**
+ * 删除单点登录应用信息
+ *
+ * @param appId 单点登录应用ID
+ * @return 结果
+ */
+ public int deleteSsoApplicationById(Long appId);
+
+ /**
+ * 根据应用标识与应用密钥查找应用
+ *
+ * @param ssoApplication
+ * @return
+ */
+ List querySsoApplicationByAppKeyAndSecret(SsoApplication ssoApplication);
+}
diff --git a/ruoyi-sso/src/main/java/com/ruoyi/sso/service/impl/SsoApplicationServiceImpl.java b/ruoyi-sso/src/main/java/com/ruoyi/sso/service/impl/SsoApplicationServiceImpl.java
new file mode 100644
index 000000000..871436ddf
--- /dev/null
+++ b/ruoyi-sso/src/main/java/com/ruoyi/sso/service/impl/SsoApplicationServiceImpl.java
@@ -0,0 +1,102 @@
+package com.ruoyi.sso.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.sso.mapper.SsoApplicationMapper;
+import com.ruoyi.sso.domain.SsoApplication;
+import com.ruoyi.sso.service.ISsoApplicationService;
+import com.ruoyi.common.core.text.Convert;
+
+/**
+ * 单点登录应用Service业务层处理
+ *
+ * @author shixueshu
+ * @date 2020-03-23
+ */
+@Service
+public class SsoApplicationServiceImpl implements ISsoApplicationService
+{
+ @Autowired
+ private SsoApplicationMapper ssoApplicationMapper;
+
+ /**
+ * 查询单点登录应用
+ *
+ * @param appId 单点登录应用ID
+ * @return 单点登录应用
+ */
+ @Override
+ public SsoApplication selectSsoApplicationById(Long appId)
+ {
+ return ssoApplicationMapper.selectSsoApplicationById(appId);
+ }
+
+ /**
+ * 查询单点登录应用列表
+ *
+ * @param ssoApplication 单点登录应用
+ * @return 单点登录应用
+ */
+ @Override
+ public List selectSsoApplicationList(SsoApplication ssoApplication)
+ {
+ return ssoApplicationMapper.selectSsoApplicationList(ssoApplication);
+ }
+
+ /**
+ * 新增单点登录应用
+ *
+ * @param ssoApplication 单点登录应用
+ * @return 结果
+ */
+ @Override
+ public int insertSsoApplication(SsoApplication ssoApplication)
+ {
+ ssoApplication.setCreateTime(DateUtils.getNowDate());
+ return ssoApplicationMapper.insertSsoApplication(ssoApplication);
+ }
+
+ /**
+ * 修改单点登录应用
+ *
+ * @param ssoApplication 单点登录应用
+ * @return 结果
+ */
+ @Override
+ public int updateSsoApplication(SsoApplication ssoApplication)
+ {
+ ssoApplication.setUpdateTime(DateUtils.getNowDate());
+ return ssoApplicationMapper.updateSsoApplication(ssoApplication);
+ }
+
+ /**
+ * 删除单点登录应用对象
+ *
+ * @param ids 需要删除的数据ID
+ * @return 结果
+ */
+ @Override
+ public int deleteSsoApplicationByIds(String ids)
+ {
+ return ssoApplicationMapper.deleteSsoApplicationByIds(Convert.toStrArray(ids));
+ }
+
+ /**
+ * 删除单点登录应用信息
+ *
+ * @param appId 单点登录应用ID
+ * @return 结果
+ */
+ @Override
+ public int deleteSsoApplicationById(Long appId)
+ {
+ return ssoApplicationMapper.deleteSsoApplicationById(appId);
+ }
+
+ @Override
+ public List querySsoApplicationByAppKeyAndSecret(SsoApplication ssoApplication) {
+ return ssoApplicationMapper.querySsoApplicationByAppKeyAndSecret(ssoApplication);
+ }
+}
diff --git a/ruoyi-sso/src/main/resources/mapper/sso/SsoApplicationMapper.xml b/ruoyi-sso/src/main/resources/mapper/sso/SsoApplicationMapper.xml
new file mode 100644
index 000000000..0ba5e7340
--- /dev/null
+++ b/ruoyi-sso/src/main/resources/mapper/sso/SsoApplicationMapper.xml
@@ -0,0 +1,102 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ select app_id, app_name, app_desc, app_key, app_secret, app_call_back_url, create_by, update_by, create_time, update_time, status from sso_application
+
+
+
+
+
+
+
+
+
+ insert into sso_application
+
+ app_name,
+ app_desc,
+ app_key,
+ app_secret,
+ app_call_back_url,
+ create_by,
+ update_by,
+ create_time,
+ update_time,
+ status,
+
+
+ #{appName},
+ #{appDesc},
+ #{appKey},
+ #{appSecret},
+ #{appCallBackUrl},
+ #{createBy},
+ #{updateBy},
+ #{createTime},
+ #{updateTime},
+ #{status},
+
+
+
+
+ update sso_application
+
+ app_name = #{appName},
+ app_desc = #{appDesc},
+ app_key = #{appKey},
+ app_secret = #{appSecret},
+ app_call_back_url = #{appCallBackUrl},
+ create_by = #{createBy},
+ update_by = #{updateBy},
+ create_time = #{createTime},
+ update_time = #{updateTime},
+ status = #{status},
+
+ where app_id = #{appId}
+
+
+
+ delete from sso_application where app_id = #{appId}
+
+
+
+ delete from sso_application where app_id in
+
+ #{appId}
+
+
+
+
\ No newline at end of file
diff --git a/ruoyi-sso/src/ssoApplicationMenu.sql b/ruoyi-sso/src/ssoApplicationMenu.sql
new file mode 100644
index 000000000..c4cca8ded
--- /dev/null
+++ b/ruoyi-sso/src/ssoApplicationMenu.sql
@@ -0,0 +1,22 @@
+-- 菜单 SQL
+insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('单点登录应用', '3', '1', '/sso/ssoApplication', 'C', '0', 'sso:ssoApplication:view', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '单点登录应用菜单');
+
+-- 按钮父菜单ID
+SELECT @parentId := LAST_INSERT_ID();
+
+-- 按钮 SQL
+insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('单点登录应用查询', @parentId, '1', '#', 'F', '0', 'sso:ssoApplication:list', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
+
+insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('单点登录应用新增', @parentId, '2', '#', 'F', '0', 'sso:ssoApplication:add', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
+
+insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('单点登录应用修改', @parentId, '3', '#', 'F', '0', 'sso:ssoApplication:edit', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
+
+insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('单点登录应用删除', @parentId, '4', '#', 'F', '0', 'sso:ssoApplication:remove', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
+
+insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('单点登录应用导出', @parentId, '5', '#', 'F', '0', 'sso:ssoApplication:export', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
diff --git a/ry.sh b/ry.sh
deleted file mode 100644
index 55adaf891..000000000
--- a/ry.sh
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/bin/bash
-
-AppName=RuoYi.jar
-
-#JVM参数
-JVM_OPTS="-Dname=$AppName -Duser.timezone=Asia/Shanghai -Xms512M -Xmx512M -XX:PermSize=256M -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC"
-APP_HOME=`pwd`
-LOG_PATH=$APP_HOME/logs/$AppName.log
-
-if [ "$1" = "" ];
-then
- echo -e "\033[0;31m 未输入操作名 \033[0m \033[0;34m {start|stop|restart|status} \033[0m"
- exit 1
-fi
-
-if [ "$AppName" = "" ];
-then
- echo -e "\033[0;31m 未输入应用名 \033[0m"
- exit 1
-fi
-
-function start()
-{
- PID=`ps -ef |grep java|grep $AppName|grep -v grep|awk '{print $2}'`
-
- if [ x"$PID" != x"" ]; then
- echo "$AppName is running..."
- else
- nohup java -jar $JVM_OPTS target/$AppName > /dev/null 2>&1 &
- echo "Start $AppName success..."
- fi
-}
-
-function stop()
-{
- echo "Stop $AppName"
-
- PID=""
- query(){
- PID=`ps -ef |grep java|grep $AppName|grep -v grep|awk '{print $2}'`
- }
-
- query
- if [ x"$PID" != x"" ]; then
- kill -TERM $PID
- echo "$AppName (pid:$PID) exiting..."
- while [ x"$PID" != x"" ]
- do
- sleep 1
- query
- done
- echo "$AppName exited."
- else
- echo "$AppName already stopped."
- fi
-}
-
-function restart()
-{
- stop
- sleep 2
- start
-}
-
-function status()
-{
- PID=`ps -ef |grep java|grep $AppName|grep -v grep|wc -l`
- if [ $PID != 0 ];then
- echo "$AppName is running..."
- else
- echo "$AppName is not running..."
- fi
-}
-
-case $1 in
- start)
- start;;
- stop)
- stop;;
- restart)
- restart;;
- status)
- status;;
- *)
-
-esac