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
087a481a
Commit
087a481a
authored
Nov 18, 2019
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'holiday-price' into dev
parents
602b0cd5
b8677acd
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
42 additions
and
19 deletions
+42
-19
AppUserSellingWaterBiz.java
...ub/wxiaoqi/security/admin/biz/AppUserSellingWaterBiz.java
+4
-2
AppUserSellingWaterMapper.xml
...n/src/main/resources/mapper/AppUserSellingWaterMapper.xml
+9
-2
OrderAccountBiz.java
...ain/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
+7
-1
OrderCalculateBiz.java
.../com/xxfc/platform/order/biz/inner/OrderCalculateBiz.java
+1
-1
OrderCancelBiz.java
...ava/com/xxfc/platform/order/biz/inner/OrderCancelBiz.java
+1
-1
BaseOrderController.java
...ava/com/xxfc/platform/order/rest/BaseOrderController.java
+1
-1
VehicleModelCalendarPriceBiz.java
...fc/platform/vehicle/biz/VehicleModelCalendarPriceBiz.java
+15
-8
VehicleModelCalendarPriceAdminController.java
.../rest/admin/VehicleModelCalendarPriceAdminController.java
+4
-3
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserSellingWaterBiz.java
View file @
087a481a
...
@@ -197,8 +197,10 @@ public class AppUserSellingWaterBiz extends BaseBiz<AppUserSellingWaterMapper, A
...
@@ -197,8 +197,10 @@ public class AppUserSellingWaterBiz extends BaseBiz<AppUserSellingWaterMapper, A
BigDecimal
commission
=
sellingWater
.
getCommission
();
BigDecimal
commission
=
sellingWater
.
getCommission
();
log
.
info
(
"订单完成计算用户拥金----finishOrderWater----id===="
+
id
+
"---commission=="
+
commission
+
"----orderType==="
+
orderType
);
log
.
info
(
"订单完成计算用户拥金----finishOrderWater----id===="
+
id
+
"---commission=="
+
commission
+
"----orderType==="
+
orderType
);
amount
=
amount
.
add
(
commission
);
amount
=
amount
.
add
(
commission
);
}
}
log
.
info
(
"订单完成计算用户拥金----finishOrderWater----orderId===="
+
orderId
+
"---amount=="
+
amount
);
BigDecimal
unbooked
=
amount
;
log
.
info
(
"订单完成计算用户拥金----finishOrderWater----orderId===="
+
orderId
+
"---amount=="
+
amount
+
"---unbooked=="
+
unbooked
);
if
(
orderType
==
1
){
if
(
orderType
==
1
){
List
<
OrderGoodsDTO
>
goodsDTOList
=
orderWaterDTO
.
getGoodsDTOList
();
List
<
OrderGoodsDTO
>
goodsDTOList
=
orderWaterDTO
.
getGoodsDTOList
();
log
.
info
(
"租车订单完成-----goodsDTOList==="
+
goodsDTOList
);
log
.
info
(
"租车订单完成-----goodsDTOList==="
+
goodsDTOList
);
...
@@ -247,7 +249,7 @@ public class AppUserSellingWaterBiz extends BaseBiz<AppUserSellingWaterMapper, A
...
@@ -247,7 +249,7 @@ public class AppUserSellingWaterBiz extends BaseBiz<AppUserSellingWaterMapper, A
detail
.
setSource
(
1
);
detail
.
setSource
(
1
);
myWaterBiz
.
updMyWater
(
detail
);
myWaterBiz
.
updMyWater
(
detail
);
if
(
orderType
==
1
||
orderType
==
2
)
{
if
(
orderType
==
1
||
orderType
==
2
)
{
myWaterBiz
.
updMyWalletUnbooked
(
userId
,
amount
,
2
);
myWaterBiz
.
updMyWalletUnbooked
(
userId
,
unbooked
,
2
);
}
}
}
}
...
...
ace-modules/ace-admin/src/main/resources/mapper/AppUserSellingWaterMapper.xml
View file @
087a481a
...
@@ -63,8 +63,15 @@ FROM
...
@@ -63,8 +63,15 @@ FROM
-->
-->
SELECT w.*,o.commission as commission ,o.type AS `sellerStatus` FROM (
SELECT w.*,o.commission as commission ,
<!--o.type-->
CASE
SELECT t.order_no,IFNULL(SUM(t.z),0)-IFNULL(SUM(t.f),0) as commission,IF(SUM(t.f)>0,'1',0)as type FROM (
WHEN fcommission>0 THEN
(CASE
WHEN o.commission=0 THEN 1
ELSE 0 END )
ELSE 0 END AS `sellerStatus` FROM (
SELECT t.order_no,IFNULL(SUM(t.z),0)-IFNULL(SUM(t.f),0) as commission,
<!--IF(SUM(t.f)>0,'1',0)as type -->
IFNULL(SUM(t.f), 0) as fcommission
FROM (
SELECT order_no,commission as z,0 as f FROM app_user_selling_water WHERE user_id=#{userId}
SELECT order_no,commission as z,0 as f FROM app_user_selling_water WHERE user_id=#{userId}
AND `status`=0 and commission>0
AND `status`=0 and commission>0
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
View file @
087a481a
...
@@ -236,7 +236,7 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
...
@@ -236,7 +236,7 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
}
}
orv
.
setFreeze2PayAmount
(
freeze2PayAmount
);
orv
.
setFreeze2PayAmount
(
freeze2PayAmount
);
orv
.
setFreeze2PayDesc
(
"
"
);
orv
.
setFreeze2PayDesc
(
"
冻结转支付订单号: "
+
baseOrder
.
getNo
()
);
ObjectRestResponse
<
String
>
result
=
thirdFeign
.
refund
(
orv
);
ObjectRestResponse
<
String
>
result
=
thirdFeign
.
refund
(
orv
);
refundTradeNo
=
result
.
getData
();
refundTradeNo
=
result
.
getData
();
...
@@ -426,6 +426,12 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
...
@@ -426,6 +426,12 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
//剩余押金 = 押金 - 违章保证金 - 定损金额
//剩余押金 = 押金 - 违章保证金 - 定损金额
oad
.
setDepositAmount
(
oad
.
getDepositAmount
().
subtract
(
illegalReserve
).
subtract
(
csv
.
getDamagesAmount
()));
oad
.
setDepositAmount
(
oad
.
getDepositAmount
().
subtract
(
illegalReserve
).
subtract
(
csv
.
getDamagesAmount
()));
//设置违约金
//设置原来算出的违约金及描述
csv
.
setViolateAmount
(
inProgressVO
.
getViolateAmount
());
csv
.
setViolateDesc
(
inProgressVO
.
getViolateDesc
());
//处理更改之后的违约金及描述
handleCrosstownDetail
(
crosstown
,
oad
,
csv
);
handleCrosstownDetail
(
crosstown
,
oad
,
csv
);
//退款
//退款
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/inner/OrderCalculateBiz.java
View file @
087a481a
...
@@ -356,7 +356,7 @@ public class OrderCalculateBiz {
...
@@ -356,7 +356,7 @@ public class OrderCalculateBiz {
if
(
timeLag
<
0
)
{
if
(
timeLag
<
0
)
{
Integer
useDays
=
getIncludeDays
(
orderPageVO
.
getOrderRentVehicleDetail
().
getStartTime
(),
DateTime
.
now
().
getMillis
());
Integer
useDays
=
getIncludeDays
(
orderPageVO
.
getOrderRentVehicleDetail
().
getStartTime
(),
DateTime
.
now
().
getMillis
());
OrderAccountDetail
oad
=
new
OrderAccountDetail
();
OrderAccountDetail
oad
=
new
OrderAccountDetail
();
inProgressVO
=
inProgressCalculate
(
orderPageVO
,
vehicleItemDTO
,
useDays
,
new
OrderAccountDetail
()
,
Boolean
.
FALSE
);
inProgressVO
=
inProgressCalculate
(
orderPageVO
,
vehicleItemDTO
,
useDays
,
oad
,
Boolean
.
FALSE
);
topAmount
=
vehicleItemDTO
.
getTopAmount
(
useDays
);
topAmount
=
vehicleItemDTO
.
getTopAmount
(
useDays
);
totalDeductAmount
=
oad
.
realTotalDeduct
();
totalDeductAmount
=
oad
.
realTotalDeduct
();
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/inner/OrderCancelBiz.java
View file @
087a481a
...
@@ -160,7 +160,7 @@ public class OrderCancelBiz {
...
@@ -160,7 +160,7 @@ public class OrderCancelBiz {
//结合
//结合
//退款子流程: 订单基础,退款描述,退款金额
//退款子流程: 订单基础,退款描述,退款金额
orderAccountBiz
.
refundSubProcess
(
baseOrder
,
""
,
baseOrder
.
getRealAmount
()
.
subtract
(
orvd
.
getDeposit
())
,
oad
.
getDepositAmount
().
add
(
oad
.
getOrderAmount
()),
AccountTypeEnum
.
OUT_ORDER_FUND
.
getCode
(),
RefundStatusEnum
.
ALL
.
getCode
(),
oad
);
orderAccountBiz
.
refundSubProcess
(
baseOrder
,
""
,
baseOrder
.
getRealAmount
(),
oad
.
getDepositAmount
().
add
(
oad
.
getOrderAmount
()),
AccountTypeEnum
.
OUT_ORDER_FUND
.
getCode
(),
RefundStatusEnum
.
ALL
.
getCode
(),
oad
);
//生成额外的费用明细
//生成额外的费用明细
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/BaseOrderController.java
View file @
087a481a
...
@@ -401,7 +401,7 @@ public class BaseOrderController extends CommonBaseController implements UserRes
...
@@ -401,7 +401,7 @@ public class BaseOrderController extends CommonBaseController implements UserRes
}});
}});
orv
.
setAmount
(
baseOrder
.
getRealAmount
().
multiply
(
new
BigDecimal
(
"100"
)).
intValue
());
orv
.
setAmount
(
baseOrder
.
getRealAmount
().
multiply
(
new
BigDecimal
(
"100"
)).
intValue
());
orv
.
setOrderNo
(
baseOrder
.
getNo
());
orv
.
setOrderNo
(
baseOrder
.
getNo
());
orv
.
setRefundDesc
(
"退款
"
);
orv
.
setRefundDesc
(
"退款
订单号:"
+
no
);
orv
.
setRefundAmount
(
refundAmount
.
multiply
(
new
BigDecimal
(
"100"
)).
intValue
());
orv
.
setRefundAmount
(
refundAmount
.
multiply
(
new
BigDecimal
(
"100"
)).
intValue
());
ObjectRestResponse
<
String
>
result
=
thirdFeign
.
refund
(
orv
);
ObjectRestResponse
<
String
>
result
=
thirdFeign
.
refund
(
orv
);
return
ObjectRestResponse
.
succ
(
result
);
return
ObjectRestResponse
.
succ
(
result
);
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleModelCalendarPriceBiz.java
View file @
087a481a
...
@@ -23,6 +23,7 @@ import org.springframework.beans.BeanUtils;
...
@@ -23,6 +23,7 @@ import org.springframework.beans.BeanUtils;
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
;
import
org.springframework.util.StringUtils
;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.entity.Example
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
...
@@ -69,18 +70,18 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
...
@@ -69,18 +70,18 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
* @param vehicleModelCalendarPrices
* @param vehicleModelCalendarPrices
* @param userId
* @param userId
*/
*/
public
void
addVehicleModelCalendarPrice
(
List
<
VehicleModelCalendarPriceSaveDTO
>
vehicleModelCalendarPrices
,
Integer
userId
)
{
public
void
addVehicleModelCalendarPrice
(
List
<
VehicleModelCalendarPriceSaveDTO
>
vehicleModelCalendarPrices
,
String
date
,
Integer
userId
)
{
if
(
CollectionUtils
.
isNotEmpty
(
vehicleModelCalendarPrices
))
{
vehicleModelCalendarPrices
=
vehicleModelCalendarPrices
==
null
?
Collections
.
EMPTY_LIST
:
vehicleModelCalendarPrices
;
List
<
VehicleModelCalendarPrice
>
vehicleModelCalendarPriceList
=
new
ArrayList
<>();
List
<
VehicleModelCalendarPrice
>
vehicleModelCalendarPriceList
=
new
ArrayList
<>();
List
<
Date
>
dateList
=
vehicleModelCalendarPrices
.
stream
().
peek
(
x
->
{
List
<
Date
>
dateList
=
vehicleModelCalendarPrices
.
stream
().
peek
(
x
->
{
VehicleModelCalendarPrice
calendarPrice
=
new
VehicleModelCalendarPrice
();
VehicleModelCalendarPrice
calendarPrice
=
new
VehicleModelCalendarPrice
();
BeanUtils
.
copyProperties
(
x
,
calendarPrice
);
BeanUtils
.
copyProperties
(
x
,
calendarPrice
);
Date
d
a
te
=
DateUtils
.
localDateToDate
(
LocalDate
.
parse
(
x
.
getDate
()));
Date
dte
=
DateUtils
.
localDateToDate
(
LocalDate
.
parse
(
x
.
getDate
()));
calendarPrice
.
setVehicleModelDay
(
d
a
te
);
calendarPrice
.
setVehicleModelDay
(
dte
);
calendarPrice
.
setCrtTime
(
new
Date
());
calendarPrice
.
setCrtTime
(
new
Date
());
calendarPrice
.
setCrtUserId
(
userId
);
calendarPrice
.
setCrtUserId
(
userId
);
calendarPrice
.
setIsDel
(
0
);
calendarPrice
.
setIsDel
(
0
);
x
.
setVehicleModelDay
(
d
a
te
);
x
.
setVehicleModelDay
(
dte
);
vehicleModelCalendarPriceList
.
add
(
calendarPrice
);
vehicleModelCalendarPriceList
.
add
(
calendarPrice
);
}).
map
(
VehicleModelCalendarPriceSaveDTO:
:
getVehicleModelDay
).
distinct
().
collect
(
Collectors
.
toList
());
}).
map
(
VehicleModelCalendarPriceSaveDTO:
:
getVehicleModelDay
).
distinct
().
collect
(
Collectors
.
toList
());
...
@@ -92,11 +93,17 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
...
@@ -92,11 +93,17 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
vehicleModelCalendarPrice
.
setIsDel
(
1
);
vehicleModelCalendarPrice
.
setIsDel
(
1
);
Example
example
=
new
Example
(
VehicleModelCalendarPrice
.
class
);
Example
example
=
new
Example
(
VehicleModelCalendarPrice
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
Example
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIn
(
"vehicleModelDay"
,
dateList
);
if
(
CollectionUtils
.
isEmpty
(
dateList
)
&&
StringUtils
.
hasText
(
date
)){
criteria
.
andEqualTo
(
"vehicleModelDay"
,
DateUtils
.
localDateToDate
(
LocalDate
.
parse
(
date
)));
}
else
{
criteria
.
andIn
(
"vehicleModelDay"
,
dateList
);
}
mapper
.
updateByExampleSelective
(
vehicleModelCalendarPrice
,
example
);
mapper
.
updateByExampleSelective
(
vehicleModelCalendarPrice
,
example
);
//2.插入新的数据
//2.插入新的数据
mapper
.
insertList
(
vehicleModelCalendarPriceList
);
if
(
CollectionUtils
.
isNotEmpty
(
dateList
))
{
}
mapper
.
insertList
(
vehicleModelCalendarPriceList
);
}
}
}
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/admin/VehicleModelCalendarPriceAdminController.java
View file @
087a481a
...
@@ -30,9 +30,10 @@ public class VehicleModelCalendarPriceAdminController {
...
@@ -30,9 +30,10 @@ public class VehicleModelCalendarPriceAdminController {
private
final
VehicleModelCalendarPriceBiz
vehicleModelCalendarPriceBiz
;
private
final
VehicleModelCalendarPriceBiz
vehicleModelCalendarPriceBiz
;
@ApiOperation
(
"车型日历价格设置"
)
@ApiOperation
(
"车型日历价格设置"
)
@PostMapping
(
"/add_edit"
)
@PostMapping
(
value
=
{
"/add_edit/{date}"
,
"/add_edit"
})
public
ObjectRestResponse
<
Void
>
add
(
@RequestBody
List
<
VehicleModelCalendarPriceSaveDTO
>
vehicleModelCalendarPriceSaveDTO
,
UserDTO
userDTO
){
public
ObjectRestResponse
<
Void
>
add
(
@RequestBody
(
required
=
false
)
List
<
VehicleModelCalendarPriceSaveDTO
>
vehicleModelCalendarPriceSaveDTO
,
vehicleModelCalendarPriceBiz
.
addVehicleModelCalendarPrice
(
vehicleModelCalendarPriceSaveDTO
,
userDTO
.
getId
());
@PathVariable
(
name
=
"date"
,
required
=
false
)
String
date
,
UserDTO
userDTO
){
vehicleModelCalendarPriceBiz
.
addVehicleModelCalendarPrice
(
vehicleModelCalendarPriceSaveDTO
,
date
,
userDTO
.
getId
());
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
}
}
...
...
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