elis 2 jaren geleden
bovenliggende
commit
724c23a447

+ 5 - 1
nngkxxdp/src/main/java/com/example/nngkxxdp/program/entity/SRepair.java

@@ -2,8 +2,8 @@ package com.example.nngkxxdp.program.entity;
 
 import lombok.Data;
 
-import java.util.Date;
 import java.io.Serializable;
+import java.util.Date;
 
 /**
  * (SRepair)实体类
@@ -41,6 +41,10 @@ public class SRepair implements Serializable {
 
     private String userId;
 
+    private Date appointmentTime;
+
+    private String maintenanceAddress;
+
 
 
 }

+ 10 - 5
nngkxxdp/src/main/resources/mapper/SRepairDao.xml

@@ -16,12 +16,15 @@
         <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
         <result property="isDel" column="is_del" jdbcType="INTEGER"/>
         <result property="userId" column="user_id" jdbcType="VARCHAR"/>
+        <result property="appointmentTime" column="appointment_time" jdbcType="TIMESTAMP"/>
+        <result property="maintenanceAddress" column="maintenance_address" jdbcType="VARCHAR"/>
+
     </resultMap>
 
     <!--查询单个-->
     <select id="queryById" resultMap="SRepairMap">
         select
-          id, repair_type, user_description, repair_pic, phone_num, status, worker_description, result_pic, worker_id,user_id
+          id, repair_type, user_description, repair_pic, phone_num, status, worker_description, result_pic, worker_id,user_id,appointment_time,maintenance_address
         from s_repair
         where id = #{id}
     </select>
@@ -29,7 +32,7 @@
     <!--查询指定行数据-->
     <select id="queryAllByLimit" resultMap="SRepairMap">
         select
-          id, repair_type, user_description, repair_pic, phone_num, status, worker_description, result_pic, worker_id, create_time, update_time, is_del
+          id, repair_type, user_description, repair_pic, phone_num, status, worker_description, result_pic, worker_id, create_time, update_time, is_del,user_id,appointment_time,maintenance_address
         from s_repair
         <where>
             <if test="id != null">
@@ -118,8 +121,8 @@
 
     <!--新增所有列-->
     <insert id="insert" keyProperty="id" useGeneratedKeys="true">
-        insert into s_repair(id,repair_type, user_description, repair_pic, phone_num, status, create_time, update_time, is_del,user_id)
-        values (#{id},#{repairType}, #{userDescription}, #{repairPic}, #{phoneNum}, 0 , now(), now(),0,#{userId})
+        insert into s_repair(id,repair_type, user_description, repair_pic, phone_num, status, create_time, update_time, is_del,user_id,appointment_time,maintenance_address)
+        values (#{id},#{repairType}, #{userDescription}, #{repairPic}, #{phoneNum}, 0 , now(), now(),0,#{userId},#{appointmentTime},#{maintenanceAddress})
     </insert>
 
     <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
@@ -198,7 +201,9 @@
             `status`,
             worker_description,
             result_pic,
-            worker_id
+            worker_id,
+            appointment_time,
+            maintenance_address
         FROM
             s_repair
         <where>

+ 8 - 8
nngkxxdp/src/main/resources/mapper/SWorkerDao.xml

@@ -27,17 +27,17 @@
           id, name, region, phone_num, status, create_time, update_time, is_del
         from s_worker
         <where>
-            <if test="name != null and name != ''">
-                and name = #{name}
+            <if test="sWorker.name != null and sWorker.name != ''">
+                and name = #{sWorker.name}
             </if>
-            <if test="region != null and region != ''">
-                and region = #{region}
+            <if test="sWorker.region != null and sWorker.region != ''">
+                and region = #{sWorker.region}
             </if>
-            <if test="phoneNum != null">
-                and phone_num = #{phoneNum}
+            <if test="sWorker.phoneNum != null">
+                and phone_num = #{sWorker.phoneNum}
             </if>
-            <if test="status != null">
-                and status = #{status}
+            <if test="sWorker.status != null">
+                and status = #{sWorker.status}
             </if>
             and is_del = 0
         </where>