Просмотр исходного кода

新增骑手审核大头照字段

新增 riderHeadPhoto 独立保存骑手审核大头照,保留原 avatar 用户头像字段,并补充数据库迁移脚本。
qmj 13 часов назад
Родитель
Сommit
62a3f01ae4

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

@@ -709,6 +709,7 @@ public class InfoUserController extends BaseController {
         user.setVehiclePhotos(infoUser.getVehiclePhotos());
         user.setLicensePlate(infoUser.getLicensePlate());
         user.setVehicleType(infoUser.getVehicleType());
+        user.setRiderHeadPhoto(infoUser.getRiderHeadPhoto());
         user.setPreLaunchCity(infoUser.getPreLaunchCity());
         user.setBirthday(infoUser.getBirthday());
         user.setInsurancePhoto(infoUser.getInsurancePhoto());

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

@@ -127,6 +127,11 @@ public class InfoUser
     /** 骑手车型(1机车 2轿车) */
     @Excel(name = "骑手车型")
     private String vehicleType;
+
+    /** 骑手审核大头照(图片URL) */
+    @Excel(name = "骑手审核大头照")
+    private String riderHeadPhoto;
+
     /** 预上线城市(骑手申请时选择) */
     @Excel(name = "预上线城市")
     private String preLaunchCity;
@@ -438,6 +443,14 @@ public class InfoUser
         this.vehicleType = vehicleType;
     }
 
+    public String getRiderHeadPhoto() {
+        return riderHeadPhoto;
+    }
+
+    public void setRiderHeadPhoto(String riderHeadPhoto) {
+        this.riderHeadPhoto = riderHeadPhoto;
+    }
+
     public String getPreLaunchCity() {
         return preLaunchCity;
     }

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

@@ -30,6 +30,7 @@ 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="riderHeadPhoto"    column="rider_head_photo"    />
         <result property="preLaunchCity"    column="pre_launch_city"    />
         <result property="birthday"    column="birthday"    />
         <result property="insurancePhoto"    column="insurance_photo"    />
@@ -117,6 +118,7 @@ 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="riderHeadPhoto != null">rider_head_photo,</if>
             <if test="preLaunchCity != null">pre_launch_city,</if>
             <if test="birthday != null">birthday,</if>
             <if test="insurancePhoto != null">insurance_photo,</if>
@@ -160,6 +162,7 @@ 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="riderHeadPhoto != null">#{riderHeadPhoto},</if>
             <if test="preLaunchCity != null">#{preLaunchCity},</if>
             <if test="birthday != null">#{birthday},</if>
             <if test="insurancePhoto != null">#{insurancePhoto},</if>
@@ -207,6 +210,7 @@ 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="riderHeadPhoto != null">rider_head_photo = #{riderHeadPhoto},</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>

+ 10 - 1
updatesql/sql.md

@@ -891,7 +891,7 @@ ALTER TABLE pos_store
 
 ```sql
 -- 仅记录迁移脚本,由开发者确认环境后手动执行;不直接执行数据库变更。
--- 骑手申请资料新增4字段:预上线城市/出生日期/强制险或电子保险卡/良民证(可后补);大头照复用 avatar 不新增列
+-- 骑手申请资料新增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,
@@ -900,3 +900,12 @@ ALTER TABLE info_user
   ADD COLUMN police_certificate TEXT NULL COMMENT '良民证(图片URL,可后补)' AFTER insurance_photo;
 ```
 
+## 2026-08-26 骑手审核大头照独立字段
+
+```sql
+-- 仅记录迁移脚本,由开发者确认环境后手动执行;不直接执行数据库变更。
+-- 大头照用于骑手资料审核,原 avatar 字段继续作为用户头像使用。
+ALTER TABLE info_user
+  ADD COLUMN rider_head_photo TEXT NULL COMMENT '骑手审核大头照(图片URL)' AFTER vehicle_type;
+```
+