yzx hace 2 semanas
padre
commit
a9d6074c25

+ 5 - 5
ruoyi-admin/pom.xml

@@ -140,11 +140,11 @@
             <artifactId>aliyun-java-sdk-core</artifactId>
             <version>4.6.4</version>
         </dependency>
-        <dependency>
-            <groupId>com.aliyun</groupId>
-            <artifactId>cloudfw20171207</artifactId>
-            <version>8.0.2</version>
-        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>com.aliyun</groupId>-->
+<!--            <artifactId>cloudfw20171207</artifactId>-->
+<!--            <version>8.0.2</version>-->
+<!--        </dependency>-->
 
         <!-- tencent cloud sdk -->
         <dependency>

+ 167 - 167
ruoyi-admin/src/main/java/com/ruoyi/aicall/aliyun/AliyunFirewallPolicyManager.java

@@ -1,175 +1,175 @@
-package com.ruoyi.aicall.aliyun;
-
-import com.aliyun.cloudfw20171207.models.*;
-import com.aliyun.teaopenapi.models.*;
-import lombok.extern.slf4j.Slf4j;
-
-/**
- * 云防火墙策略管理工具类
- */
-@Slf4j
-public class AliyunFirewallPolicyManager {
-
-    /**
-     * 使用AK&SK初始化账号Client
-     * @param accessKeyId
-     * @param accessKeySecret
-     * @param regionId
-     * @return Client
-     * @throws Exception
-     */
-    public static com.aliyun.cloudfw20171207.Client createClient(String accessKeyId, String accessKeySecret, String regionId) throws Exception {
-        Config config = new Config();
-        // 您的AccessKey ID
-        config.accessKeyId = accessKeyId;
-        // 您的AccessKey Secret
-        config.accessKeySecret = accessKeySecret;
-        // 您的可用区ID
-        config.regionId = regionId;
-        return new com.aliyun.cloudfw20171207.Client(config);
-    }
-
-    /**
-     * 创建集群
-     * @param client
-     * @return AddControlPolicyResponse
-     * @throws Exception
-     */
-    public static AddControlPolicyResponse addControlPolicy(com.aliyun.cloudfw20171207.Client client, String direction, String sourceType, String source, String destinationType, String destination, String proto, String destPortType, String destPort, String destPortGroup, String applicationName, String aclAction, String description, String ipVersion, String newOrder, String release) throws Exception {
-        AddControlPolicyRequest addControlPolicyRequest = new AddControlPolicyRequest()
-                // 枚举值: in/out, 分别代表"外对内"/"内对外"
-                .setDirection(direction)
-                // 源类型, 枚举值, net/group/location, 分表代表 "IP"/"地址簿"/"区域"
-                .setSourceType(sourceType)
-                // 如果源为 net, source 就是 CIDR, 如 8.8.8.8/32, 如果是 gorup, source 就是 groupId
-                .setSource(source)
-                // 目的类型, 枚举值, net/group, 分表代表 "IP"/"地址簿"
-                .setDestinationType(destinationType)
-                // 如果目的类型为 net, destination 就是 CIDR, 如 8.8.8.8/32, 如果是 gorup, destination 就是 groupId
-                .setDestination(destination)
-                // 协议类型, TCP/UDP/ICMP/ANY
-                .setProto(proto)
-                // 目的端口类型, 枚举值, port/group, 分别代表: "端口"/"端口地址簿"
-                .setDestPortType(destPortType)
-                // destPortType 为 port时, destPort值必填, destPortGroup不填
-                .setDestPort(destPort)
-                // destPortType 为 group, destPortGroup值必填, destPort不填
-                .setDestPortGroup(destPortGroup)
-                // 应用名:
-                .setApplicationName(applicationName)
-                // 拦截策略: log/accept/drop
-                .setAclAction(aclAction)
-                // 描述
-                .setDescription(description)
-                // 4/6
-                .setIpVersion(ipVersion)
-                // 新的排序, -1, 放最后
-                .setNewOrder(newOrder)
-                // 是否生效, true/false
-                .setRelease(release);
-        return client.addControlPolicy(addControlPolicyRequest);
-    }
-
-
-
-    /**
-     * 获取策略
-     * @param client
-     * @return DescribeControlPolicyResponse
-     * @throws Exception
-     */
-    public static DescribeControlPolicyResponse describeControlPolicy(com.aliyun.cloudfw20171207.Client client, String pageNo, String pageSize, String direction, String ipVersion) throws Exception {
-        DescribeControlPolicyRequest describeControlPolicyRequest = new DescribeControlPolicyRequest()
-                // 第几页
-                .setCurrentPage(pageNo)
-                // 每页多少条
-                .setPageSize(pageSize)
-                // 方向, 枚举值, in/out
-                .setDirection(direction)
-                // IP版本, 枚举值, 4/6
-                .setIpVersion(ipVersion);
-        return client.describeControlPolicy(describeControlPolicyRequest);
-    }
-
-
-    /**
-     * 删除策略
-     * @param client
-     * @return DeleteControlPolicyResponse
-     * @throws Exception
-     */
-    public static DeleteControlPolicyResponse deleteControlPolicy(com.aliyun.cloudfw20171207.Client client, String aclUuid, String direction) throws Exception {
-        DeleteControlPolicyRequest deleteControlPolicyRequest = new DeleteControlPolicyRequest()
-                // 唯一 id, 请参见创建的返回值
-                .setAclUuid(aclUuid)
-                // 枚举值: in/out, 分别代表"外对内"/"内对外"
-                .setDirection(direction);
-        return client.deleteControlPolicy(deleteControlPolicyRequest);
-    }
-
-
-    public static void main(String[] args_) throws Exception {
-        String accessKeyId = "";
-        String accessKeySecret = "";
-
-        // 0. 初始化客户端
-        com.aliyun.cloudfw20171207.Client client = AliyunFirewallPolicyManager.createClient(accessKeyId, accessKeySecret, "cn-hangzhou");
-        // 1. 获取访问策略列表
-        String pageNo = "1";
-        String pageSize = "100";
-        String direction = "";
-        String ipVersion = "";
-        DescribeControlPolicyResponse describeControlPolicyResponse = AliyunFirewallPolicyManager.describeControlPolicy(client, pageNo, pageSize, direction, ipVersion);
-        DescribeControlPolicyResponseBody body = describeControlPolicyResponse.body;
-        log.info("Describe Control Policy, TotalCount: " + body.totalCount + ".");
-        for (DescribeControlPolicyResponseBody.DescribeControlPolicyResponseBodyPolicys policy : body.policys) {
-            log.info("aclUuid: " + policy.aclUuid + ", aclAction: " + policy.aclAction + "!");
-        }
-//        // 2. 创建访问策略
-//        direction = "in";
-//        String sourceType = "accept";
-//        String source = "36.7.79.15";
-//        String destinationType = "net";
-//        String destination = "";
-//        String proto = "UDP";
-//        String destPortType = "port";
-//        String destPort = "5060";
-//        String destPortGroup = "";
-//        String applicationName = "ANY";
-//        String aclAction = "";
-//        String description = "";
-//        ipVersion = "";
-//        String newOrder = "";
-//        String release = "";
-//        AddControlPolicyResponse addControlPolicyResponse = CloudFirewallPolicyManager.addControlPolicy(client, direction, sourceType, source, destinationType, destination, proto, destPortType, destPort, destPortGroup, applicationName, aclAction, description, ipVersion, newOrder, release);
-//        String aclUuid = addControlPolicyResponse.body.aclUuid;
-//        log.info("Create Control Policy, AclUuid Id is " + aclUuid + ".");
+//package com.ruoyi.aicall.aliyun;
 //
-//        // 3. 获取访问策略列表
-//        direction = "";
-//        ipVersion = "";
-//        describeControlPolicyResponse = CloudFirewallPolicyManager.describeControlPolicy(client, pageNo, pageSize, direction, ipVersion);
-//        body = describeControlPolicyResponse.body;
-//        log.info("Describe Control Policy, TotalCount: " + body.totalCount + ".");
-//        for (DescribeControlPolicyResponseBody.DescribeControlPolicyResponseBodyPolicys policy : body.policys) {
-//            log.info("aclUuid: " + policy.aclUuid + ", aclAction: " + policy.aclAction + "!");
-//        }
+//import com.aliyun.cloudfw20171207.models.*;
+//import com.aliyun.teaopenapi.models.*;
+//import lombok.extern.slf4j.Slf4j;
+//
+///**
+// * 云防火墙策略管理工具类
+// */
+//@Slf4j
+//public class AliyunFirewallPolicyManager {
+//
+//    /**
+//     * 使用AK&SK初始化账号Client
+//     * @param accessKeyId
+//     * @param accessKeySecret
+//     * @param regionId
+//     * @return Client
+//     * @throws Exception
+//     */
+//    public static com.aliyun.cloudfw20171207.Client createClient(String accessKeyId, String accessKeySecret, String regionId) throws Exception {
+//        Config config = new Config();
+//        // 您的AccessKey ID
+//        config.accessKeyId = accessKeyId;
+//        // 您的AccessKey Secret
+//        config.accessKeySecret = accessKeySecret;
+//        // 您的可用区ID
+//        config.regionId = regionId;
+//        return new com.aliyun.cloudfw20171207.Client(config);
+//    }
+//
+//    /**
+//     * 创建集群
+//     * @param client
+//     * @return AddControlPolicyResponse
+//     * @throws Exception
+//     */
+//    public static AddControlPolicyResponse addControlPolicy(com.aliyun.cloudfw20171207.Client client, String direction, String sourceType, String source, String destinationType, String destination, String proto, String destPortType, String destPort, String destPortGroup, String applicationName, String aclAction, String description, String ipVersion, String newOrder, String release) throws Exception {
+//        AddControlPolicyRequest addControlPolicyRequest = new AddControlPolicyRequest()
+//                // 枚举值: in/out, 分别代表"外对内"/"内对外"
+//                .setDirection(direction)
+//                // 源类型, 枚举值, net/group/location, 分表代表 "IP"/"地址簿"/"区域"
+//                .setSourceType(sourceType)
+//                // 如果源为 net, source 就是 CIDR, 如 8.8.8.8/32, 如果是 gorup, source 就是 groupId
+//                .setSource(source)
+//                // 目的类型, 枚举值, net/group, 分表代表 "IP"/"地址簿"
+//                .setDestinationType(destinationType)
+//                // 如果目的类型为 net, destination 就是 CIDR, 如 8.8.8.8/32, 如果是 gorup, destination 就是 groupId
+//                .setDestination(destination)
+//                // 协议类型, TCP/UDP/ICMP/ANY
+//                .setProto(proto)
+//                // 目的端口类型, 枚举值, port/group, 分别代表: "端口"/"端口地址簿"
+//                .setDestPortType(destPortType)
+//                // destPortType 为 port时, destPort值必填, destPortGroup不填
+//                .setDestPort(destPort)
+//                // destPortType 为 group, destPortGroup值必填, destPort不填
+//                .setDestPortGroup(destPortGroup)
+//                // 应用名:
+//                .setApplicationName(applicationName)
+//                // 拦截策略: log/accept/drop
+//                .setAclAction(aclAction)
+//                // 描述
+//                .setDescription(description)
+//                // 4/6
+//                .setIpVersion(ipVersion)
+//                // 新的排序, -1, 放最后
+//                .setNewOrder(newOrder)
+//                // 是否生效, true/false
+//                .setRelease(release);
+//        return client.addControlPolicy(addControlPolicyRequest);
+//    }
 //
-//        // 4. 删除访问策略
-////        aclUuid = "";
-//        direction = "";
-//        DeleteControlPolicyResponse deleteControlPolicyResponse = CloudFirewallPolicyManager.deleteControlPolicy(client, aclUuid, direction);
-//        String requestId = deleteControlPolicyResponse.body.requestId;
-//        log.info("Delete Control Policy, requestId: " + requestId + ".");
 //
 //
-//        // 5. 获取访问策略列表
-//        describeControlPolicyResponse = CloudFirewallPolicyManager.describeControlPolicy(client, pageNo, pageSize, direction, ipVersion);
-//        body = describeControlPolicyResponse.body;
+//    /**
+//     * 获取策略
+//     * @param client
+//     * @return DescribeControlPolicyResponse
+//     * @throws Exception
+//     */
+//    public static DescribeControlPolicyResponse describeControlPolicy(com.aliyun.cloudfw20171207.Client client, String pageNo, String pageSize, String direction, String ipVersion) throws Exception {
+//        DescribeControlPolicyRequest describeControlPolicyRequest = new DescribeControlPolicyRequest()
+//                // 第几页
+//                .setCurrentPage(pageNo)
+//                // 每页多少条
+//                .setPageSize(pageSize)
+//                // 方向, 枚举值, in/out
+//                .setDirection(direction)
+//                // IP版本, 枚举值, 4/6
+//                .setIpVersion(ipVersion);
+//        return client.describeControlPolicy(describeControlPolicyRequest);
+//    }
+//
+//
+//    /**
+//     * 删除策略
+//     * @param client
+//     * @return DeleteControlPolicyResponse
+//     * @throws Exception
+//     */
+//    public static DeleteControlPolicyResponse deleteControlPolicy(com.aliyun.cloudfw20171207.Client client, String aclUuid, String direction) throws Exception {
+//        DeleteControlPolicyRequest deleteControlPolicyRequest = new DeleteControlPolicyRequest()
+//                // 唯一 id, 请参见创建的返回值
+//                .setAclUuid(aclUuid)
+//                // 枚举值: in/out, 分别代表"外对内"/"内对外"
+//                .setDirection(direction);
+//        return client.deleteControlPolicy(deleteControlPolicyRequest);
+//    }
+//
+//
+//    public static void main(String[] args_) throws Exception {
+//        String accessKeyId = "";
+//        String accessKeySecret = "";
+//
+//        // 0. 初始化客户端
+//        com.aliyun.cloudfw20171207.Client client = AliyunFirewallPolicyManager.createClient(accessKeyId, accessKeySecret, "cn-hangzhou");
+//        // 1. 获取访问策略列表
+//        String pageNo = "1";
+//        String pageSize = "100";
+//        String direction = "";
+//        String ipVersion = "";
+//        DescribeControlPolicyResponse describeControlPolicyResponse = AliyunFirewallPolicyManager.describeControlPolicy(client, pageNo, pageSize, direction, ipVersion);
+//        DescribeControlPolicyResponseBody body = describeControlPolicyResponse.body;
 //        log.info("Describe Control Policy, TotalCount: " + body.totalCount + ".");
 //        for (DescribeControlPolicyResponseBody.DescribeControlPolicyResponseBodyPolicys policy : body.policys) {
 //            log.info("aclUuid: " + policy.aclUuid + ", aclAction: " + policy.aclAction + "!");
 //        }
-
-    }
-}
+////        // 2. 创建访问策略
+////        direction = "in";
+////        String sourceType = "accept";
+////        String source = "36.7.79.15";
+////        String destinationType = "net";
+////        String destination = "";
+////        String proto = "UDP";
+////        String destPortType = "port";
+////        String destPort = "5060";
+////        String destPortGroup = "";
+////        String applicationName = "ANY";
+////        String aclAction = "";
+////        String description = "";
+////        ipVersion = "";
+////        String newOrder = "";
+////        String release = "";
+////        AddControlPolicyResponse addControlPolicyResponse = CloudFirewallPolicyManager.addControlPolicy(client, direction, sourceType, source, destinationType, destination, proto, destPortType, destPort, destPortGroup, applicationName, aclAction, description, ipVersion, newOrder, release);
+////        String aclUuid = addControlPolicyResponse.body.aclUuid;
+////        log.info("Create Control Policy, AclUuid Id is " + aclUuid + ".");
+////
+////        // 3. 获取访问策略列表
+////        direction = "";
+////        ipVersion = "";
+////        describeControlPolicyResponse = CloudFirewallPolicyManager.describeControlPolicy(client, pageNo, pageSize, direction, ipVersion);
+////        body = describeControlPolicyResponse.body;
+////        log.info("Describe Control Policy, TotalCount: " + body.totalCount + ".");
+////        for (DescribeControlPolicyResponseBody.DescribeControlPolicyResponseBodyPolicys policy : body.policys) {
+////            log.info("aclUuid: " + policy.aclUuid + ", aclAction: " + policy.aclAction + "!");
+////        }
+////
+////        // 4. 删除访问策略
+//////        aclUuid = "";
+////        direction = "";
+////        DeleteControlPolicyResponse deleteControlPolicyResponse = CloudFirewallPolicyManager.deleteControlPolicy(client, aclUuid, direction);
+////        String requestId = deleteControlPolicyResponse.body.requestId;
+////        log.info("Delete Control Policy, requestId: " + requestId + ".");
+////
+////
+////        // 5. 获取访问策略列表
+////        describeControlPolicyResponse = CloudFirewallPolicyManager.describeControlPolicy(client, pageNo, pageSize, direction, ipVersion);
+////        body = describeControlPolicyResponse.body;
+////        log.info("Describe Control Policy, TotalCount: " + body.totalCount + ".");
+////        for (DescribeControlPolicyResponseBody.DescribeControlPolicyResponseBodyPolicys policy : body.policys) {
+////            log.info("aclUuid: " + policy.aclUuid + ", aclAction: " + policy.aclAction + "!");
+////        }
+//
+//    }
+//}

