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

骑手资料新增车型字段(机车/轿车)

- InfoUser 增 vehicleType 字段(1机车 2轿车) + getter/setter
- InfoUserMapper.xml: resultMap + insert(列/值) + update 共4处映射
- /setuser 编辑资料接口接 vehicleType
- updatesql/sql.md: info_user 加 vehicle_type 列

Co-Authored-By: Claude <noreply@anthropic.com>
qmj 5 часов назад
Родитель
Сommit
3627597fb2

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

@@ -706,6 +706,7 @@ public class InfoUserController extends BaseController {
         user.setDrivingLicense(infoUser.getDrivingLicense());
         user.setVehiclePhotos(infoUser.getVehiclePhotos());
         user.setLicensePlate(infoUser.getLicensePlate());
+        user.setVehicleType(infoUser.getVehicleType());
         user.setFullName(infoUser.getFullName());
         user.setIdNumber(infoUser.getIdNumber());
         user.setMerchantType(infoUser.getMerchantType());

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

@@ -124,6 +124,9 @@ public class InfoUser
     /** 车牌 */
     @Excel(name = "车牌")
     private String licensePlate;
+    /** 骑手车型(1机车 2轿车) */
+    @Excel(name = "骑手车型")
+    private String vehicleType;
 
     /** 负责人 */
     @Excel(name = "负责人")
@@ -396,6 +399,14 @@ public class InfoUser
         this.licensePlate = licensePlate;
     }
 
+    public String getVehicleType() {
+        return vehicleType;
+    }
+
+    public void setVehicleType(String vehicleType) {
+        this.vehicleType = vehicleType;
+    }
+
     public String getFullName() {
         return fullName;
     }

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

@@ -29,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="drivingLicense"    column="driving_license"    />
         <result property="vehiclePhotos"    column="vehicle_photos"    />
         <result property="licensePlate"    column="license_plate"    />
+        <result property="vehicleType"    column="vehicle_type"    />
         <result property="fullName"    column="full_name"    />
         <result property="idNumber"    column="id_number"    />
         <result property="merchantType"    column="merchant_type"    />
@@ -107,6 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="driversLicense != null">drivers_license,</if>
             <if test="drivingLicense != null">driving_license,</if>
             <if test="vehiclePhotos != null">vehicle_photos,</if>
+            <if test="vehicleType != null">vehicle_type,</if>
             <if test="passportPhoto != null">passport_photo,</if>
             <if test="bankPhoto != null">bank_photo,</if>
             <if test="merchantIntroduction != null">merchant_introduction,</if>
@@ -141,6 +143,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="driversLicense != null">#{driversLicense},</if>
             <if test="drivingLicense != null">#{drivingLicense},</if>
             <if test="vehiclePhotos != null">#{vehiclePhotos},</if>
+            <if test="vehicleType != null">#{vehicleType},</if>
             <if test="passportPhoto != null">#{passportPhoto},</if>
             <if test="bankPhoto != null">#{bankPhoto},</if>
             <if test="merchantIntroduction != null">#{merchantIntroduction},</if>
@@ -179,6 +182,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="driversLicense != null">drivers_license = #{driversLicense},</if>
             <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="passportPhoto != null">passport_photo = #{passportPhoto},</if>
             <if test="bankPhoto != null">bank_photo = #{bankPhoto},</if>
             <if test="merchantIntroduction != null">merchant_introduction = #{merchantIntroduction},</if>

+ 7 - 0
updatesql/sql.md

@@ -473,3 +473,10 @@ VALUES ('骑手新任务距离上限', 'sys_qs_newtask_distance', '0', 'admin',
 INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark)
 VALUES (1, '30公里', '30', 'sys_qs_newtask_distance', '', 'default', 'Y', '0', 'admin', NOW(), '骑手新任务距商家距离上限(公里),超过不显示');
 ```
+
+## 2026-08-03 骑手车型字段
+
+```sql
+-- 骑手车型(InfoUser.vehicleType,仅骑手 userType=2 用):1=机车 2=轿车
+ALTER TABLE info_user ADD COLUMN vehicle_type VARCHAR(2) DEFAULT NULL COMMENT '骑手车型 1机车 2轿车';
+```