Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
08a4cb3b
Commit
08a4cb3b
authored
Nov 20, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-background-bug' into dev
parents
11da718f
6e5144da
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
358 additions
and
86 deletions
+358
-86
GlobalExceptionHandler.java
...iaoqi/security/common/handler/GlobalExceptionHandler.java
+30
-4
PlatformExceptionHandler.java
...oqi/security/common/handler/PlatformExceptionHandler.java
+21
-3
HttpRequestUtil.java
.../github/wxiaoqi/security/common/util/HttpRequestUtil.java
+0
-73
HttpUtils.java
...va/com/github/wxiaoqi/security/common/util/HttpUtils.java
+301
-0
OrderVehicleCrosstownBiz.java
...com/xxfc/platform/order/biz/OrderVehicleCrosstownBiz.java
+4
-4
EmailSendController.java
...fc/platform/universal/controller/EmailSendController.java
+2
-2
No files found.
ace-common/src/main/java/com/github/wxiaoqi/security/common/handler/GlobalExceptionHandler.java
View file @
08a4cb3b
...
...
@@ -6,7 +6,7 @@ import com.github.wxiaoqi.security.common.exception.auth.ClientTokenException;
import
com.github.wxiaoqi.security.common.exception.auth.UserInvalidException
;
import
com.github.wxiaoqi.security.common.exception.auth.UserTokenException
;
import
com.github.wxiaoqi.security.common.msg.BaseResponse
;
import
com.github.wxiaoqi.security.common.util.Http
RequestUtil
;
import
com.github.wxiaoqi.security.common.util.Http
Utils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.http.HttpHeaders
;
...
...
@@ -21,6 +21,8 @@ import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExcep
import
javax.servlet.http.HttpServletResponse
;
import
java.io.PrintWriter
;
import
java.io.StringWriter
;
import
java.util.HashMap
;
import
java.util.Map
;
import
static
org
.
springframework
.
http
.
HttpStatus
.
NOT_EXTENDED
;
...
...
@@ -69,7 +71,15 @@ public class GlobalExceptionHandler extends ResponseEntityExceptionHandler {
if
(
0
==
ex
.
getStatus
())
{
response
.
setStatus
(
500
);
}
HttpRequestUtil
.
httpGet
(
"http://10.5.52.3:8765/api/universal/mail/app/unauth/send?toUser=jiaoruizhen@126.com&subject=服务器异常&content="
+
ex
.
getStackTrace
().
toString
());
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"toUser"
,
"jiaoruizhen@126.com"
);
map
.
put
(
"subject"
,
"服务器异常"
);
map
.
put
(
"content"
,
ex
.
getMessage
());
try
{
HttpUtils
.
doPost
(
"http://10.5.52.3:8765"
,
"/api/universal/mail/app/unauth/send"
,
map
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
());
}
return
new
BaseResponse
(
ex
.
getStatus
(),
ex
.
getMessage
());
}
...
...
@@ -82,10 +92,26 @@ public class GlobalExceptionHandler extends ResponseEntityExceptionHandler {
StringWriter
stringWriter
=
new
StringWriter
();
cause
.
printStackTrace
(
new
PrintWriter
(
stringWriter
));
logger
.
error
(
cause
.
getMessage
(),
ex
);
HttpRequestUtil
.
httpGet
(
"http://10.5.52.3:8765/api/universal/mail/app/unauth/send?toUser=jiaoruizhen@126.com&subject=服务器异常&content="
+
stringWriter
.
toString
());
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"toUser"
,
"jiaoruizhen@126.com"
);
map
.
put
(
"subject"
,
"服务器异常"
);
map
.
put
(
"content"
,
stringWriter
.
toString
());
try
{
HttpUtils
.
doPost
(
"http://10.5.52.3:8765"
,
"/api/universal/mail/app/unauth/send"
,
map
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
());
}
return
new
BaseResponse
(
5000
,
"Server exception: "
+
ex
.
getMessage
());
}
HttpRequestUtil
.
httpGet
(
"http://10.5.52.3:8765/api/universal/mail/app/unauth/send?toUser=jiaoruizhen@126.com&subject=服务器异常&content="
+
ex
.
getStackTrace
().
toString
());
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"toUser"
,
"jiaoruizhen@126.com"
);
map
.
put
(
"subject"
,
"服务器异常"
);
map
.
put
(
"content"
,
ex
.
getMessage
());
try
{
HttpUtils
.
doPost
(
"http://10.5.52.3:8765"
,
"/api/universal/mail/app/unauth/send"
,
map
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
());
}
return
new
BaseResponse
(
CommonConstants
.
EX_OTHER_CODE
,
ex
.
getMessage
());
}
}
ace-common/src/main/java/com/github/wxiaoqi/security/common/handler/PlatformExceptionHandler.java
View file @
08a4cb3b
...
...
@@ -4,7 +4,7 @@ package com.github.wxiaoqi.security.common.handler;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.msg.BaseResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.Http
RequestUtil
;
import
com.github.wxiaoqi.security.common.util.Http
Utils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
...
...
@@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RestControllerAdvice;
import
java.io.PrintWriter
;
import
java.io.StringWriter
;
import
java.util.HashMap
;
import
java.util.Map
;
@RestControllerAdvice
(
"com.xxfc.platform"
)
@Slf4j
...
...
@@ -35,11 +37,27 @@ public class PlatformExceptionHandler {
StringWriter
stringWriter
=
new
StringWriter
();
cause
.
printStackTrace
(
new
PrintWriter
(
stringWriter
));
log
.
error
(
cause
.
getMessage
(),
e
);
HttpRequestUtil
.
httpGet
(
"http://10.5.52.3:8765/api/universal/mail/app/unauth/send?toUser=jiaoruizhen@126.com&subject=服务器异常&content="
+
stringWriter
.
toString
());
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"toUser"
,
"jiaoruizhen@126.com"
);
map
.
put
(
"subject"
,
"服务器异常"
);
map
.
put
(
"content"
,
stringWriter
.
toString
());
try
{
HttpUtils
.
doPost
(
"http://10.5.52.3:8765"
,
"/api/universal/mail/app/unauth/send"
,
map
);
}
catch
(
Exception
ex
)
{
log
.
error
(
ex
.
getMessage
());
}
return
assembleResult
(
ObjectRestResponse
.
createFailedResult
(
5000
,
"服务器开小差了,请稍后重试!"
),
"Server exception: "
+
e
.
getMessage
());
}
log
.
error
(
"Server exception: "
,
e
);
HttpRequestUtil
.
httpGet
(
"http://10.5.52.3:8765/api/universal/mail/app/unauth/send?toUser=jiaoruizhen@126.com&subject=服务器异常&content="
+
e
.
getStackTrace
().
toString
());
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"toUser"
,
"jiaoruizhen@126.com"
);
map
.
put
(
"subject"
,
"服务器异常"
);
map
.
put
(
"content"
,
e
.
getMessage
());
try
{
HttpUtils
.
doPost
(
"http://10.5.52.3:8765"
,
"/api/universal/mail/app/unauth/send"
,
map
);
}
catch
(
Exception
ex
)
{
log
.
error
(
ex
.
getMessage
());
}
return
assembleResult
(
ObjectRestResponse
.
createFailedResult
(
5000
,
"服务器开小差了,请稍后重试!"
),
"Server exception: "
+
e
.
getMessage
());
}
...
...
ace-common/src/main/java/com/github/wxiaoqi/security/common/util/HttpRequestUtil.java
deleted
100644 → 0
View file @
11da718f
package
com
.
github
.
wxiaoqi
.
security
.
common
.
util
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.http.HttpResponse
;
import
org.apache.http.client.methods.HttpGet
;
import
org.apache.http.client.methods.HttpPost
;
import
org.apache.http.impl.client.DefaultHttpClient
;
import
org.apache.http.util.EntityUtils
;
import
java.io.IOException
;
import
java.net.URLDecoder
;
@Slf4j
public
class
HttpRequestUtil
{
/**
* post请求
* @param url url地址
* @return
*/
public
static
String
httpPost
(
String
url
){
//post请求返回结果
DefaultHttpClient
httpClient
=
new
DefaultHttpClient
();
HttpPost
method
=
new
HttpPost
(
url
);
String
str
=
""
;
try
{
HttpResponse
result
=
httpClient
.
execute
(
method
);
url
=
URLDecoder
.
decode
(
url
,
"UTF-8"
);
/**请求发送成功,并得到响应**/
if
(
result
.
getStatusLine
().
getStatusCode
()
==
200
)
{
try
{
/**读取服务器返回过来的json字符串数据**/
str
=
EntityUtils
.
toString
(
result
.
getEntity
(),
"UTF-8"
);
}
catch
(
Exception
e
)
{
log
.
error
(
"post请求提交失败:"
+
url
,
e
);
}
}
}
catch
(
IOException
e
)
{
log
.
error
(
"post请求提交失败:"
+
url
,
e
);
}
return
str
;
}
/**
* 发送get请求
* @param url 路径
* @return
*/
public
static
String
httpGet
(
String
url
){
//get请求返回结果
String
strResult
=
null
;
try
{
DefaultHttpClient
client
=
new
DefaultHttpClient
();
//发送get请求
HttpGet
request
=
new
HttpGet
(
url
);
HttpResponse
response
=
client
.
execute
(
request
);
/**请求发送成功,并得到响应**/
if
(
response
.
getStatusLine
().
getStatusCode
()
==
org
.
apache
.
http
.
HttpStatus
.
SC_OK
)
{
/**读取服务器返回过来的json字符串数据**/
strResult
=
EntityUtils
.
toString
(
response
.
getEntity
(),
"UTF-8"
);
}
else
{
log
.
error
(
"get请求提交失败:"
+
url
);
}
}
catch
(
IOException
e
)
{
log
.
error
(
"get请求提交失败:"
+
url
,
e
);
}
return
strResult
;
}
}
ace-common/src/main/java/com/github/wxiaoqi/security/common/util/HttpUtils.java
0 → 100644
View file @
08a4cb3b
package
com
.
github
.
wxiaoqi
.
security
.
common
.
util
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.http.HttpResponse
;
import
org.apache.http.NameValuePair
;
import
org.apache.http.client.HttpClient
;
import
org.apache.http.client.entity.UrlEncodedFormEntity
;
import
org.apache.http.client.methods.HttpDelete
;
import
org.apache.http.client.methods.HttpGet
;
import
org.apache.http.client.methods.HttpPost
;
import
org.apache.http.client.methods.HttpPut
;
import
org.apache.http.conn.ClientConnectionManager
;
import
org.apache.http.conn.scheme.Scheme
;
import
org.apache.http.conn.scheme.SchemeRegistry
;
import
org.apache.http.conn.ssl.SSLSocketFactory
;
import
org.apache.http.entity.ByteArrayEntity
;
import
org.apache.http.entity.StringEntity
;
import
org.apache.http.impl.client.DefaultHttpClient
;
import
org.apache.http.message.BasicNameValuePair
;
import
javax.net.ssl.SSLContext
;
import
javax.net.ssl.TrustManager
;
import
javax.net.ssl.X509TrustManager
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLEncoder
;
import
java.security.KeyManagementException
;
import
java.security.NoSuchAlgorithmException
;
import
java.security.cert.X509Certificate
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
public
class
HttpUtils
{
//设置编码格式
String
ContentType
=
"application/x-www-form-urlencoded; charset=UTF-8"
;
/**
* get
*
* @param host
* @param path
* @param method
* @param headers
* @param querys
* @return
* @throws Exception
*/
public
static
HttpResponse
doGet
(
String
host
,
String
path
,
String
method
,
Map
<
String
,
String
>
headers
,
Map
<
String
,
String
>
querys
)
throws
Exception
{
HttpClient
httpClient
=
wrapClient
(
host
);
HttpGet
request
=
new
HttpGet
(
buildUrl
(
host
,
path
,
querys
));
for
(
Map
.
Entry
<
String
,
String
>
e
:
headers
.
entrySet
())
{
request
.
addHeader
(
e
.
getKey
(),
e
.
getValue
());
}
return
httpClient
.
execute
(
request
);
}
/**
* post form
*
* @param host
* @param path
* @param method
* @param headers
* @param querys
* @param bodys
* @return
* @throws Exception
*/
public
static
HttpResponse
doPost
(
String
host
,
String
path
,
String
method
,
Map
<
String
,
String
>
headers
,
Map
<
String
,
String
>
querys
,
Map
<
String
,
String
>
bodys
)
throws
Exception
{
HttpClient
httpClient
=
wrapClient
(
host
);
HttpPost
request
=
new
HttpPost
(
buildUrl
(
host
,
path
,
querys
));
for
(
Map
.
Entry
<
String
,
String
>
e
:
headers
.
entrySet
())
{
request
.
addHeader
(
e
.
getKey
(),
e
.
getValue
());
}
if
(
bodys
!=
null
)
{
List
<
NameValuePair
>
nameValuePairList
=
new
ArrayList
<
NameValuePair
>();
for
(
String
key
:
bodys
.
keySet
())
{
nameValuePairList
.
add
(
new
BasicNameValuePair
(
key
,
bodys
.
get
(
key
)));
}
UrlEncodedFormEntity
formEntity
=
new
UrlEncodedFormEntity
(
nameValuePairList
,
"utf-8"
);
formEntity
.
setContentType
(
"application/x-www-form-urlencoded; charset=UTF-8"
);
request
.
setEntity
(
formEntity
);
}
return
httpClient
.
execute
(
request
);
}
/**
* Post String
*
* @param host
* @param path
* @param querys
* @return
* @throws Exception
*/
public
static
HttpResponse
doPost
(
String
host
,
String
path
,
Map
<
String
,
String
>
querys
)
throws
Exception
{
HttpClient
httpClient
=
wrapClient
(
host
);
HttpPost
request
=
new
HttpPost
(
buildUrl
(
host
,
path
,
querys
));
return
httpClient
.
execute
(
request
);
}
/**
* Post stream
*
* @param host
* @param path
* @param method
* @param headers
* @param querys
* @param body
* @return
* @throws Exception
*/
public
static
HttpResponse
doPost
(
String
host
,
String
path
,
String
method
,
Map
<
String
,
String
>
headers
,
Map
<
String
,
String
>
querys
,
byte
[]
body
)
throws
Exception
{
HttpClient
httpClient
=
wrapClient
(
host
);
HttpPost
request
=
new
HttpPost
(
buildUrl
(
host
,
path
,
querys
));
for
(
Map
.
Entry
<
String
,
String
>
e
:
headers
.
entrySet
())
{
request
.
addHeader
(
e
.
getKey
(),
e
.
getValue
());
}
if
(
body
!=
null
)
{
request
.
setEntity
(
new
ByteArrayEntity
(
body
));
}
return
httpClient
.
execute
(
request
);
}
/**
* Put String
* @param host
* @param path
* @param method
* @param headers
* @param querys
* @param body
* @return
* @throws Exception
*/
public
static
HttpResponse
doPut
(
String
host
,
String
path
,
String
method
,
Map
<
String
,
String
>
headers
,
Map
<
String
,
String
>
querys
,
String
body
)
throws
Exception
{
HttpClient
httpClient
=
wrapClient
(
host
);
HttpPut
request
=
new
HttpPut
(
buildUrl
(
host
,
path
,
querys
));
for
(
Map
.
Entry
<
String
,
String
>
e
:
headers
.
entrySet
())
{
request
.
addHeader
(
e
.
getKey
(),
e
.
getValue
());
}
if
(
StringUtils
.
isNotBlank
(
body
))
{
request
.
setEntity
(
new
StringEntity
(
body
,
"utf-8"
));
}
return
httpClient
.
execute
(
request
);
}
/**
* Put stream
* @param host
* @param path
* @param method
* @param headers
* @param querys
* @param body
* @return
* @throws Exception
*/
public
static
HttpResponse
doPut
(
String
host
,
String
path
,
String
method
,
Map
<
String
,
String
>
headers
,
Map
<
String
,
String
>
querys
,
byte
[]
body
)
throws
Exception
{
HttpClient
httpClient
=
wrapClient
(
host
);
HttpPut
request
=
new
HttpPut
(
buildUrl
(
host
,
path
,
querys
));
for
(
Map
.
Entry
<
String
,
String
>
e
:
headers
.
entrySet
())
{
request
.
addHeader
(
e
.
getKey
(),
e
.
getValue
());
}
if
(
body
!=
null
)
{
request
.
setEntity
(
new
ByteArrayEntity
(
body
));
}
return
httpClient
.
execute
(
request
);
}
/**
* Delete
*
* @param host
* @param path
* @param method
* @param headers
* @param querys
* @return
* @throws Exception
*/
public
static
HttpResponse
doDelete
(
String
host
,
String
path
,
String
method
,
Map
<
String
,
String
>
headers
,
Map
<
String
,
String
>
querys
)
throws
Exception
{
HttpClient
httpClient
=
wrapClient
(
host
);
HttpDelete
request
=
new
HttpDelete
(
buildUrl
(
host
,
path
,
querys
));
for
(
Map
.
Entry
<
String
,
String
>
e
:
headers
.
entrySet
())
{
request
.
addHeader
(
e
.
getKey
(),
e
.
getValue
());
}
return
httpClient
.
execute
(
request
);
}
private
static
String
buildUrl
(
String
host
,
String
path
,
Map
<
String
,
String
>
querys
)
throws
UnsupportedEncodingException
{
StringBuilder
sbUrl
=
new
StringBuilder
();
sbUrl
.
append
(
host
);
if
(!
StringUtils
.
isBlank
(
path
))
{
sbUrl
.
append
(
path
);
}
if
(
null
!=
querys
)
{
StringBuilder
sbQuery
=
new
StringBuilder
();
for
(
Map
.
Entry
<
String
,
String
>
query
:
querys
.
entrySet
())
{
if
(
0
<
sbQuery
.
length
())
{
sbQuery
.
append
(
"&"
);
}
if
(
StringUtils
.
isBlank
(
query
.
getKey
())
&&
!
StringUtils
.
isBlank
(
query
.
getValue
()))
{
sbQuery
.
append
(
query
.
getValue
());
}
if
(!
StringUtils
.
isBlank
(
query
.
getKey
()))
{
sbQuery
.
append
(
query
.
getKey
());
if
(!
StringUtils
.
isBlank
(
query
.
getValue
()))
{
sbQuery
.
append
(
"="
);
sbQuery
.
append
(
URLEncoder
.
encode
(
query
.
getValue
(),
"utf-8"
));
}
}
}
if
(
0
<
sbQuery
.
length
())
{
sbUrl
.
append
(
"?"
).
append
(
sbQuery
);
}
}
return
sbUrl
.
toString
();
}
private
static
HttpClient
wrapClient
(
String
host
)
{
HttpClient
httpClient
=
new
DefaultHttpClient
();
if
(
host
.
startsWith
(
"https://"
))
{
sslClient
(
httpClient
);
}
return
httpClient
;
}
private
static
void
sslClient
(
HttpClient
httpClient
)
{
try
{
SSLContext
ctx
=
SSLContext
.
getInstance
(
"TLS"
);
X509TrustManager
tm
=
new
X509TrustManager
()
{
public
X509Certificate
[]
getAcceptedIssuers
()
{
return
null
;
}
public
void
checkClientTrusted
(
X509Certificate
[]
xcs
,
String
str
)
{
}
public
void
checkServerTrusted
(
X509Certificate
[]
xcs
,
String
str
)
{
}
};
ctx
.
init
(
null
,
new
TrustManager
[]
{
tm
},
null
);
SSLSocketFactory
ssf
=
new
SSLSocketFactory
(
ctx
);
ssf
.
setHostnameVerifier
(
SSLSocketFactory
.
ALLOW_ALL_HOSTNAME_VERIFIER
);
ClientConnectionManager
ccm
=
httpClient
.
getConnectionManager
();
SchemeRegistry
registry
=
ccm
.
getSchemeRegistry
();
registry
.
register
(
new
Scheme
(
"https"
,
ssf
,
443
));
}
catch
(
KeyManagementException
ex
)
{
throw
new
RuntimeException
(
ex
);
}
catch
(
NoSuchAlgorithmException
ex
)
{
throw
new
RuntimeException
(
ex
);
}
}
}
\ No newline at end of file
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderVehicleCrosstownBiz.java
View file @
08a4cb3b
...
...
@@ -251,7 +251,6 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
}
Vehicle
vehicle
=
null
;
RestResponse
<
Vehicle
>
vehicleRestResponse
=
vehicleFeign
.
findById
(
orderRentVehicleDetail
.
getVehicleId
());
log
.
info
(
"获取车辆信息返回消息:{}"
,
vehicleRestResponse
.
getMessage
());
if
(
vehicleRestResponse
.
getData
()
!=
null
)
{
vehicle
=
vehicleRestResponse
.
getData
();
}
else
{
...
...
@@ -289,13 +288,13 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
vehicleDepartureVo
.
setCheckMan
(
checkUserInfoDto
.
getUsername
());
vehicleDepartureVo
.
setCheckManTel
(
checkUserInfoDto
.
getTelephone
());
}
log
.
info
(
"小程序订单出车: "
+
vehicleDepartureVo
.
toString
());
try
{
RestResponse
restResponse
=
vehicleFeign
.
departureBySmall
(
vehicleDepartureVo
);
if
(
restResponse
.
getStatus
()
!=
200
)
{
return
ObjectRestResponse
.
createFailedResult
(
1001
,
restResponse
.
getMessage
());
}
log
.
error
(
"返回信息: "
+
restResponse
.
toString
());
log
.
info
(
"小程序订单出车成功: "
+
restResponse
.
getCode
()
+
restResponse
.
getMessage
());
}
catch
(
Exception
e
)
{
return
ObjectRestResponse
.
createFailedResult
(
1001
,
e
.
getMessage
());
}
...
...
@@ -309,12 +308,13 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
vehicleArrivalVo
.
setRecycleManTel
(
checkUserInfoDto
.
getTelephone
());
}
vehicleArrivalVo
.
setBookRecordId
(
orderRentVehicleDetail
.
getBookRecordId
());
log
.
info
(
"小程序订单还车: "
+
vehicleArrivalVo
.
toString
());
try
{
RestResponse
restResponse
=
vehicleFeign
.
arrivalBySmall
(
vehicleArrivalVo
);
if
(
restResponse
.
getStatus
()
!=
200
)
{
return
ObjectRestResponse
.
createFailedResult
(
1001
,
restResponse
.
getMessage
());
}
log
.
error
(
"返回信息: "
+
restResponse
.
toString
());
log
.
info
(
"小程序订单还车成功: "
+
restResponse
.
getCode
()
+
restResponse
.
getMessage
());
}
catch
(
Exception
e
)
{
return
ObjectRestResponse
.
createFailedResult
(
500
,
e
.
getMessage
());
}
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/controller/EmailSendController.java
View file @
08a4cb3b
...
...
@@ -2,7 +2,7 @@ package com.xxfc.platform.universal.controller;
import
com.xxfc.platform.universal.biz.MailServiceBiz
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.
Ge
tMapping
;
import
org.springframework.web.bind.annotation.
Pos
tMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -13,7 +13,7 @@ public class EmailSendController {
@Autowired
MailServiceBiz
mailServiceBiz
;
@
Ge
tMapping
(
value
=
"/app/unauth/send"
)
@
Pos
tMapping
(
value
=
"/app/unauth/send"
)
public
void
senEmail
(
String
toUser
,
String
subject
,
String
content
)
{
mailServiceBiz
.
run
(
toUser
,
subject
,
content
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment