提交 c28b156c authored 作者: hzh's avatar hzh

用车订单模块所有接口对接

上级 1d1ec582
......@@ -46,6 +46,10 @@ public enum VehiclesApiEnum implements ApiEnum {
* 获取罚金
**/
GET_CANCEL_FEE("/open/vehicles/order/getCancelFee", "获取罚金"),
/**
* 确认扣款
*/
CONFIRM_PAY("/open/vehicles/order/confirmPay", "用车人确认扣款;调用此接口,会自动扣款(或欠款记账)。前提是企业必须开通预存或月结欠款支付。"),
/**
* 新用车订单详情接口
**/
......
package org.dromara.common.ys.model.req.vehicles;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.dromara.common.ys.model.BaseModel;
/**
* @author hzh
* @date 2024-11-15
**/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ConfirmPayApiModel extends BaseModel {
/**
* 订单ID
**/
private String orderId;
}
......@@ -94,6 +94,16 @@ public interface IVehiclesService {
*/
org.dromara.common.ys.model.res.vehicles.OrderCancelModel cancel(String userId, OrderCancelModel model);
/**
* 确认扣款
*
* @param userId 用户id
* @param model 确认扣款参数
* @return 结果
*/
void confirmPay(String userId, ConfirmPayApiModel model);
/**
* 获取取消原因列表
*
......
......@@ -8,9 +8,9 @@ import org.dromara.common.ys.common.Code;
import org.dromara.common.ys.common.PageInfo;
import org.dromara.common.ys.enums.DomainEnum;
import org.dromara.common.ys.enums.vehicles.VehiclesApiEnum;
import org.dromara.common.ys.model.req.vehicles.ConfirmPayApiModel;
import org.dromara.common.ys.model.req.vehicles.EstimateJsycPriceModel;
import org.dromara.common.ys.model.req.vehicles.EstimateYyycPriceModel;
import org.dromara.common.ys.model.res.airport.vehicles.*;
import org.dromara.common.ys.model.res.vehicles.*;
import org.dromara.common.ys.service.IVehiclesService;
import org.springframework.stereotype.Service;
......@@ -186,6 +186,21 @@ public class VehiclesServiceImpl implements IVehiclesService {
return JSON.parseObject(res.getData(), OrderCancelModel.class);
}
@Override
public void confirmPay(String userId, ConfirmPayApiModel model) {
ApiHttpResponse res = Api.v1(
com.wenhe.base.base.RequestMethodEnum.POST,
DomainEnum.TEST.getDomain(),
VehiclesApiEnum.CONFIRM_PAY.getUrl(),
userId,
null,
JSON.toJSONString(model)
);
if (!CharSequenceUtil.equals(res.getErrCode(), Code.SUCCESS.getCode())) {
throw new RuntimeException(res.getTips());
}
}
@Override
public List<OrderGetQxyyModel> getCancelReasonList(String userId) {
ApiHttpResponse res = Api.v1(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论