浏览代码

ias 签约调整

master
chenchaod 3 周前
父节点
当前提交
60a274bad4

+ 2
- 2
zhywpt-service-ias/src/main/java/cn/com/taiji/ias/manager/ass/ResignManager.java 查看文件

@@ -29,10 +29,10 @@ public class ResignManager extends AbstractCommManager {
switch (PlateColorType.valueOfCode(color)) {
case BLUE:
case GREEN:
res = signCommonManager.carSignV2(request.getWxOpenId(), request.getAgencyId(), request.getVehicleId());
res = signCommonManager.carSignV2(request.getWxOpenId(), request.getProductId(), request.getVehicleId());
break;
case YELLOW:
res = signCommonManager.carSignV3(request.getWxOpenId(), request.getAgencyId(), request.getVehicleId(), request.getName(), request.getIdNum());
res = signCommonManager.carSignV3(request.getWxOpenId(), request.getProductId(), request.getVehicleId(), request.getName(), request.getIdNum());
break;
default:
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("微信签约只支持,蓝、渐变绿、黄,三种车牌签约");

+ 4
- 1
zhywpt-service-ias/src/main/java/cn/com/taiji/ias/manager/order/OrderPayApplyManager.java 查看文件

@@ -146,6 +146,7 @@ public class OrderPayApplyManager extends AbstractOrderManager<OrderPayApplyRequ
v3Request.setPublicKeyId(payConfig.getWxPublicKeyId());
v3Request.setPublicKey(payConfig.getWxPublicKey());
v3Request.setSubMchId(payConfig.getWxSubMchId());
v3Request.setSubAppid(payConfig.getWxSubAppId());
v3Request.setMchid(payConfig.getWxMchId());
v3Request.setApiV3Key(payConfig.getWxApiv3key());
v3Request.setPrivateKey(payConfig.getWxPrivatekey());
@@ -171,12 +172,14 @@ public class OrderPayApplyManager extends AbstractOrderManager<OrderPayApplyRequ
}
v2Request.setNotifyUrl("https://skx.mynatapp.cc/qtucpaymgt/wxv3/notify/");
v2Request.setTradeType(TradeType.valueOf(payConfig.getPayProductType()));
v2Request.setOpenid(req.getSubOpenId());
// v2Request.setOpenid(req.getSubOpenId());
v2Request.setSubOpenid(req.getSubOpenId());
// v2Request.setSceneInfo();
v2Request.setAppId(payConfig.getWxAppId());
v2Request.setMchId(payConfig.getWxMchId());
v2Request.setMchKey(payConfig.getWxKey());
v2Request.setSubMchId(payConfig.getWxSubMchId());
v2Request.setSubAppId(payConfig.getWxSubAppId());
AtsCreatPayOrderV2Response v2Response = jsonPostRepeat(v2Request);
BeanTools.copyProperties(v2Response, res);
res.setWxPackage(v2Response.getPackageValue());

+ 9
- 4
zhywpt-service-ias/src/main/java/cn/com/taiji/ias/manager/order/SignCommonManager.java 查看文件

@@ -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("产品没有签约配置信息");

+ 2
- 2
zhywpt-service-ias/src/main/java/cn/com/taiji/ias/manager/order/SignQueryManager.java 查看文件

@@ -53,8 +53,8 @@ public class SignQueryManager extends AbstractOrderManager<SignQueryRequest> {
protected void businessValidateInternal(ErrorMsgBuilder builder, SignQueryRequest request, ServiceLogEvent event,
Map<String, Object> dataStream) throws ServiceHandleException {
IssueOrderinfo order = checkOrder(request.getOrderNo());
if (!request.getOrgCode().equals(MyFinals.QTZL_AGENCY_ID) && !request.getOrgCode().equals(order.getAgencyId()))
throw newBusinessException("不是您渠道的订单,操作失败");
// if (!request.getOrgCode().equals(MyFinals.QTZL_AGENCY_ID) && !request.getOrgCode().equals(order.getAgencyId()))
// throw newBusinessException("不是您渠道的订单,操作失败");
dataStream.put(ORDER, order);
}


正在加载...
取消
保存