mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-26 05:55:03 +08:00
update 会员钱包
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package com.jsowell.pile.service;
|
||||
|
||||
import com.jsowell.pile.domain.MemberWalletInfo;
|
||||
import com.jsowell.pile.vo.base.MemberWalletVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MemberWalletInfoService {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
@@ -16,4 +19,6 @@ public interface MemberWalletInfoService {
|
||||
int updateByPrimaryKeySelective(MemberWalletInfo record);
|
||||
|
||||
int updateByPrimaryKey(MemberWalletInfo record);
|
||||
|
||||
List<MemberWalletVO> selectByMemberWalletList(String memberId);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
package com.jsowell.pile.service.impl;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.jsowell.pile.domain.MemberWalletInfo;
|
||||
import com.jsowell.pile.mapper.MemberWalletInfoMapper;
|
||||
import com.jsowell.pile.service.MemberWalletInfoService;
|
||||
import com.jsowell.pile.vo.base.MemberWalletVO;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class MemberWalletInfoServiceImpl implements MemberWalletInfoService {
|
||||
@@ -48,4 +52,23 @@ public class MemberWalletInfoServiceImpl implements MemberWalletInfoService {
|
||||
return memberWalletInfoMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MemberWalletVO> selectByMemberWalletList(String memberId) {
|
||||
List<MemberWalletVO> resultList = Lists.newArrayList();
|
||||
List<MemberWalletInfo> list = memberWalletInfoMapper.selectByMemberWalletList(memberId);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
for (MemberWalletInfo memberWalletInfo : list) {
|
||||
resultList.add(
|
||||
MemberWalletVO.builder()
|
||||
.memberId(memberWalletInfo.getMemberId())
|
||||
.merchantId(memberWalletInfo.getMerchantId())
|
||||
.walletCode(memberWalletInfo.getWalletCode())
|
||||
.principalBalance(memberWalletInfo.getPrincipalBalance())
|
||||
.build()
|
||||
);
|
||||
}
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user