+ 2 - 2
ruoyi-admin/src/main/resources/application-dev.yml

@@ -7,9 +7,9 @@ spring:
     druid:
       # 主库数据源
       master:
-        url: jdbc:mysql://192.168.66.70:3306/easycallcenter365?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+        url: jdbc:mysql://129.28.164.235:3306/easycallcenter365?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
         username: root
-        password: tydic202x888
+        password: easycallcenter365
       slave:
         # 从数据源开关/默认关闭
         enabled: false

+ 1 - 1
ruoyi-admin/src/main/resources/application.yml

@@ -1,3 +1,3 @@
 spring:
   profiles:
-    active: test
+    active: dev

BIN
ruoyi-admin/src/main/resources/static/img/login-background.jpg


+ 2 - 1
ruoyi-admin/src/main/resources/templates/index.html

@@ -37,7 +37,8 @@
         </div>
 		<a th:href="@{/index}">
 			<li class="logo hidden-xs">
-				<img th:src="@{${logoPath}}" alt="Logo" class="logo-img">
+				AI外呼平台
+<!--				<img th:src="@{${logoPath}}" alt="Logo" class="logo-img">-->
 			</li>
 		</a>
         <div class="sidebar-collapse">

+ 2 - 2
ruoyi-admin/src/main/resources/templates/login.html

@@ -106,7 +106,7 @@
             <div class="col-sm-7">
                 <div class="signin-info">
                     <div class="m-b"></div>
-                    <h4 th:text="#{user.login.welcome} + ' ' + #{sys.sysName} + '  ' + ${sysVersion}"></h4>
+                    <h2 th:text="#{user.login.welcome} + ' ' + #{sys.sysName} "></h2>
                 </div>
             </div>
             <div class="col-sm-5">
@@ -137,7 +137,7 @@
         </div>
         <div class="signup-footer">
             <div class="pull-left">
-                Copyright easycallcenter365 All Rights Reserved. <br>
+                Copyright 云联 All Rights Reserved. <br>
             </div>
         </div>
     </div>