diff --git a/Dockerfile b/Dockerfile index fc3fdbb..6e468bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,12 @@ FROM java:8 -MAINTAINER telpo - -VOLUME /tmp -ADD target/dianxin-guizhou-forward-telpo0.0.2.jar app.jar - -RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime -RUN echo "Asia/Shanghai" > /etc/timezone - +MAINTAINER king <1609724385@qq.com> EXPOSE 8102 - -ENTRYPOINT ["java","-jar", "/app.jar"] \ No newline at end of file +VOLUME /tmp +COPY target/gd2021.jar gd2021.jar +COPY --from=hengyunabc/arthas:latest /opt/arthas /opt/arthas +ENV TimeZone=Asia/Shanghai +ENV active=dev +ENV JAVA_OPTS="-Xmx256M -Xms256M" +RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone +ENTRYPOINT java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /gd2021.jar --spring.profiles.active=$active \ No newline at end of file diff --git a/guizhou_dianxin_202101_run.sh b/guizhou_dianxin_202101_run.sh new file mode 100644 index 0000000..a330def --- /dev/null +++ b/guizhou_dianxin_202101_run.sh @@ -0,0 +1,59 @@ +#!/bin/bash +environment=$1 +version=$2 +echo "环境变量为${environment},版本为$version!" +if [[ ${environment} == 'pro1' ]]; then + #echo "开始远程构建容器" + docker stop gd202101_service || true + docker rm gd202101_service || true + docker rmi -f $(docker images | grep 139.224.254.18:5000/gd202101_service | awk '{print $3}') + docker pull 139.224.254.18:5000/gd202101_service:$version + docker run -v /home/data/gd202101server/log:/var/log/gd202101server -e active=pro1 --restart=always -d --network host --name gd202101_service 139.224.254.18:5000/gd202101_service:$version + #删除产生的None镜像 + docker rmi -f $(docker images | grep none | awk '{print $3}') + docker ps -a +fi +if [[ ${environment} == 'pro2' ]]; then + #echo "开始远程构建容器" + docker stop gd202101_service || true + docker rm gd202101_service || true + docker rmi -f $(docker images | grep 139.224.254.18:5000/gd202101_service | awk '{print $3}') + docker pull 139.224.254.18:5000/gd202101_service:$version + docker run -v /home/data/gd202101server/log:/var/log/gd202101server -e active=pro2 --restart=always -d --network host --name gd202101_service 139.224.254.18:5000/gd202101_service:$version + #删除产生的None镜像 + docker rmi -f $(docker images | grep none | awk '{print $3}') + docker ps -a +fi +if [[ ${environment} == 'pro3' ]]; then + #echo "开始远程构建容器" + docker stop gd202101_service || true + docker rm gd202101_service || true + docker rmi -f $(docker images | grep 139.224.254.18:5000/gd202101_service | awk '{print $3}') + docker pull 139.224.254.18:5000/gd202101_service:$version + docker run -v /home/data/gd202101server/log:/var/log/gd202101server -e active=pro3 --restart=always -d --network host + --name gd202101_service 139.224.254.18:5000/gd202101_service:$version + #删除产生的None镜像 + docker rmi -f $(docker images | grep none | awk '{print $3}') + docker ps -a +fi +if [[ ${environment} == 'test' ]]; then + #echo "开始远程构建容器" + docker stop gd202101_service || true + docker rm gd202101_service || true + docker rmi -f $(docker images | grep 139.224.254.18:5000/gd202101_service | awk '{print $3}') + docker pull 139.224.254.18:5000/gd202101_service:$version + docker run -v /home/data/gd202101server/log:/var/log/gd202101server -e active=test --restart=always -d --network host --name gd202101_service 139.224.254.18:5000/gd202101_service:$version + #删除产生的None镜像 + docker rmi -f $(docker images | grep none | awk '{print $3}') + docker ps -a +fi +if [[ ${environment} == 'dev' ]]; then + docker stop gd202101_service || true + docker rm gd202101_service || true + docker rmi -f $(docker images | grep 139.224.254.18:5000/gd202101_service | awk '{print $3}') + docker pull 139.224.254.18:5000/gd202101_service:$version + docker run -v /home/data/gd202101server/log:/var/log/gd202101server -e active=dev --restart=always -d --network host --name gd202101_service telpo/gd202101_service:$version + #删除产生的None镜像 + docker rmi -f $(docker images | grep none | awk '{print $3}') + docker ps -a +fi diff --git a/setup_dev.sh b/setup_dev.sh new file mode 100644 index 0000000..44ce47b --- /dev/null +++ b/setup_dev.sh @@ -0,0 +1,27 @@ +#!/bin/bash +mvn clean +mvn package -Dmaven.test.skip=true +#image_version=$(date +%Y%m%d%H%M) +image_version=$version +docker stop gd202101_service || true +docker rm gd202101_service || true +# 删除镜像 +docker rmi -f $( + docker images | grep 139.224.254.18:5000/gd202101_service | awk '{print $3}' +) +docker build . -t telpo/gd202101_service:$image_version + +#TODO:推送镜像到私有仓库 +echo '=================开始推送镜像=======================' +docker tag telpo/gd202101_service:$image_version 139.224.254.18:5000/gd202101_service:$image_version +docker push 139.224.254.18:5000/gd202101_service:$image_version +echo '=================推送镜像完成=======================' + +#删除产生的None镜像 +docker rmi -f $(docker images | grep none | awk '{print $3}') +# 查看镜像列表 +docker images +# 启动容器 +docker run -v /home/data/gd202101server/log:/var/log/gd202101server -d -e active=dev --network host --restart=always --cap-add=SYS_PTRACE --name gd202101_service telpo/gd202101_service:$image_version +# 查看日志 +# docker logs gd202101_service diff --git a/setup_pro1.sh b/setup_pro1.sh new file mode 100644 index 0000000..2379d81 --- /dev/null +++ b/setup_pro1.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +mvn clean +mvn package -Dmaven.test.skip=true +image_version=$version +# 删除镜像 +docker rmi -f $( + docker images | grep registry.cn-shanghai.aliyuncs.com/telpo_platform/gd202101_service | awk '{print $3}' +) +# 构建telpo/mrp:$image_version镜像 +docker build . -t telpo/gd202101_service:$image_version +#TODO:推送镜像到阿里仓库 +echo '=================开始推送镜像=======================' +docker login --username=rzl_wangjx@1111649216405698 --password=telpo.123 registry.cn-shanghai.aliyuncs.com +docker tag telpo/gd202101_service:$image_version registry.cn-shanghai.aliyuncs.com/telpo_platform/gd202101_service:$image_version +docker push registry.cn-shanghai.aliyuncs.com/telpo_platform/gd202101_service:$image_version +echo '=================推送镜像完成=======================' +#删除产生的None镜像 +docker rmi -f $(docker images | grep none | awk '{print $3}') +# 查看镜像列表 +docker images diff --git a/setup_pro2.sh b/setup_pro2.sh new file mode 100644 index 0000000..2379d81 --- /dev/null +++ b/setup_pro2.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +mvn clean +mvn package -Dmaven.test.skip=true +image_version=$version +# 删除镜像 +docker rmi -f $( + docker images | grep registry.cn-shanghai.aliyuncs.com/telpo_platform/gd202101_service | awk '{print $3}' +) +# 构建telpo/mrp:$image_version镜像 +docker build . -t telpo/gd202101_service:$image_version +#TODO:推送镜像到阿里仓库 +echo '=================开始推送镜像=======================' +docker login --username=rzl_wangjx@1111649216405698 --password=telpo.123 registry.cn-shanghai.aliyuncs.com +docker tag telpo/gd202101_service:$image_version registry.cn-shanghai.aliyuncs.com/telpo_platform/gd202101_service:$image_version +docker push registry.cn-shanghai.aliyuncs.com/telpo_platform/gd202101_service:$image_version +echo '=================推送镜像完成=======================' +#删除产生的None镜像 +docker rmi -f $(docker images | grep none | awk '{print $3}') +# 查看镜像列表 +docker images diff --git a/setup_pro3.sh b/setup_pro3.sh new file mode 100644 index 0000000..2379d81 --- /dev/null +++ b/setup_pro3.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +mvn clean +mvn package -Dmaven.test.skip=true +image_version=$version +# 删除镜像 +docker rmi -f $( + docker images | grep registry.cn-shanghai.aliyuncs.com/telpo_platform/gd202101_service | awk '{print $3}' +) +# 构建telpo/mrp:$image_version镜像 +docker build . -t telpo/gd202101_service:$image_version +#TODO:推送镜像到阿里仓库 +echo '=================开始推送镜像=======================' +docker login --username=rzl_wangjx@1111649216405698 --password=telpo.123 registry.cn-shanghai.aliyuncs.com +docker tag telpo/gd202101_service:$image_version registry.cn-shanghai.aliyuncs.com/telpo_platform/gd202101_service:$image_version +docker push registry.cn-shanghai.aliyuncs.com/telpo_platform/gd202101_service:$image_version +echo '=================推送镜像完成=======================' +#删除产生的None镜像 +docker rmi -f $(docker images | grep none | awk '{print $3}') +# 查看镜像列表 +docker images diff --git a/setup_test.sh b/setup_test.sh new file mode 100644 index 0000000..6fc4147 --- /dev/null +++ b/setup_test.sh @@ -0,0 +1,27 @@ +#!/bin/bash +mvn clean +mvn package -Dmaven.test.skip=true +#image_version=$(date +%Y%m%d%H%M) +image_version=$version +docker stop gd202101_service || true +docker rm gd202101_service || true +# 删除镜像 +docker rmi -f $( + docker images | grep 139.224.254.18:5000/gd202101_service | awk '{print $3}' +) +docker build . -t telpo/gd202101_service:$image_version + +#TODO:推送镜像到私有仓库 +echo '=================开始推送镜像=======================' +docker tag telpo/gd202101_service:$image_version 139.224.254.18:5000/gd202101_service:$image_version +docker push 139.224.254.18:5000/gd202101_service:$image_version +echo '=================推送镜像完成=======================' + +#删除产生的None镜像 +docker rmi -f $(docker images | grep none | awk '{print $3}') +# 查看镜像列表 +docker images +# 启动容器 +docker run -v /home/data/gd202101server/log:/var/log/gd202101server -d -e active=test --network host --restart=always --name gd202101_service telpo/gd202101_service:$image_version +# 查看日志 +# docker logs gd202101_service diff --git a/src/main/java/com/ssjl/zhaobiao/guizhou/controller/IotController.java b/src/main/java/com/ssjl/zhaobiao/guizhou/controller/IotController.java index 47b4374..173df35 100644 --- a/src/main/java/com/ssjl/zhaobiao/guizhou/controller/IotController.java +++ b/src/main/java/com/ssjl/zhaobiao/guizhou/controller/IotController.java @@ -113,6 +113,7 @@ public class IotController { req.setContent(askLocation); byte[] res = httpUtil.send(imei, "", req); System.out.println(ByteUtil.bytesToHexString(res)); + // 调用IOTAPI激活设备 log.info(imei + "激活设备"); IotApiActiveDevice active = new IotApiActiveDevice(); diff --git a/src/main/java/com/ssjl/zhaobiao/guizhou/entity/GZResponse.java b/src/main/java/com/ssjl/zhaobiao/guizhou/entity/GZResponse.java index e135647..cd0fc8c 100644 --- a/src/main/java/com/ssjl/zhaobiao/guizhou/entity/GZResponse.java +++ b/src/main/java/com/ssjl/zhaobiao/guizhou/entity/GZResponse.java @@ -1,5 +1,10 @@ package com.ssjl.zhaobiao.guizhou.entity; +import com.google.common.base.Strings; +import com.ssjl.zhaobiao.guizhou.utils.GZUtil; + +import java.util.Arrays; + public class GZResponse { private byte tag; @@ -14,11 +19,23 @@ public class GZResponse { private byte check; + private String phone; + + + public GZResponse(){ tag = (byte)0x7E; flag = (byte)0xFF; } + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + public String getImei() { return imei; } @@ -42,4 +59,25 @@ public class GZResponse { public void setErrorCode(GZResponseStatus errorCode) { this.errorCode = errorCode; } + + public byte[] toBytes(){ + byte[] list = new byte[14]; + int i = 0; + list[i++] = tag; + list[i++] = flag; + byte[] bytes; + if(Strings.isNullOrEmpty(imei)){ + bytes = GZUtil.imeiToByte(phone); + }else{ + bytes = GZUtil.imeiToByte(imei); + } + System.arraycopy(bytes, 0, list, i, bytes.length); + i += bytes.length; + list[i++] = (byte)index; + list[i++] = (byte)errorCode.getCode(); + list[i++] = GZUtil.check(Arrays.copyOfRange(list, 1, 12)); + list[i++] = tag; + return list; + } + } diff --git a/src/main/java/com/ssjl/zhaobiao/guizhou/handle/GZResponseHandle.java b/src/main/java/com/ssjl/zhaobiao/guizhou/handle/GZResponseHandle.java index c03aef9..3b41500 100644 --- a/src/main/java/com/ssjl/zhaobiao/guizhou/handle/GZResponseHandle.java +++ b/src/main/java/com/ssjl/zhaobiao/guizhou/handle/GZResponseHandle.java @@ -1,21 +1,24 @@ package com.ssjl.zhaobiao.guizhou.handle; -import com.ssjl.zhaobiao.guizhou.entity.GZDeviceFlagType; -import com.ssjl.zhaobiao.guizhou.entity.GZRequestStatus; -import com.ssjl.zhaobiao.guizhou.entity.IMessageContent; +import com.ssjl.zhaobiao.guizhou.entity.*; import com.ssjl.zhaobiao.guizhou.service.IGZPlatformService; import com.ssjl.zhaobiao.guizhou.utils.ByteUtil; +import com.ssjl.zhaobiao.guizhou.utils.GZHttpUtil; import com.ssjl.zhaobiao.guizhou.utils.GZUtil; +import lombok.extern.slf4j.Slf4j; import org.checkerframework.checker.units.qual.C; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.io.IOException; +@Slf4j @Component public class GZResponseHandle { @Autowired GZServiceFactory serviceFactory; + @Autowired + GZHttpUtil gzHttpUtil; public Object process(byte[] res) throws IOException { if(res[1] == 0xFF){ @@ -52,10 +55,25 @@ public class GZResponseHandle { System.arraycopy(res, 14, msgBytes, 0, msgBytes.length); IMessageContent content = GZMessageContentFactory.build(msgType, msgBytes); IGZPlatformService service = serviceFactory.getService(msgType); + Object serviceRs = new byte[0]; if(service != null){ - return service.process(content, deviceFlag, flagType, msgIndex, status); + serviceRs = service.process(content, deviceFlag, flagType, msgIndex, status); + } + // 应答 + GZResponse gzRs = new GZResponse(); + gzRs.setIndex(msgIndex); + if(flagType == GZDeviceFlagType.PHONE){ + gzRs.setPhone(deviceFlag); + gzRs.setImei(""); + }else{ + gzRs.setImei(deviceFlag); + gzRs.setPhone(""); } - return new byte[0]; + gzRs.setErrorCode(GZResponseStatus.RECEIVE_SUCCESS); + log.info("应答报文:" + ByteUtil.bytesToHexString(gzRs.toBytes())); + byte[] responseRs = gzHttpUtil.send(gzRs.getImei(), gzRs.getPhone(), gzRs); + log.info("应答回复:" + ByteUtil.bytesToHexString(responseRs)); + return serviceRs; // byte[] result = content.process(deviceFlag, flagType, msgIndex, status); } diff --git a/src/main/java/com/ssjl/zhaobiao/guizhou/quartz/QuartzConfig.java b/src/main/java/com/ssjl/zhaobiao/guizhou/quartz/QuartzConfig.java index 0154912..98bd80e 100644 --- a/src/main/java/com/ssjl/zhaobiao/guizhou/quartz/QuartzConfig.java +++ b/src/main/java/com/ssjl/zhaobiao/guizhou/quartz/QuartzConfig.java @@ -35,7 +35,7 @@ public class QuartzConfig { @Bean public Trigger gzHeartTaskTrigger() { SimpleScheduleBuilder scheduleBuilder = SimpleScheduleBuilder.simpleSchedule() - .withIntervalInMinutes(30) + .withIntervalInMinutes(1) .repeatForever(); return TriggerBuilder.newTrigger() .forJob(gzHeartTask()) diff --git a/src/main/java/com/ssjl/zhaobiao/guizhou/utils/GZHttpUtil.java b/src/main/java/com/ssjl/zhaobiao/guizhou/utils/GZHttpUtil.java index a2a252c..d72b881 100644 --- a/src/main/java/com/ssjl/zhaobiao/guizhou/utils/GZHttpUtil.java +++ b/src/main/java/com/ssjl/zhaobiao/guizhou/utils/GZHttpUtil.java @@ -2,6 +2,7 @@ package com.ssjl.zhaobiao.guizhou.utils; import com.ssjl.zhaobiao.guizhou.entity.GZRequest; import com.ssjl.zhaobiao.guizhou.entity.GZRequestStatus; +import com.ssjl.zhaobiao.guizhou.entity.GZResponse; import com.ssjl.zhaobiao.guizhou.entity.IMessageContent; import okhttp3.Headers; import org.springframework.beans.factory.annotation.Autowired; @@ -37,4 +38,16 @@ public class GZHttpUtil { req.setStatus(GZRequestStatus.RESPONSE_ALL); return send(imei, phone, req); } + + public byte[] send(String imei, String phone, GZResponse req) throws IOException { + Headers headers = new Headers.Builder().add("meid-id", imei).add("imsi-id", phone).build(); + byte[] b = req.toBytes(); + try { + byte[] res = httpUtil.postBytes(url, b, headers); + return res; + } catch (IOException e) { + e.printStackTrace(); + throw e; + } + } } diff --git a/src/main/java/com/ssjl/zhaobiao/guizhou/utils/GZUtil.java b/src/main/java/com/ssjl/zhaobiao/guizhou/utils/GZUtil.java index 19c2796..86d6666 100644 --- a/src/main/java/com/ssjl/zhaobiao/guizhou/utils/GZUtil.java +++ b/src/main/java/com/ssjl/zhaobiao/guizhou/utils/GZUtil.java @@ -168,6 +168,20 @@ public class GZUtil { } return ByteUtil.hexToByteArray(hex); } + public static byte[] phoneToByte(String phone){ + String hex; + if(phone.length() <= 15){ + hex = phone + "F"; + }else{ + BigInteger num = new BigInteger(phone); + hex = num.toString(16); + hex += "E"; + } + while (hex .length() < 16){ + hex = "0" + hex; + } + return ByteUtil.hexToByteArray(hex); + } /** * 获得终端号码,可能是手机号,也可能是IMEI diff --git a/src/main/resources/application-pro1.properties b/src/main/resources/application-pro1.properties new file mode 100644 index 0000000..3da7080 --- /dev/null +++ b/src/main/resources/application-pro1.properties @@ -0,0 +1,57 @@ +server.port=8102 +jdbc.type=mysql +spring.datasource.url=jdbc:mysql://183.238.195.77:23305/gps_card?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Hongkong&allowMultiQueries=true +## spring.datasource.url=jdbc:mysql://127.0.0.1:3306/lovicoco_school?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Hongkong&allowMultiQueries=true +spring.datasource.username=root +spring.datasource.password=telpo#1234 +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +# mybatis +mybatis.type-aliases-package=com.ssjl.zhaobiao.guizhou.entity +mybatis.mapper-locations=classpath:mapper/*.xml +mybatis.configuration.map-underscore-to-camel-case=true +# JWT +jwt.header=Authorization +jwt.secret=mySecret +jwt.expiration=604800 +jwt.tokenHead="Bearer " +jwt.route.authentication.path=auth +jwt.route.authentication.refresh=refresh +jwt.route.authentication.register="auth/register" +jwt.access_token.expiration=6400 +jwt.refresh_token_expiration=600 + +logging.file.path=/home/data/zhaobiao/guizhou/logs + +spring.jackson.time-zone=GMT+8 +spring.jackson.date-format=yyyy-MM-dd HH:mm:ss + +spring.http.encoding.force=true +spring.http.encoding.charset=UTF-8 +spring.http.encoding.enabled=true +server.tomcat.uri-encoding=UTF-8 + +#Netty +netty.host=127.0.0.1 +netty.port=8888 + +4g.api.apiUrl = http://47.116.142.20/webapi +4g.api.key = 7368616e78697869616f616e746f6e67 +4g.api.token = 123Te1p0Te1p0321 +# \u8D35\u5DDE\u7535\u4FE1\u53C2\u6570 +guizhou.protocol=T01.4 +guizhou.factory=telpo +guizhou.device.model=TPS401 +guizhou.device.version=ACB_1001 +#guizhou.factory=zhizhong +#guizhou.device.model=RZL600 +#guizhou.device.version=RZL_2021 +#guizhou.factory=zhanneng +#guizhou.device.model=TPE390 +#guizhou.device.version=TPE_0056 +guizhou.http.url=http://202.105.147.30:24183 +guizhou.device.testList= [{ "imei": "862622050253671","phone": "18664272743" },{ "imei": "862622050253358","phone": "" },{ "imei": "800115470000678","phone": "13500259054" }] +guizhou.device.zhizhong=862622050654340,862622050317740 +guizhou.device.zhanneng=862622050925104,862622050927027 +guizhou.device.tianbo=862622050253671,862622050253358,800115470000678 +guizhou.http.zhizhong=http://139.196.198.68:8102/iot +guizhou.http.zhanneng=http://139.196.106.140:8102/iot diff --git a/src/main/resources/application-pro2.properties b/src/main/resources/application-pro2.properties new file mode 100644 index 0000000..99e0fea --- /dev/null +++ b/src/main/resources/application-pro2.properties @@ -0,0 +1,57 @@ +server.port=8102 +jdbc.type=mysql +spring.datasource.url=jdbc:mysql://183.238.195.77:23305/gps_card?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Hongkong&allowMultiQueries=true +## spring.datasource.url=jdbc:mysql://127.0.0.1:3306/lovicoco_school?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Hongkong&allowMultiQueries=true +spring.datasource.username=root +spring.datasource.password=telpo#1234 +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +# mybatis +mybatis.type-aliases-package=com.ssjl.zhaobiao.guizhou.entity +mybatis.mapper-locations=classpath:mapper/*.xml +mybatis.configuration.map-underscore-to-camel-case=true +# JWT +jwt.header=Authorization +jwt.secret=mySecret +jwt.expiration=604800 +jwt.tokenHead="Bearer " +jwt.route.authentication.path=auth +jwt.route.authentication.refresh=refresh +jwt.route.authentication.register="auth/register" +jwt.access_token.expiration=6400 +jwt.refresh_token_expiration=600 + +logging.file.path=/home/data/zhaobiao/guizhou/logs + +spring.jackson.time-zone=GMT+8 +spring.jackson.date-format=yyyy-MM-dd HH:mm:ss + +spring.http.encoding.force=true +spring.http.encoding.charset=UTF-8 +spring.http.encoding.enabled=true +server.tomcat.uri-encoding=UTF-8 + +#Netty +netty.host=127.0.0.1 +netty.port=8888 + +4g.api.apiUrl = http://47.116.142.140/webapi +4g.api.key = 7368616e78697869616f616e746f6e67 +4g.api.token = 123Te1p0Te1p0321 +# \u8D35\u5DDE\u7535\u4FE1\u53C2\u6570 +guizhou.protocol=T01.4 +#guizhou.factory=telpo +#guizhou.device.model=TPS401 +#guizhou.device.version=ACB_1001 +#guizhou.factory=zhizhong +#guizhou.device.model=RZL600 +#guizhou.device.version=RZL_2021 +guizhou.factory=zhanneng +guizhou.device.model=TPE390 +guizhou.device.version=TPE_0056 +guizhou.http.url=http://202.105.147.30:24183 +guizhou.device.testList= [{ "imei": "862622050253671","phone": "18664272743" },{ "imei": "862622050253358","phone": "" },{ "imei": "800115470000678","phone": "13500259054" }] +guizhou.device.zhizhong=862622050654340,862622050317740 +guizhou.device.zhanneng=862622050925104,862622050927027 +guizhou.device.tianbo=862622050253671,862622050253358,800115470000678 +guizhou.http.zhizhong=http://139.196.198.68:8102/iot +guizhou.http.zhanneng=http://139.196.106.140:8102/iot diff --git a/src/main/resources/application-pro3.properties b/src/main/resources/application-pro3.properties new file mode 100644 index 0000000..a3cb65b --- /dev/null +++ b/src/main/resources/application-pro3.properties @@ -0,0 +1,57 @@ +server.port=8102 +jdbc.type=mysql +spring.datasource.url=jdbc:mysql://183.238.195.77:23305/gps_card?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Hongkong&allowMultiQueries=true +## spring.datasource.url=jdbc:mysql://127.0.0.1:3306/lovicoco_school?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Hongkong&allowMultiQueries=true +spring.datasource.username=root +spring.datasource.password=telpo#1234 +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +# mybatis +mybatis.type-aliases-package=com.ssjl.zhaobiao.guizhou.entity +mybatis.mapper-locations=classpath:mapper/*.xml +mybatis.configuration.map-underscore-to-camel-case=true +# JWT +jwt.header=Authorization +jwt.secret=mySecret +jwt.expiration=604800 +jwt.tokenHead="Bearer " +jwt.route.authentication.path=auth +jwt.route.authentication.refresh=refresh +jwt.route.authentication.register="auth/register" +jwt.access_token.expiration=6400 +jwt.refresh_token_expiration=600 + +logging.file.path=/home/data/zhaobiao/guizhou/logs + +spring.jackson.time-zone=GMT+8 +spring.jackson.date-format=yyyy-MM-dd HH:mm:ss + +spring.http.encoding.force=true +spring.http.encoding.charset=UTF-8 +spring.http.encoding.enabled=true +server.tomcat.uri-encoding=UTF-8 + +#Netty +netty.host=127.0.0.1 +netty.port=8888 + +4g.api.apiUrl = http://47.116.142.68/webapi +4g.api.key = 7368616e78697869616f616e746f6e67 +4g.api.token = 123Te1p0Te1p0321 +# \u8D35\u5DDE\u7535\u4FE1\u53C2\u6570 +guizhou.protocol=T01.4 +#guizhou.factory=telpo +#guizhou.device.model=TPS401 +#guizhou.device.version=ACB_1001 +guizhou.factory=zhizhong +guizhou.device.model=RZL600 +guizhou.device.version=RZL_2021 +#guizhou.factory=zhanneng +#guizhou.device.model=TPE390 +#guizhou.device.version=TPE_0056 +guizhou.http.url=http://202.105.147.30:24183 +guizhou.device.testList= [{ "imei": "862622050253671","phone": "18664272743" },{ "imei": "862622050253358","phone": "" },{ "imei": "800115470000678","phone": "13500259054" }] +guizhou.device.zhizhong=862622050654340,862622050317740 +guizhou.device.zhanneng=862622050925104,862622050927027 +guizhou.device.tianbo=862622050253671,862622050253358,800115470000678 +guizhou.http.zhizhong=http://139.196.198.68:8102/iot +guizhou.http.zhanneng=http://139.196.106.140:8102/iot diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index ebc1526..d8f6548 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -50,7 +50,7 @@ guizhou.device.version=ACB_1001 #guizhou.device.version=TPE_0056 guizhou.http.url=http://202.105.147.30:24183 #\u5929\u6CE2 -guizhou.device.testList= [{ "imei": "862622050253671","phone": "18664272743" },{ "imei": "862622050253358","phone": "" },{ "imei": "800115470000678","phone": "13500259054" }] +guizhou.device.testList= [{ "imei": "862622050253671","phone": "18664272743" },{ "imei": "862622050253358","phone": "18038740596" },{ "imei": "800115470000678","phone": "13500259054" }] #\u667A\u4E2D #guizhou.device.testList= [{ "imei": "862622050654340","phone": "18985521203" },{ "imei": "862622050317740","phone": "18985521202" }] #\u5C55\u80FD