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
46b4b41d
Commit
46b4b41d
authored
Aug 02, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/base-modify' into base-modify
parents
ab94bbdf
3fa359b8
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
160 additions
and
162 deletions
+160
-162
pom.xml
ace-common/pom.xml
+5
-0
CommonLogServiceImpl.java
...xiaoqi/security/common/log/Impl/CommonLogServiceImpl.java
+1
-1
pom.xml
pom.xml
+0
-4
OrderPayBiz.java
...ain/java/com/xxfc/platform/universal/biz/OrderPayBiz.java
+138
-122
TrafficViolationsService.java
.../platform/universal/service/TrafficViolationsService.java
+5
-3
AdminInfoFeign.java
.../java/com/xxfc/platform/vehicle/feign/AdminInfoFeign.java
+0
-25
AreaBiz.java
.../src/main/java/com/xxfc/platform/vehicle/biz/AreaBiz.java
+0
-1
BranchCompanyBiz.java
.../java/com/xxfc/platform/vehicle/biz/BranchCompanyBiz.java
+0
-1
VehicleBiz.java
...c/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
+11
-4
VehicleBookRecordBiz.java
...a/com/xxfc/platform/vehicle/biz/VehicleBookRecordBiz.java
+0
-1
No files found.
ace-common/pom.xml
View file @
46b4b41d
...
@@ -33,6 +33,11 @@
...
@@ -33,6 +33,11 @@
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-sleuth-zipkin
</artifactId>
<version>
2.1.0.RELEASE
</version>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-aop
</artifactId>
<artifactId>
spring-boot-starter-aop
</artifactId>
...
...
ace-common/src/main/java/com/github/wxiaoqi/security/common/log/Impl/CommonLogServiceImpl.java
View file @
46b4b41d
...
@@ -86,7 +86,7 @@ public class CommonLogServiceImpl implements CommonLogService {
...
@@ -86,7 +86,7 @@ public class CommonLogServiceImpl implements CommonLogService {
}
}
@Override
@Override
public
void
run
()
{
public
void
run
()
{
//
mongoTemplate.insert(xxLogEntity, xxLogEntity.getMongoKey());
mongoTemplate
.
insert
(
xxLogEntity
,
xxLogEntity
.
getMongoKey
());
}
}
}
}
...
...
pom.xml
View file @
46b4b41d
...
@@ -97,10 +97,6 @@
...
@@ -97,10 +97,6 @@
<artifactId>
fastjson
</artifactId>
<artifactId>
fastjson
</artifactId>
<version>
1.2.33
</version>
<version>
1.2.33
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-sleuth-zipkin
</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-alibaba-dependencies
</artifactId>
<artifactId>
spring-cloud-alibaba-dependencies
</artifactId>
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/biz/OrderPayBiz.java
View file @
46b4b41d
package
com
.
xxfc
.
platform
.
universal
.
biz
;
package
com
.
xxfc
.
platform
.
universal
.
biz
;
import
cn.hutool.core.text.UnicodeUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alipay.api.AlipayApiException
;
import
com.alipay.api.AlipayApiException
;
...
@@ -51,7 +52,7 @@ import static com.xxfc.platform.universal.constant.DictionaryKey.UNIVERSAL_PAY;
...
@@ -51,7 +52,7 @@ import static com.xxfc.platform.universal.constant.DictionaryKey.UNIVERSAL_PAY;
*/
*/
@Service
@Service
@Slf4j
@Slf4j
public
class
OrderPayBiz
extends
BaseBiz
<
OrderPayMapper
,
OrderPay
>
{
public
class
OrderPayBiz
extends
BaseBiz
<
OrderPayMapper
,
OrderPay
>
{
@Autowired
@Autowired
DictionaryBiz
dictionaryBiz
;
DictionaryBiz
dictionaryBiz
;
...
@@ -65,126 +66,127 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
...
@@ -65,126 +66,127 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
String
weixinHost
;
String
weixinHost
;
String
notifyUrl
=
weixinHost
+
"/service/payment/notify/alipay"
;
String
notifyUrl
=
weixinHost
+
"/service/payment/notify/alipay"
;
public
JSONObject
preparepay
(
OrderPayVo
orderPayVo
)
{
if
(
null
==
orderPayVo
)
{
public
JSONObject
preparepay
(
OrderPayVo
orderPayVo
)
{
if
(
null
==
orderPayVo
)
{
log
.
error
(
"-----参数为空-----------"
);
log
.
error
(
"-----参数为空-----------"
);
return
JsonResultUtil
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"参数为空"
);
return
JsonResultUtil
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"参数为空"
);
}
}
if
(
orderPayVo
.
getAmount
()==
null
||
orderPayVo
.
getAmount
()==
0
)
{
if
(
orderPayVo
.
getAmount
()
==
null
||
orderPayVo
.
getAmount
()
==
0
)
{
log
.
error
(
"-----金额不为为0-----------"
);
log
.
error
(
"-----金额不为为0-----------"
);
return
JsonResultUtil
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"金额不为为0"
);
return
JsonResultUtil
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"金额不为为0"
);
}
}
if
(
StringUtils
.
isBlank
(
orderPayVo
.
getOrderNo
()))
{
if
(
StringUtils
.
isBlank
(
orderPayVo
.
getOrderNo
()))
{
log
.
error
(
"-----订单不能为空-----------"
);
log
.
error
(
"-----订单不能为空-----------"
);
return
JsonResultUtil
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"订单不能为空"
);
return
JsonResultUtil
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"订单不能为空"
);
}
}
log
.
info
(
"订单支付参数:orderVo = {}"
,
orderPayVo
.
toString
());
log
.
info
(
"订单支付参数:orderVo = {}"
,
orderPayVo
.
toString
());
String
trade_no
=
OrderUtil
.
GetOrderNumber
(
""
);
String
trade_no
=
OrderUtil
.
GetOrderNumber
(
""
);
orderPayVo
.
setTradeNo
(
trade_no
);
orderPayVo
.
setTradeNo
(
trade_no
);
String
order_no
=
orderPayVo
.
getOrderNo
();
String
order_no
=
orderPayVo
.
getOrderNo
();
Integer
amount
=
orderPayVo
.
getAmount
();
Integer
amount
=
orderPayVo
.
getAmount
();
log
.
error
(
"---下单---order_no====="
+
order_no
+
"--支付订单号--trade_no===="
+
trade_no
+
"--金额---amount===="
+
amount
);
log
.
error
(
"---下单---order_no====="
+
order_no
+
"--支付订单号--trade_no===="
+
trade_no
+
"--金额---amount===="
+
amount
);
//报名费回调路径
//报名费回调路径
//临时处理
//临时处理
Map
<
String
,
Dictionary
>
dictionaryMap
=
dictionaryBiz
.
getAll4Map
();
Map
<
String
,
Dictionary
>
dictionaryMap
=
dictionaryBiz
.
getAll4Map
();
Integer
demotion
=
Integer
.
valueOf
(
dictionaryMap
.
get
(
UNIVERSAL_PAY
+
"_"
+
PAY_DEMOTION
).
getDetail
());
Integer
demotion
=
Integer
.
valueOf
(
dictionaryMap
.
get
(
UNIVERSAL_PAY
+
"_"
+
PAY_DEMOTION
).
getDetail
());
amount
=
amount
/
demotion
;
amount
=
amount
/
demotion
;
if
(
amount
<=
0
)
{
if
(
amount
<=
0
)
{
amount
=
1
;
amount
=
1
;
}
}
Integer
type
=
orderPayVo
.
getType
()==
null
?
1
:
orderPayVo
.
getType
();
Integer
type
=
orderPayVo
.
getType
()
==
null
?
1
:
orderPayVo
.
getType
();
String
jsParam
=
""
;
String
jsParam
=
""
;
String
notify_url
=
weixinHost
+
"/api/universal/pay/app/unauth/notify"
;
String
notify_url
=
weixinHost
+
"/api/universal/pay/app/unauth/notify"
;
log
.
info
(
"报名费回调路径notify_url:"
+
notify_url
);
log
.
info
(
"报名费回调路径notify_url:"
+
notify_url
);
Integer
payWay
=
orderPayVo
.
getPayWay
()==
null
?
1
:
orderPayVo
.
getPayWay
();
Integer
payWay
=
orderPayVo
.
getPayWay
()
==
null
?
1
:
orderPayVo
.
getPayWay
();
String
sellerAccount
=
null
;
String
sellerAccount
=
null
;
if
(
type
==
2
&&
payWay
==
1
){
if
(
type
==
2
&&
payWay
==
1
)
{
//微信网页支付
sellerAccount
=
SystemConfig
.
APP_PARTNER
;
sellerAccount
=
SystemConfig
.
APP_PARTNER
;
jsParam
=
WXPay
.
webPay
(
amount
+
""
,
orderPayVo
.
getBody
(),
notify_url
,
trade_no
,
orderPayVo
.
getBuyerIp
(),
orderPayVo
.
getBuyerAccount
());
jsParam
=
WXPay
.
webPay
(
amount
+
""
,
orderPayVo
.
getBody
(),
notify_url
,
trade_no
,
orderPayVo
.
getBuyerIp
(),
orderPayVo
.
getBuyerAccount
());
}
else
if
(
type
==
1
&&
payWay
==
1
){
}
else
if
(
type
==
1
&&
payWay
==
1
)
{
//微信APP支付
sellerAccount
=
SystemConfig
.
APP_PARTNER
;
sellerAccount
=
SystemConfig
.
APP_PARTNER
;
jsParam
=
WXPay
.
apppay
(
amount
+
""
,
orderPayVo
.
getBody
(),
notify_url
,
trade_no
,
orderPayVo
.
getBuyerIp
(),
0
);
jsParam
=
WXPay
.
apppay
(
amount
+
""
,
orderPayVo
.
getBody
(),
notify_url
,
trade_no
,
orderPayVo
.
getBuyerIp
(),
0
);
}
else
if
(
type
==
1
&&
payWay
==
2
){
}
else
if
(
type
==
1
&&
payWay
!=
1
&&
payWay
!=
3
)
{
//支付宝APP支付,或预授权支付
sellerAccount
=
SystemConfig
.
ALIPAY_PID
;
sellerAccount
=
SystemConfig
.
ALIPAY_PID
;
jsParam
=
generateAliPayment
(
orderPayVo
);
jsParam
=
generateAliPayment
(
orderPayVo
);
}
}
log
.
info
(
"报名费回调路径jsParam:"
+
jsParam
);
log
.
info
(
"报名费回调路径jsParam:"
+
jsParam
);
if
(!
StringUtils
.
isBlank
(
jsParam
))
if
(!
StringUtils
.
isBlank
(
jsParam
))
{
{
try
{
try
{
OrderPay
orderPay
=
new
OrderPay
();
OrderPay
orderPay
=
new
OrderPay
();
BeanUtils
.
copyProperties
(
orderPay
,
orderPayVo
);
BeanUtils
.
copyProperties
(
orderPay
,
orderPayVo
);
orderPay
.
setSellerAccount
(
sellerAccount
);
orderPay
.
setSellerAccount
(
sellerAccount
);
insertSelective
(
orderPay
);
insertSelective
(
orderPay
);
log
.
error
(
"---下单---order_no====="
+
order_no
+
"----成功"
);
log
.
error
(
"---下单---order_no====="
+
order_no
+
"----成功"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
log
.
error
(
"---下单---order_no====="
+
order_no
+
"----异常---msg==="
+
e
.
getMessage
());
log
.
error
(
"---下单---order_no====="
+
order_no
+
"----异常---msg==="
+
e
.
getMessage
());
return
JsonResultUtil
.
createFailedResult
(
ResultCode
.
EXCEPTION_CODE
,
"出现异常"
);
return
JsonResultUtil
.
createFailedResult
(
ResultCode
.
EXCEPTION_CODE
,
"出现异常"
);
}
}
if
(
payWay
==
1
)
{
if
(
payWay
==
1
)
{
JSONObject
temp
=
JSON
.
parseObject
(
jsParam
);
JSONObject
temp
=
JSON
.
parseObject
(
jsParam
);
return
JsonResultUtil
.
createSuccessResultWithObj
(
temp
);
return
JsonResultUtil
.
createSuccessResultWithObj
(
temp
);
}
else
{
}
else
{
return
JsonResultUtil
.
createSuccessResultWithObj
(
jsParam
);
return
JsonResultUtil
.
createSuccessResultWithObj
(
jsParam
);
}
}
}
else
{
}
else
{
return
JsonResultUtil
.
createDefaultFail
();
return
JsonResultUtil
.
createDefaultFail
();
}
}
}
}
//支付回调
//支付回调
public
void
notice
(
String
orderNo
,
String
serialNumber
)
{
public
void
notice
(
String
orderNo
,
String
serialNumber
)
{
log
.
error
(
"---支付回调---trade_no====="
+
orderNo
+
"----开始处理"
);
log
.
error
(
"---支付回调---trade_no====="
+
orderNo
+
"----开始处理"
);
Example
example
=
new
Example
(
OrderPay
.
class
);
Example
example
=
new
Example
(
OrderPay
.
class
);
example
.
createCriteria
().
andEqualTo
(
"tradeNo"
,
orderNo
).
andEqualTo
(
"isDel"
,
0
).
andEqualTo
(
"status"
,
0
);
example
.
createCriteria
().
andEqualTo
(
"tradeNo"
,
orderNo
).
andEqualTo
(
"isDel"
,
0
).
andEqualTo
(
"status"
,
0
);
List
<
OrderPay
>
list
=
mapper
.
selectByExample
(
example
);
List
<
OrderPay
>
list
=
mapper
.
selectByExample
(
example
);
if
(
list
.
size
()==
0
)
{
if
(
list
.
size
()
==
0
)
{
log
.
error
(
"---支付回调---trade_no====="
+
orderNo
+
"----订单不存在或已处理"
);
log
.
error
(
"---支付回调---trade_no====="
+
orderNo
+
"----订单不存在或已处理"
);
return
;
return
;
}
}
example
.
clear
();
example
.
clear
();
example
.
createCriteria
().
andEqualTo
(
"tradeNo"
,
orderNo
);
example
.
createCriteria
().
andEqualTo
(
"tradeNo"
,
orderNo
);
OrderPay
orderPay
=
new
OrderPay
();
OrderPay
orderPay
=
new
OrderPay
();
orderPay
.
setFinishTime
(
System
.
currentTimeMillis
());
orderPay
.
setFinishTime
(
System
.
currentTimeMillis
());
orderPay
.
setStatus
(
1
);
orderPay
.
setStatus
(
1
);
orderPay
.
setSerialNumber
(
serialNumber
);
orderPay
.
setSerialNumber
(
serialNumber
);
int
num
=
mapper
.
updateByExampleSelective
(
orderPay
,
example
);
int
num
=
mapper
.
updateByExampleSelective
(
orderPay
,
example
);
log
.
error
(
"---支付回调处理---num====="
+
num
+
"----orderNo======="
+
orderNo
);
log
.
error
(
"---支付回调处理---num====="
+
num
+
"----orderNo======="
+
orderNo
);
if
(
num
>
0
)
{
if
(
num
>
0
)
{
//支付成功,添加积分
//支付成功,添加积分
OrderPay
pay
=
list
.
get
(
0
);
OrderPay
pay
=
list
.
get
(
0
);
OrderPay
newValue
=
mapper
.
selectOne
(
orderPay
);
OrderPay
newValue
=
mapper
.
selectOne
(
orderPay
);
log
.
info
(
"支付回调信息:newValue = {}"
,
newValue
);
log
.
info
(
"支付回调信息:newValue = {}"
,
newValue
);
if
(
newValue
.
getStatus
()
==
1
)
{
if
(
newValue
.
getStatus
()
==
1
)
{
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"userId"
,
newValue
.
getUserId
());
jsonObject
.
put
(
"userId"
,
newValue
.
getUserId
());
jsonObject
.
put
(
"amount"
,
newValue
.
getAmount
());
jsonObject
.
put
(
"amount"
,
newValue
.
getAmount
());
jsonObject
.
put
(
"channelId"
,
newValue
.
getOrderNo
());
jsonObject
.
put
(
"channelId"
,
newValue
.
getOrderNo
());
if
(
newValue
.
getChannel
()
==
1
)
{
//租车
if
(
newValue
.
getChannel
()
==
1
)
{
//租车
jsonObject
.
put
(
"integralRuleCode"
,
"RENTRV"
);
jsonObject
.
put
(
"integralRuleCode"
,
"RENTRV"
);
}
else
if
(
newValue
.
getChannel
()
==
2
)
{
//旅游
}
else
if
(
newValue
.
getChannel
()
==
2
)
{
//旅游
jsonObject
.
put
(
"integralRuleCode"
,
"BUYROUT"
);
jsonObject
.
put
(
"integralRuleCode"
,
"BUYROUT"
);
}
else
if
(
newValue
.
getChannel
()
==
3
)
{
//会员
}
else
if
(
newValue
.
getChannel
()
==
3
)
{
//会员
jsonObject
.
put
(
"integralRuleCode"
,
"BUYMEMBER"
);
jsonObject
.
put
(
"integralRuleCode"
,
"BUYMEMBER"
);
}
}
log
.
info
(
"支付订单号:orderNo = {}, orderType = {}"
,
newValue
.
getOrderNo
(),
newValue
.
getChannel
());
log
.
info
(
"支付订单号:orderNo = {}, orderType = {}"
,
newValue
.
getOrderNo
(),
newValue
.
getChannel
());
log
.
info
(
"支付成功获取积分:发送消息 exchange = {}, routingKey = {}, json = {}"
,
RabbitConstant
.
INTEGRAL_TOPIC
,
RabbitConstant
.
INTEGRAL_ROUTING_KEY
,
jsonObject
.
toJSONString
());
log
.
info
(
"支付成功获取积分:发送消息 exchange = {}, routingKey = {}, json = {}"
,
RabbitConstant
.
INTEGRAL_TOPIC
,
RabbitConstant
.
INTEGRAL_ROUTING_KEY
,
jsonObject
.
toJSONString
());
mqServiceBiZ
.
sendMessage
(
RabbitConstant
.
INTEGRAL_TOPIC
,
RabbitConstant
.
INTEGRAL_ROUTING_KEY
,
jsonObject
.
toJSONString
());
mqServiceBiZ
.
sendMessage
(
RabbitConstant
.
INTEGRAL_TOPIC
,
RabbitConstant
.
INTEGRAL_ROUTING_KEY
,
jsonObject
.
toJSONString
());
}
}
if
(
StringUtils
.
isNotBlank
(
pay
.
getNotifyUrl
()))
{
if
(
StringUtils
.
isNotBlank
(
pay
.
getNotifyUrl
()))
{
String
url
=
pay
.
getNotifyUrl
();
String
url
=
pay
.
getNotifyUrl
();
Integer
type
=
pay
.
getType
()==
null
?
1
:
pay
.
getType
();
Integer
type
=
pay
.
getType
()
==
null
?
1
:
pay
.
getType
();
url
+=
"&tradeNo="
+
orderNo
+
"&type="
+
type
;
url
+=
"&tradeNo="
+
orderNo
+
"&type="
+
type
;
log
.
error
(
"---支付回调处理---orderNo======="
+
orderNo
+
"----notifyUrl===="
+
url
);
log
.
error
(
"---支付回调处理---orderNo======="
+
orderNo
+
"----notifyUrl===="
+
url
);
String
result
=
""
;
String
result
=
""
;
if
(
url
.
contains
(
"https"
)||
url
.
contains
(
"HTTPS"
))
{
if
(
url
.
contains
(
"https"
)
||
url
.
contains
(
"HTTPS"
))
{
result
=
HTTPSUtils
.
httpRequest
(
url
,
"GET"
,
null
);
result
=
HTTPSUtils
.
httpRequest
(
url
,
"GET"
,
null
);
}
else
{
}
else
{
result
=
HTTPUtils
.
doGet
(
url
);
result
=
HTTPUtils
.
doGet
(
url
);
}
}
log
.
error
(
"---支付回调处理---orderNo======="
+
orderNo
+
"---result==="
+
result
);
log
.
error
(
"---支付回调处理---orderNo======="
+
orderNo
+
"---result==="
+
result
);
}
}
}
}
...
@@ -192,13 +194,14 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
...
@@ -192,13 +194,14 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
/**
/**
* 支付宝回调接口
* 支付宝回调接口
*
* @return
* @return
*/
*/
public
String
alipayNotify
()
{
public
String
alipayNotify
()
{
//获取支付宝POST过来反馈信息
//获取支付宝POST过来反馈信息
Map
<
String
,
String
>
params
=
new
HashMap
<>();
Map
<
String
,
String
>
params
=
new
HashMap
<>();
Map
requestParams
=
request
.
getParameterMap
();
Map
requestParams
=
request
.
getParameterMap
();
for
(
Iterator
iter
=
requestParams
.
keySet
().
iterator
();
iter
.
hasNext
();)
{
for
(
Iterator
iter
=
requestParams
.
keySet
().
iterator
();
iter
.
hasNext
();
)
{
String
name
=
(
String
)
iter
.
next
();
String
name
=
(
String
)
iter
.
next
();
String
[]
values
=
(
String
[])
requestParams
.
get
(
name
);
String
[]
values
=
(
String
[])
requestParams
.
get
(
name
);
String
valueStr
=
""
;
String
valueStr
=
""
;
...
@@ -260,7 +263,7 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
...
@@ -260,7 +263,7 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
String
tradeNo
=
params
.
get
(
"out_order_no"
);
String
tradeNo
=
params
.
get
(
"out_order_no"
);
String
operationId
=
params
.
get
(
"operation_id"
);
String
operationId
=
params
.
get
(
"operation_id"
);
notice
(
tradeNo
,
operationId
);
notice
(
tradeNo
,
operationId
);
return
ObjectRestResponse
.
succ
().
getMessage
();
return
ObjectRestResponse
.
succ
().
getMessage
();
}
catch
(
AlipayApiException
e
)
{
}
catch
(
AlipayApiException
e
)
{
log
.
error
(
""
,
e
);
log
.
error
(
""
,
e
);
...
@@ -270,25 +273,26 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
...
@@ -270,25 +273,26 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
/**
/**
* 支付宝生成支付信息
* 支付宝生成支付信息
*
* @return
* @return
*/
*/
@SuppressWarnings
(
"rawtypes"
)
private
String
generateAliPayment
(
OrderPayVo
orderPayVo
)
{
private
String
generateAliPayment
(
OrderPayVo
orderPayVo
)
{
//实例化客户端
//实例化客户端
AlipayClient
alipayClient
=
new
DefaultAlipayClient
(
SystemConfig
.
ALIPAY_PAY_BASE_URL
+
"/gateway.do"
,
AlipayClient
alipayClient
=
new
DefaultAlipayClient
(
SystemConfig
.
ALIPAY_PAY_BASE_URL
+
"/gateway.do"
,
SystemConfig
.
ALIPAY_APPID
,
SystemConfig
.
ALIPAY_PRIVATE_KEY
,
AlipayConstants
.
FORMAT_JSON
,
SystemConfig
.
ALIPAY_APPID
,
SystemConfig
.
ALIPAY_PRIVATE_KEY
,
AlipayConstants
.
FORMAT_JSON
,
"utf-8"
,
SystemConfig
.
ALIPAY_PUBLIC_KEY
,
AlipayConstants
.
SIGN_TYPE_RSA2
);
AlipayConstants
.
CHARSET_UTF8
,
SystemConfig
.
ALIPAY_PUBLIC_KEY
,
AlipayConstants
.
SIGN_TYPE_RSA2
);
//实例化具体API对应的request类,类名称和接口名称对应,当前调用接口名称:alipay.trade.app.pay
//
orderPayVo
.
setNotifyUrl
(
notifyUrl
);
orderPayVo
.
setNotifyUrl
(
notifyUrl
);
try
{
try
{
if
(
orderPayVo
.
getPayWay
()
==
2
)
{
//支付宝APP支付
log
.
info
(
"=============支付宝APP支付================"
);
return
appOrderPay
(
alipayClient
,
orderPayVo
);
}
else
{
//预授权
log
.
info
(
"=============支付宝预授权支付================"
);
return
fundAuthOrderAppFreeze
(
alipayClient
,
orderPayVo
);
return
fundAuthOrderAppFreeze
(
alipayClient
,
orderPayVo
);
}
catch
(
Exception
e
){
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
//
return
null
;
return
null
;
}
}
...
@@ -297,32 +301,40 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
...
@@ -297,32 +301,40 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
BigDecimal
realAmount
=
new
BigDecimal
(
orderPayVo
.
getAmount
().
toString
()).
divide
(
new
BigDecimal
(
"100"
),
2
,
BigDecimal
.
ROUND_UP
);
BigDecimal
realAmount
=
new
BigDecimal
(
orderPayVo
.
getAmount
().
toString
()).
divide
(
new
BigDecimal
(
"100"
),
2
,
BigDecimal
.
ROUND_UP
);
AlipayTradeAppPayRequest
request
=
new
AlipayTradeAppPayRequest
();
AlipayTradeAppPayRequest
request
=
new
AlipayTradeAppPayRequest
();
//SDK已经封装掉了公共参数,这里只需要传入业务参数。以下方法为sdk的model入参方式(model和biz_content同时存在的情况下取biz_content)。
//SDK已经封装掉了公共参数,这里只需要传入业务参数。以下方法为sdk的model入参方式(model和biz_content同时存在的情况下取biz_content)。
request
.
setBizContent
(
"{"
+
"\"timeout_express\":\"30m\","
+
"\"total_amount\":\""
+
realAmount
.
toString
()
+
"\","
+
"\"subject\":\""
+
orderPayVo
.
getSubject
()
+
"\","
+
"\"body\":\""
+
orderPayVo
.
getBody
()
+
"\","
+
"\"out_trade_no\":\""
+
orderPayVo
.
getTradeNo
()
+
"\""
+
" }"
);
request
.
setNotifyUrl
(
orderPayVo
.
getNotifyUrl
());
try
{
try
{
//这里和普通的接口调用不同,使用的是sdkExecute
//这里和普通的接口调用不同,使用的是sdkExecute
// request.setBizContent("{" +
// "\"timeout_express\":\"30m\"," +
// "\"product_code\":\"QUICK_MSECURITY_PAY\"," +
// "\"total_amount\":\"" + realAmount.toString() + "\"," +
// "\"subject\":\"" + orderPayVo.getSubject() + "\"," +
// "\"body\":\"" + orderPayVo.getBody() + "\"," +
// "\"out_trade_no\":\"" + orderPayVo.getTradeNo() + "\"" +
// "}");
AlipayTradeAppPayModel
model
=
new
AlipayTradeAppPayModel
();
//model.setBody("我是测试数据");
model
.
setSubject
(
orderPayVo
.
getSubject
());
model
.
setOutTradeNo
(
orderPayVo
.
getTradeNo
());
model
.
setTimeoutExpress
(
"30m"
);
model
.
setTotalAmount
(
realAmount
.
toString
());
model
.
setProductCode
(
"QUICK_MSECURITY_PAY"
);
request
.
setBizModel
(
model
);
request
.
setNotifyUrl
(
orderPayVo
.
getNotifyUrl
());
log
.
info
(
"请求参数:param = {}"
,
request
.
getBizModel
().
toString
());
AlipayTradeAppPayResponse
response
=
alipayClient
.
sdkExecute
(
request
);
AlipayTradeAppPayResponse
response
=
alipayClient
.
sdkExecute
(
request
);
log
.
info
(
response
.
getBody
());
//就是orderString 可以直接给客户端请求,无需再做处理。
log
.
info
(
UnicodeUtil
.
toUnicode
(
response
.
getBody
()));
//就是orderString 可以直接给客户端请求,无需再做处理。
return
UnicodeUtil
.
toUnicode
(
response
.
getBody
());
return
response
.
getBody
();
}
catch
(
Exception
e
)
{
}
catch
(
AlipayApiException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
return
null
;
return
null
;
}
}
//预授权冻结
//预授权冻结
public
String
fundAuthOrderAppFreeze
(
AlipayClient
alipayClient
,
OrderPayVo
orderPayVo
)
throws
AlipayApiException
{
public
String
fundAuthOrderAppFreeze
(
AlipayClient
alipayClient
,
OrderPayVo
orderPayVo
)
throws
AlipayApiException
{
AlipayFundAuthOrderAppFreezeRequest
request
=
new
AlipayFundAuthOrderAppFreezeRequest
();
AlipayFundAuthOrderAppFreezeRequest
request
=
new
AlipayFundAuthOrderAppFreezeRequest
();
AlipayFundAuthOrderAppFreezeModel
model
=
new
AlipayFundAuthOrderAppFreezeModel
();
BigDecimal
realAmount
=
new
BigDecimal
(
orderPayVo
.
getAmount
().
toString
()).
divide
(
new
BigDecimal
(
"100"
),
2
,
BigDecimal
.
ROUND_UP
);
BigDecimal
realAmount
=
new
BigDecimal
(
orderPayVo
.
getAmount
().
toString
()).
divide
(
new
BigDecimal
(
"100"
),
2
,
BigDecimal
.
ROUND_UP
);
request
.
setBizContent
(
"{"
+
request
.
setBizContent
(
"{"
+
"\"auth_code\":\""
+
orderPayVo
.
getTradeNo
()
+
"\","
+
"\"auth_code\":\""
+
orderPayVo
.
getTradeNo
()
+
"\","
+
...
@@ -332,10 +344,10 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
...
@@ -332,10 +344,10 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
"\"order_title\":\""
+
orderPayVo
.
getSubject
()
+
"\","
+
"\"order_title\":\""
+
orderPayVo
.
getSubject
()
+
"\","
+
"\"product_code\":\"PRE_AUTH_ONLINE\","
+
"\"product_code\":\"PRE_AUTH_ONLINE\","
+
"\"pay_timeout\":\"1d\","
+
"\"pay_timeout\":\"1d\","
+
"\"amount\": \""
+
realAmount
.
toString
()
+
"\" }"
);
"\"amount\": \""
+
realAmount
.
toString
()
+
"\" }"
);
request
.
setNotifyUrl
(
orderPayVo
.
getNotifyUrl
());
//异步通知地址,必填,该接口只通过该参数进行异步通知
request
.
setNotifyUrl
(
orderPayVo
.
getNotifyUrl
());
//异步通知地址,必填,该接口只通过该参数进行异步通知
AlipayFundAuthOrderAppFreezeResponse
response
=
alipayClient
.
sdkExecute
(
request
);
//注意这里是sdkExecute,可以获取签名参数
AlipayFundAuthOrderAppFreezeResponse
response
=
alipayClient
.
sdkExecute
(
request
);
//注意这里是sdkExecute,可以获取签名参数
if
(
response
.
isSuccess
())
{
if
(
response
.
isSuccess
())
{
log
.
info
(
"调用成功"
);
log
.
info
(
"调用成功"
);
log
.
info
(
"response: {}"
+
response
.
getBody
());
//签名后的参数,直接入参到
log
.
info
(
"response: {}"
+
response
.
getBody
());
//签名后的参数,直接入参到
return
response
.
getBody
();
return
response
.
getBody
();
...
@@ -344,6 +356,7 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
...
@@ -344,6 +356,7 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
return
null
;
return
null
;
}
}
}
}
//解冻预授权
//解冻预授权
public
void
fundAuthOrderUnFreeze
(
AlipayClient
alipayClient
)
throws
AlipayApiException
{
public
void
fundAuthOrderUnFreeze
(
AlipayClient
alipayClient
)
throws
AlipayApiException
{
AlipayFundAuthOrderUnfreezeRequest
request
=
new
AlipayFundAuthOrderUnfreezeRequest
();
AlipayFundAuthOrderUnfreezeRequest
request
=
new
AlipayFundAuthOrderUnfreezeRequest
();
...
@@ -357,11 +370,12 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
...
@@ -357,11 +370,12 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
request
.
setBizModel
(
model
);
request
.
setBizModel
(
model
);
request
.
setNotifyUrl
(
notifyUrl
);
//异步通知地址,必填,该接口只通过该参数进行异步通知
request
.
setNotifyUrl
(
notifyUrl
);
//异步通知地址,必填,该接口只通过该参数进行异步通知
AlipayFundAuthOrderUnfreezeResponse
response
=
alipayClient
.
execute
(
request
);
AlipayFundAuthOrderUnfreezeResponse
response
=
alipayClient
.
execute
(
request
);
log
.
info
(
"response: {}"
+
response
.
getBody
());
log
.
info
(
"response: {}"
+
response
.
getBody
());
}
}
//取消预授权
//取消预授权
public
void
fundAuthCancel
()
throws
AlipayApiException
{
public
void
fundAuthCancel
()
throws
AlipayApiException
{
AlipayClient
alipayClient
=
new
DefaultAlipayClient
(
"https://openapi.alipay.com/gateway.do"
,
"app_id"
,
"your private_key"
,
"json"
,
"GBK"
,
"alipay_public_key"
,
"RSA2"
);
AlipayClient
alipayClient
=
new
DefaultAlipayClient
(
"https://openapi.alipay.com/gateway.do"
,
"app_id"
,
"your private_key"
,
"json"
,
"GBK"
,
"alipay_public_key"
,
"RSA2"
);
AlipayFundAuthOperationCancelRequest
request
=
new
AlipayFundAuthOperationCancelRequest
();
AlipayFundAuthOperationCancelRequest
request
=
new
AlipayFundAuthOperationCancelRequest
();
AlipayFundAuthOperationCancelModel
model
=
new
AlipayFundAuthOperationCancelModel
();
AlipayFundAuthOperationCancelModel
model
=
new
AlipayFundAuthOperationCancelModel
();
//model.setAuthNo("2017120110002001390206804295"); // 支付宝资金授权订单号,在授权冻结成功时返回参数中获得
//model.setAuthNo("2017120110002001390206804295"); // 支付宝资金授权订单号,在授权冻结成功时返回参数中获得
...
@@ -373,11 +387,12 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
...
@@ -373,11 +387,12 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
request
.
setNotifyUrl
(
""
);
//异步通知地址,必填,该接口只通过该参数进行异步通知
request
.
setNotifyUrl
(
""
);
//异步通知地址,必填,该接口只通过该参数进行异步通知
AlipayFundAuthOperationCancelResponse
response
=
alipayClient
.
execute
(
request
);
AlipayFundAuthOperationCancelResponse
response
=
alipayClient
.
execute
(
request
);
log
.
info
(
"response: {}"
+
response
.
getBody
());
log
.
info
(
"response: {}"
+
response
.
getBody
());
}
}
//预授权转支付
//预授权转支付
public
void
tradePay
()
throws
AlipayApiException
{
public
void
tradePay
()
throws
AlipayApiException
{
AlipayClient
alipayClient
=
new
DefaultAlipayClient
(
"https://openapi.alipay.com/gateway.do"
,
"app_id"
,
"your private_key"
,
"json"
,
"utf-8"
,
"alipay_public_key"
,
"RSA2"
);
AlipayClient
alipayClient
=
new
DefaultAlipayClient
(
"https://openapi.alipay.com/gateway.do"
,
"app_id"
,
"your private_key"
,
"json"
,
"utf-8"
,
"alipay_public_key"
,
"RSA2"
);
AlipayTradePayRequest
request
=
new
AlipayTradePayRequest
();
AlipayTradePayRequest
request
=
new
AlipayTradePayRequest
();
AlipayTradePayModel
model
=
new
AlipayTradePayModel
();
AlipayTradePayModel
model
=
new
AlipayTradePayModel
();
model
.
setOutTradeNo
(
"20180412100020088982"
);
// 预授权转支付商户订单号,为新的商户交易流水号;如果重试发起扣款,商户订单号不要变;
model
.
setOutTradeNo
(
"20180412100020088982"
);
// 预授权转支付商户订单号,为新的商户交易流水号;如果重试发起扣款,商户订单号不要变;
...
@@ -395,16 +410,17 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
...
@@ -395,16 +410,17 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
request
.
setNotifyUrl
(
""
);
//异步通知地址,必填,该接口只通过该参数进行异步通知
request
.
setNotifyUrl
(
""
);
//异步通知地址,必填,该接口只通过该参数进行异步通知
AlipayTradePayResponse
response
=
alipayClient
.
execute
(
request
);
AlipayTradePayResponse
response
=
alipayClient
.
execute
(
request
);
if
(
response
.
isSuccess
())
{
if
(
response
.
isSuccess
())
{
System
.
out
.
println
(
"调用成功"
);
System
.
out
.
println
(
"调用成功"
);
log
.
info
(
"response: {}"
+
response
.
getBody
());
log
.
info
(
"response: {}"
+
response
.
getBody
());
}
else
{
}
else
{
System
.
out
.
println
(
"调用失败"
);
System
.
out
.
println
(
"调用失败"
);
}
}
}
}
//退款
//退款
public
void
testTradeRefund
()
throws
Exception
{
public
void
testTradeRefund
()
throws
Exception
{
AlipayClient
alipayClient
=
new
DefaultAlipayClient
(
"https://openapi.alipay.com/gateway.do"
,
"app_id"
,
"your private_key"
,
"json"
,
"GBK"
,
"alipay_public_key"
,
"RSA2"
);
AlipayClient
alipayClient
=
new
DefaultAlipayClient
(
"https://openapi.alipay.com/gateway.do"
,
"app_id"
,
"your private_key"
,
"json"
,
"GBK"
,
"alipay_public_key"
,
"RSA2"
);
AlipayTradeRefundModel
model
=
new
AlipayTradeRefundModel
();
AlipayTradeRefundModel
model
=
new
AlipayTradeRefundModel
();
model
.
setOutTradeNo
(
"tradePay000002"
);
//与预授权转支付商户订单号相同,代表对该笔交易退款
model
.
setOutTradeNo
(
"tradePay000002"
);
//与预授权转支付商户订单号相同,代表对该笔交易退款
model
.
setRefundAmount
(
"0.01"
);
model
.
setRefundAmount
(
"0.01"
);
...
@@ -413,7 +429,7 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
...
@@ -413,7 +429,7 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
AlipayTradeRefundRequest
request
=
new
AlipayTradeRefundRequest
();
AlipayTradeRefundRequest
request
=
new
AlipayTradeRefundRequest
();
request
.
setBizModel
(
model
);
request
.
setBizModel
(
model
);
AlipayTradeRefundResponse
response
=
alipayClient
.
execute
(
request
);
AlipayTradeRefundResponse
response
=
alipayClient
.
execute
(
request
);
log
.
info
(
"response: {}"
+
response
.
getBody
());
log
.
info
(
"response: {}"
+
response
.
getBody
());
}
}
...
@@ -443,7 +459,7 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
...
@@ -443,7 +459,7 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
" }"
);
" }"
);
try
{
try
{
AlipayFundAuthOrderFreezeResponse
aresponse
=
alipayClient
.
execute
(
arequest
);
AlipayFundAuthOrderFreezeResponse
aresponse
=
alipayClient
.
execute
(
arequest
);
if
(
aresponse
.
isSuccess
())
{
if
(
aresponse
.
isSuccess
())
{
System
.
out
.
println
(
"调用成功"
);
System
.
out
.
println
(
"调用成功"
);
}
else
{
}
else
{
System
.
out
.
println
(
"调用失败"
);
System
.
out
.
println
(
"调用失败"
);
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/service/TrafficViolationsService.java
View file @
46b4b41d
...
@@ -16,13 +16,15 @@ import org.apache.http.HttpResponse;
...
@@ -16,13 +16,15 @@ import org.apache.http.HttpResponse;
import
org.apache.http.util.EntityUtils
;
import
org.apache.http.util.EntityUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.task.TaskExecutor
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.sql.SQLException
;
import
java.sql.SQLException
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.regex.Matcher
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
java.util.regex.Pattern
;
...
@@ -207,7 +209,7 @@ public class TrafficViolationsService {
...
@@ -207,7 +209,7 @@ public class TrafficViolationsService {
* @throws SQLException
* @throws SQLException
*/
*/
@Scheduled
(
cron
=
"0 0 0 0/7 * ?"
)
@Scheduled
(
cron
=
"0 0 0 0/7 * ?"
)
p
rivate
void
updateLicensePlateType
()
throws
SQLException
{
p
ublic
void
updateLicensePlateType
()
throws
SQLException
{
List
<
LicensePlateType
>
licensePlateTypes
=
licensePlateTypeBiz
.
selectListAll
();
List
<
LicensePlateType
>
licensePlateTypes
=
licensePlateTypeBiz
.
selectListAll
();
licensePlateTypeBiz
.
updateLicensePlateType
(
licensePlateTypes
);
licensePlateTypeBiz
.
updateLicensePlateType
(
licensePlateTypes
);
}
}
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/feign/AdminInfoFeign.java
deleted
100644 → 0
View file @
ab94bbdf
package
com
.
xxfc
.
platform
.
vehicle
.
feign
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.dto.UserDTO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
javax.servlet.http.HttpServletRequest
;
@Component
public
class
AdminInfoFeign
{
@Autowired
UserFeign
userFeign
;
public
UserDTO
getAdminUserInfo
()
{
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
if
(
request
.
getHeader
(
"Authorization"
)
!=
null
)
{
return
userFeign
.
userinfoByToken
(
request
.
getHeader
(
"Authorization"
)).
getData
();
}
return
null
;
}
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/AreaBiz.java
View file @
46b4b41d
...
@@ -7,7 +7,6 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
...
@@ -7,7 +7,6 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.xxfc.platform.vehicle.common.RestResponse
;
import
com.xxfc.platform.vehicle.common.RestResponse
;
import
com.xxfc.platform.vehicle.entity.Area
;
import
com.xxfc.platform.vehicle.entity.Area
;
import
com.xxfc.platform.vehicle.feign.AdminInfoFeign
;
import
com.xxfc.platform.vehicle.mapper.AreaMapper
;
import
com.xxfc.platform.vehicle.mapper.AreaMapper
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/BranchCompanyBiz.java
View file @
46b4b41d
...
@@ -15,7 +15,6 @@ import com.xxfc.platform.vehicle.constant.RedisKey;
...
@@ -15,7 +15,6 @@ import com.xxfc.platform.vehicle.constant.RedisKey;
import
com.xxfc.platform.vehicle.entity.BranchCompany
;
import
com.xxfc.platform.vehicle.entity.BranchCompany
;
import
com.xxfc.platform.vehicle.entity.BranchCompanyStockInfo
;
import
com.xxfc.platform.vehicle.entity.BranchCompanyStockInfo
;
import
com.xxfc.platform.vehicle.entity.SysRegion
;
import
com.xxfc.platform.vehicle.entity.SysRegion
;
import
com.xxfc.platform.vehicle.feign.AdminInfoFeign
;
import
com.xxfc.platform.vehicle.mapper.BranchCompanyMapper
;
import
com.xxfc.platform.vehicle.mapper.BranchCompanyMapper
;
import
com.xxfc.platform.vehicle.util.excel.ExcelImport
;
import
com.xxfc.platform.vehicle.util.excel.ExcelImport
;
import
com.xxfc.platform.vehicle.pojo.BranchCompanyVo
;
import
com.xxfc.platform.vehicle.pojo.BranchCompanyVo
;
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
View file @
46b4b41d
...
@@ -5,7 +5,9 @@ import cn.hutool.core.bean.copier.CopyOptions;
...
@@ -5,7 +5,9 @@ import cn.hutool.core.bean.copier.CopyOptions;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.dto.UserDTO
;
import
com.github.wxiaoqi.security.admin.feign.dto.UserDTO
;
import
com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
...
@@ -20,7 +22,6 @@ import com.xxfc.platform.vehicle.common.RestResponse;
...
@@ -20,7 +22,6 @@ import com.xxfc.platform.vehicle.common.RestResponse;
import
com.xxfc.platform.vehicle.constant.*
;
import
com.xxfc.platform.vehicle.constant.*
;
import
com.xxfc.platform.vehicle.constant.ResCode.ResCode
;
import
com.xxfc.platform.vehicle.constant.ResCode.ResCode
;
import
com.xxfc.platform.vehicle.entity.*
;
import
com.xxfc.platform.vehicle.entity.*
;
import
com.xxfc.platform.vehicle.feign.AdminInfoFeign
;
import
com.xxfc.platform.vehicle.mapper.*
;
import
com.xxfc.platform.vehicle.mapper.*
;
import
com.xxfc.platform.vehicle.pojo.*
;
import
com.xxfc.platform.vehicle.pojo.*
;
import
com.xxfc.platform.vehicle.pojo.dto.VehiclePlanDto
;
import
com.xxfc.platform.vehicle.pojo.dto.VehiclePlanDto
;
...
@@ -59,7 +60,7 @@ import static com.github.wxiaoqi.security.auth.common.constatns.CommonConstants.
...
@@ -59,7 +60,7 @@ import static com.github.wxiaoqi.security.auth.common.constatns.CommonConstants.
@Service
@Service
@Slf4j
@Slf4j
public
class
VehicleBiz
extends
BaseBiz
<
VehicleMapper
,
Vehicle
>
{
public
class
VehicleBiz
extends
BaseBiz
<
VehicleMapper
,
Vehicle
>
implements
UserRestInterface
{
public
static
final
DateTimeFormatter
DEFAULT_DATE_TIME_FORMATTER
=
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd"
);
public
static
final
DateTimeFormatter
DEFAULT_DATE_TIME_FORMATTER
=
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd"
);
public
static
final
DateTimeFormatter
DATE_TIME_FORMATTER
=
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd HH:mm:ss"
);
public
static
final
DateTimeFormatter
DATE_TIME_FORMATTER
=
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd HH:mm:ss"
);
...
@@ -84,7 +85,13 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
...
@@ -84,7 +85,13 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
@Autowired
@Autowired
private
VehicleBookHourInfoBiz
vehicleBookHourInfoBiz
;
private
VehicleBookHourInfoBiz
vehicleBookHourInfoBiz
;
@Autowired
@Autowired
AdminInfoFeign
adminInfoFeign
;
UserFeign
userFeign
;
@Override
public
UserFeign
getUserFeign
()
{
return
userFeign
;
}
@Value
(
"${vehicle.baseUploadPath}"
)
@Value
(
"${vehicle.baseUploadPath}"
)
private
String
baseUploadPath
;
private
String
baseUploadPath
;
@Value
(
"${vehicle.fristMileage}"
)
@Value
(
"${vehicle.fristMileage}"
)
...
@@ -1266,7 +1273,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
...
@@ -1266,7 +1273,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
Integer
limit
=
vehiclePlanDto
.
getLimit
()
==
null
?
10
:
vehiclePlanDto
.
getLimit
();
Integer
limit
=
vehiclePlanDto
.
getLimit
()
==
null
?
10
:
vehiclePlanDto
.
getLimit
();
vehiclePlanDto
.
setPage
(
page
);
vehiclePlanDto
.
setPage
(
page
);
vehiclePlanDto
.
setLimit
(
limit
);
vehiclePlanDto
.
setLimit
(
limit
);
UserDTO
userDTO
=
adminInfoFeign
.
getAdminUserInfo
();
UserDTO
userDTO
=
getAdminUserInfo
();
if
(
userDTO
==
null
)
{
if
(
userDTO
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
235
,
"token失效"
);
return
ObjectRestResponse
.
createFailedResult
(
235
,
"token失效"
);
}
}
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBookRecordBiz.java
View file @
46b4b41d
...
@@ -19,7 +19,6 @@ import com.xxfc.platform.vehicle.constant.ResCode.ResCode;
...
@@ -19,7 +19,6 @@ import com.xxfc.platform.vehicle.constant.ResCode.ResCode;
import
com.xxfc.platform.vehicle.constant.VehicleBookRecordStatus
;
import
com.xxfc.platform.vehicle.constant.VehicleBookRecordStatus
;
import
com.xxfc.platform.vehicle.entity.BookRecordAccItem
;
import
com.xxfc.platform.vehicle.entity.BookRecordAccItem
;
import
com.xxfc.platform.vehicle.entity.VehicleBookRecord
;
import
com.xxfc.platform.vehicle.entity.VehicleBookRecord
;
import
com.xxfc.platform.vehicle.feign.AdminInfoFeign
;
import
com.xxfc.platform.vehicle.mapper.BookRecordAccItemMapper
;
import
com.xxfc.platform.vehicle.mapper.BookRecordAccItemMapper
;
import
com.xxfc.platform.vehicle.mapper.VehicleBookRecordMapper
;
import
com.xxfc.platform.vehicle.mapper.VehicleBookRecordMapper
;
import
com.xxfc.platform.vehicle.pojo.*
;
import
com.xxfc.platform.vehicle.pojo.*
;
...
...
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