lchao 1 年之前
父节点
当前提交
fe31e4764c

+ 8 - 8
authority-admin/pom.xml

@@ -3,8 +3,8 @@
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
-        <artifactId>ruoyi</artifactId>
-        <groupId>com.ruoyi</groupId>
+        <artifactId>authority</artifactId>
+        <groupId>com.authority</groupId>
         <version>3.8.6</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
@@ -45,20 +45,20 @@
 
         <!-- 核心模块-->
         <dependency>
-            <groupId>com.ruoyi</groupId>
-            <artifactId>ruoyi-framework</artifactId>
+            <groupId>com.authority</groupId>
+            <artifactId>authority-framework</artifactId>
         </dependency>
 
         <!-- 定时任务-->
         <dependency>
-            <groupId>com.ruoyi</groupId>
-            <artifactId>ruoyi-quartz</artifactId>
+            <groupId>com.authority</groupId>
+            <artifactId>authority-quartz</artifactId>
         </dependency>
 
         <!-- 代码生成-->
         <dependency>
-            <groupId>com.ruoyi</groupId>
-            <artifactId>ruoyi-generator</artifactId>
+            <groupId>com.authority</groupId>
+            <artifactId>authority-generator</artifactId>
         </dependency>
         <dependency>
             <groupId>cn.hutool</groupId>

+ 1 - 2
authority-admin/src/main/java/com/ruoyi/web/controller/system/SysSecretProjectController.java

@@ -13,6 +13,7 @@ import com.ruoyi.system.service.ISysSecretProjectService;
 import com.ruoyi.web.utils.ClipboardUtil;
 import com.ruoyi.web.utils.JWTExample;
 import com.ruoyi.web.utils.RestUtil;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -123,8 +124,6 @@ public class SysSecretProjectController extends BaseController {
         }
         return toAjax(sysSecretProjectService.updateSysSecretProject(sysSecretProjectDTO));
     }
-
-
     /**
      * 关闭项目授权管理
      */

+ 14 - 0
authority-system/src/main/java/com/ruoyi/system/domain/SysSecretProject.java

@@ -52,6 +52,11 @@ public class SysSecretProject extends BaseEntity {
      */
     private Long isSwitch;
 
+    /**
+     * 授权认证类型(1:离线认证;2:在线认证;)
+     */
+    private Long authorityType;
+
     public void setId(Long id) {
         this.id = id;
     }
@@ -110,6 +115,15 @@ public class SysSecretProject extends BaseEntity {
                 .append("status", getStatus())
                 .append("secretKey", getSecretKey())
                 .append("isSwitch", getIsSwitch())
+                .append("authorityType", getAuthorityType())
                 .toString();
     }
+
+    public Long getAuthorityType() {
+        return authorityType;
+    }
+
+    public void setAuthorityType(Long authorityType) {
+        this.authorityType = authorityType;
+    }
 }

+ 14 - 0
authority-system/src/main/java/com/ruoyi/system/domain/dto/SysSecretProjectDTO.java

@@ -53,6 +53,11 @@ public class SysSecretProjectDTO extends BaseEntity {
      */
     private String secretKey;
 
+    /**
+     * 授权认证类型(1:离线认证;2:在线认证;)
+     */
+    private Long authorityType;
+
     public void setId(Long id) {
         this.id = id;
     }
@@ -137,6 +142,15 @@ public class SysSecretProjectDTO extends BaseEntity {
                 .append("secretKey", getSecretKey())
                 .append("isSwitch", getIsSwitch())
                 .append("value", getValue())
+                .append("authorityType", getAuthorityType())
                 .toString();
     }
+
+    public Long getAuthorityType() {
+        return authorityType;
+    }
+
+    public void setAuthorityType(Long authorityType) {
+        this.authorityType = authorityType;
+    }
 }

+ 6 - 1
authority-system/src/main/resources/mapper/system/SysSecretProjectMapper.xml

@@ -11,6 +11,7 @@
         <result property="status" column="status"/>
         <result property="secretKey" column="secret_key"/>
         <result property="isSwitch" column="is_switch"/>
+        <result property="authorityType" column="authority_type"/>
     </resultMap>
 
     <resultMap type="SysSecretProjectDTO" id="getSysSecretProjectList">
@@ -22,10 +23,11 @@
         <result property="secretKey" column="secret_key"/>
         <result property="statusText" column="statusText"/>
         <result property="isSwitch" column="is_switch"/>
+        <result property="authorityType" column="authority_type"/>
     </resultMap>
 
     <sql id="selectSysSecretProjectVo">
-        select id, project_id, overdue_date, status, secret_key,is_switch
+        select id, project_id, overdue_date, status, secret_key,is_switch,authority_type
         from sys_secret_project
     </sql>
 
@@ -75,6 +77,7 @@
             <if test="status != null">status,</if>
             <if test="overdueDate != null">overdue_date,</if>
             <if test="isSwitch != null">is_switch,</if>
+            <if test="authorityType != null">authority_type,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="projectId != null">#{projectId},</if>
@@ -82,6 +85,7 @@
             <if test="status != null">#{status},</if>
             <if test="overdueDate != null">#{overdueDate},</if>
             <if test="isSwitch != null">#{isSwitch},</if>
+            <if test="authorityType != null">#{authorityType},</if>
         </trim>
     </insert>
 
@@ -93,6 +97,7 @@
             <if test="status != null">status = #{status},</if>
             <if test="overdueDate != null">overdue_date = #{overdueDate},</if>
             <if test="isSwitch != null">is_switch = #{isSwitch},</if>
+            <if test="authorityType != null">authority_type = #{authorityType},</if>
         </trim>
         where id = #{id}
     </update>

+ 7 - 13
authority-ui/src/views/authority/secret/index.vue

@@ -117,13 +117,13 @@
           </el-date-picker>
         </el-form-item>
         <el-form-item label="授权认证类型" prop="authorityType">
-          <el-select v-model="form.authorityType" placeholder="请选择">
+          <el-select v-model="form.authorityType" placeholder="授权认证类型">
             <el-option
-              v-for="item in options"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value">
-            </el-option>
+              v-for="dict in dict.type.sys_is_status"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            />
           </el-select>
         </el-form-item>
       </el-form>
@@ -162,6 +162,7 @@ import {delProject, listAllProject} from "@/api/system/project";
 
 export default {
   name: "secret",
+  dicts:['sys_is_status'],
   data() {
     return {
       // 遮罩层
@@ -199,13 +200,6 @@ export default {
       value: true,
       // 表单校验
       rules: {},
-      options: [{
-        value: '1',
-        label: '在线授权'
-      }, {
-        value: '2',
-        label: '离线授权'
-      }],
     };
   },
   created() {