diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/brokerage/record/MemberBrokerageRecordConvert.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/brokerage/record/MemberBrokerageRecordConvert.java index d36ef1c03..393bacb72 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/brokerage/record/MemberBrokerageRecordConvert.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/brokerage/record/MemberBrokerageRecordConvert.java @@ -30,6 +30,10 @@ public interface MemberBrokerageRecordConvert { PageResult convertPage(PageResult page); 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() .setUserId(user.getId()) .setBizType(BrokerageRecordBizTypeEnum.ORDER.getType()) @@ -38,7 +42,7 @@ public interface MemberBrokerageRecordConvert { .setTotalPrice(user.getBrokeragePrice()) .setTitle(BrokerageRecordBizTypeEnum.ORDER.getTitle()) .setDescription(StrUtil.format(BrokerageRecordBizTypeEnum.ORDER.getDescription(), String.valueOf(brokerage / 100.0))) - .setStatus(BrokerageRecordStatusEnum.WAIT_SETTLEMENT.getStatus()) + .setStatus(status) .setFrozenDays(brokerageFrozenDays) .setUnfreezeTime(unfreezeTime); }