mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update 修改结算
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package com.jsowell.adapay.dto;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class UpdateAccountConfigDTO {
|
||||
private String merchantId;
|
||||
|
||||
// 结算起始金额 ( 0.00格式,整数部分最长13位,小数部分最长2位) min_amt, remained_amt,channel_remark至少有一个不为空
|
||||
private String minAmt;
|
||||
|
||||
// 结算留存金额 ( 0.00格式,整数部分最长13位,小数部分最长2位)
|
||||
private String remainedAmt;
|
||||
|
||||
// 结算信息摘要,银行出款时摘要信息
|
||||
private String channelRemark;
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import com.huifu.adapay.core.exception.BaseAdaPayException;
|
||||
import com.huifu.adapay.model.Member;
|
||||
import com.huifu.adapay.model.SettleAccount;
|
||||
import com.jsowell.adapay.dto.AdapayMemberInfoDTO;
|
||||
import com.jsowell.adapay.dto.UpdateAccountConfigDTO;
|
||||
import com.jsowell.adapay.response.QueryMemberResponse;
|
||||
import com.jsowell.adapay.vo.AdapayAccountBalanceVO;
|
||||
import com.jsowell.adapay.vo.AdapayMemberInfoVO;
|
||||
@@ -38,6 +39,7 @@ public class AdapayMemberService {
|
||||
|
||||
/**
|
||||
* 创建汇付会员
|
||||
*
|
||||
* @param dto
|
||||
* @throws Exception
|
||||
*/
|
||||
@@ -121,6 +123,7 @@ public class AdapayMemberService {
|
||||
|
||||
/**
|
||||
* 查询汇付会员信息
|
||||
*
|
||||
* @param merchantId
|
||||
* @return
|
||||
*/
|
||||
@@ -244,4 +247,26 @@ public class AdapayMemberService {
|
||||
return vo;
|
||||
}
|
||||
|
||||
public void updateSettleAccountConfig(UpdateAccountConfigDTO dto) throws BaseAdaPayException {
|
||||
// 通过merchantId 查询出汇付会员id 和 结算账户id,用来查询余额
|
||||
AdapayMemberAccount adapayMemberAccount = adapayMemberAccountService.selectByMerchantId(dto.getMerchantId());
|
||||
if (adapayMemberAccount == null) {
|
||||
return;
|
||||
}
|
||||
// 修改账户配置
|
||||
Map<String, Object> params = Maps.newHashMap();
|
||||
params.put("app_id", ADAPAY_APP_ID);
|
||||
params.put("member_id", adapayMemberAccount.getAdapayMemberId());
|
||||
params.put("settle_account_id", adapayMemberAccount.getSettleAccountId());
|
||||
if (StringUtils.isNotBlank(dto.getMinAmt())) {
|
||||
params.put("min_amt", dto.getMinAmt());
|
||||
}
|
||||
if (StringUtils.isNotBlank(dto.getRemainedAmt())) {
|
||||
params.put("remained_amt", dto.getRemainedAmt());
|
||||
}
|
||||
if (StringUtils.isNotBlank(dto.getChannelRemark())) {
|
||||
params.put("channel_remark", dto.getChannelRemark());
|
||||
}
|
||||
Map<String, Object> settleCount = SettleAccount.update(params);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user