浏览代码

骑手申请资料新增预上线城市/出生日期/强制险/良民证字段(需求602)

sql.md 同时携带此前未提交的商家证件字段 VARCHAR(2000)改 TEXT(规避MySQL 1118)修正

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
qmj 1 天之前
父节点
当前提交
d1afba87ea

+ 4 - 0
ruoyi-admin/src/main/java/com/ruoyi/app/user/InfoUserController.java

@@ -709,6 +709,10 @@ public class InfoUserController extends BaseController {
         user.setVehiclePhotos(infoUser.getVehiclePhotos());
         user.setLicensePlate(infoUser.getLicensePlate());
         user.setVehicleType(infoUser.getVehicleType());
+        user.setPreLaunchCity(infoUser.getPreLaunchCity());
+        user.setBirthday(infoUser.getBirthday());
+        user.setInsurancePhoto(infoUser.getInsurancePhoto());
+        user.setPoliceCertificate(infoUser.getPoliceCertificate());
         user.setFullName(infoUser.getFullName());
         user.setIdNumber(infoUser.getIdNumber());
         user.setMerchantType(infoUser.getMerchantType());

+ 47 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/InfoUser.java

@@ -127,6 +127,21 @@ public class InfoUser
     /** 骑手车型(1机车 2轿车) */
     @Excel(name = "骑手车型")
     private String vehicleType;
+    /** 预上线城市(骑手申请时选择) */
+    @Excel(name = "预上线城市")
+    private String preLaunchCity;
+
+    /** 出生日期(yyyy-MM-dd,骑手申请时填写,用于年满18岁校验) */
+    @Excel(name = "出生日期")
+    private String birthday;
+
+    /** 强制险或电子保险卡(图片URL,多张逗号分隔) */
+    @Excel(name = "强制险或电子保险卡")
+    private String insurancePhoto;
+
+    /** 良民证(图片URL,可后补) */
+    @Excel(name = "良民证")
+    private String policeCertificate;
 
     /** 负责人 */
     @Excel(name = "负责人")
@@ -423,6 +438,38 @@ public class InfoUser
         this.vehicleType = vehicleType;
     }
 
+    public String getPreLaunchCity() {
+        return preLaunchCity;
+    }
+
+    public void setPreLaunchCity(String preLaunchCity) {
+        this.preLaunchCity = preLaunchCity;
+    }
+
+    public String getBirthday() {
+        return birthday;
+    }
+
+    public void setBirthday(String birthday) {
+        this.birthday = birthday;
+    }
+
+    public String getInsurancePhoto() {
+        return insurancePhoto;
+    }
+
+    public void setInsurancePhoto(String insurancePhoto) {
+        this.insurancePhoto = insurancePhoto;
+    }
+
+    public String getPoliceCertificate() {
+        return policeCertificate;
+    }
+
+    public void setPoliceCertificate(String policeCertificate) {
+        this.policeCertificate = policeCertificate;
+    }
+
     public String getFullName() {
         return fullName;
     }

+ 16 - 0
ruoyi-system/src/main/resources/mapper/infouser/InfoUserMapper.xml

@@ -30,6 +30,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="vehiclePhotos"    column="vehicle_photos"    />
         <result property="licensePlate"    column="license_plate"    />
         <result property="vehicleType"    column="vehicle_type"    />
+        <result property="preLaunchCity"    column="pre_launch_city"    />
+        <result property="birthday"    column="birthday"    />
+        <result property="insurancePhoto"    column="insurance_photo"    />
+        <result property="policeCertificate"    column="police_certificate"    />
         <result property="fullName"    column="full_name"    />
         <result property="idNumber"    column="id_number"    />
         <result property="merchantType"    column="merchant_type"    />
@@ -113,6 +117,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="drivingLicense != null">driving_license,</if>
             <if test="vehiclePhotos != null">vehicle_photos,</if>
             <if test="vehicleType != null">vehicle_type,</if>
+            <if test="preLaunchCity != null">pre_launch_city,</if>
+            <if test="birthday != null">birthday,</if>
+            <if test="insurancePhoto != null">insurance_photo,</if>
+            <if test="policeCertificate != null">police_certificate,</if>
             <if test="passportPhoto != null">passport_photo,</if>
             <if test="bankPhoto != null">bank_photo,</if>
             <if test="merchantIntroduction != null">merchant_introduction,</if>
@@ -152,6 +160,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="drivingLicense != null">#{drivingLicense},</if>
             <if test="vehiclePhotos != null">#{vehiclePhotos},</if>
             <if test="vehicleType != null">#{vehicleType},</if>
