mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2025-01-19 11:40:05 +08:00
member: 佣金不冻结时,直接就是结算状态
This commit is contained in:
parent
c7ef8519c8
commit
090058a2ba
@ -30,6 +30,10 @@ public interface MemberBrokerageRecordConvert {
|
|||||||
PageResult<MemberBrokerageRecordRespVO> convertPage(PageResult<MemberBrokerageRecordDO> page);
|
PageResult<MemberBrokerageRecordRespVO> convertPage(PageResult<MemberBrokerageRecordDO> page);
|
||||||
|
|
||||||
default MemberBrokerageRecordDO convert(MemberUserDO user, String bizId, int brokerageFrozenDays, int brokerage, LocalDateTime unfreezeTime) {
|
default MemberBrokerageRecordDO convert(MemberUserDO user, String bizId, int brokerageFrozenDays, int brokerage, LocalDateTime unfreezeTime) {
|
||||||
|
// 不冻结时,佣金直接就是结算状态
|
||||||
|
Integer status = brokerageFrozenDays > 0
|
||||||
|
? BrokerageRecordStatusEnum.WAIT_SETTLEMENT.getStatus()
|
||||||
|
: BrokerageRecordStatusEnum.SETTLEMENT.getStatus();
|
||||||
return new MemberBrokerageRecordDO()
|
return new MemberBrokerageRecordDO()
|
||||||
.setUserId(user.getId())
|
.setUserId(user.getId())
|
||||||
.setBizType(BrokerageRecordBizTypeEnum.ORDER.getType())
|
.setBizType(BrokerageRecordBizTypeEnum.ORDER.getType())
|
||||||
@ -38,7 +42,7 @@ public interface MemberBrokerageRecordConvert {
|
|||||||
.setTotalPrice(user.getBrokeragePrice())
|
.setTotalPrice(user.getBrokeragePrice())
|
||||||
.setTitle(BrokerageRecordBizTypeEnum.ORDER.getTitle())
|
.setTitle(BrokerageRecordBizTypeEnum.ORDER.getTitle())
|
||||||
.setDescription(StrUtil.format(BrokerageRecordBizTypeEnum.ORDER.getDescription(), String.valueOf(brokerage / 100.0)))
|
.setDescription(StrUtil.format(BrokerageRecordBizTypeEnum.ORDER.getDescription(), String.valueOf(brokerage / 100.0)))
|
||||||
.setStatus(BrokerageRecordStatusEnum.WAIT_SETTLEMENT.getStatus())
|
.setStatus(status)
|
||||||
.setFrozenDays(brokerageFrozenDays)
|
.setFrozenDays(brokerageFrozenDays)
|
||||||
.setUnfreezeTime(unfreezeTime);
|
.setUnfreezeTime(unfreezeTime);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user