Browse Source

Merge branches 'dev' and 'dev_plugins' of http://git.elinkit.com.cn:7070/r/epmet-cloud into dev_plugins

 Conflicts:
	epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml
	epmet-module/epmet-third/epmet-third-server/pom.xml
	epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml
	epmet-module/resi-group/resi-group-server/pom.xml
	epmet-user/epmet-user-server/deploy/docker-compose-dev.yml
	epmet-user/epmet-user-server/pom.xml
master
sunyuchao 5 years ago
parent
commit
069e0fda29
  1. 32
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/annotation/ExternalRequestAuth.java
  2. 35
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/ExternalRequestAuthAspect.java
  3. 2
      epmet-gateway/deploy/docker-compose-dev.yml
  4. 2
      epmet-gateway/pom.xml
  5. 6
      epmet-module/epmet-common-service/common-service-server/pom.xml
  6. 2
      epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml
  7. 2
      epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-prod.yml
  8. 2
      epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-test.yml
  9. 8
      epmet-module/epmet-heart/epmet-heart-server/pom.xml
  10. 1
      epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml
  11. 2
      epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml
  12. 1
      epmet-module/epmet-third/epmet-third-server/pom.xml
  13. 1
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java
  14. 1
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/WarrantServiceImpl.java
  15. 1
      epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CustomerMpDao.xml
  16. 10
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/TestController.java
  17. 7
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/TestService.java
  18. 16
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/TestServiceImpl.java
  19. 2
      epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml
  20. 1
      epmet-module/resi-group/resi-group-server/pom.xml
  21. 1
      epmet-user/epmet-user-server/deploy/docker-compose-dev.yml
  22. 1
      epmet-user/epmet-user-server/pom.xml
  23. 2
      epmet-user/epmet-user-server/src/main/resources/mapper/UserRoleDao.xml

32
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/annotation/ExternalRequestAuth.java

@ -0,0 +1,32 @@
/**
* Copyright 2018 人人开源 http://www.renren.io
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.epmet.commons.tools.annotation;
import java.lang.annotation.*;
/**
* 需要认证的外部请求
* @Author wxz
* @Description
* @Date 2020/4/23 16:17
**/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface ExternalRequestAuth {
}

35
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/ExternalRequestAuthAspect.java

@ -0,0 +1,35 @@
package com.epmet.commons.tools.aspect;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
/**
* 外部请求认证切面
*/
@Aspect
@Component
public class ExternalRequestAuthAspect {
/**
* 拦截加了ExternalRequestAuth注解的方法
* @param point
* @throws Throwable
*/
@Before("@annotation(com.epmet.commons.tools.annotation.ExternalRequestAuth)")
public void before(JoinPoint point) throws Throwable {
System.out.println("切面执行了");
RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
ServletRequestAttributes sra = (ServletRequestAttributes) requestAttributes;
HttpServletRequest request = sra.getRequest();
String token = request.getHeader("token");
System.out.println("token:" + token);
}
}

2
epmet-gateway/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-gateway-server:
container_name: epmet-gateway-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-gateway:0.3.30
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-gateway:0.3.31
ports:
- "8080:8080"
network_mode: host # 使用现有网络

2
epmet-gateway/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" 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">
<modelVersion>4.0.0</modelVersion>
<version>0.3.30</version>
<version>0.3.31</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-cloud</artifactId>

6
epmet-module/epmet-common-service/common-service-server/pom.xml

@ -188,10 +188,10 @@
<spring.flyway.enabled>true</spring.flyway.enabled>
<!--亿联云消息网关配置-->
<elink.mq.host>https://epmet-dev.elinkservice.cn/estos/</elink.mq.host>
<elink.mq.host>https://estos.elinkservice.cn:7519/estos/</elink.mq.host>
<elink.mq.sendMsgPath>producerService/producer/sendMsg</elink.mq.sendMsgPath>
<elink.mq.appId>202007161443499985fa2d397436d10356542134c8f008c48</elink.mq.appId>
<elink.mq.token>52d9d9b0e7d0eb5b8b81c205b579e07c</elink.mq.token>
<elink.mq.appId>202008141820598348026098a1b5dd0bc63a1e2418e275d1b</elink.mq.appId>
<elink.mq.token>7ce17f65826539ff3e8616dccd4b70fc</elink.mq.token>
</properties>
</profile>
</profiles>

2
epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-heart-server:
container_name: epmet-heart-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-heart-server:0.0.51
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-heart-server:0.0.52
ports:
- "8111:8111"
network_mode: host # 使用现有网络

2
epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-prod.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-heart-server:
container_name: epmet-heart-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-heart-server:0.0.1
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-heart-server:0.0.52
ports:
- "8111:8111"
network_mode: host # 使用现有网络

2
epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-test.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-heart-server:
container_name: epmet-heart-server-test
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-heart-server:0.0.51
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-heart-server:0.0.52
ports:
- "8111:8111"
network_mode: host # 使用现有网络

