Commit a5f892212f0a877b0242122d921e0eaab18dddbd
1 parent
51816693
Exists in
master
日志
Showing
17 changed files
with
23 additions
and
264 deletions
Show diff stats
cloud/lapi/pom.xml
@@ -128,7 +128,7 @@ | @@ -128,7 +128,7 @@ | ||
128 | <configuration> | 128 | <configuration> |
129 | <archive> | 129 | <archive> |
130 | <manifest> | 130 | <manifest> |
131 | - <mainClass>com.sincere.lapi.LapiDemoApplication</mainClass> | 131 | + <mainClass>com.sincere.lapi.LapiApplication</mainClass> |
132 | <addClasspath>true</addClasspath> | 132 | <addClasspath>true</addClasspath> |
133 | <classpathPrefix>lib/</classpathPrefix> | 133 | <classpathPrefix>lib/</classpathPrefix> |
134 | </manifest> | 134 | </manifest> |
cloud/lapi/src/main/java/com/sincere/lapi/LapiApplication.java
0 → 100644
@@ -0,0 +1,18 @@ | @@ -0,0 +1,18 @@ | ||
1 | +package com.sincere.lapi; | ||
2 | + | ||
3 | +import com.sincere.lapi.server.ServerRun; | ||
4 | +import org.springframework.boot.SpringApplication; | ||
5 | +import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
6 | +import org.springframework.cloud.openfeign.EnableFeignClients; | ||
7 | + | ||
8 | +@EnableFeignClients(basePackages = "com.sincere.lapi.feign") | ||
9 | +@SpringBootApplication | ||
10 | +public class LapiApplication { | ||
11 | + | ||
12 | + public static void main(String[] args) { | ||
13 | + SpringApplication.run(LapiApplication.class, args); | ||
14 | + ServerRun serverRun = new ServerRun(); | ||
15 | + serverRun.start(5300); | ||
16 | + } | ||
17 | + | ||
18 | +} |
cloud/lapi/src/main/java/com/sincere/lapi/LapiDemoApplication.java
@@ -1,18 +0,0 @@ | @@ -1,18 +0,0 @@ | ||
1 | -package com.sincere.lapi; | ||
2 | - | ||
3 | -import com.sincere.lapi.server.ServerRun; | ||
4 | -import org.springframework.boot.SpringApplication; | ||
5 | -import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
6 | -import org.springframework.cloud.openfeign.EnableFeignClients; | ||
7 | - | ||
8 | -@EnableFeignClients(basePackages = "com.sincere.lapi.feign") | ||
9 | -@SpringBootApplication | ||
10 | -public class LapiDemoApplication { | ||
11 | - | ||
12 | - public static void main(String[] args) { | ||
13 | - SpringApplication.run(LapiDemoApplication.class, args); | ||
14 | - ServerRun serverRun = new ServerRun(); | ||
15 | - serverRun.start(5300); | ||
16 | - } | ||
17 | - | ||
18 | -} |
cloud/lapi/src/main/java/com/sincere/lapi/controller/LapiController.java
1 | -/* | ||
2 | - * Copyright (c) 2018, ZheJiang Uniview Technologies Co., Ltd. All rights reserved. | ||
3 | - * <http://www.uniview.com/> | ||
4 | - *------------------------------------------------------------------------------ | ||
5 | - * Product : 速通门 | ||
6 | - * Module Name : com.unv.fastgate.server.service | ||
7 | - * Date Created: 2019/5/7 | ||
8 | - * Creator : dW5565 dongchenghao | ||
9 | - * Description : | ||
10 | - * | ||
11 | - *------------------------------------------------------------------------------ | ||
12 | - * Modification History | ||
13 | - * DATE NAME DESCRIPTION | ||
14 | - *------------------------------------------------------------------------------ | ||
15 | - *------------------------------------------------------------------------------ | ||
16 | - */ | ||
17 | package com.sincere.lapi.controller; | 1 | package com.sincere.lapi.controller; |
18 | 2 | ||
19 | import com.alibaba.fastjson.JSONArray; | 3 | import com.alibaba.fastjson.JSONArray; |
@@ -39,9 +23,9 @@ import sun.misc.BASE64Encoder; | @@ -39,9 +23,9 @@ import sun.misc.BASE64Encoder; | ||
39 | import java.util.*; | 23 | import java.util.*; |
40 | 24 | ||
41 | /** | 25 | /** |
42 | - * description | ||
43 | - * | ||
44 | - * @author dW5565 | 26 | + * @author chen |
27 | + * @version 1.0 | ||
28 | + * @date 2019/11/28 0028 9:17 | ||
45 | */ | 29 | */ |
46 | @RestController | 30 | @RestController |
47 | public class LapiController { | 31 | public class LapiController { |
cloud/lapi/src/main/java/com/sincere/lapi/pojo/IdentificationInfo.java
1 | -/* | ||
2 | - * Copyright (c) 2018, ZheJiang Uniview Technologies Co., Ltd. All rights reserved. | ||
3 | - * <http://www.uniview.com/> | ||
4 | - *------------------------------------------------------------------------------ | ||
5 | - * Product : 速通门 | ||
6 | - * Module Name : com.unv.fastgate.server.service | ||
7 | - * Date Created: 2019/5/13 | ||
8 | - * Creator : dW5565 dongchenghao | ||
9 | - * Description : | ||
10 | - * | ||
11 | - *------------------------------------------------------------------------------ | ||
12 | - * Modification History | ||
13 | - * DATE NAME DESCRIPTION | ||
14 | - *------------------------------------------------------------------------------ | ||
15 | - *------------------------------------------------------------------------------ | ||
16 | - */ | ||
17 | package com.sincere.lapi.pojo; | 1 | package com.sincere.lapi.pojo; |
18 | 2 | ||
19 | import com.alibaba.fastjson.annotation.JSONField; | 3 | import com.alibaba.fastjson.annotation.JSONField; |
20 | 4 | ||
21 | -/** | ||
22 | - * description | ||
23 | - * | ||
24 | - * @author dW5565 | ||
25 | - */ | ||
26 | public class IdentificationInfo { | 5 | public class IdentificationInfo { |
27 | 6 | ||
28 | @JSONField(name = "Type", ordinal = 1) | 7 | @JSONField(name = "Type", ordinal = 1) |
cloud/lapi/src/main/java/com/sincere/lapi/pojo/LAPIResponse.java
@@ -4,10 +4,6 @@ import com.alibaba.fastjson.annotation.JSONField; | @@ -4,10 +4,6 @@ import com.alibaba.fastjson.annotation.JSONField; | ||
4 | 4 | ||
5 | import java.io.Serializable; | 5 | import java.io.Serializable; |
6 | 6 | ||
7 | -/** | ||
8 | - * @author wW4799 | ||
9 | - * @date 2018/10/18. | ||
10 | - */ | ||
11 | public class LAPIResponse implements Serializable { | 7 | public class LAPIResponse implements Serializable { |
12 | /** | 8 | /** |
13 | * 响应URL | 9 | * 响应URL |
cloud/lapi/src/main/java/com/sincere/lapi/pojo/PersonImageInfo.java
1 | -/* | ||
2 | - * Copyright (c) 2018, ZheJiang Uniview Technologies Co., Ltd. All rights reserved. | ||
3 | - * <http://www.uniview.com/> | ||
4 | - *------------------------------------------------------------------------------ | ||
5 | - * Product : 速通门 | ||
6 | - * Module Name : com.unv.fastgate.server.service | ||
7 | - * Date Created: 2019/5/13 | ||
8 | - * Creator : dW5565 dongchenghao | ||
9 | - * Description : | ||
10 | - * | ||
11 | - *------------------------------------------------------------------------------ | ||
12 | - * Modification History | ||
13 | - * DATE NAME DESCRIPTION | ||
14 | - *------------------------------------------------------------------------------ | ||
15 | - *------------------------------------------------------------------------------ | ||
16 | - */ | ||
17 | package com.sincere.lapi.pojo; | 1 | package com.sincere.lapi.pojo; |
18 | 2 | ||
19 | import com.alibaba.fastjson.annotation.JSONField; | 3 | import com.alibaba.fastjson.annotation.JSONField; |
20 | 4 | ||
21 | -/** | ||
22 | - * description | ||
23 | - * | ||
24 | - * @author dW5565 | ||
25 | - */ | ||
26 | public class PersonImageInfo { | 5 | public class PersonImageInfo { |
27 | @JSONField(name = "FaceID", ordinal = 1) | 6 | @JSONField(name = "FaceID", ordinal = 1) |
28 | private Long faceID; | 7 | private Long faceID; |
cloud/lapi/src/main/java/com/sincere/lapi/pojo/PersonInfo.java
1 | -/* | ||
2 | - * Copyright (c) 2018, ZheJiang Uniview Technologies Co., Ltd. All rights reserved. | ||
3 | - * <http://www.uniview.com/> | ||
4 | - *------------------------------------------------------------------------------ | ||
5 | - * Product : 速通门 | ||
6 | - * Module Name : com.unv.fastgate.server.service | ||
7 | - * Date Created: 2019/5/13 | ||
8 | - * Creator : dW5565 dongchenghao | ||
9 | - * Description : | ||
10 | - * | ||
11 | - *------------------------------------------------------------------------------ | ||
12 | - * Modification History | ||
13 | - * DATE NAME DESCRIPTION | ||
14 | - *------------------------------------------------------------------------------ | ||
15 | - *------------------------------------------------------------------------------ | ||
16 | - */ | ||
17 | package com.sincere.lapi.pojo; | 1 | package com.sincere.lapi.pojo; |
18 | 2 | ||
19 | import com.alibaba.fastjson.annotation.JSONField; | 3 | import com.alibaba.fastjson.annotation.JSONField; |
20 | 4 | ||
21 | import java.util.List; | 5 | import java.util.List; |
22 | 6 | ||
23 | -/** | ||
24 | - * description | ||
25 | - * | ||
26 | - * @author dW5565 | ||
27 | - */ | ||
28 | public class PersonInfo { | 7 | public class PersonInfo { |
29 | 8 | ||
30 | @JSONField(name = "PersonID", ordinal = 1) | 9 | @JSONField(name = "PersonID", ordinal = 1) |
cloud/lapi/src/main/java/com/sincere/lapi/pojo/PersonInfoList.java
1 | -/* | ||
2 | - * Copyright (c) 2018, ZheJiang Uniview Technologies Co., Ltd. All rights reserved. | ||
3 | - * <http://www.uniview.com/> | ||
4 | - *------------------------------------------------------------------------------ | ||
5 | - * Product : 速通门 | ||
6 | - * Module Name : com.unv.fastgate.server.service | ||
7 | - * Date Created: 2019/5/13 | ||
8 | - * Creator : dW5565 dongchenghao | ||
9 | - * Description : | ||
10 | - * | ||
11 | - *------------------------------------------------------------------------------ | ||
12 | - * Modification History | ||
13 | - * DATE NAME DESCRIPTION | ||
14 | - *------------------------------------------------------------------------------ | ||
15 | - *------------------------------------------------------------------------------ | ||
16 | - */ | ||
17 | package com.sincere.lapi.pojo; | 1 | package com.sincere.lapi.pojo; |
18 | 2 | ||
19 | import com.alibaba.fastjson.annotation.JSONField; | 3 | import com.alibaba.fastjson.annotation.JSONField; |
20 | 4 | ||
21 | import java.util.List; | 5 | import java.util.List; |
22 | 6 | ||
23 | -/** | ||
24 | - * description | ||
25 | - * | ||
26 | - * @author dW5565 | ||
27 | - */ | ||
28 | public class PersonInfoList { | 7 | public class PersonInfoList { |
29 | 8 | ||
30 | @JSONField(name = "Num", ordinal = 1) | 9 | @JSONField(name = "Num", ordinal = 1) |
cloud/lapi/src/main/java/com/sincere/lapi/pojo/PersonTimeTemplateInfo.java
1 | -/* | ||
2 | - * Copyright (c) 2018, ZheJiang Uniview Technologies Co., Ltd. All rights reserved. | ||
3 | - * <http://www.uniview.com/> | ||
4 | - *------------------------------------------------------------------------------ | ||
5 | - * Product : 速通门 | ||
6 | - * Module Name : com.unv.fastgate.server.service | ||
7 | - * Date Created: 2019/5/13 | ||
8 | - * Creator : dW5565 dongchenghao | ||
9 | - * Description : | ||
10 | - * | ||
11 | - *------------------------------------------------------------------------------ | ||
12 | - * Modification History | ||
13 | - * DATE NAME DESCRIPTION | ||
14 | - *------------------------------------------------------------------------------ | ||
15 | - *------------------------------------------------------------------------------ | ||
16 | - */ | ||
17 | package com.sincere.lapi.pojo; | 1 | package com.sincere.lapi.pojo; |
18 | 2 | ||
19 | import com.alibaba.fastjson.annotation.JSONField; | 3 | import com.alibaba.fastjson.annotation.JSONField; |
20 | 4 | ||
21 | -/** | ||
22 | - * description | ||
23 | - * | ||
24 | - * @author dW5565 | ||
25 | - */ | ||
26 | public class PersonTimeTemplateInfo { | 5 | public class PersonTimeTemplateInfo { |
27 | 6 | ||
28 | 7 |
cloud/lapi/src/main/java/com/sincere/lapi/server/ServerRun.java
1 | -/* | ||
2 | - * Copyright (c) 2018, ZheJiang Uniview Technologies Co., Ltd. All rights reserved. | ||
3 | - * <http://www.uniview.com/> | ||
4 | - *------------------------------------------------------------------------------ | ||
5 | - * Product : 速通门 | ||
6 | - * Module Name : com.unv.fastgate.server.service | ||
7 | - * Date Created: 2019/5/7 | ||
8 | - * Creator : dW5565 dongchenghao | ||
9 | - * Description : | ||
10 | - * | ||
11 | - *------------------------------------------------------------------------------ | ||
12 | - * Modification History | ||
13 | - * DATE NAME DESCRIPTION | ||
14 | - *------------------------------------------------------------------------------ | ||
15 | - *------------------------------------------------------------------------------ | ||
16 | - */ | ||
17 | package com.sincere.lapi.server; | 1 | package com.sincere.lapi.server; |
18 | 2 | ||
19 | import com.sincere.lapi.server.thread.ServerThread; | 3 | import com.sincere.lapi.server.thread.ServerThread; |
20 | 4 | ||
21 | -/** | ||
22 | - * description | ||
23 | - * | ||
24 | - * @author dW5565 | ||
25 | - */ | 5 | + |
26 | public class ServerRun { | 6 | public class ServerRun { |
27 | public void start(int port){ | 7 | public void start(int port){ |
28 | try { | 8 | try { |
cloud/lapi/src/main/java/com/sincere/lapi/server/handler/HttpClientHandler.java
@@ -25,11 +25,6 @@ import java.util.Date; | @@ -25,11 +25,6 @@ import java.util.Date; | ||
25 | 25 | ||
26 | import static io.netty.buffer.Unpooled.copiedBuffer; | 26 | import static io.netty.buffer.Unpooled.copiedBuffer; |
27 | 27 | ||
28 | -/** | ||
29 | - * description | ||
30 | - * | ||
31 | - * @author dW5565 | ||
32 | - */ | ||
33 | public class HttpClientHandler extends ChannelInboundHandlerAdapter { | 28 | public class HttpClientHandler extends ChannelInboundHandlerAdapter { |
34 | 29 | ||
35 | Logger logger = LoggerFactory.getLogger(HttpClientHandler.class); | 30 | Logger logger = LoggerFactory.getLogger(HttpClientHandler.class); |
cloud/lapi/src/main/java/com/sincere/lapi/server/init/LapiServerInitializer.java
1 | -/* | ||
2 | - * Copyright (c) 2018, ZheJiang Uniview Technologies Co., Ltd. All rights reserved. | ||
3 | - * <http://www.uniview.com/> | ||
4 | - *------------------------------------------------------------------------------ | ||
5 | - * Product : 速通门 | ||
6 | - * Module Name : com.unv.fastgate.server.service | ||
7 | - * Date Created: 2019/5/8 | ||
8 | - * Creator : dW5565 dongchenghao | ||
9 | - * Description : | ||
10 | - * | ||
11 | - *------------------------------------------------------------------------------ | ||
12 | - * Modification History | ||
13 | - * DATE NAME DESCRIPTION | ||
14 | - *------------------------------------------------------------------------------ | ||
15 | - *------------------------------------------------------------------------------ | ||
16 | - */ | ||
17 | package com.sincere.lapi.server.init; | 1 | package com.sincere.lapi.server.init; |
18 | 2 | ||
19 | import com.sincere.lapi.server.handler.HttpClientHandler; | 3 | import com.sincere.lapi.server.handler.HttpClientHandler; |
@@ -25,12 +9,6 @@ import io.netty.handler.codec.string.StringDecoder; | @@ -25,12 +9,6 @@ import io.netty.handler.codec.string.StringDecoder; | ||
25 | import io.netty.handler.timeout.ReadTimeoutHandler; | 9 | import io.netty.handler.timeout.ReadTimeoutHandler; |
26 | 10 | ||
27 | 11 | ||
28 | - | ||
29 | -/** | ||
30 | - * description | ||
31 | - * | ||
32 | - * @author dW5565 | ||
33 | - */ | ||
34 | public class LapiServerInitializer extends ChannelInitializer<SocketChannel> { | 12 | public class LapiServerInitializer extends ChannelInitializer<SocketChannel> { |
35 | 13 | ||
36 | @Override | 14 | @Override |
cloud/lapi/src/main/java/com/sincere/lapi/server/init/NettyFactory.java
1 | -/* | ||
2 | - * Copyright (c) 2018, ZheJiang Uniview Technologies Co., Ltd. All rights reserved. | ||
3 | - * <http://www.uniview.com/> | ||
4 | - *------------------------------------------------------------------------------ | ||
5 | - * Product : 速通门 | ||
6 | - * Module Name : com.unv.fastgate.server.service | ||
7 | - * Date Created: 2019/5/8 | ||
8 | - * Creator : dW5565 dongchenghao | ||
9 | - * Description : | ||
10 | - * | ||
11 | - *------------------------------------------------------------------------------ | ||
12 | - * Modification History | ||
13 | - * DATE NAME DESCRIPTION | ||
14 | - *------------------------------------------------------------------------------ | ||
15 | - *------------------------------------------------------------------------------ | ||
16 | - */ | ||
17 | package com.sincere.lapi.server.init; | 1 | package com.sincere.lapi.server.init; |
18 | 2 | ||
19 | import io.netty.bootstrap.ServerBootstrap; | 3 | import io.netty.bootstrap.ServerBootstrap; |
@@ -23,11 +7,6 @@ import io.netty.channel.EventLoopGroup; | @@ -23,11 +7,6 @@ import io.netty.channel.EventLoopGroup; | ||
23 | import io.netty.channel.nio.NioEventLoopGroup; | 7 | import io.netty.channel.nio.NioEventLoopGroup; |
24 | import io.netty.channel.socket.nio.NioServerSocketChannel; | 8 | import io.netty.channel.socket.nio.NioServerSocketChannel; |
25 | 9 | ||
26 | -/** | ||
27 | - * description | ||
28 | - * | ||
29 | - * @author dW5565 | ||
30 | - */ | ||
31 | public class NettyFactory { | 10 | public class NettyFactory { |
32 | 11 | ||
33 | public void createNetty(int port) { | 12 | public void createNetty(int port) { |
cloud/lapi/src/main/java/com/sincere/lapi/server/pojo/HeartBack.java
1 | -/* | ||
2 | - * Copyright (c) 2018, ZheJiang Uniview Technologies Co., Ltd. All rights reserved. | ||
3 | - * <http://www.uniview.com/> | ||
4 | - *------------------------------------------------------------------------------ | ||
5 | - * Product : 速通门 | ||
6 | - * Module Name : com.unv.fastgate.server.service | ||
7 | - * Date Created: 2019/5/9 | ||
8 | - * Creator : dW5565 dongchenghao | ||
9 | - * Description : | ||
10 | - * | ||
11 | - *------------------------------------------------------------------------------ | ||
12 | - * Modification History | ||
13 | - * DATE NAME DESCRIPTION | ||
14 | - *------------------------------------------------------------------------------ | ||
15 | - *------------------------------------------------------------------------------ | ||
16 | - */ | ||
17 | package com.sincere.lapi.server.pojo; | 1 | package com.sincere.lapi.server.pojo; |
18 | 2 | ||
19 | import com.alibaba.fastjson.annotation.JSONField; | 3 | import com.alibaba.fastjson.annotation.JSONField; |
20 | 4 | ||
21 | -/** | ||
22 | - * 本用例未做心跳回包,请自行回包 | ||
23 | - * | ||
24 | - * @author dW5565 | ||
25 | - */ | ||
26 | public class HeartBack { | 5 | public class HeartBack { |
27 | 6 | ||
28 | @JSONField(name = "ResponseURL", ordinal = 1) | 7 | @JSONField(name = "ResponseURL", ordinal = 1) |
cloud/lapi/src/main/java/com/sincere/lapi/server/thread/ServerThread.java
1 | -/* | ||
2 | - * Copyright (c) 2018, ZheJiang Uniview Technologies Co., Ltd. All rights reserved. | ||
3 | - * <http://www.uniview.com/> | ||
4 | - *------------------------------------------------------------------------------ | ||
5 | - * Product : 速通门 | ||
6 | - * Module Name : com.unv.fastgate.server.service | ||
7 | - * Date Created: 2019/5/7 | ||
8 | - * Creator : dW5565 dongchenghao | ||
9 | - * Description : | ||
10 | - * | ||
11 | - *------------------------------------------------------------------------------ | ||
12 | - * Modification History | ||
13 | - * DATE NAME DESCRIPTION | ||
14 | - *------------------------------------------------------------------------------ | ||
15 | - *------------------------------------------------------------------------------ | ||
16 | - */ | ||
17 | package com.sincere.lapi.server.thread; | 1 | package com.sincere.lapi.server.thread; |
18 | 2 | ||
19 | import com.sincere.lapi.server.init.NettyFactory; | 3 | import com.sincere.lapi.server.init.NettyFactory; |
20 | 4 | ||
21 | - | ||
22 | -/** | ||
23 | - * description | ||
24 | - * | ||
25 | - * @author dW5565 | ||
26 | - */ | ||
27 | public class ServerThread implements Runnable { | 5 | public class ServerThread implements Runnable { |
28 | private int port; | 6 | private int port; |
29 | 7 |
cloud/lapi/src/main/java/com/sincere/lapi/service/request/TerminalHttpCall.java
@@ -14,11 +14,6 @@ import java.net.URI; | @@ -14,11 +14,6 @@ import java.net.URI; | ||
14 | import java.util.Map; | 14 | import java.util.Map; |
15 | import java.util.concurrent.ConcurrentHashMap; | 15 | import java.util.concurrent.ConcurrentHashMap; |
16 | 16 | ||
17 | -/** | ||
18 | - * 终端http调用 | ||
19 | - * | ||
20 | - * @author dW5565 | ||
21 | - */ | ||
22 | @Component("terminalHttpCall") | 17 | @Component("terminalHttpCall") |
23 | public class TerminalHttpCall { | 18 | public class TerminalHttpCall { |
24 | 19 |