|
|
@@ -4,6 +4,7 @@ import cn.com.taiji.common.manager.net.http.ServiceHandleException; |
|
|
|
import cn.com.taiji.core.entity.basic.QtkVehicleInfo; |
|
|
|
import cn.com.taiji.core.entity.comm.CommonWxSignConfig; |
|
|
|
import cn.com.taiji.core.entity.dict.issue.FeeCategory; |
|
|
|
import cn.com.taiji.core.entity.dict.pay.PayChannelType; |
|
|
|
import cn.com.taiji.core.entity.issue.IssueProductPay; |
|
|
|
import cn.com.taiji.core.model.comm.protocol.ats.weiXin.*; |
|
|
|
import cn.com.taiji.core.model.comm.protocol.ias.order.SignQueryResponse; |
|
|
@@ -35,6 +36,7 @@ public class SignCommonManager extends AbstractCommManager { |
|
|
|
private IssueProductPayRepo issueProductPayRepo; |
|
|
|
|
|
|
|
|
|
|
|
//暂时适配微信,后面支付宝再适配 |
|
|
|
public SignQueryResponse carSignV2(String wxOpenId, String productId,String vehicleId) throws ServiceHandleException { |
|
|
|
List<IssueProductPay> issueProductPayList = issueProductPayRepo.findByFeeCategoryAndReleaseId(FeeCategory.PASS, productId); |
|
|
|
if (isEmpty(issueProductPayList)){ |
|
|
@@ -42,8 +44,9 @@ public class SignCommonManager extends AbstractCommManager { |
|
|
|
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("产品未配置通行费"); |
|
|
|
} |
|
|
|
String[] split = vehicleId.split("_"); |
|
|
|
// CommonWxSignConfig signConfig = commonWxSignConfigRepo.findByAgencyIdAndVersion(productId, 2); |
|
|
|
CommonWxSignConfig signConfig = commonWxSignConfigRepo.findById(issueProductPayList.get(0).getPayConfigId()).orElse(null); |
|
|
|
IssueProductPay issueProductPay = issueProductPayList.get(0); |
|
|
|
CommonWxSignConfig signConfig = commonWxSignConfigRepo.findByParentIdAndPayChannelTypeAndVersion(issueProductPay.getPayConfigId(), |
|
|
|
PayChannelType.valueOf(issueProductPay.getChargeMethod().name()), 2); |
|
|
|
if (signConfig == null) { |
|
|
|
logger.error("产品编号{}没有签约配置信息", productId); |
|
|
|
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("产品没有签约配置信息"); |
|
|
@@ -77,6 +80,7 @@ public class SignCommonManager extends AbstractCommManager { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//暂时适配微信,后面支付宝再适配 |
|
|
|
public SignQueryResponse carSignV3(String wxOpenId,String productId,String vehicleId,String name,String idNum) throws ServiceHandleException { |
|
|
|
|
|
|
|
List<IssueProductPay> issueProductPayList = issueProductPayRepo.findByFeeCategoryAndReleaseId(FeeCategory.PASS, productId); |
|
|
@@ -85,8 +89,9 @@ public class SignCommonManager extends AbstractCommManager { |
|
|
|
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("产品未配置通行费"); |
|
|
|
} |
|
|
|
String[] split = vehicleId.split("_"); |
|
|
|
// CommonWxSignConfig signConfig = commonWxSignConfigRepo.findByAgencyIdAndVersion(agencyId, 3); |
|
|
|
CommonWxSignConfig signConfig = commonWxSignConfigRepo.findById(issueProductPayList.get(0).getPayConfigId()).orElse(null); |
|
|
|
IssueProductPay issueProductPay = issueProductPayList.get(0); |
|
|
|
CommonWxSignConfig signConfig = commonWxSignConfigRepo.findByParentIdAndPayChannelTypeAndVersion(issueProductPay.getPayConfigId(), |
|
|
|
PayChannelType.valueOf(issueProductPay.getChargeMethod().name()), 3); |
|
|
|
if (signConfig == null) { |
|
|
|
logger.error("产品编号{}没有签约配置信息", productId); |
|
|
|
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("产品没有签约配置信息"); |