8
epmet-module/epmet-heart/epmet-heart-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" 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">
<modelVersion>4.0.0</modelVersion>
<version>0.0.51</version>
<version>0.0.52</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-heart</artifactId>
@ -222,10 +222,10 @@
<spring.flyway.enabled>true</spring.flyway.enabled>
<openapi.scan.server.url>https://epmet-open.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
<!--亿联云消息网关配置-->
<elink.mq.host>https://epmet-cloud.elinkservice.cn/estos/</elink.mq.host>
<elink.mq.host>https://estos.elinkservice.cn:7519/estos/</elink.mq.host>
<elink.mq.sendMsgPath>producerService/producer/sendMsg</elink.mq.sendMsgPath>
<elink.mq.appId>202007161443499985fa2d397436d10356542134c8f008c48</elink.mq.appId>
<elink.mq.token>52d9d9b0e7d0eb5b8b81c205b579e07c</elink.mq.token>
<elink.mq.appId>202008141820598348026098a1b5dd0bc63a1e2418e275d1b</elink.mq.appId>
<elink.mq.token>7ce17f65826539ff3e8616dccd4b70fc</elink.mq.token>
<!--生产钉钉 机器人地址-->
<dingTalk.robot.webHook>https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1</dingTalk.robot.secret>

1
epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml

@ -3,6 +3,7 @@ services:
epmet-third-server:
container_name: epmet-third-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.130
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.131
ports:
- "8110:8110"
network_mode: host # 使用现有网络

2
epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-third-server:
container_name: epmet-third-server-test
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-third-server:0.0.128
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-third-server:0.0.131
ports:
- "8110:8110"
network_mode: host # 使用现有网络

1
epmet-module/epmet-third/epmet-third-server/pom.xml

@ -3,6 +3,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.0.130</version>
<version>0.0.131</version>
<parent>
<groupId>com.epmet</groupId>

1
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java

@ -727,6 +727,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
}
String secret = "SEC54dfa7dfa877ea3ea81be14c7a6ae7e2c499b7a148d818d2a68c69f3df08ddfe";
String url = "https://oapi.dingtalk.com/robot/send?access_token=b5b403239205c95930f7291f1c2a8dd838640b22432ccb2dfa0c6d5e47d14892";
//2.拼接钉钉消息内容并发送
OapiRobotSendRequest request = new OapiRobotSendRequest();
request.setMsgtype("markdown");

1
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/WarrantServiceImpl.java

@ -257,6 +257,7 @@ public class WarrantServiceImpl implements WarrantService {
String url = "https://oapi.dingtalk.com/robot/send?access_token=b5b403239205c95930f7291f1c2a8dd838640b22432ccb2dfa0c6d5e47d14892";
String secret = "SEC54dfa7dfa877ea3ea81be14c7a6ae7e2c499b7a148d818d2a68c69f3df08ddfe";
HttpClientManager.getInstance().sendDingMsg(JSON.toJSONString(request),url,secret);
}

1
epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CustomerMpDao.xml

@ -48,6 +48,7 @@
app_id = #{authAppId}
</update>
<!-- 根据 客户Id和授权方AppId查询clientType -->
<select id="selectClientTypeByCustomerIdAndAuthId" resultType="java.lang.String">
SELECT

10
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/TestController.java

@ -1,5 +1,8 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.ExternalRequestAuth;
import com.epmet.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@ -9,9 +12,14 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping("test")
public class TestController {
@Autowired
private TestService testService;
@ExternalRequestAuth
@GetMapping("test")
public void test() {
System.out.println(666);
System.out.println("TestController -> test()");
testService.test();
}
}

7
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/TestService.java

@ -0,0 +1,7 @@
package com.epmet.service;
public interface TestService {
void test();
}

16
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/TestServiceImpl.java

@ -0,0 +1,16 @@
package com.epmet.service.impl;
import com.epmet.commons.tools.annotation.ExternalRequestAuth;
import com.epmet.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class TestServiceImpl implements TestService {
@ExternalRequestAuth
@Override
public void test() {
System.out.println("TestService -> test()");
}
}

2
epmet-module/resi-group/resi-group-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
resi-group-server:
container_name: resi-group-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/resi-group-server:0.3.65
image: 192.168.1.130:10080/epmet-cloud-dev/resi-group-server:0.3.66
ports:
- "8095:8095"
network_mode: host # 使用现有网络

1
epmet-module/resi-group/resi-group-server/pom.xml

@ -3,6 +3,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.65</version>
<version>0.3.66</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>resi-group</artifactId>

1
epmet-user/epmet-user-server/deploy/docker-compose-dev.yml

@ -3,6 +3,7 @@ services:
epmet-user-server:
container_name: epmet-user-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.117
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.118
ports:
- "8087:8087"
network_mode: host # 不会创建新的网络

1
epmet-user/epmet-user-server/pom.xml

@ -3,6 +3,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.117</version>
<version>0.3.118</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-user</artifactId>

2
epmet-user/epmet-user-server/src/main/resources/mapper/UserRoleDao.xml

@ -34,8 +34,6 @@
ur.DEL_FLAG = 0
AND
ur.USER_ID = #{userId}
AND
ur.CUSTOMER_ID = #{customerId}
<if test='null != gridId and "" != gridId'>
AND( ur.GRID_ID = #{gridId} OR ur.GRID_ID = 'all' )
</if>

Loading…
Cancel
Save