+            <if test="preLaunchCity != null">#{preLaunchCity},</if>
+            <if test="birthday != null">#{birthday},</if>
+            <if test="insurancePhoto != null">#{insurancePhoto},</if>
+            <if test="policeCertificate != null">#{policeCertificate},</if>
             <if test="passportPhoto != null">#{passportPhoto},</if>
             <if test="bankPhoto != null">#{bankPhoto},</if>
             <if test="merchantIntroduction != null">#{merchantIntroduction},</if>
@@ -195,6 +207,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="drivingLicense != null">driving_license = #{drivingLicense},</if>
             <if test="vehiclePhotos != null">vehicle_photos = #{vehiclePhotos},</if>
             <if test="vehicleType != null">vehicle_type = #{vehicleType},</if>
+            <if test="preLaunchCity != null">pre_launch_city = #{preLaunchCity},</if>
+            <if test="birthday != null">birthday = #{birthday},</if>
+            <if test="insurancePhoto != null">insurance_photo = #{insurancePhoto},</if>
+            <if test="policeCertificate != null">police_certificate = #{policeCertificate},</if>
             <if test="passportPhoto != null">passport_photo = #{passportPhoto},</if>
             <if test="bankPhoto != null">bank_photo = #{bankPhoto},</if>
             <if test="merchantIntroduction != null">merchant_introduction = #{merchantIntroduction},</if>

+ 20 - 5
updatesql/sql.md

@@ -875,13 +875,28 @@ ALTER TABLE pos_order_line_payment
 ```sql
 -- 仅记录迁移脚本,由开发者确认环境后手动执行;Codex 不直接执行数据库变更。
 -- 商家认证新增 4 个证件材料字段(图片URL,多张逗号分隔;營業登記證/食品業者/UBO 为"如有"可选)
+-- 注:用 TEXT 类型;info_user 列多,VARCHAR(2000) 触发 MySQL 1118 行大小超限(TEXT 不计入行大小)
 ALTER TABLE info_user
-  ADD COLUMN business_license VARCHAR(2000) DEFAULT NULL COMMENT '營業登記證證明(图片URL,多张逗号分隔,如有)',
-  ADD COLUMN directors_screenshot VARCHAR(2000) DEFAULT NULL COMMENT '董監事資料查詢截圖(图片URL,多张逗号分隔)',
-  ADD COLUMN food_permit VARCHAR(2000) DEFAULT NULL COMMENT '食品業者登錄字號證明(图片URL,如有)',
-  ADD COLUMN ubo_statement VARCHAR(2000) DEFAULT NULL COMMENT '實質受益人聲明書UBO(图片URL,如有)';
+  ADD COLUMN business_license TEXT NULL COMMENT '營業登記證證明(图片URL,多张逗号分隔,如有)',
+  ADD COLUMN directors_screenshot TEXT NULL COMMENT '董監事資料查詢截圖(图片URL,多张逗号分隔)',
+  ADD COLUMN food_permit TEXT NULL COMMENT '食品業者登錄字號證明(图片URL,如有)',
+  ADD COLUMN ubo_statement TEXT NULL COMMENT '實質受益人聲明書UBO(图片URL,如有)';
 
 -- 门店新增菜单照片字段(图片URL,多张逗号分隔)
 ALTER TABLE pos_store
-  ADD COLUMN menu_photo VARCHAR(2000) DEFAULT NULL COMMENT '菜單照片(图片URL,多张逗号分隔)' AFTER logo;
+  ADD COLUMN menu_photo TEXT NULL COMMENT '菜單照片(图片URL,多张逗号分隔)' AFTER logo;
 ```
+
+## 2026-08-25 骑手申请资料新增字段(需求602:骑手端申请材料与后台审核字段对齐)
+
+```sql
+-- 仅记录迁移脚本,由开发者确认环境后手动执行;不直接执行数据库变更。
+-- 骑手申请资料新增4字段:预上线城市/出生日期/强制险或电子保险卡/良民证(可后补);大头照复用 avatar 不新增列。
+ALTER TABLE info_user
+  ADD COLUMN pre_launch_city VARCHAR(100) DEFAULT NULL COMMENT '预上线城市(骑手申请时选择)' AFTER vehicle_type,
+  ADD COLUMN birthday VARCHAR(20) DEFAULT NULL COMMENT '出生日期(yyyy-MM-dd)' AFTER pre_launch_city,
+-- 注:两个照片字段用 TEXT,与上条同因——info_user 列多,VARCHAR(2000) 会触发 MySQL 1118 行大小超限(TEXT 不计入行大小)
+  ADD COLUMN insurance_photo TEXT NULL COMMENT '强制险或电子保险卡(图片URL,多张逗号分隔)' AFTER birthday,
+  ADD COLUMN police_certificate TEXT NULL COMMENT '良民证(图片URL,可后补)' AFTER insurance_photo;
+```
+