Showing
5 changed files
with
14 additions
and
12 deletions
| 1 | package com.erry.iclear.dateInterface.service; | 1 | package com.erry.iclear.dateInterface.service; |
| 2 | 2 | ||
| 3 | +import lombok.extern.slf4j.Slf4j; | ||
| 3 | import org.springframework.beans.factory.annotation.Value; | 4 | import org.springframework.beans.factory.annotation.Value; |
| 4 | import org.springframework.mail.javamail.JavaMailSenderImpl; | 5 | import org.springframework.mail.javamail.JavaMailSenderImpl; |
| 5 | import org.springframework.mail.javamail.MimeMessageHelper; | 6 | import org.springframework.mail.javamail.MimeMessageHelper; |
| ... | @@ -10,6 +11,7 @@ import java.util.*; | ... | @@ -10,6 +11,7 @@ import java.util.*; |
| 10 | /** | 11 | /** |
| 11 | * Created on 2017-9-22. | 12 | * Created on 2017-9-22. |
| 12 | */ | 13 | */ |
| 14 | +@Slf4j | ||
| 13 | @Service("emailSenderService") | 15 | @Service("emailSenderService") |
| 14 | public class EmailSenderService { | 16 | public class EmailSenderService { |
| 15 | 17 | ... | ... |
| ... | @@ -68,12 +68,12 @@ public class IClearApiTask { | ... | @@ -68,12 +68,12 @@ public class IClearApiTask { |
| 68 | try{ | 68 | try{ |
| 69 | log.info("monitorIclearNodesTask start>>>>>>>>>>>>"); | 69 | log.info("monitorIclearNodesTask start>>>>>>>>>>>>"); |
| 70 | boolean requestResult42 = apiService.connectIclearNode(this.iclearAddressUrl42); | 70 | boolean requestResult42 = apiService.connectIclearNode(this.iclearAddressUrl42); |
| 71 | - if(requestResult42){ | 71 | + if(!requestResult42){ |
| 72 | - emailSenderService.sendMail(null,"系统访问异常提示","42机器无法正常访问"); | 72 | + emailSenderService.sendMail(null,"系统访问异常提示","系统提示:42节点访问异常,请及时查看"); |
| 73 | } | 73 | } |
| 74 | boolean requestResult43 = apiService.connectIclearNode(this.iclearAddressUrl43); | 74 | boolean requestResult43 = apiService.connectIclearNode(this.iclearAddressUrl43); |
| 75 | - if(requestResult43){ | 75 | + if(!requestResult43){ |
| 76 | - emailSenderService.sendMail(null,"系统访问异常提示","43机器无法正常访问"); | 76 | + emailSenderService.sendMail(null,"系统访问异常提示","系统提示:43节点访问异常,请及时查看"); |
| 77 | } | 77 | } |
| 78 | log.info("monitorIclearNodesTask end>>>>>>>>>>>>"); | 78 | log.info("monitorIclearNodesTask end>>>>>>>>>>>>"); |
| 79 | }catch (Exception e){ | 79 | }catch (Exception e){ | ... | ... |
| ... | @@ -15,8 +15,8 @@ task.pushMawbTask=0 0/1 * * * ? | ... | @@ -15,8 +15,8 @@ task.pushMawbTask=0 0/1 * * * ? |
| 15 | task.pushErrorReturnDate=0 0/3 * * * ? | 15 | task.pushErrorReturnDate=0 0/3 * * * ? |
| 16 | #推送失败的申报数据 | 16 | #推送失败的申报数据 |
| 17 | task.pushErrorDeclareDate=0 0/3 * * * ? | 17 | task.pushErrorDeclareDate=0 0/3 * * * ? |
| 18 | -#推送失败的回执数据 | 18 | +#监听iclear节点是否正常定时任务间隔 |
| 19 | -task.monitorIclearNodes=0 0/1 * * * ? | 19 | +task.monitorIclearNodes=0 0/5 * * * ? |
| 20 | 20 | ||
| 21 | api.base-address=http://localhost:8080/Exp | 21 | api.base-address=http://localhost:8080/Exp |
| 22 | #获取token账号 | 22 | #获取token账号 |
| ... | @@ -38,8 +38,8 @@ api.address.customs-url=https://apiuat.iclrccd-fedex.com/export/outbound/customs | ... | @@ -38,8 +38,8 @@ api.address.customs-url=https://apiuat.iclrccd-fedex.com/export/outbound/customs |
| 38 | #推送完整报文地址 | 38 | #推送完整报文地址 |
| 39 | api.address.complete-msg-url=https://apiuat.iclrccd-fedex.com/export/outbound/mawb | 39 | api.address.complete-msg-url=https://apiuat.iclrccd-fedex.com/export/outbound/mawb |
| 40 | #iclear应用节点是否能够正常访问 | 40 | #iclear应用节点是否能够正常访问 |
| 41 | -iclear.address.url42=https://www.fedex.com/ | 41 | +iclear.address.url42=http://localhost:8080/Exp |
| 42 | -iclear.address.url43=https://www.baidu.com/ | 42 | +iclear.address.url43=http://localhost:8080/Exp |
| 43 | #代理地址(刷新token、传输海关回执地址、推送完整报文地址) | 43 | #代理地址(刷新token、传输海关回执地址、推送完整报文地址) |
| 44 | api.address.proxy-url=cn2-proxy.apac.fedex.com | 44 | api.address.proxy-url=cn2-proxy.apac.fedex.com |
| 45 | api.address.proxy-port=3128 | 45 | api.address.proxy-port=3128 |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -8,7 +8,7 @@ task.pushMawbTask=0 0/1 * * * ? | ... | @@ -8,7 +8,7 @@ task.pushMawbTask=0 0/1 * * * ? |
| 8 | task.pushErrorReturnDate=0 0/30 * * * ? | 8 | task.pushErrorReturnDate=0 0/30 * * * ? |
| 9 | #推送失败的申报数据 | 9 | #推送失败的申报数据 |
| 10 | task.pushErrorDeclareDate=0 0/30 * * * ? | 10 | task.pushErrorDeclareDate=0 0/30 * * * ? |
| 11 | -#推送失败的回执数据 | 11 | +#监听iclear节点是否正常定时任务间隔 |
| 12 | task.monitorIclearNodes=0 0/5 * * * ? | 12 | task.monitorIclearNodes=0 0/5 * * * ? |
| 13 | 13 | ||
| 14 | api.base-address=https://declaration.fedex.com.cn/Exp | 14 | api.base-address=https://declaration.fedex.com.cn/Exp | ... | ... |
| ... | @@ -8,7 +8,7 @@ task.pushMawbTask=0 0/1 * * * ? | ... | @@ -8,7 +8,7 @@ task.pushMawbTask=0 0/1 * * * ? |
| 8 | task.pushErrorReturnDate=0 0/3 * * * ? | 8 | task.pushErrorReturnDate=0 0/3 * * * ? |
| 9 | #推送失败的申报数据 | 9 | #推送失败的申报数据 |
| 10 | task.pushErrorDeclareDate=0 0/3 * * * ? | 10 | task.pushErrorDeclareDate=0 0/3 * * * ? |
| 11 | -#推送失败的回执数据 | 11 | +#监听iclear节点是否正常定时任务间隔 |
| 12 | task.monitorIclearNodes=0 0/5 * * * ? | 12 | task.monitorIclearNodes=0 0/5 * * * ? |
| 13 | 13 | ||
| 14 | api.base-address=https://declarationuat.fedex.com.cn/Exp | 14 | api.base-address=https://declarationuat.fedex.com.cn/Exp |
| ... | @@ -31,8 +31,8 @@ api.address.customs-url=https://apiuat.iclrccd-fedex.com/export/outbound/customs | ... | @@ -31,8 +31,8 @@ api.address.customs-url=https://apiuat.iclrccd-fedex.com/export/outbound/customs |
| 31 | #推送完整报文地址 | 31 | #推送完整报文地址 |
| 32 | api.address.complete-msg-url=https://apiuat.iclrccd-fedex.com/export/outbound/mawb | 32 | api.address.complete-msg-url=https://apiuat.iclrccd-fedex.com/export/outbound/mawb |
| 33 | #iclear应用节点是否能够正常访问 | 33 | #iclear应用节点是否能够正常访问 |
| 34 | -iclear.address.url42=https://pjec0003.cndczmd.apac.fedex.com:9002/Exp/ | 34 | +iclear.address.url42=http://ujec0003.cndczmd.apac.fedex.com:9001/Exp/#login |
| 35 | -iclear.address.url43=https://pjec0004.cndczmd.apac.fedex.com:9002/Exp/ | 35 | +iclear.address.url43=http://ujec0004.cndczmd.apac.fedex.com:9001/Exp/#login |
| 36 | #代理地址(刷新token、传输海关回执地址、推送完整报文地址) | 36 | #代理地址(刷新token、传输海关回执地址、推送完整报文地址) |
| 37 | api.address.proxy-url=cn2-proxy.apac.fedex.com | 37 | api.address.proxy-url=cn2-proxy.apac.fedex.com |
| 38 | api.address.proxy-port=3128 | 38 | api.address.proxy-port=3128 |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment