This commit is contained in:
2023-07-11 10:35:27 +08:00
parent bba4effd93
commit e9cf2d2103
3 changed files with 31 additions and 17 deletions

View File

@@ -46,7 +46,6 @@ import com.jsowell.pile.vo.web.OrderListVO;
import com.jsowell.pile.vo.web.PileDetailVO; import com.jsowell.pile.vo.web.PileDetailVO;
import com.jsowell.service.MemberService; import com.jsowell.service.MemberService;
import com.jsowell.service.OrderService; import com.jsowell.service.OrderService;
import com.jsowell.pile.service.PileRemoteService;
import com.jsowell.service.PileService; import com.jsowell.service.PileService;
import com.jsowell.thirdparty.amap.service.AMapService; import com.jsowell.thirdparty.amap.service.AMapService;
import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO; import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO;
@@ -183,6 +182,7 @@ public class SpringBootTestController {
private IMemberBasicInfoService memberBasicInfoService; private IMemberBasicInfoService memberBasicInfoService;
@Test @Test
public void testUpdateConnectorStatus() { public void testUpdateConnectorStatus() {
String pileConnectorCode = "8800000000000101"; String pileConnectorCode = "8800000000000101";
@@ -1093,13 +1093,9 @@ public class SpringBootTestController {
} }
@Test @Test
public void testMemberRegisterAndLogin() { public void testMemberRegisterAndLogin() throws BaseAdaPayException {
// String phone = "18512341234";
// String merchantId = "18512341234";
// String token = memberService.memberRegisterAndLogin(phone, merchantId);
// System.out.println(token);
// String memberId = JWTUtils.getMemberId(token);
// System.out.println(memberId);
} }
@Test @Test

View File

@@ -77,4 +77,7 @@ public class QueryCorpMemberResponse {
// 银行卡对应的户名 // 银行卡对应的户名
private String card_name; private String card_name;
// 企业结算账户 json字符串
private String settle_accounts;
} }

View File

@@ -155,12 +155,13 @@ public class AdapayMemberService {
public Map<String, Object> selectAdapayMember(String merchantId) throws BaseAdaPayException { public Map<String, Object> selectAdapayMember(String merchantId) throws BaseAdaPayException {
Map<String, Object> map = Maps.newHashMap(); Map<String, Object> map = Maps.newHashMap();
AdapayMemberAccount adapayMemberAccount = adapayMemberAccountService.selectByMerchantId(merchantId); AdapayMemberAccount adapayMemberAccount = adapayMemberAccountService.selectByMerchantId(merchantId);
if (adapayMemberAccount == null) { // if (adapayMemberAccount == null) {
log.error("通过merchantId:{}, 没有查询到结算账户配置", merchantId); // log.error("通过merchantId:{}, 没有查询到结算账户配置", merchantId);
return null; // return null;
} // }
//
String adapayMemberId = adapayMemberAccount.getAdapayMemberId(); // String adapayMemberId = adapayMemberAccount.getAdapayMemberId();
String adapayMemberId = "ACM25743626";
String bankAcctType; String bankAcctType;
AdapayMemberInfoVO adapayMemberInfoVO = null; AdapayMemberInfoVO adapayMemberInfoVO = null;
List<AdapaySettleAccountVO> list = null; List<AdapaySettleAccountVO> list = null;
@@ -254,10 +255,24 @@ public class AdapayMemberService {
.email(response.getEmail()) .email(response.getEmail())
.socialCreditCode(response.getSocial_credit_code()) .socialCreditCode(response.getSocial_credit_code())
.socialCreditCodeExpires(response.getSocial_credit_code_expires()) .socialCreditCodeExpires(response.getSocial_credit_code_expires())
.bankCode(response.getBank_code()) // .bankCode(response.getBank_code())
.cardName(response.getCard_name()) // .cardName(response.getCard_name())
.cardNo(response.getCard_no()) // .cardNo(response.getCard_no())
.build(); .build();
if (StringUtils.isNotBlank(response.getSettle_accounts())) {
JSONObject jsonObject = JSON.parseObject(response.getSettle_accounts());
String settleAccountId = jsonObject.getString("id");
if (StringUtils.isNotEmpty(settleAccountId)) {
AdapaySettleAccountVO adapaySettleAccountVO = queryAdapaySettleAccount(adapayMemberId, settleAccountId);
if (adapaySettleAccountVO != null) {
corpMemberVO.setBankCode(adapaySettleAccountVO.getBankCode());
corpMemberVO.setCardName(adapaySettleAccountVO.getCardName());
corpMemberVO.setCardNo(adapaySettleAccountVO.getCardId());
}
}
}
return corpMemberVO; return corpMemberVO;
} }