|
|
@@ -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()); |
|
|
|
} |
|
|
|
} |