Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
Overview
Overview
Details
Activity
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
pseer
gxpt_ht
Commits
38919ea9
Commit
38919ea9
authored
Sep 14, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改订单价格计算
parent
81cbfd14
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
31 deletions
+15
-31
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+15
-31
No files found.
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
38919ea9
...
@@ -2498,45 +2498,29 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -2498,45 +2498,29 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
);
);
// if (ObjectUtil.isNotEmpty(consumerMember)) {
// if (ObjectUtil.isNotEmpty(consumerMember)) {
// queryWrapper.eq(Activity::getIsOpen, YesNoEnum.yes.getIndex());
// queryWrapper.eq(Activity::getIsOpen, YesNoEnum.yes.getIndex());
// if (consumerMember.getIsRights().equals(YesNoEnum.yes.getIndex())) {
//// if (consumerMember.getIsRights().equals(YesNoEnum.yes.getIndex())) {
// queryWrapper.eq(Activity::getMemberType, MemberTypeEnum.RIGHTS.getIndex());
//// queryWrapper.eq(Activity::getMemberType, MemberTypeEnum.RIGHTS.getIndex());
//// } else if (consumerMember.getIsRecharge().equals(YesNoEnum.yes.getIndex()) && consumerMember.getIsRights().equals(YesNoEnum.no.getIndex())) {
//// queryWrapper.eq(Activity::getMemberType, MemberTypeEnum.RECHARGE.getIndex());
//// } else {
//// queryWrapper.eq(Activity::getMemberType, MemberTypeEnum.NORMAL.getIndex());
//// }
// if (consumerMember.getIsRecharge().equals(YesNoEnum.no.getIndex()) && consumerMember.getIsRights().equals(YesNoEnum.no.getIndex())) {
// queryWrapper.eq(Activity::getMemberType, MemberTypeEnum.NORMAL.getIndex());
// } else if (consumerMember.getIsRecharge().equals(YesNoEnum.yes.getIndex()) && consumerMember.getIsRights().equals(YesNoEnum.yes.getIndex())) {
// queryWrapper.in(Activity::getMemberType, MemberTypeEnum.RECHARGE.getIndex(), MemberTypeEnum.RIGHTS.getIndex());
// } else if (consumerMember.getIsRecharge().equals(YesNoEnum.yes.getIndex()) && consumerMember.getIsRights().equals(YesNoEnum.no.getIndex())) {
// } else if (consumerMember.getIsRecharge().equals(YesNoEnum.yes.getIndex()) && consumerMember.getIsRights().equals(YesNoEnum.no.getIndex())) {
//// activity.setMemberType(MemberTypeEnum.RECHARGE.getIndex());
// queryWrapper.eq(Activity::getMemberType, MemberTypeEnum.RECHARGE.getIndex());
// queryWrapper.eq(Activity::getMemberType, MemberTypeEnum.RECHARGE.getIndex());
// } else {
// } else if (consumerMember.getIsRights().equals(YesNoEnum.yes.getIndex()) && consumerMember.getIsRecharge().equals(YesNoEnum.no.getIndex())) {
// queryWrapper.eq(Activity::getMemberType, MemberTypeEnum.NORMAL.getIndex());
//// activity.setMemberType(MemberTypeEnum.RIGHTS.getIndex());
// queryWrapper.eq(Activity::getMemberType, MemberTypeEnum.RIGHTS.getIndex());
// }
// }
// }
// }
// if (ObjectUtil.isNotEmpty(consumerWallet)) {
// if (ObjectUtil.isNotEmpty(consumerWallet)) {
// priceResponse.setAvailableBalance(consumerWallet.getBalance());
// priceResponse.setAvailableBalance(consumerWallet.getBalance());
// priceResponse.setAvailableDuration(consumerWallet.getRemainingDuration());
// priceResponse.setAvailableDuration(consumerWallet.getRemainingDuration());
// }
// }
consumerWallet
=
consumerWalletService
.
getOne
(
new
LambdaQueryWrapper
<
ConsumerWallet
>().
eq
(
ConsumerWallet:
:
getConsumerId
,
user
.
getId
()));
consumerMember
=
consumerMemberService
.
getOne
(
new
LambdaQueryWrapper
<
ConsumerMember
>().
eq
(
ConsumerMember:
:
getConsumerId
,
user
.
getId
()));
if
(
ObjectUtil
.
isNotEmpty
(
consumerMember
))
{
queryWrapper
.
eq
(
Activity:
:
getIsOpen
,
YesNoEnum
.
yes
.
getIndex
());
// if (consumerMember.getIsRights().equals(YesNoEnum.yes.getIndex())) {
// queryWrapper.eq(Activity::getMemberType, MemberTypeEnum.RIGHTS.getIndex());
// } else if (consumerMember.getIsRecharge().equals(YesNoEnum.yes.getIndex()) && consumerMember.getIsRights().equals(YesNoEnum.no.getIndex())) {
// queryWrapper.eq(Activity::getMemberType, MemberTypeEnum.RECHARGE.getIndex());
// } else {
// queryWrapper.eq(Activity::getMemberType, MemberTypeEnum.NORMAL.getIndex());
// }
if
(
consumerMember
.
getIsRecharge
().
equals
(
YesNoEnum
.
no
.
getIndex
())
&&
consumerMember
.
getIsRights
().
equals
(
YesNoEnum
.
no
.
getIndex
()))
{
queryWrapper
.
eq
(
Activity:
:
getMemberType
,
MemberTypeEnum
.
NORMAL
.
getIndex
());
}
else
if
(
consumerMember
.
getIsRecharge
().
equals
(
YesNoEnum
.
yes
.
getIndex
())
&&
consumerMember
.
getIsRights
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
queryWrapper
.
in
(
Activity:
:
getMemberType
,
MemberTypeEnum
.
RECHARGE
.
getIndex
(),
MemberTypeEnum
.
RIGHTS
.
getIndex
());
}
else
if
(
consumerMember
.
getIsRecharge
().
equals
(
YesNoEnum
.
yes
.
getIndex
())
&&
consumerMember
.
getIsRights
().
equals
(
YesNoEnum
.
no
.
getIndex
()))
{
// activity.setMemberType(MemberTypeEnum.RECHARGE.getIndex());
queryWrapper
.
eq
(
Activity:
:
getMemberType
,
MemberTypeEnum
.
RECHARGE
.
getIndex
());
}
else
if
(
consumerMember
.
getIsRights
().
equals
(
YesNoEnum
.
yes
.
getIndex
())
&&
consumerMember
.
getIsRecharge
().
equals
(
YesNoEnum
.
no
.
getIndex
()))
{
// activity.setMemberType(MemberTypeEnum.RIGHTS.getIndex());
queryWrapper
.
eq
(
Activity:
:
getMemberType
,
MemberTypeEnum
.
RIGHTS
.
getIndex
());
}
}
if
(
ObjectUtil
.
isNotEmpty
(
consumerWallet
))
{
priceResponse
.
setAvailableBalance
(
consumerWallet
.
getBalance
());
priceResponse
.
setAvailableDuration
(
consumerWallet
.
getRemainingDuration
());
}
}
}
SRoom
room
=
roomService
.
getById
(
request
.
getRoomId
());
SRoom
room
=
roomService
.
getById
(
request
.
getRoomId
());
BigDecimal
totalPrice
=
computeTotalPrice
(
room
.
getPrice
(),
request
.
getPreStartDate
(),
request
.
getPreEndDate
());
BigDecimal
totalPrice
=
computeTotalPrice
(
room
.
getPrice
(),
request
.
getPreStartDate
(),
request
.
getPreEndDate
());
...
...
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