Browse Source

修改新账通企业开户id业务逻辑

multiwx
dy-hu 3 months ago
parent
commit
ee4c45d334
  1. 2
      cereshop-admin/src/main/java/com/shop/cereshop/admin/pay/hnapay/impl/HnaPayServiceImpl.java
  2. 2
      cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CerePlatformBusinessDAO.java
  3. 14
      cereshop-app/src/main/java/com/shop/cereshop/app/pay/hnapay/service/impl/HnaPayServiceImpl.java
  4. 3
      cereshop-app/src/main/java/com/shop/cereshop/app/utils/ContextUtil.java
  5. 4
      cereshop-app/src/main/resources/mybatis/mapper/business/CerePlatformBusinessDAO.xml
  6. 2
      cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/bwxpay/CereBusinessWxpay.java

2
cereshop-admin/src/main/java/com/shop/cereshop/admin/pay/hnapay/impl/HnaPayServiceImpl.java

@ -243,7 +243,7 @@ public class HnaPayServiceImpl implements HnaPayService {
transForm.initCommonParams("T002"); transForm.initCommonParams("T002");
transForm.setSubmitUrl(InitForm.T002_SUBMIT_URL); transForm.setSubmitUrl(InitForm.T002_SUBMIT_URL);
transForm.setTranAmount(String.valueOf(money)); transForm.setTranAmount(String.valueOf(money));
transForm.setUserId(business.getXsPayId());
transForm.setUserId(business.getHnaPayId());
transForm.setBindCardAgrNo(shopBank.getCardNumber()); transForm.setBindCardAgrNo(shopBank.getCardNumber());
transForm.setNotifyUrl(HnaPayConfig.GETMONEY_NOTICE_URL); transForm.setNotifyUrl(HnaPayConfig.GETMONEY_NOTICE_URL);
transForm.setPaymentTerminalInfo(HnaPayConfig.IP); transForm.setPaymentTerminalInfo(HnaPayConfig.IP);

2
cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CerePlatformBusinessDAO.java

@ -37,6 +37,6 @@ public interface CerePlatformBusinessDAO extends BaseMapper<CerePlatformBusiness
CerePlatformBusiness findByDomain(@Param("domain") String domain); CerePlatformBusiness findByDomain(@Param("domain") String domain);
String findXsPayIdByProject(@Param("project") String project);
String findHnaPayIdByProject(@Param("project") String project);
} }

14
cereshop-app/src/main/java/com/shop/cereshop/app/pay/hnapay/service/impl/HnaPayServiceImpl.java

@ -106,7 +106,7 @@ public class HnaPayServiceImpl implements HnaPayService {
List<Long> businessIdList = cerePlatformShopList.stream().map(CerePlatformShop::getBusinessId).distinct().collect(Collectors.toList()); List<Long> businessIdList = cerePlatformShopList.stream().map(CerePlatformShop::getBusinessId).distinct().collect(Collectors.toList());
List<CerePlatformBusiness> cerePlatformBusinessList = cerePlatformBusinessService.getByIdList(businessIdList); List<CerePlatformBusiness> cerePlatformBusinessList = cerePlatformBusinessService.getByIdList(businessIdList);
for (CerePlatformBusiness cerePlatformBusiness : cerePlatformBusinessList) { for (CerePlatformBusiness cerePlatformBusiness : cerePlatformBusinessList) {
if (StringUtils.isEmpty(cerePlatformBusiness.getXsPayId())) {
if (StringUtils.isEmpty(cerePlatformBusiness.getHnaPayId())) {
//校验商家是否注册新账通商户 //校验商家是否注册新账通商户
throw new CoBusinessException("10000", "商家" + cerePlatformBusiness.getBusinessName() + "未进行支付信息认证,请联系管理员", ""); throw new CoBusinessException("10000", "商家" + cerePlatformBusiness.getBusinessName() + "未进行支付信息认证,请联系管理员", "");
} }
@ -137,8 +137,8 @@ public class HnaPayServiceImpl implements HnaPayService {
transForm.setBuyerId(""); transForm.setBuyerId("");
transForm.setMerchantId(HnaPayConfig.MERCHANT_ID); transForm.setMerchantId(HnaPayConfig.MERCHANT_ID);
String project = ContextUtil.getProject(); String project = ContextUtil.getProject();
String xsPayId = cerePlatformBusinessDAO.findXsPayIdByProject(project);
String merId = project.equals("0") ? HnaPayConfig.MERCHANT_ID : xsPayId;
String hnaPayId = cerePlatformBusinessDAO.findHnaPayIdByProject(project);
String merId = project.equals("0") ? HnaPayConfig.MERCHANT_ID : hnaPayId;
//收款方id即收款方的新账通id //收款方id即收款方的新账通id
transForm.setReceiveUserId(merId); transForm.setReceiveUserId(merId);
transForm.setBusinessType("03"); transForm.setBusinessType("03");
@ -198,7 +198,7 @@ public class HnaPayServiceImpl implements HnaPayService {
} }
DivideAcctDtlVo divideAcctDtlVo = new DivideAcctDtlVo(); DivideAcctDtlVo divideAcctDtlVo = new DivideAcctDtlVo();
divideAcctDtlVo.setLedgerUserId(cerePlatformBusiness.getXsPayId());
divideAcctDtlVo.setLedgerUserId(cerePlatformBusiness.getHnaPayId());
divideAcctDtlVo.setAmount(String.valueOf(prodTotalAmount)); divideAcctDtlVo.setAmount(String.valueOf(prodTotalAmount));
divideAcctDtlVos.add(divideAcctDtlVo); divideAcctDtlVos.add(divideAcctDtlVo);
@ -296,7 +296,7 @@ public class HnaPayServiceImpl implements HnaPayService {
List<Long> businessIdList = cerePlatformShopList.stream().map(CerePlatformShop::getBusinessId).distinct().collect(Collectors.toList()); List<Long> businessIdList = cerePlatformShopList.stream().map(CerePlatformShop::getBusinessId).distinct().collect(Collectors.toList());
List<CerePlatformBusiness> cerePlatformBusinessList = cerePlatformBusinessService.getByIdList(businessIdList); List<CerePlatformBusiness> cerePlatformBusinessList = cerePlatformBusinessService.getByIdList(businessIdList);
for (CerePlatformBusiness cerePlatformBusiness : cerePlatformBusinessList) { for (CerePlatformBusiness cerePlatformBusiness : cerePlatformBusinessList) {
if(StringUtils.isEmpty(cerePlatformBusiness.getXsPayId())){
if(StringUtils.isEmpty(cerePlatformBusiness.getHnaPayId())){
throw new CoBusinessException("10000","商家" + cerePlatformBusiness.getBusinessName() + "未进行支付信息认证,请联系管理员", ""); throw new CoBusinessException("10000","商家" + cerePlatformBusiness.getBusinessName() + "未进行支付信息认证,请联系管理员", "");
} }
} }
@ -321,8 +321,8 @@ public class HnaPayServiceImpl implements HnaPayService {
transForm.setPayLimit("1"); transForm.setPayLimit("1");
transForm.setMerchantId(HnaPayConfig.MERCHANT_ID); transForm.setMerchantId(HnaPayConfig.MERCHANT_ID);
String project = ContextUtil.getProject(); String project = ContextUtil.getProject();
String xsPayId = cerePlatformBusinessDAO.findXsPayIdByProject(project);
String merId = project.equals("0") ? HnaPayConfig.MERCHANT_ID : xsPayId;
String hnaPayId = cerePlatformBusinessDAO.findHnaPayIdByProject(project);
String merId = project.equals("0") ? HnaPayConfig.MERCHANT_ID : hnaPayId;
//收款方id即收款方的新账通id //收款方id即收款方的新账通id
transForm.setReceiveUserId(merId); transForm.setReceiveUserId(merId);
transForm.setBusinessType("03"); transForm.setBusinessType("03");

3
cereshop-app/src/main/java/com/shop/cereshop/app/utils/ContextUtil.java

@ -40,7 +40,8 @@ public class ContextUtil {
} }
public static void clearLanguage(){ public static void clearLanguage(){
languageTL.set(null);
//languageTL.set(null);
languageTL.remove();
} }
public static String getLanguage(){ public static String getLanguage(){

4
cereshop-app/src/main/resources/mybatis/mapper/business/CerePlatformBusinessDAO.xml

@ -326,7 +326,7 @@
SELECT business_id FROM cere_platform_business where pc_domain=#{domain} or mobile_domain=#{domain} SELECT business_id FROM cere_platform_business where pc_domain=#{domain} or mobile_domain=#{domain}
</select> </select>
<select id="findXsPayIdByProject" resultType="java.lang.String">
SELECT xs_pay_id FROM cere_platform_business where business_id=#{project}
<select id="findHnaPayIdByProject" resultType="java.lang.String">
SELECT hna_pay_id FROM cere_platform_business where business_id=#{project}
</select> </select>
</mapper> </mapper>

2
cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/bwxpay/CereBusinessWxpay.java

@ -30,7 +30,7 @@ public class CereBusinessWxpay implements Serializable {
/** /**
* 支付APP端的appid * 支付APP端的appid
*/ */
private String AppAppId;
private String appAppId;
/** /**
* 商户号 * 商户号

Loading…
Cancel
Save