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
53383770
Commit
53383770
authored
Aug 08, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'refs/heads/dev' into test
parents
ecdce917
36d97a0a
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
68 additions
and
68 deletions
+68
-68
DurationLogController.java
...va/share/web/controller/system/DurationLogController.java
+1
-1
EquityMembersOrderController.java
...e/web/controller/system/EquityMembersOrderController.java
+2
-0
RechargeController.java
.../java/share/web/controller/system/RechargeController.java
+2
-0
ComputedOrderPriceResponse.java
...ava/share/system/response/ComputedOrderPriceResponse.java
+6
-0
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+53
-67
BalanceLogMapper.xml
...tem/src/main/resources/mapper/system/BalanceLogMapper.xml
+1
-0
DurationLogMapper.xml
...em/src/main/resources/mapper/system/DurationLogMapper.xml
+1
-0
IntegralLogMapper.xml
...em/src/main/resources/mapper/system/IntegralLogMapper.xml
+1
-0
MemberProgressLogMapper.xml
.../main/resources/mapper/system/MemberProgressLogMapper.xml
+1
-0
No files found.
share-front/src/main/java/share/web/controller/system/DurationLogController.java
View file @
53383770
...
@@ -21,7 +21,7 @@ import java.util.List;
...
@@ -21,7 +21,7 @@ import java.util.List;
* @date 2024-06-24
* @date 2024-06-24
*/
*/
@RestController
@RestController
@RequestMapping
(
"/
system/
durationLog"
)
@RequestMapping
(
"/durationLog"
)
public
class
DurationLogController
extends
BaseController
{
public
class
DurationLogController
extends
BaseController
{
@Autowired
@Autowired
private
DurationLogService
durationLogService
;
private
DurationLogService
durationLogService
;
...
...
share-front/src/main/java/share/web/controller/system/EquityMembersOrderController.java
View file @
53383770
...
@@ -12,6 +12,7 @@ import share.common.core.domain.R;
...
@@ -12,6 +12,7 @@ import share.common.core.domain.R;
import
share.common.core.page.TableDataInfo
;
import
share.common.core.page.TableDataInfo
;
import
share.common.core.redis.RedisUtil
;
import
share.common.core.redis.RedisUtil
;
import
share.common.enums.BusinessType
;
import
share.common.enums.BusinessType
;
import
share.common.enums.YesNoEnum
;
import
share.common.utils.JsonConvertUtil
;
import
share.common.utils.JsonConvertUtil
;
import
share.system.domain.SConsumer
;
import
share.system.domain.SConsumer
;
import
share.system.domain.vo.EquityMembersOrderVo
;
import
share.system.domain.vo.EquityMembersOrderVo
;
...
@@ -45,6 +46,7 @@ public class EquityMembersOrderController extends BaseController {
...
@@ -45,6 +46,7 @@ public class EquityMembersOrderController extends BaseController {
startPage
();
startPage
();
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
equityMembersOrder
.
setConsumerId
(
user
.
getId
());
equityMembersOrder
.
setConsumerId
(
user
.
getId
());
equityMembersOrder
.
setPayStatus
(
YesNoEnum
.
yes
.
getIndex
());
List
<
EquityMembersOrderVo
>
list
=
equityMembersOrderService
.
selectEquityMembersOrderList
(
equityMembersOrder
);
List
<
EquityMembersOrderVo
>
list
=
equityMembersOrderService
.
selectEquityMembersOrderList
(
equityMembersOrder
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
...
...
share-front/src/main/java/share/web/controller/system/RechargeController.java
View file @
53383770
...
@@ -10,6 +10,7 @@ import share.common.core.domain.AjaxResult;
...
@@ -10,6 +10,7 @@ import share.common.core.domain.AjaxResult;
import
share.common.core.domain.R
;
import
share.common.core.domain.R
;
import
share.common.core.page.TableDataInfo
;
import
share.common.core.page.TableDataInfo
;
import
share.common.core.redis.RedisUtil
;
import
share.common.core.redis.RedisUtil
;
import
share.common.enums.YesNoEnum
;
import
share.common.utils.JsonConvertUtil
;
import
share.common.utils.JsonConvertUtil
;
import
share.system.domain.SConsumer
;
import
share.system.domain.SConsumer
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.domain.vo.FrontTokenComponent
;
...
@@ -43,6 +44,7 @@ public class RechargeController extends BaseController {
...
@@ -43,6 +44,7 @@ public class RechargeController extends BaseController {
startPage
();
startPage
();
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
recharge
.
setConsumerId
(
user
.
getId
());
recharge
.
setConsumerId
(
user
.
getId
());
recharge
.
setStatus
(
YesNoEnum
.
yes
.
getIndex
());
List
<
RechargeVo
>
list
=
rechargeService
.
selectRechargeList
(
recharge
);
List
<
RechargeVo
>
list
=
rechargeService
.
selectRechargeList
(
recharge
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
...
...
share-system/src/main/java/share/system/response/ComputedOrderPriceResponse.java
View file @
53383770
...
@@ -42,6 +42,9 @@ public class ComputedOrderPriceResponse implements Serializable {
...
@@ -42,6 +42,9 @@ public class ComputedOrderPriceResponse implements Serializable {
@ApiModelProperty
(
value
=
"折扣比例"
)
@ApiModelProperty
(
value
=
"折扣比例"
)
private
BigDecimal
discountRatio
;
private
BigDecimal
discountRatio
;
@ApiModelProperty
(
value
=
"可用时长"
)
private
BigDecimal
availableDuration
;
//使用时长
//使用时长
@ApiModelProperty
(
value
=
"使用时长"
)
@ApiModelProperty
(
value
=
"使用时长"
)
private
BigDecimal
duration
;
private
BigDecimal
duration
;
...
@@ -50,6 +53,9 @@ public class ComputedOrderPriceResponse implements Serializable {
...
@@ -50,6 +53,9 @@ public class ComputedOrderPriceResponse implements Serializable {
@ApiModelProperty
(
value
=
"剩余时长"
)
@ApiModelProperty
(
value
=
"剩余时长"
)
private
BigDecimal
remainingDuration
;
private
BigDecimal
remainingDuration
;
@ApiModelProperty
(
value
=
"可用余额"
)
private
BigDecimal
availableBalance
;
//使用余额
//使用余额
@ApiModelProperty
(
value
=
"使用余额"
)
@ApiModelProperty
(
value
=
"使用余额"
)
private
BigDecimal
balance
;
private
BigDecimal
balance
;
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
53383770
...
@@ -1005,7 +1005,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -1005,7 +1005,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
List
<
String
>
phones
=
new
ArrayList
<>();
List
<
String
>
phones
=
new
ArrayList
<>();
SConsumerVo
sConsumer
=
new
SConsumerVo
();
SConsumerVo
sConsumer
=
new
SConsumerVo
();
sConsumer
.
setStoreId
(
sStore
.
getId
());
sConsumer
.
setStoreId
(
sStore
.
getId
());
sConsumer
.
setPosition
(
3
);
sConsumer
.
setPosition
(
PositionEnum
.
CUSTOMER_SERVICE
.
getCode
()
);
List
<
SConsumer
>
consumers
=
sConsumerService
.
selectAllocatedList
(
sConsumer
);
List
<
SConsumer
>
consumers
=
sConsumerService
.
selectAllocatedList
(
sConsumer
);
if
(
consumers
.
size
()
>
0
)
{
if
(
consumers
.
size
()
>
0
)
{
//获取用户id
//获取用户id
...
@@ -1104,7 +1104,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -1104,7 +1104,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
// memberProgressLogService.save(memberProgressLog);
// memberProgressLogService.save(memberProgressLog);
// consumerMemberService.updateConsumerMember(consumerMember);
// consumerMemberService.updateConsumerMember(consumerMember);
// } else if (consumerMember.getMemberType().equals(MemberTypeEnum.RIGHTS.getIndex())) {
// } else if (consumerMember.getMemberType().equals(MemberTypeEnum.RIGHTS.getIndex())) {
SConsumerCoupon
coupon
=
consumerCouponService
.
getById
(
sOrder
.
getCouponId
());
SConsumerCoupon
coupon
=
null
;
if
(
ObjectUtil
.
isNotEmpty
(
sOrder
.
getCouponId
()))
{
coupon
=
consumerCouponService
.
getById
(
sOrder
.
getCouponId
());
}
IntegralLog
integralLog
=
new
IntegralLog
();
IntegralLog
integralLog
=
new
IntegralLog
();
integralLog
.
setConsumerId
(
sOrder
.
getConsumerId
());
integralLog
.
setConsumerId
(
sOrder
.
getConsumerId
());
integralLog
.
setCurrentIntegral
(
consumerWallet
.
getRemainingIntegral
());
integralLog
.
setCurrentIntegral
(
consumerWallet
.
getRemainingIntegral
());
...
@@ -1136,34 +1140,29 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -1136,34 +1140,29 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
MemberProgressLog
memberProgressLog
=
new
MemberProgressLog
();
MemberProgressLog
memberProgressLog
=
new
MemberProgressLog
();
memberProgressLog
.
setConsumerId
(
sOrder
.
getConsumerId
());
memberProgressLog
.
setConsumerId
(
sOrder
.
getConsumerId
());
memberProgressLog
.
setCurrentProgress
(
consumerMember
.
getMembershipProgress
());
memberProgressLog
.
setCurrentProgress
(
consumerMember
.
getMembershipProgress
());
if
(
consumerMember
.
getMemberType
().
equals
(
MemberTypeEnum
.
NORMAL
.
getIndex
()))
{
//查询当前会员类型和下一级的会员配置
if
(
consumerMember
.
getIsRecharge
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
consumerMember
.
setMemberType
(
MemberTypeEnum
.
RECHARGE
.
getIndex
());
MemberConfig
one
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
MemberConfig
one
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
.
eq
(
MemberConfig:
:
getMembershipLevel
,
consumerMember
.
getMembershipLevel
()
+
1L
));
.
eq
(
MemberConfig:
:
getMembershipLevel
,
consumerMember
.
getMembershipLevel
()
+
1L
));
if
(
membershipProgress
.
compareTo
(
BigDecimal
.
valueOf
(
one
.
getLimitRequirements
()))
>=
0
)
{
if
(
consumerMember
.
getMemberType
().
equals
(
MemberTypeEnum
.
NORMAL
.
getIndex
()))
{
if
(
consumerMember
.
getIsRecharge
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
consumerMember
.
setMemberType
(
MemberTypeEnum
.
RECHARGE
.
getIndex
());
if
(
ObjectUtil
.
isNotEmpty
(
one
)
&&
membershipProgress
.
compareTo
(
BigDecimal
.
valueOf
(
one
.
getLimitRequirements
()))
>=
0
)
{
consumerMember
.
setMembershipLevel
(
consumerMember
.
getMembershipLevel
()
+
1L
);
consumerMember
.
setMembershipLevel
(
consumerMember
.
getMembershipLevel
()
+
1L
);
consumerMember
.
setMemberConfigId
(
one
.
getId
());
consumerMember
.
setMemberConfigId
(
one
.
getId
());
}
}
}
else
if
(
consumerMember
.
getIsRights
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
}
else
if
(
consumerMember
.
getIsRights
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
consumerMember
.
setMemberType
(
MemberTypeEnum
.
RIGHTS
.
getIndex
());
consumerMember
.
setMemberType
(
MemberTypeEnum
.
RIGHTS
.
getIndex
());
MemberConfig
one
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
if
(
ObjectUtil
.
isNotEmpty
(
one
)
&&
membershipProgress
.
compareTo
(
BigDecimal
.
valueOf
(
one
.
getLimitRequirements
()))
>=
0
)
{
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
.
eq
(
MemberConfig:
:
getMembershipLevel
,
consumerMember
.
getMembershipLevel
()
+
1L
));
if
(
membershipProgress
.
compareTo
(
BigDecimal
.
valueOf
(
one
.
getLimitRequirements
()))
>=
0
)
{
consumerMember
.
setMembershipLevel
(
consumerMember
.
getMembershipLevel
()
+
1L
);
consumerMember
.
setMembershipLevel
(
consumerMember
.
getMembershipLevel
()
+
1L
);
consumerMember
.
setMemberConfigId
(
one
.
getId
());
consumerMember
.
setMemberConfigId
(
one
.
getId
());
}
}
}
}
}
else
{
}
else
{
//查询当前会员类型和下一级的会员配置
MemberConfig
one
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
.
eq
(
MemberConfig:
:
getMembershipLevel
,
consumerMember
.
getMembershipLevel
()
+
1L
));
if
(
ObjectUtil
.
isNotEmpty
(
one
))
{
if
(
ObjectUtil
.
isNotEmpty
(
one
))
{
//判断是否升级
//判断是否升级
if
(
membershipProgress
.
compareTo
(
BigDecimal
.
valueOf
(
one
.
getLimitRequirements
()))
>=
0
)
{
if
(
ObjectUtil
.
isNotEmpty
(
one
)
&&
membershipProgress
.
compareTo
(
BigDecimal
.
valueOf
(
one
.
getLimitRequirements
()))
>=
0
)
{
consumerMember
.
setMembershipLevel
(
consumerMember
.
getMembershipLevel
()
+
1L
);
consumerMember
.
setMembershipLevel
(
consumerMember
.
getMembershipLevel
()
+
1L
);
consumerMember
.
setMemberConfigId
(
one
.
getId
());
consumerMember
.
setMemberConfigId
(
one
.
getId
());
}
}
...
@@ -1252,7 +1251,10 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -1252,7 +1251,10 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
// memberProgressLogService.save(memberProgressLog);
// memberProgressLogService.save(memberProgressLog);
// consumerMemberService.updateConsumerMember(consumerMember);
// consumerMemberService.updateConsumerMember(consumerMember);
// } else if (consumerMember.getMemberType().equals(MemberTypeEnum.RIGHTS.getIndex())) {
// } else if (consumerMember.getMemberType().equals(MemberTypeEnum.RIGHTS.getIndex())) {
SConsumerCoupon
coupon
=
consumerCouponService
.
getById
(
sOrder
.
getCouponId
());
SConsumerCoupon
coupon
=
null
;
if
(
ObjectUtil
.
isNotEmpty
(
sOrder
.
getCouponId
()))
{
coupon
=
consumerCouponService
.
getById
(
sOrder
.
getCouponId
());
}
IntegralLog
integralLog
=
new
IntegralLog
();
IntegralLog
integralLog
=
new
IntegralLog
();
integralLog
.
setConsumerId
(
sOrder
.
getConsumerId
());
integralLog
.
setConsumerId
(
sOrder
.
getConsumerId
());
integralLog
.
setCurrentIntegral
(
consumerWallet
.
getRemainingIntegral
());
integralLog
.
setCurrentIntegral
(
consumerWallet
.
getRemainingIntegral
());
...
@@ -1285,36 +1287,43 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -1285,36 +1287,43 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
MemberProgressLog
memberProgressLog
=
new
MemberProgressLog
();
MemberProgressLog
memberProgressLog
=
new
MemberProgressLog
();
memberProgressLog
.
setConsumerId
(
sOrder
.
getConsumerId
());
memberProgressLog
.
setConsumerId
(
sOrder
.
getConsumerId
());
memberProgressLog
.
setCurrentProgress
(
consumerMember
.
getMembershipProgress
());
memberProgressLog
.
setCurrentProgress
(
consumerMember
.
getMembershipProgress
());
//查询当前会员类型和当前等级的会员配置
MemberConfig
one
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
.
eq
(
MemberConfig:
:
getMembershipLevel
,
consumerMember
.
getMembershipLevel
()));
if
(
consumerMember
.
getMemberType
().
equals
(
MemberTypeEnum
.
NORMAL
.
getIndex
()))
{
if
(
consumerMember
.
getMemberType
().
equals
(
MemberTypeEnum
.
NORMAL
.
getIndex
()))
{
if
(
consumerMember
.
getIsRecharge
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
if
(
consumerMember
.
getIsRecharge
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
if
(
consumerMember
.
getMembershipLevel
().
compareTo
(
0L
)
>
0
)
{
consumerMember
.
setMemberType
(
MemberTypeEnum
.
RECHARGE
.
getIndex
());
consumerMember
.
setMemberType
(
MemberTypeEnum
.
RECHARGE
.
getIndex
());
MemberConfig
one
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
if
(
ObjectUtil
.
isNotEmpty
(
one
)
&&
membershipProgress
.
compareTo
(
BigDecimal
.
valueOf
(
one
.
getLimitRequirements
()))
<=
0
)
{
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
.
eq
(
MemberConfig:
:
getMembershipLevel
,
consumerMember
.
getMembershipLevel
()
-
1L
));
if
(
membershipProgress
.
compareTo
(
BigDecimal
.
valueOf
(
one
.
getLimitRequirements
()))
<=
0
)
{
consumerMember
.
setMembershipLevel
(
consumerMember
.
getMembershipLevel
()
-
1L
);
consumerMember
.
setMembershipLevel
(
consumerMember
.
getMembershipLevel
()
-
1L
);
consumerMember
.
setMemberConfigId
(
one
.
getId
());
consumerMember
.
setMemberConfigId
(
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
.
eq
(
MemberConfig:
:
getMembershipLevel
,
consumerMember
.
getMembershipLevel
())).
getId
());
}
}
}
}
else
if
(
consumerMember
.
getIsRights
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
}
else
if
(
consumerMember
.
getIsRights
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
if
(
consumerMember
.
getMembershipLevel
().
compareTo
(
0L
)
>
0
)
{
consumerMember
.
setMemberType
(
MemberTypeEnum
.
RIGHTS
.
getIndex
());
consumerMember
.
setMemberType
(
MemberTypeEnum
.
RIGHTS
.
getIndex
());
MemberConfig
one
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
if
(
ObjectUtil
.
isNotEmpty
(
one
)
&&
membershipProgress
.
compareTo
(
BigDecimal
.
valueOf
(
one
.
getLimitRequirements
()))
<=
0
)
{
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
.
eq
(
MemberConfig:
:
getMembershipLevel
,
consumerMember
.
getMembershipLevel
()
-
1L
));
if
(
membershipProgress
.
compareTo
(
BigDecimal
.
valueOf
(
one
.
getLimitRequirements
()))
<=
0
)
{
consumerMember
.
setMembershipLevel
(
consumerMember
.
getMembershipLevel
()
-
1L
);
consumerMember
.
setMembershipLevel
(
consumerMember
.
getMembershipLevel
()
-
1L
);
consumerMember
.
setMemberConfigId
(
one
.
getId
());
consumerMember
.
setMemberConfigId
(
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
.
eq
(
MemberConfig:
:
getMembershipLevel
,
consumerMember
.
getMembershipLevel
())).
getId
());
}
}
}
}
}
}
else
{
}
else
{
//查询当前会员类型和下一级的会员配置
if
(
consumerMember
.
getMembershipLevel
().
compareTo
(
0L
)
>
0
)
{
MemberConfig
one
=
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
.
eq
(
MemberConfig:
:
getMembershipLevel
,
consumerMember
.
getMembershipLevel
()
-
1L
));
if
(
ObjectUtil
.
isNotEmpty
(
one
))
{
if
(
ObjectUtil
.
isNotEmpty
(
one
))
{
//判断是否升级
//判断是否升级
if
(
membershipProgress
.
compareTo
(
BigDecimal
.
valueOf
(
one
.
getLimitRequirements
()))
<=
0
)
{
if
(
ObjectUtil
.
isNotEmpty
(
one
)
&&
membershipProgress
.
compareTo
(
BigDecimal
.
valueOf
(
one
.
getLimitRequirements
()))
<=
0
)
{
consumerMember
.
setMembershipLevel
(
consumerMember
.
getMembershipLevel
()
-
1L
);
consumerMember
.
setMembershipLevel
(
consumerMember
.
getMembershipLevel
()
-
1L
);
consumerMember
.
setMemberConfigId
(
one
.
getId
());
consumerMember
.
setMemberConfigId
(
memberConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MemberConfig
>()
.
eq
(
MemberConfig:
:
getMemberType
,
consumerMember
.
getMemberType
())
.
eq
(
MemberConfig:
:
getMembershipLevel
,
consumerMember
.
getMembershipLevel
())).
getId
());
}
}
}
}
}
}
}
...
@@ -1911,7 +1920,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -1911,7 +1920,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
List
<
String
>
phones
=
new
ArrayList
<>();
List
<
String
>
phones
=
new
ArrayList
<>();
SConsumerVo
sConsumer
=
new
SConsumerVo
();
SConsumerVo
sConsumer
=
new
SConsumerVo
();
sConsumer
.
setStoreId
(
sStore
.
getId
());
sConsumer
.
setStoreId
(
sStore
.
getId
());
sConsumer
.
setPosition
(
3
);
sConsumer
.
setPosition
(
PositionEnum
.
CUSTOMER_SERVICE
.
getCode
()
);
List
<
SConsumer
>
consumers
=
sConsumerService
.
selectAllocatedList
(
sConsumer
);
List
<
SConsumer
>
consumers
=
sConsumerService
.
selectAllocatedList
(
sConsumer
);
if
(
consumers
.
size
()
>
0
)
{
if
(
consumers
.
size
()
>
0
)
{
List
<
Long
>
sconsumerIds
=
consumers
.
stream
().
map
(
SConsumer:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
sconsumerIds
=
consumers
.
stream
().
map
(
SConsumer:
:
getId
).
collect
(
Collectors
.
toList
());
...
@@ -2199,7 +2208,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -2199,7 +2208,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
}
}
//判断预约时间是否到达,可提前一个小时开门
//判断预约时间是否到达,可提前一个小时开门
if
(
DateUtils
.
addMinutes
(
sOrder
.
getPreStartDate
(),
Constants
.
OPEN_DOOR_AHEAD_HOUR_MINUS
).
compareTo
(
new
Date
())
>
0
)
{
if
(
DateUtils
.
addMinutes
(
sOrder
.
getPreStartDate
(),
Constants
.
OPEN_DOOR_AHEAD_HOUR_MINUS
).
compareTo
(
new
Date
())
>
0
)
{
throw
new
BaseException
(
"预约时间未到达,可提前"
+
Constants
.
OPEN_DOOR_AHEAD_HOUR
+
"
小时
进场,请耐心等候!"
);
throw
new
BaseException
(
"预约时间未到达,可提前"
+
Constants
.
OPEN_DOOR_AHEAD_HOUR
+
"
分钟
进场,请耐心等候!"
);
}
}
// 判断房间是否脏房中
// 判断房间是否脏房中
// if (sRoomVo.getIsDirtyRoom() > 0) {
// if (sRoomVo.getIsDirtyRoom() > 0) {
...
@@ -2293,8 +2302,10 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -2293,8 +2302,10 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
ComputedOrderPriceResponse
priceResponse
=
new
ComputedOrderPriceResponse
();
ComputedOrderPriceResponse
priceResponse
=
new
ComputedOrderPriceResponse
();
priceResponse
.
setBalance
(
BigDecimal
.
ZERO
);
priceResponse
.
setBalance
(
BigDecimal
.
ZERO
);
priceResponse
.
setRemainingBalance
(
BigDecimal
.
ZERO
);
priceResponse
.
setRemainingBalance
(
BigDecimal
.
ZERO
);
priceResponse
.
setAvailableBalance
(
BigDecimal
.
ZERO
);
priceResponse
.
setDuration
(
BigDecimal
.
ZERO
);
priceResponse
.
setDuration
(
BigDecimal
.
ZERO
);
priceResponse
.
setRemainingDuration
(
BigDecimal
.
ZERO
);
priceResponse
.
setRemainingDuration
(
BigDecimal
.
ZERO
);
priceResponse
.
setAvailableDuration
(
BigDecimal
.
ZERO
);
priceResponse
.
setDiscount
(
BigDecimal
.
ZERO
);
priceResponse
.
setDiscount
(
BigDecimal
.
ZERO
);
Activity
activity
=
null
;
Activity
activity
=
null
;
ConsumerMember
consumerMember
=
null
;
ConsumerMember
consumerMember
=
null
;
...
@@ -2307,6 +2318,10 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -2307,6 +2318,10 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
queryWrapper
.
eq
(
Activity:
:
getIsOpen
,
YesNoEnum
.
yes
.
getIndex
());
queryWrapper
.
eq
(
Activity:
:
getIsOpen
,
YesNoEnum
.
yes
.
getIndex
());
queryWrapper
.
eq
(
Activity:
:
getMemberType
,
consumerMember
.
getMemberType
());
queryWrapper
.
eq
(
Activity:
:
getMemberType
,
consumerMember
.
getMemberType
());
}
}
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
());
...
@@ -2380,38 +2395,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -2380,38 +2395,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
if
(
ObjectUtil
.
isNull
(
request
.
getCouponId
())
||
request
.
getCouponId
()
<=
0
)
{
if
(
ObjectUtil
.
isNull
(
request
.
getCouponId
())
||
request
.
getCouponId
()
<=
0
)
{
priceResponse
.
setCouponFee
(
BigDecimal
.
ZERO
);
priceResponse
.
setCouponFee
(
BigDecimal
.
ZERO
);
priceResponse
.
setDiscountFee
(
priceResponse
.
getTotalFee
().
subtract
(
priceResponse
.
getPayFee
()));
priceResponse
.
setDiscountFee
(
priceResponse
.
getTotalFee
().
subtract
(
priceResponse
.
getPayFee
()));
if
(
priceResponse
.
getTotalFee
().
compareTo
(
new
BigDecimal
(
0
))
==
0
)
{
// if (priceResponse.getTotalFee().compareTo(new BigDecimal(0)) == 0) {
priceResponse
.
setDiscountRatio
(
BigDecimal
.
ZERO
);
// priceResponse.setDiscountRatio(BigDecimal.ZERO);
}
else
{
priceResponse
.
setDiscountRatio
(
priceResponse
.
getDiscountFee
().
divide
(
priceResponse
.
getTotalFee
(),
2
,
RoundingMode
.
HALF_UP
).
multiply
(
new
BigDecimal
(
100
)));
}
// CronParser cronParser = new CronParser(CronDefinitionBuilder.instanceDefinitionFor(CronType.QUARTZ));
// if (ObjectUtil.isNotEmpty(activity)) {
// Cron cron = cronParser.parse(activity.getCronExpression());
// ExecutionTime executionTime = ExecutionTime.forCron(cron);
// boolean match = executionTime.isMatch(ZonedDateTime.ofInstant(request.getPreStartDate().toInstant(), ZoneId.systemDefault()));
// boolean match1 = executionTime.isMatch(ZonedDateTime.ofInstant(request.getPreEndDate().toInstant(), ZoneId.systemDefault()));
// if (ObjectUtil.isNotEmpty(consumerMember) && !match && !match1) {
// MemberConfig memberConfig = memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>().eq(MemberConfig::getId, consumerMember.getMemberConfigId()));
// //总金额乘以折扣比例除以100
// priceResponse.setPayFee(priceResponse.getPayFee().multiply(memberConfig.getDiscountRatio()).divide(new BigDecimal(100)));
//// priceResponse.setCouponFee(priceResponse.getDiscountFee());
// }
// } else {
// } else {
// if (ObjectUtil.isNotEmpty(consumerMember)) {
// MemberConfig memberConfig = memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>().eq(MemberConfig::getId, consumerMember.getMemberConfigId()));
// //总金额乘以折扣比例除以100
// priceResponse.setPayFee(priceResponse.getPayFee().multiply(memberConfig.getDiscountRatio()).divide(new BigDecimal(100)));
// priceResponse.setDiscountFee(priceResponse.getTotalFee().subtract(priceResponse.getPayFee()));
//// priceResponse.setCouponFee(priceResponse.getDiscountFee());
// if (ObjectUtil.isNotEmpty(priceResponse.getDiscountFee()) && priceResponse.getTotalFee().compareTo(new BigDecimal(0.00)) > 0) {
// priceResponse.setDiscountRatio(priceResponse.getDiscountFee().divide(priceResponse.getTotalFee(), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)));
// priceResponse.setDiscountRatio(priceResponse.getDiscountFee().divide(priceResponse.getTotalFee(), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)));
// } else {
// priceResponse.setDiscountRatio(new BigDecimal(0));
// }
// }
// }
// }
priceResponse
.
setDiscountFee
(
priceResponse
.
getTotalFee
().
subtract
(
priceResponse
.
getPayFee
()));
if
(
ObjectUtil
.
isNotEmpty
(
priceResponse
.
getDiscountFee
())
&&
priceResponse
.
getTotalFee
().
compareTo
(
new
BigDecimal
(
0.00
))
>
0
)
{
if
(
ObjectUtil
.
isNotEmpty
(
priceResponse
.
getDiscountFee
())
&&
priceResponse
.
getTotalFee
().
compareTo
(
new
BigDecimal
(
0.00
))
>
0
)
{
priceResponse
.
setDiscountRatio
(
priceResponse
.
getDiscountFee
().
divide
(
priceResponse
.
getTotalFee
(),
2
,
RoundingMode
.
HALF_UP
).
multiply
(
new
BigDecimal
(
100
)));
priceResponse
.
setDiscountRatio
(
priceResponse
.
getDiscountFee
().
divide
(
priceResponse
.
getTotalFee
(),
2
,
RoundingMode
.
HALF_UP
).
multiply
(
new
BigDecimal
(
100
)));
}
else
{
}
else
{
...
@@ -2592,6 +2580,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -2592,6 +2580,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
private
BigDecimal
getBigDecimal
(
OrderComputedPriceRequest
request
,
Activity
activity
,
BigDecimal
payPrice
,
SConsumer
user
,
ConsumerMember
consumerMember
)
{
private
BigDecimal
getBigDecimal
(
OrderComputedPriceRequest
request
,
Activity
activity
,
BigDecimal
payPrice
,
SConsumer
user
,
ConsumerMember
consumerMember
)
{
if
(
ObjectUtil
.
isNotEmpty
(
user
))
{
if
(
ObjectUtil
.
isNotEmpty
(
user
))
{
MemberConfig
memberConfig
=
memberConfigService
.
getById
(
consumerMember
.
getMemberConfigId
());
if
(
ObjectUtil
.
isNotEmpty
(
activity
))
{
if
(
ObjectUtil
.
isNotEmpty
(
activity
))
{
CronParser
cronParser
=
new
CronParser
(
CronDefinitionBuilder
.
instanceDefinitionFor
(
CronType
.
QUARTZ
));
CronParser
cronParser
=
new
CronParser
(
CronDefinitionBuilder
.
instanceDefinitionFor
(
CronType
.
QUARTZ
));
Cron
cron
=
cronParser
.
parse
(
activity
.
getCronExpression
());
Cron
cron
=
cronParser
.
parse
(
activity
.
getCronExpression
());
...
@@ -2612,7 +2601,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -2612,7 +2601,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
if
(
match
&&
match1
)
{
if
(
match
&&
match1
)
{
payPrice
=
payPrice
.
multiply
(
activity
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
));
payPrice
=
payPrice
.
multiply
(
activity
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
));
}
else
{
}
else
{
MemberConfig
memberConfig
=
memberConfigService
.
getById
(
consumerMember
.
getMemberConfigId
());
payPrice
=
payPrice
.
multiply
(
memberConfig
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
));
payPrice
=
payPrice
.
multiply
(
memberConfig
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
));
}
}
}
else
{
}
else
{
...
@@ -2633,17 +2622,14 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -2633,17 +2622,14 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
if
(
match
&&
match1
)
{
if
(
match
&&
match1
)
{
payPrice
=
payPrice
.
multiply
(
activity
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
));
payPrice
=
payPrice
.
multiply
(
activity
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
));
}
else
{
}
else
{
MemberConfig
memberConfig
=
memberConfigService
.
getById
(
consumerMember
.
getMemberConfigId
());
payPrice
=
payPrice
.
multiply
(
memberConfig
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
));
payPrice
=
payPrice
.
multiply
(
memberConfig
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
));
}
}
// payPrice = payPrice.multiply(activity.getDiscountRatio()).divide(new BigDecimal(100));
// payPrice = payPrice.multiply(activity.getDiscountRatio()).divide(new BigDecimal(100));
}
else
{
}
else
{
MemberConfig
memberConfig
=
memberConfigService
.
getById
(
consumerMember
.
getMemberConfigId
());
payPrice
=
payPrice
.
multiply
(
memberConfig
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
));
payPrice
=
payPrice
.
multiply
(
memberConfig
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
));
}
}
}
}
}
else
{
}
else
{
MemberConfig
memberConfig
=
memberConfigService
.
getById
(
consumerMember
.
getMemberConfigId
());
payPrice
=
payPrice
.
multiply
(
memberConfig
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
));
payPrice
=
payPrice
.
multiply
(
memberConfig
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
));
}
}
}
}
...
...
share-system/src/main/resources/mapper/system/BalanceLogMapper.xml
View file @
53383770
...
@@ -67,6 +67,7 @@
...
@@ -67,6 +67,7 @@
<if
test=
"operationTime != null "
>
and b.operation_time = #{operationTime}
</if>
<if
test=
"operationTime != null "
>
and b.operation_time = #{operationTime}
</if>
<if
test=
"isDelete != null "
>
and b.is_delete = #{isDelete}
</if>
<if
test=
"isDelete != null "
>
and b.is_delete = #{isDelete}
</if>
</where>
</where>
ORDER BY b.operation_time DESC
</select>
</select>
<select
id=
"selectBalanceLogById"
parameterType=
"Long"
resultMap=
"BalanceLogResult"
>
<select
id=
"selectBalanceLogById"
parameterType=
"Long"
resultMap=
"BalanceLogResult"
>
...
...
share-system/src/main/resources/mapper/system/DurationLogMapper.xml
View file @
53383770
...
@@ -67,6 +67,7 @@
...
@@ -67,6 +67,7 @@
<if
test=
"operationTime != null "
>
and d.operation_time = #{operationTime}
</if>
<if
test=
"operationTime != null "
>
and d.operation_time = #{operationTime}
</if>
<if
test=
"isDelete != null "
>
and d.is_delete = #{isDelete}
</if>
<if
test=
"isDelete != null "
>
and d.is_delete = #{isDelete}
</if>
</where>
</where>
ORDER BY d.operation_time DESC
</select>
</select>
<select
id=
"selectDurationLogById"
parameterType=
"Long"
resultMap=
"DurationLogResult"
>
<select
id=
"selectDurationLogById"
parameterType=
"Long"
resultMap=
"DurationLogResult"
>
...
...
share-system/src/main/resources/mapper/system/IntegralLogMapper.xml
View file @
53383770
...
@@ -67,6 +67,7 @@
...
@@ -67,6 +67,7 @@
<if
test=
"operationTime != null "
>
and i.operation_time = #{operationTime}
</if>
<if
test=
"operationTime != null "
>
and i.operation_time = #{operationTime}
</if>
<if
test=
"isDelete != null "
>
and i.is_delete = #{isDelete}
</if>
<if
test=
"isDelete != null "
>
and i.is_delete = #{isDelete}
</if>
</where>
</where>
ORDER BY i.operation_time DESC
</select>
</select>
<select
id=
"selectIntegralLogById"
parameterType=
"Long"
resultMap=
"IntegralLogResult"
>
<select
id=
"selectIntegralLogById"
parameterType=
"Long"
resultMap=
"IntegralLogResult"
>
...
...
share-system/src/main/resources/mapper/system/MemberProgressLogMapper.xml
View file @
53383770
...
@@ -70,6 +70,7 @@
...
@@ -70,6 +70,7 @@
<if
test=
"operationTime != null "
>
and m.operation_time = #{operationTime}
</if>
<if
test=
"operationTime != null "
>
and m.operation_time = #{operationTime}
</if>
<if
test=
"isDelete != null "
>
and m.is_delete = #{isDelete}
</if>
<if
test=
"isDelete != null "
>
and m.is_delete = #{isDelete}
</if>
</where>
</where>
ORDER BY m.operation_time DESC
</select>
</select>
<select
id=
"selectMemberProgressLogById"
parameterType=
"Long"
resultMap=
"MemberProgressLogResult"
>
<select
id=
"selectMemberProgressLogById"
parameterType=
"Long"
resultMap=
"MemberProgressLogResult"
>
...
...
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