diff --git a/dating-agency-mall-server/src/main/java/com/qniao/dam/api/query/walletaccount/user/response/UsePageWalletAccountRecordByOperatorVo.java b/dating-agency-mall-server/src/main/java/com/qniao/dam/api/query/walletaccount/user/response/UsePageWalletAccountRecordByOperatorVo.java index 7774736..eed0363 100644 --- a/dating-agency-mall-server/src/main/java/com/qniao/dam/api/query/walletaccount/user/response/UsePageWalletAccountRecordByOperatorVo.java +++ b/dating-agency-mall-server/src/main/java/com/qniao/dam/api/query/walletaccount/user/response/UsePageWalletAccountRecordByOperatorVo.java @@ -5,6 +5,7 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.qniao.dam.domian.aggregate.product.constant.ProductSubCategoryEnum; import com.qniao.dam.domian.aggregate.walletaccount.constant.TradeTypeEnum; +import com.qniao.dau.domian.aggregate.matchmaker.constant.MatchmakerLevelEnum; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -34,9 +35,15 @@ public class UsePageWalletAccountRecordByOperatorVo { @ApiModelProperty("手机号") private String phone; + @ApiModelProperty("红娘用户ID") + private Long matchmakerUserId; + @ApiModelProperty("红娘身份类型") private ProductSubCategoryEnum matchmakerType; + @ApiModelProperty("红娘等级") + private MatchmakerLevelEnum matchmakerLevel; + @ApiModelProperty("交易金额") private BigDecimal tradeAmount; diff --git a/dating-agency-mall-server/src/main/java/com/qniao/dam/query/walletaccount/impl/WalletAccountQueryServiceImpl.java b/dating-agency-mall-server/src/main/java/com/qniao/dam/query/walletaccount/impl/WalletAccountQueryServiceImpl.java index c7b6449..97633d4 100644 --- a/dating-agency-mall-server/src/main/java/com/qniao/dam/query/walletaccount/impl/WalletAccountQueryServiceImpl.java +++ b/dating-agency-mall-server/src/main/java/com/qniao/dam/query/walletaccount/impl/WalletAccountQueryServiceImpl.java @@ -12,6 +12,7 @@ import com.qniao.dam.domian.aggregate.walletaccount.constant.IdentityTypeEnum; import com.qniao.dam.domian.aggregate.walletaccount.constant.TradeTypeEnum; import com.qniao.dam.infrastructure.persistent.dao.domain.WalletAccountRecordDao; import com.qniao.dam.infrastructure.persistent.dao.view.WalletAccountViewDao; +import com.qniao.dam.query.matchmaker.MatchmakerQueryService; import com.qniao.dam.query.walletaccount.WalletAccountQueryService; import com.qniao.dam.domain.aggregate.walletaccount.entity.WalletAccount; import com.qniao.dam.infrastructure.persistent.dao.domain.WalletAccountDao; @@ -35,6 +36,8 @@ public class WalletAccountQueryServiceImpl implements WalletAccountQueryService private WalletAccountViewDao walletAccountViewDao; @Resource private WalletAccountRecordDao walletAccountRecordDao; + @Resource + private MatchmakerQueryService matchmakerQueryService; @Override public WalletAccount queryByUserId(Long userId) { @@ -94,7 +97,13 @@ public class WalletAccountQueryServiceImpl implements WalletAccountQueryService @Override public IPage pageWalletAccountRecordByOperator(PageUtil pageUtil, UsePageWalletAccountRecordByOperatorQueryParams queryParams) { - return walletAccountViewDao.pageWalletAccountRecordByOperator(pageUtil.toPageWithoutOrders(),queryParams); + IPage page = walletAccountViewDao.pageWalletAccountRecordByOperator(pageUtil.toPageWithoutOrders(), queryParams); + if (page.getRecords().size() > 0) { + page.getRecords().forEach(record -> { + record.setMatchmakerLevel(matchmakerQueryService.queryLevelByUserId(record.getMatchmakerUserId())); + }); + } + return page; } private BigDecimal countUnavailableWithdrawBalance(Long walletAccountId, LocalDate date, int month) {