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
ad067d0a
Commit
ad067d0a
authored
Oct 31, 2020
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
fec5ddec
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
14 deletions
+36
-14
UserCommentVo.java
...a/com/github/wxiaoqi/security/admin/vo/UserCommentVo.java
+3
-0
BaseOrderAcceptDetailedBiz.java
...xiaoqi/security/admin/biz/BaseOrderAcceptDetailedBiz.java
+31
-14
UserCommentMapper.xml
...ace-admin/src/main/resources/mapper/UserCommentMapper.xml
+2
-0
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/vo/UserCommentVo.java
View file @
ad067d0a
...
...
@@ -32,6 +32,9 @@ public class UserCommentVo extends UserComment {
@ApiModelProperty
(
"用户名称"
)
private
String
toUserName
;
@ApiModelProperty
(
"to用户头像"
)
private
String
toHeadimgurl
;
private
PageDataVO
<
UserCommentVo
>
childer
;
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/BaseOrderAcceptDetailedBiz.java
View file @
ad067d0a
...
...
@@ -10,6 +10,7 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.vehicle.pojo.dto.order.VMCalendarPriceCostDTO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -84,7 +85,7 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
}
}
//
购买计算用户拥金
//
下单分账
public
void
payOrderAccept
(
OrderWaterDTO
orderWaterDTO
)
{
//订单id
Integer
orderId
=
orderWaterDTO
.
getOrderId
()
==
null
?
0
:
orderWaterDTO
.
getOrderId
();
...
...
@@ -104,8 +105,19 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
List
<
BaseCommissionRatio
>
baseCommissionRatios
=
commissionRatioBiz
.
getList
();
BigDecimal
amount
=
BigDecimal
.
ZERO
;
BigDecimal
companyDivisionAmount
=
orderAmount
;
if
(
baseCommissionRatios
.
size
()
>
0
){
//先计算分给店铺
BigDecimal
companyExtrac
=
baseCommissionRatios
.
stream
().
map
(
BaseCommissionRatio:
:
getExtract
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
companyExtrac
=
new
BigDecimal
(
100
).
subtract
(
companyExtrac
);
//店铺金额
companyDivisionAmount
=
orderAmount
.
multiply
(
companyExtrac
).
divide
(
new
BigDecimal
(
100
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
//其他金额
BigDecimal
otherDivisionAmount
=
orderAmount
.
subtract
(
companyDivisionAmount
);
Integer
num
=
0
;
for
(
BaseCommissionRatio
commissionRatio:
baseCommissionRatios
){
num
++;
Integer
type
=
commissionRatio
.
getType
()
==
null
?
0
:
commissionRatio
.
getType
();
Integer
mchId
=
0
;
Integer
divisionType
=
0
;
...
...
@@ -131,7 +143,12 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
if
(
type
!=
3
&&
mchId
==
0
){
continue
;
}
BigDecimal
divisionAmount
=
orderAmount
.
multiply
(
commissionRatio
.
getExtract
()).
divide
(
new
BigDecimal
(
100
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
BigDecimal
divisionAmount
;
if
(
num
.
equals
(
baseCommissionRatios
.
size
())){
divisionAmount
=
otherDivisionAmount
.
subtract
(
amount
);
}
else
{
divisionAmount
=
otherDivisionAmount
.
multiply
(
commissionRatio
.
getExtract
()).
divide
(
new
BigDecimal
(
100
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
}
BaseOrderAcceptDetailed
acceptDetailed
=
new
BaseOrderAcceptDetailed
();
BeanUtils
.
copyProperties
(
orderWaterDTO
,
acceptDetailed
);
acceptDetailed
.
setMchId
(
mchId
);
...
...
@@ -147,18 +164,18 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
sellingWaterBiz
.
payOrderWater
(
orderWaterDTO
);
}
}
if
(
orderAmount
.
compareTo
(
amount
)
>
0
){
BigDecimal
divisionAmount
=
orderAmount
.
subtract
(
amount
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
//店铺分账
BaseOrderAcceptDetailed
acceptDetailed
=
new
BaseOrderAcceptDetailed
();
BeanUtils
.
copyProperties
(
orderWaterDTO
,
acceptDetailed
);
acceptDetailed
.
setMchId
(
companyId
);
acceptDetailed
.
setOrderAmount
(
orderAmount
);
acceptDetailed
.
setDivisionAmount
(
d
ivisionAmount
);
acceptDetailed
.
setDivisionAmount
(
companyD
ivisionAmount
);
acceptDetailed
.
setDivisionType
(
5
);
acceptDetailed
.
setAddTime
(
System
.
currentTimeMillis
());
acceptDetailed
.
setStatus
(
0
);
insertSelective
(
acceptDetailed
);
}
}
...
...
ace-modules/ace-admin/src/main/resources/mapper/UserCommentMapper.xml
View file @
ad067d0a
...
...
@@ -7,7 +7,9 @@
SELECT
c.*,
IFNULL(d1.realname,d1.nickname) as userName,
d1.headimgurl as headimgurl,
IFNULL(d2.realname,d2.nickname) as toUserName,
d2.headimgurl as toHeadimgurl,
b.`name`as companyName
FROM user_comment c
LEFT JOIN app_user_detail d1 ON c.user_id=d1.userid
...
...
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