提交 8a175426 authored 作者: jiangwenye's avatar jiangwenye

平台账号查询

上级 48aaa2d8
......@@ -62,6 +62,12 @@ public class OwnerSettlementOwnerController {
return Result.ok(settlementOwnerService.getSettlementPlatformAccount());
}
@ApiOperation(value = "获取违约结算平台收款账号",notes = "<br>By:姜文业")
@GetMapping("/getBreakSettlementPlatformAccount")
public Result<SettlementPlatformAccountVO> getBreakSettlementPlatformAccount() {
return Result.ok(settlementOwnerService.getBreakSettlementPlatformAccount());
}
@ApiOperation(value = "付款接口",notes = "<br>By:李瑞新")
@PostMapping("/updatePaymentSettlement")
public Result updatePaymentSettlement(@RequestBody @Validated OwnerPaymentSettlementParam param) {
......
......@@ -177,6 +177,46 @@ public class SettlementOwnerServiceImpl implements SettlementOwnerService {
return vo;
}
@Override
public SettlementPlatformAccountVO getBreakSettlementPlatformAccount() {
//平台账号
//SettlementPlatformAccount platformAccount = settlementPlatformAccountDao.getSettlementPlatformAccount();
//返回对象
SettlementPlatformAccountVO vo = new SettlementPlatformAccountVO();
/*if(Objects.nonNull(platformAccount)){
vo.setPayee(platformAccount.getCardHolder());
vo.setPayeeBankCardNo(platformAccount.getBankCardNo());
vo.setPayeeBankName(platformAccount.getBankName());
}*/
List<CarrierPagePlatformAccountConfigVO> configs =
platformAccountConfigService.getPlatformAccountConfigByType(
PlatformAccountConfigEnum.BusinessType.BREAK.getCode(),
PlatformAccountConfigEnum.OwnerType.COMPANY.getCode(),
null,
null,
PlatformAccountConfigEnum.ConfigRange.COLLECTION.getCode());
if(CollectionUtils.isEmpty(configs)){
throw new ServiceSystemException(PerformanceResultEnum.PLATFORM_ACCOUNT_CONFIG_IS_NULL);
}
if(configs.size() > 1){
throw new ServiceSystemException(PerformanceResultEnum.PLATFORM_ACCOUNT_CONFIG_MANY);
}
vo.setPayee(configs.get(0).getCompanyName());
vo.setPayeeBankCardNo(configs.get(0).getBankCardNo());
vo.setPayeeBankName(configs.get(0).getBankName());
//当前账号
UserSessionData loginUserInfo = TokenUtil.getLoginUserInfo();
OwnerBindCardVO card = ownerAccountService.getOwnerBindCard(loginUserInfo.getUserNo());
if(Objects.nonNull(card)){
vo.setPaymentBankCardNo(card.getOwnerBankAccount());
vo.setPaymentBankName(card.getOwnerAccountBank());
}
return vo;
}
@Override
public SettlementPlatformAccountVO getCarrierSettlementPlatformAccount(String settlementNo){
......
......@@ -21,6 +21,8 @@ public interface SettlementOwnerService {
SettlementPlatformAccountVO getSettlementPlatformAccount();
SettlementPlatformAccountVO getBreakSettlementPlatformAccount();
SettlementPlatformAccountVO getCarrierSettlementPlatformAccount(String settlementNo);
void updatePaymentSettlement(OwnerPaymentSettlementParam param);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论