feat: 结算账户
parent
0c9922ce94
commit
7f8d71b9a8
|
|
@ -0,0 +1,35 @@
|
|||
package com.ruoyi.xkt.dto.account;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author liangyq
|
||||
* @date 2025-04-23 15:03
|
||||
*/
|
||||
@Data
|
||||
public class ExternalAccountUpdateDTO {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 归属人实际账户
|
||||
*/
|
||||
private String accountOwnerNumber;
|
||||
/**
|
||||
* 归属人真实姓名
|
||||
*/
|
||||
private String accountOwnerName;
|
||||
/**
|
||||
* 归属人手机号
|
||||
*/
|
||||
private String accountOwnerPhoneNumber;
|
||||
/**
|
||||
* 归属人认证通过
|
||||
*/
|
||||
private Boolean accountAuthAccess;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ package com.ruoyi.xkt.service;
|
|||
|
||||
import com.ruoyi.xkt.domain.ExternalAccount;
|
||||
import com.ruoyi.xkt.dto.account.ExternalAccountAddDTO;
|
||||
import com.ruoyi.xkt.dto.account.ExternalAccountUpdateDTO;
|
||||
import com.ruoyi.xkt.dto.finance.TransInfo;
|
||||
import com.ruoyi.xkt.enums.*;
|
||||
|
||||
|
|
@ -68,8 +69,8 @@ public interface IExternalAccountService {
|
|||
/**
|
||||
* 修改账户
|
||||
*
|
||||
* @param externalAccount
|
||||
* @param update
|
||||
* @return
|
||||
*/
|
||||
int modifyAccount(ExternalAccount externalAccount);
|
||||
int modifyAccount(ExternalAccountUpdateDTO update);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,11 +121,13 @@ public class AccountServiceImpl implements IAccountService {
|
|||
EAccountOwnerType.STORE, EAccountType.ALI_PAY);
|
||||
if (alipayExternalAccount != null) {
|
||||
//修改
|
||||
alipayExternalAccount.setAccountOwnerName(alipayBind.getAccountOwnerName());
|
||||
alipayExternalAccount.setAccountOwnerNumber(alipayBind.getAccountOwnerNumber());
|
||||
alipayExternalAccount.setAccountOwnerPhoneNumber(alipayBind.getAccountOwnerPhoneNumber());
|
||||
alipayExternalAccount.setAccountAuthAccess(true);
|
||||
externalAccountService.modifyAccount(alipayExternalAccount);
|
||||
ExternalAccountUpdateDTO updateDTO = new ExternalAccountUpdateDTO();
|
||||
updateDTO.setId(alipayExternalAccount.getId());
|
||||
updateDTO.setAccountOwnerName(alipayBind.getAccountOwnerName());
|
||||
updateDTO.setAccountOwnerNumber(alipayBind.getAccountOwnerNumber());
|
||||
updateDTO.setAccountOwnerPhoneNumber(alipayBind.getAccountOwnerPhoneNumber());
|
||||
updateDTO.setAccountAuthAccess(true);
|
||||
externalAccountService.modifyAccount(updateDTO);
|
||||
} else {
|
||||
//新增
|
||||
ExternalAccountAddDTO addDTO = new ExternalAccountAddDTO();
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import com.ruoyi.common.utils.bean.BeanValidators;
|
|||
import com.ruoyi.xkt.domain.ExternalAccount;
|
||||
import com.ruoyi.xkt.domain.ExternalAccountTransDetail;
|
||||
import com.ruoyi.xkt.dto.account.ExternalAccountAddDTO;
|
||||
import com.ruoyi.xkt.dto.account.ExternalAccountUpdateDTO;
|
||||
import com.ruoyi.xkt.dto.finance.TransInfo;
|
||||
import com.ruoyi.xkt.enums.*;
|
||||
import com.ruoyi.xkt.mapper.ExternalAccountMapper;
|
||||
|
|
@ -153,14 +154,11 @@ public class ExternalAccountServiceImpl implements IExternalAccountService {
|
|||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public int modifyAccount(ExternalAccount externalAccount) {
|
||||
Assert.notNull(externalAccount);
|
||||
Assert.notNull(externalAccount.getId());
|
||||
int r = externalAccountMapper.updateById(externalAccount);
|
||||
if (r == 0) {
|
||||
throw new ServiceException(Constants.VERSION_LOCK_ERROR_COMMON_MSG);
|
||||
}
|
||||
return r;
|
||||
public int modifyAccount(ExternalAccountUpdateDTO update) {
|
||||
Assert.notNull(update);
|
||||
Assert.notNull(update.getId());
|
||||
ExternalAccount updateParams = BeanUtil.toBean(update, ExternalAccount.class);
|
||||
return externalAccountMapper.updateById(updateParams);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue