Bläddra i källkod

ats 车主签约V3

master
chenchaod 2 månader sedan
förälder
incheckning
09ccef20b7

+ 3
- 3
zhywpt-service-ats/src/main/java/cn/com/taiji/ats/manager/handler/WinXinServiceHandler.java Visa fil

@@ -50,7 +50,7 @@ public class WinXinServiceHandler extends AbstractAtsServiceHandler<WeiXinServic
@Autowired
private VehicleUserStateManager vehicleUserStateManager;
@Autowired
private VehicleUserStateV3Manager vehicleUserStateV3Manager;
private VehicleSignV3Manager vehicleUserStateV3Manager;
@Autowired
private VehicleSignV3ResultManager vehicleSignV3ResultManager;
@Autowired
@@ -80,8 +80,8 @@ public class WinXinServiceHandler extends AbstractAtsServiceHandler<WeiXinServic
return queryRefundV3Manager.serviceHandle((AtsQueryRefundV3Request) request);
case VEHICLEUSERSTATE:
return vehicleUserStateManager.serviceHandle((AtsVehicleUserStateRequest) request);
case VEHICLEUSERSTATEV3:
return vehicleUserStateV3Manager.serviceHandle((AtsVehicleUserStateV3Request) request);
case VEHICLESIGNV3:
return vehicleUserStateV3Manager.serviceHandle((AtsVehicleSignV3Request) request);
case VEHICLESIGNRESULTV3:
return vehicleSignV3ResultManager.serviceHandle((AtsVehicleSignV3ResultRequest) request);
case GETWECHATOPENDI:

zhywpt-service-ats/src/main/java/cn/com/taiji/ats/manager/weixin/VehicleUserStateV3Manager.java → zhywpt-service-ats/src/main/java/cn/com/taiji/ats/manager/weixin/VehicleSignV3Manager.java Visa fil

@@ -4,8 +4,8 @@ import cn.com.taiji.ats.config.WechatConfig;
import cn.com.taiji.ats.manager.AbstractCommManager;
import cn.com.taiji.ats.model.wx.CarSignRequestV3;
import cn.com.taiji.ats.model.wx.CarSignResponseV3;
import cn.com.taiji.core.model.comm.protocol.ats.weiXin.AtsVehicleUserStateV3Request;
import cn.com.taiji.core.model.comm.protocol.ats.weiXin.AtsVehicleUserStateV3Response;
import cn.com.taiji.core.model.comm.protocol.ats.weiXin.AtsVehicleSignV3Request;
import cn.com.taiji.core.model.comm.protocol.ats.weiXin.AtsVehicleSignV3Response;
import com.wechat.pay.java.core.RSAAutoCertificateConfig;
import com.wechat.pay.java.core.http.*;
import org.springframework.beans.factory.annotation.Autowired;
@@ -17,15 +17,15 @@ import static com.wechat.pay.java.core.util.GsonUtil.toJson;
* @Author:ChenChao
* @Date:2025/6/20 10:39
* @Filename:VehicleUserStateV3Manager
* @description:
* @description: 参考官方文档:https://pay.weixin.qq.com/doc/v3/partner/4012715215
*/
@Service
public class VehicleUserStateV3Manager extends AbstractCommManager {
public class VehicleSignV3Manager extends AbstractCommManager {

@Autowired
private WechatConfig wechatConfig;

public AtsVehicleUserStateV3Response serviceHandle(AtsVehicleUserStateV3Request req) {
public AtsVehicleSignV3Response serviceHandle(AtsVehicleSignV3Request req) {

RSAAutoCertificateConfig config =
wechatConfig.initV3Config(req.getMchid(), req.getApiV3Key(), req.getPrivateKey(), req.getSerialNo());
@@ -51,6 +51,6 @@ public class VehicleUserStateV3Manager extends AbstractCommManager {
.body(new JsonRequestBody.Builder().body(toJson(request)).build())
.build();
CarSignResponseV3 serviceResponse = httpClient.execute(httpRequest, CarSignResponseV3.class).getServiceResponse();
return copyProperties(serviceResponse,new AtsVehicleUserStateV3Response());
return copyProperties(serviceResponse,new AtsVehicleSignV3Response());
}
}

+ 1
- 1
zhywpt-service-ats/src/main/java/cn/com/taiji/ats/manager/weixin/VehicleSignV3ResultManager.java Visa fil

@@ -16,7 +16,7 @@ import static com.wechat.pay.java.core.http.UrlEncoder.urlEncode;
* @Author:ChenChao
* @Date:2025/6/21 16:59
* @Filename:VehicleSignV3ResultManager
* @description:
* @description: 参看官方文档:https://pay.weixin.qq.com/doc/v3/partner/4012715623
*/
@Service
public class VehicleSignV3ResultManager extends AbstractManager {

+ 5
- 0
zhywpt-service-ats/src/main/java/cn/com/taiji/ats/model/wx/CarSignRequestV3.java Visa fil

@@ -3,6 +3,8 @@ package cn.com.taiji.ats.model.wx;
import com.google.gson.annotations.SerializedName;
import lombok.Data;

import javax.validation.constraints.NotBlank;


/**
* @Author:ChenChao
@@ -23,6 +25,9 @@ public class CarSignRequestV3 {
@SerializedName("plan_id")
private String planId;

@SerializedName("plate_number")
private String plateNumber;


@SerializedName("identify")
private Identity identity;

Laddar…
Avbryt
Spara