mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-03 21:48:13 +08:00
update 会员钱包
This commit is contained in:
@@ -2,7 +2,9 @@ package com.jsowell.pile.service.impl;
|
|||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.jsowell.pile.domain.MemberWalletInfo;
|
import com.jsowell.pile.domain.MemberWalletInfo;
|
||||||
|
import com.jsowell.pile.domain.PileMerchantInfo;
|
||||||
import com.jsowell.pile.mapper.MemberWalletInfoMapper;
|
import com.jsowell.pile.mapper.MemberWalletInfoMapper;
|
||||||
|
import com.jsowell.pile.service.IPileMerchantInfoService;
|
||||||
import com.jsowell.pile.service.MemberWalletInfoService;
|
import com.jsowell.pile.service.MemberWalletInfoService;
|
||||||
import com.jsowell.pile.vo.base.MemberWalletVO;
|
import com.jsowell.pile.vo.base.MemberWalletVO;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
@@ -10,6 +12,7 @@ import org.springframework.stereotype.Service;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class MemberWalletInfoServiceImpl implements MemberWalletInfoService {
|
public class MemberWalletInfoServiceImpl implements MemberWalletInfoService {
|
||||||
@@ -17,6 +20,9 @@ public class MemberWalletInfoServiceImpl implements MemberWalletInfoService {
|
|||||||
@Resource
|
@Resource
|
||||||
private MemberWalletInfoMapper memberWalletInfoMapper;
|
private MemberWalletInfoMapper memberWalletInfoMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IPileMerchantInfoService pileMerchantInfoService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int deleteByPrimaryKey(Integer id) {
|
public int deleteByPrimaryKey(Integer id) {
|
||||||
return memberWalletInfoMapper.deleteByPrimaryKey(id);
|
return memberWalletInfoMapper.deleteByPrimaryKey(id);
|
||||||
@@ -58,14 +64,18 @@ public class MemberWalletInfoServiceImpl implements MemberWalletInfoService {
|
|||||||
List<MemberWalletInfo> list = memberWalletInfoMapper.selectByMemberWalletList(memberId);
|
List<MemberWalletInfo> list = memberWalletInfoMapper.selectByMemberWalletList(memberId);
|
||||||
if (CollectionUtils.isNotEmpty(list)) {
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
for (MemberWalletInfo memberWalletInfo : list) {
|
for (MemberWalletInfo memberWalletInfo : list) {
|
||||||
resultList.add(
|
MemberWalletVO memberWalletVO = MemberWalletVO.builder()
|
||||||
MemberWalletVO.builder()
|
|
||||||
.memberId(memberWalletInfo.getMemberId())
|
.memberId(memberWalletInfo.getMemberId())
|
||||||
.merchantId(memberWalletInfo.getMerchantId())
|
.merchantId(memberWalletInfo.getMerchantId())
|
||||||
.walletCode(memberWalletInfo.getWalletCode())
|
.walletCode(memberWalletInfo.getWalletCode())
|
||||||
.principalBalance(memberWalletInfo.getPrincipalBalance())
|
.principalBalance(memberWalletInfo.getPrincipalBalance())
|
||||||
.build()
|
.build();
|
||||||
);
|
// 获取运营商名称
|
||||||
|
PileMerchantInfo merchantInfo = pileMerchantInfoService.selectPileMerchantInfoById(memberWalletInfo.getMerchantId());
|
||||||
|
if (Objects.nonNull(merchantInfo)) {
|
||||||
|
memberWalletVO.setMerchantName(merchantInfo.getMerchantName());
|
||||||
|
}
|
||||||
|
resultList.add(memberWalletVO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return resultList;
|
return resultList;
|
||||||
|
|||||||
@@ -28,6 +28,11 @@ public class MemberWalletVO {
|
|||||||
*/
|
*/
|
||||||
private String merchantId;
|
private String merchantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属运营商name
|
||||||
|
*/
|
||||||
|
private String merchantName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 本金金额
|
* 本金金额
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user