✨ 司机端认证提交与记录查询接口(车辆/个人)
实现司机在小程序上提交认证、查看生效值与认证记录的能力。 提交链路的结构性保证(这是本次改造的核心约束「提交审核不影响车辆正常使用」): - 提交只产生一条新的待审记录,**绝不修改 effective_cert_record_id**, 因此已认证的车重新提交后依然可用;待审内容在审核通过前只存在于记录表里; - 同对象至多一条待审:落新记录前先把前一条待审转已作废, 且只动作待审——已通过/已驳回是终态,尤其不碰生效快照指着的那条; - 新记录状态显式设为待审:框架会把空 status 静默填成 1,而 1 在本表是「已通过」, 不显式设置会让一次提交凭空变成审核通过; - 新记录清空驳回原因,避免出现「审核中」却带着上一次驳回文案。 越权校验:司机只能提交/查看本人及本人绑定车辆的认证(复用 VehiclePlateSupport), 不可查看者返回业务异常而不是空列表——空列表会被误读成「没有记录」。 新增: - DriverAuthController(/driver/auth/**,兼容 /blade-transport/driver/auth/**) - IDriverCertService / DriverCertServiceImpl - PersonCertSubmitRequest / VehicleCertSubmitRequest - TransportCertRecordVO.statusText(状态文案统一在 Wrapper 翻译,四端一套说法) - IDriverAppService.currentDriverEntity()(认证写入需要司机实体) 17 个用例覆盖票 02 的三条验收点与不变式(含「重新提交后生效值仍是旧的」)。 全模块 33 个测试通过:mvn -o test -pl blade-service/blade-transport -am
This commit is contained in:
+90
@@ -0,0 +1,90 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 司机端个人认证提交请求
|
||||
* <p>
|
||||
* 一次提交承载个人认证的**全部**内容(身份证 + 驾驶证 + 从业资格证),
|
||||
* 三证一起提交、一起审核,不拆开。
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "司机端个人认证提交请求")
|
||||
public class PersonCertSubmitRequest implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "真实姓名")
|
||||
private String realName;
|
||||
@Schema(description = "身份证号")
|
||||
private String idCardNo;
|
||||
@Schema(description = "身份证正面照")
|
||||
private String idCardFrontUrl;
|
||||
@Schema(description = "身份证反面照")
|
||||
private String idCardBackUrl;
|
||||
@Schema(description = "身份证有效期起")
|
||||
private LocalDate idCardValidStart;
|
||||
@Schema(description = "身份证有效期止")
|
||||
private LocalDate idCardValidEnd;
|
||||
@Schema(description = "身份证长期有效")
|
||||
private Integer idCardLongTerm;
|
||||
|
||||
@Schema(description = "驾驶证档案编号")
|
||||
private String driverFileNo;
|
||||
@Schema(description = "准驾车型")
|
||||
private String driverClass;
|
||||
@Schema(description = "驾驶证主页照片")
|
||||
private String driverLicenseFrontUrl;
|
||||
@Schema(description = "驾驶证副页照片")
|
||||
private String driverLicenseBackUrl;
|
||||
@Schema(description = "驾驶证有效期起")
|
||||
private LocalDate driverValidStart;
|
||||
@Schema(description = "驾驶证有效期止")
|
||||
private LocalDate driverValidEnd;
|
||||
@Schema(description = "驾驶证长期有效")
|
||||
private Integer driverLongTerm;
|
||||
|
||||
@Schema(description = "从业资格证号")
|
||||
private String qualificationNo;
|
||||
@Schema(description = "从业资格证照片")
|
||||
private String qualificationUrl;
|
||||
@Schema(description = "从业资格证有效期止")
|
||||
private LocalDate qualificationValidEnd;
|
||||
|
||||
@Schema(description = "大头照")
|
||||
private String headPhoto;
|
||||
|
||||
}
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.transport.pojo.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 司机端车辆认证提交请求
|
||||
* <p>
|
||||
* 一次提交承载该车辆认证的**全部**内容(行驶证 + 道路运输证),两证一起提交、一起审核。
|
||||
* 提交只产生新的待审记录,不覆盖车辆当前已生效的认证内容。
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "司机端车辆认证提交请求")
|
||||
public class VehicleCertSubmitRequest implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "车辆ID:新增时为空,重新认证时必填")
|
||||
private Long id;
|
||||
@Schema(description = "车牌号")
|
||||
private String plateNo;
|
||||
@Schema(description = "车辆类型")
|
||||
private String vehicleType;
|
||||
@Schema(description = "车辆识别代号(车架号)")
|
||||
private String vin;
|
||||
@Schema(description = "发动机号")
|
||||
private String engineNo;
|
||||
@Schema(description = "车牌颜色")
|
||||
private String plateColor;
|
||||
|
||||
@Schema(description = "行驶证档案编号")
|
||||
private String licenseNo;
|
||||
@Schema(description = "行驶证主页照片")
|
||||
private String licenseFrontUrl;
|
||||
@Schema(description = "行驶证副页照片")
|
||||
private String licenseBackUrl;
|
||||
@Schema(description = "行驶证有效期起")
|
||||
private LocalDate licenseValidStart;
|
||||
@Schema(description = "行驶证有效期止")
|
||||
private LocalDate licenseValidEnd;
|
||||
@Schema(description = "行驶证长期有效")
|
||||
private Integer licenseLongTerm;
|
||||
|
||||
@Schema(description = "道路运输证号")
|
||||
private String roadTransportNo;
|
||||
@Schema(description = "道路运输证照片")
|
||||
private String roadTransportUrl;
|
||||
@Schema(description = "道路运输证有效期起")
|
||||
private LocalDate roadTransportValidStart;
|
||||
@Schema(description = "道路运输证有效期止")
|
||||
private LocalDate roadTransportValidEnd;
|
||||
@Schema(description = "道路运输证长期有效")
|
||||
private Integer roadTransportLongTerm;
|
||||
|
||||
}
|
||||
+8
@@ -70,5 +70,13 @@ public class TransportCertRecordVO extends TransportCertRecord {
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "审核人姓名")
|
||||
private String auditUserName;
|
||||
/**
|
||||
* 状态中文文案:审核中 / 已通过 / 已驳回 / 已作废
|
||||
* <p>
|
||||
* 由服务层统一翻译后下发,避免小程序、Web、接口三处各造一套说法。
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "状态中文文案")
|
||||
private String statusText;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user