fix:账户列表、密码更新接口

This commit is contained in:
wangff
2025-11-18 09:17:45 +08:00
parent f5283b783c
commit 0d882ff79a
10 changed files with 188 additions and 18 deletions

View File

@@ -1,10 +1,7 @@
package com.cool.store.service.wallet;
import com.cool.store.request.wallet.*;
import com.cool.store.vo.wallet.AccountAuthenticationVO;
import com.cool.store.vo.wallet.AccountBillListVO;
import com.cool.store.vo.wallet.AccountInfoVO;
import com.cool.store.vo.wallet.BankVO;
import com.cool.store.vo.wallet.*;
import com.github.pagehelper.PageInfo;
import java.util.List;
@@ -63,10 +60,10 @@ public interface WalletService {
/**
* 查询账户列表
* @param request 钱包门店Request
* @param request 门店idRequest
* @return 账户信息VO列表
*/
List<AccountInfoVO> getAccountList(WalletShopRequest request);
List<AccountInfoVO> getAccountList(StoreShopRequest request);
/**
* 交易流水
@@ -74,4 +71,18 @@ public interface WalletService {
* @return 账户交易列表VO列表
*/
PageInfo<AccountBillListVO> getBillPage(AccountBillQueryRequest request);
/**
* 密码维护
* @param request 账户密码维护Request
* @return 是否成功
*/
Boolean passwordUpdate(AccountPasswordRequest request);
/**
* 账户充值
* @param request 账户充值Request
* @return 账户充值VO
*/
AccountPaymentVO payment(AccountPaymentRequest request);
}

View File

@@ -6,6 +6,7 @@ import com.cool.store.constants.CommonConstants;
import com.cool.store.dao.RegionDao;
import com.cool.store.dao.ShopInfoDAO;
import com.cool.store.dao.ShopStageInfoDAO;
import com.cool.store.dao.wallet.WalletLargePaymentDAO;
import com.cool.store.dto.wallet.*;
import com.cool.store.entity.LicenseTransactDO;
import com.cool.store.entity.RegionDO;
@@ -22,10 +23,8 @@ import com.cool.store.request.wallet.*;
import com.cool.store.service.wallet.WalletApiService;
import com.cool.store.service.wallet.WalletService;
import com.cool.store.utils.BeanUtil;
import com.cool.store.vo.wallet.AccountAuthenticationVO;
import com.cool.store.vo.wallet.AccountBillListVO;
import com.cool.store.vo.wallet.AccountInfoVO;
import com.cool.store.vo.wallet.BankVO;
import com.cool.store.utils.UUIDUtils;
import com.cool.store.vo.wallet.*;
import com.github.pagehelper.PageInfo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -57,6 +56,7 @@ public class WalletServiceImpl implements WalletService {
private final ApplyLicenseMapper applyLicenseMapper;
private final WalletApiService walletApiService;
private final RegionDao regionDao;
private final WalletLargePaymentDAO walletLargePaymentDAO;
@Override
public Boolean accountCreate(AccountCreateRequest request) {
@@ -192,12 +192,9 @@ public class WalletServiceImpl implements WalletService {
}
@Override
public List<AccountInfoVO> getAccountList(WalletShopRequest request) {
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
if (Objects.isNull(shopInfo)) {
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
}
List<AccountInfoDTO> accountInfo = walletApiService.getAccountInfo(new OutStoreIdRequest(shopInfo.getStoreId()));
public List<AccountInfoVO> getAccountList(StoreShopRequest request) {
String storeId = getStoreId(request);
List<AccountInfoDTO> accountInfo = walletApiService.getAccountInfo(new OutStoreIdRequest(storeId));
return BeanUtil.toList(accountInfo, AccountInfoVO.class);
}
@@ -226,6 +223,36 @@ public class WalletServiceImpl implements WalletService {
return toPageInfo(billPage.getData(), AccountBillListVO.class, billPage.getPage());
}
@Override
public Boolean passwordUpdate(AccountPasswordRequest request) {
String storeId = getStoreId(request);
UpdatePasswordRequest passwordRequest = BeanUtil.toBean(request, UpdatePasswordRequest.class);
passwordRequest.setOutStoreId(storeId);
walletApiService.upholdPwd(passwordRequest);
return true;
}
@Override
public AccountPaymentVO payment(AccountPaymentRequest request) {
String storeId = getStoreId(request);
String paymentId = UUIDUtils.get32UUID();
// new LargePaymentRequest(storeId, paymentId, "", request.getAmount());
return null;
}
public String getStoreId(StoreShopRequest request) {
String storeId = request.getStoreId();
if (StringUtils.isBlank(storeId) && Objects.nonNull(request.getShopId())) {
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
storeId = Objects.nonNull(shopInfo) ? shopInfo.getStoreId() : null;
}
if (StringUtils.isBlank(storeId)) {
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
}
return storeId;
}
/**
* 查询并校验门店是否存在以及阶段是否处于平安钱包未开通状态
*/