mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
updateupdate 创建企业用户
This commit is contained in:
@@ -7,13 +7,13 @@ import com.huifu.adapay.core.exception.BaseAdaPayException;
|
||||
import com.huifu.adapay.model.CorpMember;
|
||||
import com.huifu.adapay.model.Member;
|
||||
import com.huifu.adapay.model.SettleAccount;
|
||||
import com.jsowell.adapay.dto.AdapayMemberInfoDTO;
|
||||
import com.jsowell.adapay.dto.CreateCorpMemberDTO;
|
||||
import com.jsowell.adapay.dto.CreateSettleAccountDTO;
|
||||
import com.jsowell.adapay.dto.UpdateAccountConfigDTO;
|
||||
import com.jsowell.adapay.response.QueryMemberResponse;
|
||||
import com.jsowell.adapay.vo.AdapayAccountBalanceVO;
|
||||
import com.jsowell.adapay.vo.AdapayMemberInfoVO;
|
||||
import com.jsowell.adapay.vo.AdapaySettleAccountVO;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.common.util.id.IdUtils;
|
||||
@@ -41,6 +41,15 @@ public class AdapayMemberService {
|
||||
@Autowired
|
||||
private IAdapayMemberAccountService adapayMemberAccountService;
|
||||
|
||||
public void createSettleAccount(CreateSettleAccountDTO dto) throws Exception {
|
||||
String bankAcctType = dto.getBankAcctType();
|
||||
if (StringUtils.equals(bankAcctType, Constants.ONE)) {
|
||||
createMember(dto);
|
||||
} else if (StringUtils.equals(bankAcctType, Constants.TWO)) {
|
||||
createCorpMember(dto);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建汇付会员
|
||||
*
|
||||
@@ -48,7 +57,7 @@ public class AdapayMemberService {
|
||||
* @throws Exception
|
||||
*/
|
||||
@Transactional(readOnly = false, propagation = Propagation.REQUIRED)
|
||||
public void createMember(AdapayMemberInfoDTO dto) throws Exception {
|
||||
public void createMember(CreateSettleAccountDTO dto) throws Exception {
|
||||
AdapayMemberAccount adapayMemberAccount = adapayMemberAccountService.selectByMerchantId(dto.getMerchantId());
|
||||
if (adapayMemberAccount != null) {
|
||||
return;
|
||||
@@ -283,7 +292,7 @@ public class AdapayMemberService {
|
||||
/**
|
||||
* 创建企业用户
|
||||
*/
|
||||
public void createCorpMember(CreateCorpMemberDTO dto) throws BaseAdaPayException, IOException {
|
||||
public void createCorpMember(CreateSettleAccountDTO dto) throws BaseAdaPayException, IOException {
|
||||
Map<String, Object> memberParams = Maps.newHashMap();
|
||||
String adapayMemberId = "ACM" + IdUtils.getMemberId();
|
||||
memberParams.put("member_id", adapayMemberId);
|
||||
@@ -318,4 +327,6 @@ public class AdapayMemberService {
|
||||
// adapayMemberAccount.setSettleAccountId(settleAccountId);
|
||||
adapayMemberAccountService.insertAdapayMemberAccount(adapayMemberAccount);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user