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
98792612
Commit
98792612
authored
Aug 06, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'base-modify' of
http://113.105.137.151:22280/youjj/cloud-platform
into base-modify
parents
06e548e0
3914b252
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
165 additions
and
78 deletions
+165
-78
AppUsersManageController.java
...wxiaoqi/security/admin/rest/AppUsersManageController.java
+0
-2
IntegralUserStatus.java
...com/xxfc/platform/activity/entity/IntegralUserStatus.java
+6
-0
IntegralRuleBiz.java
.../java/com/xxfc/platform/activity/biz/IntegralRuleBiz.java
+9
-14
IntegralUserStatusBiz.java
...com/xxfc/platform/activity/biz/IntegralUserStatusBiz.java
+6
-0
IntegralRuleMapper.xml
...y-server/src/main/resources/mapper/IntegralRuleMapper.xml
+1
-5
IntegralUserStatusMapper.xml
...er/src/main/resources/mapper/IntegralUserStatusMapper.xml
+1
-0
MsgController.java
...rc/main/java/com/xxfc/platform/im/rest/MsgController.java
+1
-1
DailyMembersOrderStatisticsBiz.java
...fc/platform/order/biz/DailyMembersOrderStatisticsBiz.java
+11
-3
DailyOrderStatisticsBiz.java
.../com/xxfc/platform/order/biz/DailyOrderStatisticsBiz.java
+1
-1
DailyTravelOrderStatisticsBiz.java
...xfc/platform/order/biz/DailyTravelOrderStatisticsBiz.java
+13
-4
DailyVehicleOrderStatisticsBiz.java
...fc/platform/order/biz/DailyVehicleOrderStatisticsBiz.java
+10
-4
OrderDepositRefundRecordBiz.java
.../xxfc/platform/order/biz/OrderDepositRefundRecordBiz.java
+8
-1
OrderRefundBiz.java
...main/java/com/xxfc/platform/order/biz/OrderRefundBiz.java
+27
-1
OrderVehicleCrosstownBiz.java
...com/xxfc/platform/order/biz/OrderVehicleCrosstownBiz.java
+10
-10
OrderMsgBiz.java
...n/java/com/xxfc/platform/order/biz/inner/OrderMsgBiz.java
+1
-0
BaseOrderStatisticsJobHandler.java
...tform/order/jobhandler/BaseOrderStatisticsJobHandler.java
+9
-7
BackStageOrderController.java
...om/xxfc/platform/order/rest/BackStageOrderController.java
+1
-1
DepositRefundRecordMapper.xml
...r/src/main/resources/mapper/DepositRefundRecordMapper.xml
+1
-0
CertificationController.java
...latform/universal/controller/CertificationController.java
+18
-8
TrafficViolationsService.java
.../platform/universal/service/TrafficViolationsService.java
+13
-0
VehicleBookRecordMapper.xml
...ver/src/main/resources/mapper/VehicleBookRecordMapper.xml
+16
-16
VehicleMapper.xml
...ehicle-server/src/main/resources/mapper/VehicleMapper.xml
+2
-0
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/AppUsersManageController.java
View file @
98792612
...
@@ -126,7 +126,5 @@ public class AppUsersManageController extends BaseController<AppUserManageBiz,Ap
...
@@ -126,7 +126,5 @@ public class AppUsersManageController extends BaseController<AppUserManageBiz,Ap
appUserLoginBiz
.
deleteAppUserById
(
id
);
appUserLoginBiz
.
deleteAppUserById
(
id
);
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
}
}
}
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/entity/IntegralUserStatus.java
View file @
98792612
...
@@ -21,4 +21,10 @@ public class IntegralUserStatus {
...
@@ -21,4 +21,10 @@ public class IntegralUserStatus {
private
Long
crtTime
;
private
Long
crtTime
;
private
Long
updTime
;
private
Long
updTime
;
@Transient
private
Long
startTime
;
@Transient
private
Long
endTime
;
}
}
\ No newline at end of file
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/IntegralRuleBiz.java
View file @
98792612
...
@@ -8,11 +8,10 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
...
@@ -8,11 +8,10 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import
com.github.wxiaoqi.security.common.util.Query
;
import
com.github.wxiaoqi.security.common.util.Query
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.activity.entity.IntegralRule
;
import
com.xxfc.platform.activity.entity.IntegralRule
;
import
com.xxfc.platform.activity.entity.IntegralUser
Record
;
import
com.xxfc.platform.activity.entity.IntegralUser
Status
;
import
com.xxfc.platform.activity.mapper.IntegralRuleMapper
;
import
com.xxfc.platform.activity.mapper.IntegralRuleMapper
;
import
com.xxfc.platform.activity.user.UserInfoBiz
;
import
com.xxfc.platform.activity.user.UserInfoBiz
;
import
com.xxfc.platform.activity.vo.IntegralRuleDto
;
import
com.xxfc.platform.activity.vo.IntegralRuleDto
;
import
com.xxfc.platform.activity.vo.IntegralUserRecordDto
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -27,7 +26,8 @@ public class IntegralRuleBiz extends BaseBiz<IntegralRuleMapper, IntegralRule> {
...
@@ -27,7 +26,8 @@ public class IntegralRuleBiz extends BaseBiz<IntegralRuleMapper, IntegralRule> {
UserInfoBiz
userInfoBiz
;
UserInfoBiz
userInfoBiz
;
@Autowired
@Autowired
IntegralUserRecordBiz
integralUserRecordBiz
;
IntegralUserRecordBiz
integralUserRecordBiz
;
@Autowired
IntegralUserStatusBiz
integralUserStatusBiz
;
/**
/**
* 添加、更新积分规则
* 添加、更新积分规则
* @param integralRule
* @param integralRule
...
@@ -97,22 +97,17 @@ public class IntegralRuleBiz extends BaseBiz<IntegralRuleMapper, IntegralRule> {
...
@@ -97,22 +97,17 @@ public class IntegralRuleBiz extends BaseBiz<IntegralRuleMapper, IntegralRule> {
Query
query
=
new
Query
(
integralRule
);
Query
query
=
new
Query
(
integralRule
);
PageDataVO
<
IntegralRule
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
mapper
.
selectAllByParam
(
integralRule
));
PageDataVO
<
IntegralRule
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
mapper
.
selectAllByParam
(
integralRule
));
//添加个人积分状态
//添加个人积分状态
pageDataVO
.
getData
().
forEach
((
a
)
->
getIntegralStatus
(
appUserDTO
,
a
));
return
ObjectRestResponse
.
succ
(
pageDataVO
);
return
ObjectRestResponse
.
succ
(
pageDataVO
);
}
}
public
boolean
getIntegralStatus
(
AppUserDTO
appUserDTO
,
IntegralRule
integralRule
)
{
public
void
getIntegralStatus
(
AppUserDTO
appUserDTO
,
IntegralRule
integralRule
)
{
IntegralUserRecordDto
integralUserRecordDto
=
new
IntegralUserRecordDto
();
IntegralUserStatus
integralUserStatus1
=
integralUserStatusBiz
.
selectByUserAndCode
(
integralRule
.
getCode
(),
appUserDTO
.
getUserid
());
integralUserRecordDto
.
setUserId
(
appUserDTO
.
getUserid
());
if
(
integralUserStatus1
!=
null
)
{
integralUserRecordDto
.
setIntegralRuleCode
(
integralRule
.
getCode
());
integralRule
.
setIntegralStatus
(
integralUserStatus1
.
getIntegralStatus
());
List
<
IntegralUserRecord
>
integralUserRecords
=
integralUserRecordBiz
.
getByUserAndTime
(
integralUserRecordDto
).
getData
();
if
(
integralUserRecords
==
null
||
integralUserRecords
.
size
()
<=
0
)
{
return
false
;
}
else
if
(
integralUserRecords
.
size
()
==
integralRule
.
getNumber
()){
//记录 == 规则数 代表已经完成
return
true
;
}
else
{
return
false
;
}
}
}
}
}
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/IntegralUserStatusBiz.java
View file @
98792612
...
@@ -10,6 +10,8 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -10,6 +10,8 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.TimeZone
;
@Service
@Service
@Transactional
@Transactional
public
class
IntegralUserStatusBiz
extends
BaseBiz
<
IntegralUserStatusMapper
,
IntegralUserStatus
>
{
public
class
IntegralUserStatusBiz
extends
BaseBiz
<
IntegralUserStatusMapper
,
IntegralUserStatus
>
{
...
@@ -28,9 +30,13 @@ public class IntegralUserStatusBiz extends BaseBiz<IntegralUserStatusMapper, Int
...
@@ -28,9 +30,13 @@ public class IntegralUserStatusBiz extends BaseBiz<IntegralUserStatusMapper, Int
public
IntegralUserStatus
selectByUserAndCode
(
String
code
,
Integer
userId
)
{
public
IntegralUserStatus
selectByUserAndCode
(
String
code
,
Integer
userId
)
{
if
(!
StringUtils
.
isAllBlank
(
code
,
userId
+
""
))
{
if
(!
StringUtils
.
isAllBlank
(
code
,
userId
+
""
))
{
long
current
=
System
.
currentTimeMillis
();
long
startTime
=
current
/
(
1000
*
3600
*
24
)
*
(
1000
*
3600
*
24
)
-
TimeZone
.
getDefault
().
getRawOffset
();
IntegralUserStatus
integralUserStatus
=
new
IntegralUserStatus
();
IntegralUserStatus
integralUserStatus
=
new
IntegralUserStatus
();
integralUserStatus
.
setIntegralRuleCode
(
code
);
integralUserStatus
.
setIntegralRuleCode
(
code
);
integralUserStatus
.
setUserId
(
userId
);
integralUserStatus
.
setUserId
(
userId
);
integralUserStatus
.
setStartTime
(
startTime
);
integralUserStatus
.
setEndTime
(
startTime
+
24
*
60
*
60
*
1000
-
1
);
return
mapper
.
selectByUserAndCode
(
integralUserStatus
);
return
mapper
.
selectByUserAndCode
(
integralUserStatus
);
}
}
return
null
;
return
null
;
...
...
xx-activity/xx-activity-server/src/main/resources/mapper/IntegralRuleMapper.xml
View file @
98792612
...
@@ -31,15 +31,11 @@
...
@@ -31,15 +31,11 @@
<select
id=
"selectAllByParam"
resultType=
"com.xxfc.platform.activity.entity.IntegralRule"
parameterType=
"com.xxfc.platform.activity.vo.IntegralRuleDto"
>
<select
id=
"selectAllByParam"
resultType=
"com.xxfc.platform.activity.entity.IntegralRule"
parameterType=
"com.xxfc.platform.activity.vo.IntegralRuleDto"
>
select i1.*, i2.integral_status from integral_rule i1
select i1.* from integral_rule i1
left join integral_user_status i2 on i1.code = i2.integral_rule_code
<where>
<where>
<if
test=
"id != null"
>
<if
test=
"id != null"
>
and i1.id = #{id}
and i1.id = #{id}
</if>
</if>
<if
test=
"userId != null"
>
and i2.user_id = #{userId}
</if>
<if
test=
"code != null"
>
<if
test=
"code != null"
>
and i1.code = #{code}
and i1.code = #{code}
</if>
</if>
...
...
xx-activity/xx-activity-server/src/main/resources/mapper/IntegralUserStatusMapper.xml
View file @
98792612
...
@@ -11,5 +11,6 @@
...
@@ -11,5 +11,6 @@
<select
id=
"selectByUserAndCode"
resultType=
"com.xxfc.platform.activity.entity.IntegralUserStatus"
parameterType=
"com.xxfc.platform.activity.entity.IntegralUserStatus"
>
<select
id=
"selectByUserAndCode"
resultType=
"com.xxfc.platform.activity.entity.IntegralUserStatus"
parameterType=
"com.xxfc.platform.activity.entity.IntegralUserStatus"
>
select * from integral_user_status
select * from integral_user_status
where integral_rule_code = #{integralRuleCode} and user_id = #{userId}
where integral_rule_code = #{integralRuleCode} and user_id = #{userId}
and crt_time between #{startTime} and #{endTime} and integral_status =1
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
xx-im/xx-im-server/src/main/java/com/xxfc/platform/im/rest/MsgController.java
View file @
98792612
...
@@ -20,7 +20,7 @@ public class MsgController {
...
@@ -20,7 +20,7 @@ public class MsgController {
return
msgBiz
.
getMsgList
(
page
,
limit
,
type
);
return
msgBiz
.
getMsgList
(
page
,
limit
,
type
);
}
}
@PostMapping
(
value
=
"/hotMsg/list"
)
@PostMapping
(
value
=
"/
app/unauth/
hotMsg/list"
)
public
ObjectRestResponse
getHotMsgList
(
Integer
page
,
Integer
limit
)
{
public
ObjectRestResponse
getHotMsgList
(
Integer
page
,
Integer
limit
)
{
return
msgBiz
.
getHotMsgList
(
page
,
limit
);
return
msgBiz
.
getHotMsgList
(
page
,
limit
);
}
}
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/DailyMembersOrderStatisticsBiz.java
View file @
98792612
...
@@ -9,24 +9,26 @@ import org.apache.commons.beanutils.BeanUtils;
...
@@ -9,24 +9,26 @@ import org.apache.commons.beanutils.BeanUtils;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
* 每日购买会员订单统计
* 每日购买会员订单统计
*
* @author Administrator
* @author Administrator
*/
*/
@Service
@Service
public
class
DailyMembersOrderStatisticsBiz
extends
BaseBiz
<
DailyMembersOrderStatisticsMapper
,
DailyMembersOrderStatistics
>
{
public
class
DailyMembersOrderStatisticsBiz
extends
BaseBiz
<
DailyMembersOrderStatisticsMapper
,
DailyMembersOrderStatistics
>
{
public
boolean
memberOrderStatistics
()
{
public
boolean
memberOrderStatistics
()
{
try
{
try
{
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
travelGmv
=
mapper
.
getTravelGmv
();
Map
<
String
,
Object
>
travelGmv
=
mapper
.
getTravelGmv
();
resultMap
.
putAll
(
travelGmv
);
resultMap
.
putAll
(
travelGmv
);
DailyMembersOrderStatistics
MembersStatistics
=
new
DailyMembersOrderStatistics
();
DailyMembersOrderStatistics
MembersStatistics
=
new
DailyMembersOrderStatistics
();
BeanUtils
.
copyProperties
(
MembersStatistics
,
resultMap
);
BeanUtils
.
copyProperties
(
MembersStatistics
,
resultMap
);
insertSelective
(
MembersStatistics
);
insertSelective
(
MembersStatistics
);
return
true
;
return
true
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -34,4 +36,10 @@ public class DailyMembersOrderStatisticsBiz extends BaseBiz<DailyMembersOrderSta
...
@@ -34,4 +36,10 @@ public class DailyMembersOrderStatisticsBiz extends BaseBiz<DailyMembersOrderSta
return
false
;
return
false
;
}
}
}
}
@Override
public
int
insertSelectiveRe
(
DailyMembersOrderStatistics
entity
)
{
entity
.
setCrtTime
(
new
Date
());
return
mapper
.
insertSelective
(
entity
);
}
}
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/DailyOrderStatisticsBiz.java
View file @
98792612
...
@@ -25,7 +25,7 @@ public class DailyOrderStatisticsBiz extends BaseBiz<DailyOrderStatisticsMapper,
...
@@ -25,7 +25,7 @@ public class DailyOrderStatisticsBiz extends BaseBiz<DailyOrderStatisticsMapper,
@Autowired
@Autowired
private
DailyMembersOrderStatisticsBiz
membersStatisticsBiz
;
private
DailyMembersOrderStatisticsBiz
membersStatisticsBiz
;
// @Scheduled(cron = "0 0/1 *
* * ?")
@Scheduled
(
cron
=
"0 0 2
* * ?"
)
public
boolean
statisticalOrder
(){
public
boolean
statisticalOrder
(){
boolean
vehicleFlag
=
vehicleStatisticsBiz
.
StatisticsOfCarRentalOrders
();
boolean
vehicleFlag
=
vehicleStatisticsBiz
.
StatisticsOfCarRentalOrders
();
boolean
travelFlag
=
travelStatisticsBiz
.
StatisticsOfTravelOrders
();
boolean
travelFlag
=
travelStatisticsBiz
.
StatisticsOfTravelOrders
();
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/DailyTravelOrderStatisticsBiz.java
View file @
98792612
package
com
.
xxfc
.
platform
.
order
.
biz
;
package
com
.
xxfc
.
platform
.
order
.
biz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.util.EntityUtils
;
import
com.xxfc.platform.order.entity.DailyTravelOrderStatistics
;
import
com.xxfc.platform.order.entity.DailyTravelOrderStatistics
;
import
com.xxfc.platform.order.mapper.DailyTravelOrderStatisticsMapper
;
import
com.xxfc.platform.order.mapper.DailyTravelOrderStatisticsMapper
;
import
org.apache.commons.beanutils.BeanUtils
;
import
org.apache.commons.beanutils.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
* 每日旅游订单统计
* 每日旅游订单统计
*
* @author Administrator
* @author Administrator
*/
*/
@Service
@Service
public
class
DailyTravelOrderStatisticsBiz
extends
BaseBiz
<
DailyTravelOrderStatisticsMapper
,
DailyTravelOrderStatistics
>
{
public
class
DailyTravelOrderStatisticsBiz
extends
BaseBiz
<
DailyTravelOrderStatisticsMapper
,
DailyTravelOrderStatistics
>
{
public
boolean
StatisticsOfTravelOrders
()
{
public
boolean
StatisticsOfTravelOrders
()
{
try
{
try
{
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
travelGmv
=
mapper
.
getTravelGmv
();
Map
<
String
,
Object
>
travelGmv
=
mapper
.
getTravelGmv
();
BigDecimal
travelPenalSum
=
mapper
.
getTravelPenalSum
();
BigDecimal
travelPenalSum
=
mapper
.
getTravelPenalSum
();
resultMap
.
putAll
(
travelGmv
);
resultMap
.
putAll
(
travelGmv
);
resultMap
.
put
(
"penalSum"
,
travelPenalSum
);
resultMap
.
put
(
"penalSum"
,
travelPenalSum
);
DailyTravelOrderStatistics
TravelStatistics
=
new
DailyTravelOrderStatistics
();
DailyTravelOrderStatistics
TravelStatistics
=
new
DailyTravelOrderStatistics
();
BeanUtils
.
copyProperties
(
TravelStatistics
,
resultMap
);
BeanUtils
.
copyProperties
(
TravelStatistics
,
resultMap
);
insertSelective
(
TravelStatistics
);
insertSelective
(
TravelStatistics
);
return
true
;
return
true
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -34,4 +37,10 @@ public class DailyTravelOrderStatisticsBiz extends BaseBiz<DailyTravelOrderStati
...
@@ -34,4 +37,10 @@ public class DailyTravelOrderStatisticsBiz extends BaseBiz<DailyTravelOrderStati
return
false
;
return
false
;
}
}
}
}
@Override
public
int
insertSelectiveRe
(
DailyTravelOrderStatistics
entity
)
{
entity
.
setCrtTime
(
new
Date
());
return
mapper
.
insertSelective
(
entity
);
}
}
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/DailyVehicleOrderStatisticsBiz.java
View file @
98792612
...
@@ -2,6 +2,7 @@ package com.xxfc.platform.order.biz;
...
@@ -2,6 +2,7 @@ package com.xxfc.platform.order.biz;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.xxfc.platform.order.entity.DailyMembersOrderStatistics
;
import
com.xxfc.platform.order.entity.DailyVehicleOrderStatistics
;
import
com.xxfc.platform.order.entity.DailyVehicleOrderStatistics
;
import
com.xxfc.platform.order.mapper.DailyVehicleOrderStatisticsMapper
;
import
com.xxfc.platform.order.mapper.DailyVehicleOrderStatisticsMapper
;
import
com.xxfc.platform.order.pojo.DedDetailDTO
;
import
com.xxfc.platform.order.pojo.DedDetailDTO
;
...
@@ -12,10 +13,7 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -12,10 +13,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/** 每日租车订单统计
/** 每日租车订单统计
* @author Administrator
* @author Administrator
...
@@ -102,4 +100,12 @@ public class DailyVehicleOrderStatisticsBiz extends BaseBiz<DailyVehicleOrderSta
...
@@ -102,4 +100,12 @@ public class DailyVehicleOrderStatisticsBiz extends BaseBiz<DailyVehicleOrderSta
return
null
;
return
null
;
}
}
@Override
public
int
insertSelectiveRe
(
DailyVehicleOrderStatistics
entity
)
{
Date
date
=
new
Date
();
entity
.
setCrtTime
(
new
Date
());
return
mapper
.
insertSelective
(
entity
);
}
}
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderDepositRefundRecordBiz.java
View file @
98792612
...
@@ -80,6 +80,13 @@ public class OrderDepositRefundRecordBiz extends BaseBiz<DepositRefundRecordMapp
...
@@ -80,6 +80,13 @@ public class OrderDepositRefundRecordBiz extends BaseBiz<DepositRefundRecordMapp
return
mapper
.
findByCrossIdAndStatus
(
map
);
return
mapper
.
findByCrossIdAndStatus
(
map
);
}
}
public
void
update
(
DepositRefundRecord
depositRefundRecord
)
{
if
(
depositRefundRecord
.
getId
()
!=
null
)
{
updateSelectiveByIdRe
(
depositRefundRecord
);
}
}
public
List
<
DepositRefundRecord
>
selectByCrossId
(
Integer
cross
)
{
public
List
<
DepositRefundRecord
>
selectByCrossId
(
Integer
cross
)
{
List
<
DepositRefundRecord
>
list
=
mapper
.
selectByCrossId
(
cross
);
List
<
DepositRefundRecord
>
list
=
mapper
.
selectByCrossId
(
cross
);
for
(
DepositRefundRecord
depositRefundRecord
:
list
)
{
for
(
DepositRefundRecord
depositRefundRecord
:
list
)
{
...
@@ -140,7 +147,7 @@ public class OrderDepositRefundRecordBiz extends BaseBiz<DepositRefundRecordMapp
...
@@ -140,7 +147,7 @@ public class OrderDepositRefundRecordBiz extends BaseBiz<DepositRefundRecordMapp
BeanUtil
.
copyProperties
(
depositRefundRecord
,
newValue
,
CopyOptions
.
create
().
setIgnoreNullValue
(
true
).
setIgnoreError
(
true
));
BeanUtil
.
copyProperties
(
depositRefundRecord
,
newValue
,
CopyOptions
.
create
().
setIgnoreNullValue
(
true
).
setIgnoreError
(
true
));
newValue
.
setAmount
(
orderViolation
.
getPrice
());
newValue
.
setAmount
(
orderViolation
.
getPrice
());
newValue
.
setRestAmount
(
depositRefundRecord
.
getTotalAmount
().
subtract
(
orderViolation
.
getPrice
()));
//减去违章金之后的押金
newValue
.
setRestAmount
(
depositRefundRecord
.
getTotalAmount
().
subtract
(
orderViolation
.
getPrice
()));
//减去违章金之后的押金
newValue
.
setIscomplete
(
tru
e
);
newValue
.
setIscomplete
(
fals
e
);
newValue
.
setId
(
null
);
newValue
.
setId
(
null
);
insertSelectiveRe
(
newValue
);
insertSelectiveRe
(
newValue
);
depositRefundRecord
.
setIsshow
(
false
);
depositRefundRecord
.
setIsshow
(
false
);
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderRefundBiz.java
View file @
98792612
...
@@ -4,7 +4,10 @@ import cn.hutool.core.bean.BeanUtil;
...
@@ -4,7 +4,10 @@ import cn.hutool.core.bean.BeanUtil;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.json.JSONUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.IntervalUtil
;
import
com.github.wxiaoqi.security.common.util.IntervalUtil
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.xxfc.platform.order.biz.inner.OrderMsgBiz
;
import
com.xxfc.platform.order.biz.inner.OrderMsgBiz
;
import
com.xxfc.platform.order.contant.enumerate.*
;
import
com.xxfc.platform.order.contant.enumerate.*
;
import
com.xxfc.platform.order.entity.*
;
import
com.xxfc.platform.order.entity.*
;
...
@@ -14,6 +17,7 @@ import com.xxfc.platform.universal.constant.DictionaryKey;
...
@@ -14,6 +17,7 @@ import com.xxfc.platform.universal.constant.DictionaryKey;
import
com.xxfc.platform.universal.entity.Dictionary
;
import
com.xxfc.platform.universal.entity.Dictionary
;
import
com.xxfc.platform.universal.feign.ThirdFeign
;
import
com.xxfc.platform.universal.feign.ThirdFeign
;
import
com.xxfc.platform.universal.vo.OrderRefundVo
;
import
com.xxfc.platform.universal.vo.OrderRefundVo
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.jexl2.MapContext
;
import
org.apache.commons.jexl2.MapContext
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -23,6 +27,7 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
...
@@ -23,6 +27,7 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.math.RoundingMode
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.Set
;
...
@@ -39,6 +44,7 @@ import static com.xxfc.platform.universal.constant.DictionaryKey.APP_ORDER;
...
@@ -39,6 +44,7 @@ import static com.xxfc.platform.universal.constant.DictionaryKey.APP_ORDER;
* @date 2019-06-18 11:08:09
* @date 2019-06-18 11:08:09
*/
*/
@Service
@Service
@Slf4j
public
class
OrderRefundBiz
extends
BaseBiz
<
OrderRefundMapper
,
OrderRefund
>
{
public
class
OrderRefundBiz
extends
BaseBiz
<
OrderRefundMapper
,
OrderRefund
>
{
@Autowired
@Autowired
ThirdFeign
thirdFeign
;
ThirdFeign
thirdFeign
;
...
@@ -61,6 +67,9 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper,OrderRefund> {
...
@@ -61,6 +67,9 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper,OrderRefund> {
@Autowired
@Autowired
UserFeign
userFeign
;
UserFeign
userFeign
;
@Autowired
OrderDepositRefundRecordBiz
orderDepositRefundRecordBiz
;
/**
/**
* 退还部分押金
* 退还部分押金
* @param orderMQDTO
* @param orderMQDTO
...
@@ -72,16 +81,25 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper,OrderRefund> {
...
@@ -72,16 +81,25 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper,OrderRefund> {
//未退还, 进行挂起保留违章预备金 的退还
//未退还, 进行挂起保留违章预备金 的退还
if
(
RefundStatusEnum
.
NONE
.
getCode
().
equals
(
orderMQDTO
.
getRefundStatus
()))
{
if
(
RefundStatusEnum
.
NONE
.
getCode
().
equals
(
orderMQDTO
.
getRefundStatus
()))
{
Integer
crosstownTypeEnum
;
Integer
crosstownTypeEnum
;
Integer
depositRefundRecordStatus
;
//判断是否定损过
//判断是否定损过
if
(
SYS_TRUE
.
equals
(
orderMQDTO
.
getOrderRentVehicleDetail
().
getFixedLossStatus
()))
{
if
(
SYS_TRUE
.
equals
(
orderMQDTO
.
getOrderRentVehicleDetail
().
getFixedLossStatus
()))
{
crosstownTypeEnum
=
CrosstownTypeEnum
.
FIXED_LOSS
.
getCode
();
crosstownTypeEnum
=
CrosstownTypeEnum
.
FIXED_LOSS
.
getCode
();
depositRefundRecordStatus
=
DepositRefundStatus
.
FIXLOSSREFUND
.
getCode
();
}
else
{
}
else
{
crosstownTypeEnum
=
CrosstownTypeEnum
.
ARRIVE
.
getCode
();
crosstownTypeEnum
=
CrosstownTypeEnum
.
ARRIVE
.
getCode
();
depositRefundRecordStatus
=
DepositRefundStatus
.
REFUNDARRIVAL
.
getCode
();
}
}
OrderVehicleCrosstown
crosstown
=
crosstownBiz
.
selectOne
(
new
OrderVehicleCrosstown
(){{
OrderVehicleCrosstown
crosstown
=
crosstownBiz
.
selectOne
(
new
OrderVehicleCrosstown
(){{
setOrderId
(
orderMQDTO
.
getId
());
setOrderId
(
orderMQDTO
.
getId
());
setType
(
crosstownTypeEnum
);
setType
(
crosstownTypeEnum
);
}});
}});
if
(
null
==
crosstown
)
{
throw
new
BaseException
(
ResultCode
.
PARAM_ILLEGAL_CODE
,
new
HashSet
<
String
>(){{
add
(
"退款第一部分押金失败,获取不了还车/定损记录,订单号:"
+
orderMQDTO
.
getId
());
}});
}
//还车扣除款 剩余的 钱,再减去违章预备金
//还车扣除款 剩余的 钱,再减去违章预备金
BigDecimal
refundAmont
=
crosstown
.
getRestDeposit
().
subtract
(
illegalReserve
);
BigDecimal
refundAmont
=
crosstown
.
getRestDeposit
().
subtract
(
illegalReserve
);
BigDecimal
originalRefundAmount
=
crosstown
.
getRestDeposit
().
add
(
crosstown
.
getDeductionCost
()).
subtract
(
illegalReserve
);
BigDecimal
originalRefundAmount
=
crosstown
.
getRestDeposit
().
add
(
crosstown
.
getDeductionCost
()).
subtract
(
illegalReserve
);
...
@@ -93,6 +111,10 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper,OrderRefund> {
...
@@ -93,6 +111,10 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper,OrderRefund> {
refundDesc
+=
")"
;
refundDesc
+=
")"
;
refundTrigger
(
orderMQDTO
,
orderMQDTO
.
getOrderRentVehicleDetail
(),
illegalReserve
,
originalRefundAmount
,
refundAmont
,
refundDesc
,
RefundStatusEnum
.
RESIDUE_ILLEGAL
.
getCode
(),
RefundTypeEnum
.
PART_DEPOSIT
);
refundTrigger
(
orderMQDTO
,
orderMQDTO
.
getOrderRentVehicleDetail
(),
illegalReserve
,
originalRefundAmount
,
refundAmont
,
refundDesc
,
RefundStatusEnum
.
RESIDUE_ILLEGAL
.
getCode
(),
RefundTypeEnum
.
PART_DEPOSIT
);
DepositRefundRecord
depositRefundRecord
=
orderDepositRefundRecordBiz
.
findByCrossIdAndStatus
(
crosstown
.
getId
(),
depositRefundRecordStatus
);
depositRefundRecord
.
setIscomplete
(
Boolean
.
TRUE
);
orderDepositRefundRecordBiz
.
updateSelectiveById
(
depositRefundRecord
);
orderMsgBiz
.
handelMsgDeposit
(
orderMQDTO
.
getOrderRentVehicleDetail
(),
orderMQDTO
,
userFeign
.
userDetailById
(
orderMQDTO
.
getUserId
()).
getData
());
orderMsgBiz
.
handelMsgDeposit
(
orderMQDTO
.
getOrderRentVehicleDetail
(),
orderMQDTO
,
userFeign
.
userDetailById
(
orderMQDTO
.
getUserId
()).
getData
());
}
}
// else {
// else {
...
@@ -220,7 +242,11 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper,OrderRefund> {
...
@@ -220,7 +242,11 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper,OrderRefund> {
orv
.
setOrderNo
(
baseOrder
.
getNo
());
orv
.
setOrderNo
(
baseOrder
.
getNo
());
orv
.
setRefundDesc
(
refundDesc
+
refundAmount
.
toString
());
orv
.
setRefundDesc
(
refundDesc
+
refundAmount
.
toString
());
orv
.
setRefundAmount
(
refundAmount
.
multiply
(
new
BigDecimal
(
"100"
)).
intValue
());
orv
.
setRefundAmount
(
refundAmount
.
multiply
(
new
BigDecimal
(
"100"
)).
intValue
());
refundTradeNo
=
thirdFeign
.
refund
(
orv
).
getData
();
ObjectRestResponse
<
String
>
result
=
thirdFeign
.
refund
(
orv
);
refundTradeNo
=
result
.
getData
();
if
(
null
==
refundTradeNo
)
{
log
.
error
(
"退款没有refundTradeNo,订单号为:"
+
baseOrder
.
getNo
()+
", 微服务调用结果为"
+
JSONUtil
.
toJsonStr
(
result
));
}
}
}
//记录订单退款记录
//记录订单退款记录
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderVehicleCrosstownBiz.java
View file @
98792612
...
@@ -232,8 +232,8 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
...
@@ -232,8 +232,8 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
}
}
BigDecimal
amount
=
new
BigDecimal
(
cost
.
toString
()).
divide
(
new
BigDecimal
(
"1"
),
2
,
BigDecimal
.
ROUND_UP
);
BigDecimal
amount
=
new
BigDecimal
(
cost
.
toString
()).
divide
(
new
BigDecimal
(
"1"
),
2
,
BigDecimal
.
ROUND_UP
);
orderVehicleCrosstownDto
.
setDeductionCost
(
amount
);
orderVehicleCrosstownDto
.
setDeductionCost
(
amount
);
//扣除费用
和备用金
//扣除费用
orderVehicleCrosstownDto
.
setRestDeposit
(
orderRentVehicleDetail
.
getDeposit
().
subtract
(
getAmount
()).
subtract
(
amount
));
orderVehicleCrosstownDto
.
setRestDeposit
(
orderRentVehicleDetail
.
getDeposit
().
subtract
(
amount
));
//出车成功后修改订单状态
//出车成功后修改订单状态
List
<
OrderVehicleCrosstownDto
>
oldValue
=
orderVehicleCrosstownBiz
.
selectByOrderId
(
orderVehicleCrosstownDto
);
List
<
OrderVehicleCrosstownDto
>
oldValue
=
orderVehicleCrosstownBiz
.
selectByOrderId
(
orderVehicleCrosstownDto
);
if
(
oldValue
.
size
()
==
1
)
{
if
(
oldValue
.
size
()
==
1
)
{
...
@@ -267,7 +267,7 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
...
@@ -267,7 +267,7 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
ObjectRestResponse
<
OrderPageVO
>
objectRestResponse
=
baseOrderBiz
.
getOrderDetail
(
baseOrder
.
getNo
());
ObjectRestResponse
<
OrderPageVO
>
objectRestResponse
=
baseOrderBiz
.
getOrderDetail
(
baseOrder
.
getNo
());
if
(
objectRestResponse
.
getData
()
!=
null
&&
objectRestResponse
.
getData
().
getOrderRentVehicleDetail
()
!=
null
)
{
if
(
objectRestResponse
.
getData
()
!=
null
&&
objectRestResponse
.
getData
().
getOrderRentVehicleDetail
()
!=
null
)
{
//总押金-保留金
//总押金-保留金
totalAmount
=
objectRestResponse
.
getData
().
getOrderRentVehicleDetail
().
getDeposit
()
.
subtract
(
getAmount
())
;
totalAmount
=
objectRestResponse
.
getData
().
getOrderRentVehicleDetail
().
getDeposit
();
}
}
if
(
baseOrder
.
getStatus
()
==
OrderStatusEnum
.
ORDER_TOSTART
.
getCode
())
{
//交车
if
(
baseOrder
.
getStatus
()
==
OrderStatusEnum
.
ORDER_TOSTART
.
getCode
())
{
//交车
baseOrder
.
setStatus
(
OrderStatusEnum
.
ORDER_WAIT
.
getCode
());
baseOrder
.
setStatus
(
OrderStatusEnum
.
ORDER_WAIT
.
getCode
());
...
@@ -277,8 +277,8 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
...
@@ -277,8 +277,8 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
//添加非定损记录
//添加非定损记录
DepositRefundRecord
depositRefundRecord
=
new
DepositRefundRecord
();
DepositRefundRecord
depositRefundRecord
=
new
DepositRefundRecord
();
depositRefundRecord
.
setAmount
(
orderVehicleCrosstown
.
getDeductionCost
());
depositRefundRecord
.
setAmount
(
orderVehicleCrosstown
.
getDeductionCost
());
depositRefundRecord
.
setRestAmount
(
orderVehicleCrosstown
.
getRestDeposit
(
));
depositRefundRecord
.
setRestAmount
(
totalAmount
.
subtract
(
getAmount
()).
subtract
(
orderVehicleCrosstown
.
getDeductionCost
()
));
depositRefundRecord
.
setTotalAmount
(
totalAmount
);
depositRefundRecord
.
setTotalAmount
(
totalAmount
.
subtract
(
getAmount
())
);
depositRefundRecord
.
setCrosstownId
(
orderVehicleCrosstown
.
getId
());
depositRefundRecord
.
setCrosstownId
(
orderVehicleCrosstown
.
getId
());
orderDepositRefundRecordBiz
.
saveNormalRecord
(
depositRefundRecord
);
orderDepositRefundRecordBiz
.
saveNormalRecord
(
depositRefundRecord
);
baseOrder
.
setStatus
(
OrderStatusEnum
.
ORDER_FINISH
.
getCode
());
baseOrder
.
setStatus
(
OrderStatusEnum
.
ORDER_FINISH
.
getCode
());
...
@@ -290,8 +290,8 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
...
@@ -290,8 +290,8 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
//添加定损记录
//添加定损记录
DepositRefundRecord
depositRefundRecord
=
new
DepositRefundRecord
();
DepositRefundRecord
depositRefundRecord
=
new
DepositRefundRecord
();
depositRefundRecord
.
setAmount
(
orderVehicleCrosstown
.
getDeductionCost
());
depositRefundRecord
.
setAmount
(
orderVehicleCrosstown
.
getDeductionCost
());
depositRefundRecord
.
setRestAmount
(
orderVehicleCrosstown
.
getRestDeposit
(
));
depositRefundRecord
.
setRestAmount
(
totalAmount
.
subtract
(
getAmount
()).
subtract
(
orderVehicleCrosstown
.
getDeductionCost
()
));
depositRefundRecord
.
setTotalAmount
(
totalAmount
);
depositRefundRecord
.
setTotalAmount
(
totalAmount
.
subtract
(
getAmount
())
);
depositRefundRecord
.
setCrosstownId
(
orderVehicleCrosstown
.
getId
());
depositRefundRecord
.
setCrosstownId
(
orderVehicleCrosstown
.
getId
());
orderDepositRefundRecordBiz
.
saveFixLossRecord
(
depositRefundRecord
);
orderDepositRefundRecordBiz
.
saveFixLossRecord
(
depositRefundRecord
);
baseOrder
.
setStatus
(
OrderStatusEnum
.
ORDER_FIXED_LOSS
.
getCode
());
baseOrder
.
setStatus
(
OrderStatusEnum
.
ORDER_FIXED_LOSS
.
getCode
());
...
@@ -307,9 +307,9 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
...
@@ -307,9 +307,9 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
depositRefundRecord
.
setIsshow
(
false
);
depositRefundRecord
.
setIsshow
(
false
);
orderDepositRefundRecordBiz
.
updateSelectiveByIdRe
(
depositRefundRecord
);
orderDepositRefundRecordBiz
.
updateSelectiveByIdRe
(
depositRefundRecord
);
newValue
.
setIscomplete
(
true
);
//发起退款显示
newValue
.
setIscomplete
(
true
);
//发起退款显示
newValue
.
setAmount
(
orderVehicleCrosstown
.
getDeductionCost
());
depositRefundRecord
.
setAmount
(
orderVehicleCrosstown
.
getDeductionCost
());
newValue
.
setRestAmount
(
orderVehicleCrosstown
.
getRestDeposit
(
));
depositRefundRecord
.
setRestAmount
(
totalAmount
.
subtract
(
getAmount
()).
subtract
(
orderVehicleCrosstown
.
getDeductionCost
()
));
newValue
.
setTotalAmount
(
totalAmount
);
depositRefundRecord
.
setTotalAmount
(
totalAmount
.
subtract
(
getAmount
())
);
newValue
.
setCrosstownId
(
orderVehicleCrosstown
.
getId
());
newValue
.
setCrosstownId
(
orderVehicleCrosstown
.
getId
());
newValue
.
setId
(
null
);
newValue
.
setId
(
null
);
orderDepositRefundRecordBiz
.
insertSelectiveRe
(
newValue
);
orderDepositRefundRecordBiz
.
insertSelectiveRe
(
newValue
);
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/inner/OrderMsgBiz.java
View file @
98792612
...
@@ -445,6 +445,7 @@ public class OrderMsgBiz {
...
@@ -445,6 +445,7 @@ public class OrderMsgBiz {
smsParams
.
add
(
otd
.
getStartAddr
());
smsParams
.
add
(
otd
.
getStartAddr
());
break
;
break
;
case
SmsTemplateDTO
.
PAY_G
:
case
SmsTemplateDTO
.
PAY_G
:
smsParams
.
add
(
baseOrder
.
getName
());
smsParams
.
add
(
baseOrder
.
getRealAmount
().
toString
());
smsParams
.
add
(
baseOrder
.
getRealAmount
().
toString
());
smsParams
.
add
(
omd
.
getRentFreeNum
().
toString
());
smsParams
.
add
(
omd
.
getRentFreeNum
().
toString
());
smsParams
.
add
(
appUserDTO
.
getRentFreeDays
().
toString
());
smsParams
.
add
(
appUserDTO
.
getRentFreeDays
().
toString
());
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/jobhandler/BaseOrderStatisticsJobHandler.java
View file @
98792612
...
@@ -28,17 +28,19 @@ public class BaseOrderStatisticsJobHandler extends IJobHandler {
...
@@ -28,17 +28,19 @@ public class BaseOrderStatisticsJobHandler extends IJobHandler {
XxlJobLogger
.
log
(
"-----定时器进入---baseOrderStatisticsHandler---"
);
XxlJobLogger
.
log
(
"-----定时器进入---baseOrderStatisticsHandler---"
);
log
.
info
(
"-----定时器进入---baseOrderStatisticsHandler---"
);
log
.
info
(
"-----定时器进入---baseOrderStatisticsHandler---"
);
boolean
flag
=
statisticsBiz
.
statisticalOrder
();
//
boolean flag = statisticsBiz.statisticalOrder();
ReturnT
returnT
=
new
ReturnT
();
ReturnT
returnT
=
new
ReturnT
();
if
(
flag
)
{
//
if (flag) {
returnT
.
setCode
(
100
);
returnT
.
setCode
(
100
);
returnT
.
setMsg
(
"成功"
);
returnT
.
setMsg
(
"成功"
);
return
returnT
;
return
returnT
;
}
else
{
// }
returnT
.
setCode
(
500
);
returnT
.
setMsg
(
"失败"
);
// else {
return
returnT
;
// returnT.setCode(500);
}
// returnT.setMsg("失败");
// return returnT;
// }
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
XxlJobLogger
.
log
(
e
);
XxlJobLogger
.
log
(
e
);
return
FAIL
;
return
FAIL
;
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/BackStageOrderController.java
View file @
98792612
...
@@ -95,7 +95,7 @@ public class BackStageOrderController extends CommonBaseController implements Us
...
@@ -95,7 +95,7 @@ public class BackStageOrderController extends CommonBaseController implements Us
ObjectRestResponse
<
List
<
AppUserVo
>>
objectRestResponse
=
userFeign
.
getByUserIds
(
userIds
);
ObjectRestResponse
<
List
<
AppUserVo
>>
objectRestResponse
=
userFeign
.
getByUserIds
(
userIds
);
log
.
info
(
"获取用户信息:objectRestResponse = {}"
,
objectRestResponse
.
getData
());
log
.
info
(
"获取用户信息:objectRestResponse = {}"
,
objectRestResponse
.
getData
());
Map
<
String
,
AppUserVo
>
appUserVoMap
=
objectRestResponse
.
getData
()
==
null
?
new
HashMap
<
String
,
AppUserVo
>()
Map
<
String
,
AppUserVo
>
appUserVoMap
=
objectRestResponse
.
getData
()
==
null
?
new
HashMap
<
String
,
AppUserVo
>()
:
objectRestResponse
.
getData
().
parallelStream
().
collect
(
Collectors
.
toMap
(
v
->
v
.
getUserid
().
toString
(),
v
->
v
));
:
objectRestResponse
.
getData
().
parallelStream
().
collect
(
Collectors
.
toMap
(
v
->
v
.
getUserid
().
toString
()
.
trim
()
,
v
->
v
));
for
(
OrderListVo
orderPageVO
:
list
)
{
for
(
OrderListVo
orderPageVO
:
list
)
{
AppUserVo
appUserVo
=
appUserVoMap
.
get
(
orderPageVO
.
getUserId
().
toString
());
AppUserVo
appUserVo
=
appUserVoMap
.
get
(
orderPageVO
.
getUserId
().
toString
());
...
...
xx-order/xx-order-server/src/main/resources/mapper/DepositRefundRecordMapper.xml
View file @
98792612
...
@@ -11,5 +11,6 @@
...
@@ -11,5 +11,6 @@
parameterType=
"java.lang.Integer"
>
parameterType=
"java.lang.Integer"
>
select * from deposit_refund_record
select * from deposit_refund_record
where crosstown_id = #{crossId} and isshow = 1
where crosstown_id = #{crossId} and isshow = 1
order by status
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/controller/CertificationController.java
View file @
98792612
...
@@ -12,6 +12,7 @@ import com.xxfc.platform.universal.biz.MQServiceBiZ;
...
@@ -12,6 +12,7 @@ import com.xxfc.platform.universal.biz.MQServiceBiZ;
import
com.xxfc.platform.universal.entity.IdInformation
;
import
com.xxfc.platform.universal.entity.IdInformation
;
import
com.xxfc.platform.universal.service.CertificationService
;
import
com.xxfc.platform.universal.service.CertificationService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.aop.framework.AopContext
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.core.task.TaskExecutor
;
import
org.springframework.core.task.TaskExecutor
;
...
@@ -21,6 +22,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -21,6 +22,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
/**
/**
...
@@ -46,9 +50,11 @@ public class CertificationController {
...
@@ -46,9 +50,11 @@ public class CertificationController {
private
TaskExecutor
executor
;
private
TaskExecutor
executor
;
@Autowired
@Autowired
MQServiceBiZ
mqServiceBiZ
;
private
MQServiceBiZ
mqServiceBiZ
;
private
ExecutorService
executorService
=
Executors
.
newCachedThreadPool
();
/**
/**
* 实名认证
* 实名认证
* @param idInformation
* @param idInformation
...
@@ -90,13 +96,17 @@ public class CertificationController {
...
@@ -90,13 +96,17 @@ public class CertificationController {
if
(
type
!=
null
&&
type
==
0
){
if
(
type
!=
null
&&
type
==
0
){
ObjectRestResponse
<
Integer
>
result
=
certificationService
.
certificate
(
idInformation
);
ObjectRestResponse
<
Integer
>
result
=
certificationService
.
certificate
(
idInformation
);
if
(
result
.
getRel
())
{
if
(
result
.
getRel
())
{
Thread
thread
=
new
Thread
(
new
Runnable
()
{
CompletableFuture
.
supplyAsync
(()->{
@Override
setIntegral
(
appUserDTO
.
getUserid
(),
result
.
getData
());
public
void
run
()
{
return
null
;
setIntegral
(
appUserDTO
.
getUserid
(),
result
.
getData
());
},
executorService
);
}
// Thread thread = new Thread(new Runnable() {
});
// @Override
thread
.
start
();
// public void run() {
// setIntegral(appUserDTO.getUserid(),result.getData());
// }
// });
// thread.start();
}
}
return
result
;
return
result
;
}
}
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/service/TrafficViolationsService.java
View file @
98792612
...
@@ -23,6 +23,10 @@ import org.springframework.stereotype.Service;
...
@@ -23,6 +23,10 @@ import org.springframework.stereotype.Service;
import
java.sql.SQLException
;
import
java.sql.SQLException
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.Executor
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
java.util.regex.Matcher
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
java.util.regex.Pattern
;
...
@@ -41,6 +45,8 @@ public class TrafficViolationsService {
...
@@ -41,6 +45,8 @@ public class TrafficViolationsService {
private
String
CODE
;
private
String
CODE
;
@Value
(
"${RETURN.TYPE}"
)
@Value
(
"${RETURN.TYPE}"
)
private
String
TYPE
;
private
String
TYPE
;
private
ExecutorService
executorService
=
Executors
.
newCachedThreadPool
();
/**
/**
* 下列参数,根据使用不同的公司的接口进行修改
* 下列参数,根据使用不同的公司的接口进行修改
*/
*/
...
@@ -190,6 +196,13 @@ public class TrafficViolationsService {
...
@@ -190,6 +196,13 @@ public class TrafficViolationsService {
List
<
LicensePlateType
>
finalLicensePlateTypes
=
licensePlateTypes
;
List
<
LicensePlateType
>
finalLicensePlateTypes
=
licensePlateTypes
;
CompletableFuture
.
supplyAsync
(()->{
insertLicensePlateType
(
finalLicensePlateTypes
);
return
null
;
},
executorService
);
Thread
thread
=
new
Thread
(
new
Runnable
()
{
Thread
thread
=
new
Thread
(
new
Runnable
()
{
@Override
@Override
public
void
run
()
{
public
void
run
()
{
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleBookRecordMapper.xml
View file @
98792612
...
@@ -377,22 +377,22 @@
...
@@ -377,22 +377,22 @@
select v1.* from vehicle_book_record v1
select v1.* from vehicle_book_record v1
left join vehicle v2 on v2.id = v1.vehicle_id
left join vehicle v2 on v2.id = v1.vehicle_id
<where>
<where>
<if
test=
"startTime != null"
>
<if
test=
"startTime != null"
>
and v1.create_time between #{startTime} and #{endTime}
and v1.create_time between #{startTime} and #{endTime}
</if>
</if>
<if
test=
"numberPlate != null
"
>
<if
test=
"numberPlate != null || numberPlate != ''
"
>
and v2.number_plate = #{numberPlate}
and v2.number_plate = #{numberPlate}
</if>
</if>
<if
test=
"status != null"
>
<if
test=
"status != null"
>
and v2.status = #{status}
and v2.status = #{status}
</if>
</if>
<if
test=
"subordinateBranch != null"
>
<if
test=
"subordinateBranch != null"
>
and v2.subordinate_branch = #{subordinateBranch}
and v2.subordinate_branch = #{subordinateBranch}
</if>
</if>
<if
test=
"parkBranchCompanyId != null"
>
<if
test=
"parkBranchCompanyId != null"
>
and v2.park_branch_company_id = #{parkBranchCompanyId}
and v2.park_branch_company_id = #{parkBranchCompanyId}
</if>
</if>
</where>
</where>
order By v1.create_time DESC
order By v1.create_time DESC
</select>
</select>
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleMapper.xml
View file @
98792612
...
@@ -383,6 +383,7 @@
...
@@ -383,6 +383,7 @@
<include
refid=
"searchUsableSql"
/>
<include
refid=
"searchUsableSql"
/>
and vm.id is not null
and vm.id is not null
and vm.status = 1
and vm.status = 1
and vm.isdel = 0
and bc.id is not null
and bc.id is not null
GROUP BY model_id, company_id
GROUP BY model_id, company_id
<if
test=
"lon != null and lat != null"
>
, distance
</if>
<if
test=
"lon != null and lat != null"
>
, distance
</if>
...
@@ -597,6 +598,7 @@
...
@@ -597,6 +598,7 @@
<if
test=
" parkBranchCompanyId != null "
>
<if
test=
" parkBranchCompanyId != null "
>
and v.park_branch_company_id = #{parkBranchCompanyId}
and v.park_branch_company_id = #{parkBranchCompanyId}
</if>
</if>
and v.is_del = 0
</where>
</where>
</sql>
</sql>
...
...
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