This commit is contained in:
2023-06-15 14:40:11 +08:00
parent cdd2a217c3
commit e1b2be97cc
12 changed files with 49 additions and 682 deletions

View File

@@ -14,13 +14,8 @@ import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.util.StringUtils;
import com.jsowell.common.util.id.IdUtils;
import com.jsowell.pile.domain.AdapayMemberAccount;
import com.jsowell.pile.domain.AdapayMemberInfo;
import com.jsowell.pile.domain.AdapaySettleAccount;
import com.jsowell.pile.service.AdapayMemberInfoService;
import com.jsowell.pile.service.IAdapayMemberAccountService;
import com.jsowell.pile.service.IAdapaySettleAccountService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@@ -37,12 +32,6 @@ public class AdapayMemberService {
@Value("${adapay.appId}")
private String ADAPAY_APP_ID;
@Autowired
private AdapayMemberInfoService adapayMemberInfoService;
@Autowired
private IAdapaySettleAccountService adapaySettleAccountService;
@Autowired
private IAdapayMemberAccountService adapayMemberAccountService;
@@ -127,16 +116,7 @@ public class AdapayMemberService {
*/
public AdapayMemberVO selectAdapayMember(String merchantId) {
AdapayMemberVO resultVO = new AdapayMemberVO();
AdapayMemberInfo adapayMemberInfo = adapayMemberInfoService.selectByMerchantId(merchantId);
if (adapayMemberInfo != null) {
BeanUtils.copyProperties(adapayMemberInfo, resultVO);
}
// 通过merchantId 查询出汇付会员id 和 结算账户id用来查询余额
AdapaySettleAccount adapaySettleAccount = adapaySettleAccountService.selectByMerchantId(merchantId);
if (adapaySettleAccount != null) {
BeanUtils.copyProperties(adapaySettleAccount, resultVO);
}
return resultVO;
}
@@ -174,12 +154,12 @@ public class AdapayMemberService {
public AdapayAccountBalanceVO queryAdapayAccountBalance(String merchantId) throws BaseAdaPayException {
AdapayAccountBalanceVO vo = AdapayAccountBalanceVO.builder().build();
// 通过merchantId 查询出汇付会员id 和 结算账户id用来查询余额
AdapaySettleAccount adapaySettleAccount = adapaySettleAccountService.selectByMerchantId(merchantId);
if (adapaySettleAccount == null) {
AdapayMemberAccount adapayMemberAccount = adapayMemberAccountService.selectByMerchantId(merchantId);
if (adapayMemberAccount == null) {
return vo;
}
String settle_account_id = adapaySettleAccount.getAdapayMemberId();
String member_id = adapaySettleAccount.getAdapayMemberId();
String settle_account_id = adapayMemberAccount.getAdapayMemberId();
String member_id = adapayMemberAccount.getAdapayMemberId();
Map<String, Object> queryParams = Maps.newHashMap();
queryParams.put("settle_account_id", settle_account_id);
queryParams.put("member_id", member_id);
@@ -197,12 +177,7 @@ public class AdapayMemberService {
public AdapaySettleAccountVO selectSettleAccount(String merchantId) {
AdapaySettleAccountVO vo = new AdapaySettleAccountVO();
// 通过merchantId 查询出汇付会员id 和 结算账户id用来查询余额
AdapaySettleAccount adapaySettleAccount = adapaySettleAccountService.selectByMerchantId(merchantId);
if (adapaySettleAccount == null) {
return vo;
}
BeanUtils.copyProperties(adapaySettleAccount, vo);
return vo;
}
}