Преглед на файлове

fault 添加状态字段,添加插入时候LAST_INSERT_ID支持。

tom преди 5 месеца
родител
ревизия
5f26317518

+ 9 - 0
ruoyi-sim/src/main/resources/mapper/sim/FaultMapper.xml

@@ -9,6 +9,7 @@
         <result property="parentFaultId" column="parent_fault_id"/>
         <result property="simType" column="sim_type"/>
         <result property="faultType" column="fault_type"/>
+        <result property="faultState" column="fault_state"/>
         <result property="conflictFaultIds" column="conflict_fault_ids"/>
         <result property="replacePart" column="replace_part"/>
         <result property="replaceName" column="replace_name"/>
@@ -27,6 +28,7 @@
                parent_fault_id,
                sim_type,
                fault_type,
+               fault_state,
                conflict_fault_ids,
                replace_part,
                replace_name,
@@ -47,6 +49,7 @@
             <if test="parentFaultId != null  and parentFaultId != ''">and parent_fault_id = #{parentFaultId}</if>
             <if test="simType != null  and simType != ''">and sim_type = #{simType}</if>
             <if test="faultType != null  and faultType != ''">and fault_type = #{faultType}</if>
+            <if test="faultState != null  and faultState != ''">and fault_state = #{faultState}</if>
             <if test="conflictFaultIds != null  and conflictFaultIds != ''">and conflict_fault_ids =
                 #{conflictFaultIds}
             </if>
@@ -67,12 +70,16 @@
     </select>
 
     <insert id="insertFault" parameterType="Fault">
+        <selectKey keyProperty="faultId" order="AFTER" resultType="java.lang.String">
+            select LAST_INSERT_ID()
+        </selectKey>
         insert into sim_fault
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="faultId != null">fault_id,</if>
             <if test="parentFaultId != null and parentFaultId != ''">parent_fault_id,</if>
             <if test="simType != null and simType != ''">sim_type,</if>
             <if test="faultType != null">fault_type,</if>
+            <if test="faultState != null">fault_state,</if>
             <if test="conflictFaultIds != null and conflictFaultIds != ''">conflict_fault_ids,</if>
             <if test="replacePart != null">replace_part,</if>
             <if test="replaceName != null">replace_name,</if>
@@ -90,6 +97,7 @@
             <if test="parentFaultId != null and parentFaultId != ''">#{parentFaultId},</if>
             <if test="simType != null and simType != ''">#{simType},</if>
             <if test="faultType != null">#{faultType},</if>
+            <if test="faultState != null">#{faultState},</if>
             <if test="conflictFaultIds != null and conflictFaultIds != ''">#{conflictFaultIds},</if>
             <if test="replacePart != null">#{replacePart},</if>
             <if test="replaceName != null">#{replaceName},</if>
@@ -110,6 +118,7 @@
             <if test="parentFaultId != null and parentFaultId != ''">parent_fault_id = #{parentFaultId},</if>
             <if test="simType != null and simType != ''">sim_type = #{simType},</if>
             <if test="faultType != null">fault_type = #{faultType},</if>
+            <if test="faultState != null">fault_state = #{faultState},</if>
             <if test="conflictFaultIds != null and conflictFaultIds != ''">conflict_fault_ids = #{conflictFaultIds},
             </if>
             <if test="replacePart != null">replace_part = #{replacePart},</if>

+ 3 - 0
ruoyi-sim/src/main/resources/mapper/sim/MajorMapper.xml

@@ -32,6 +32,9 @@
     </select>
 
     <insert id="insertMajor" parameterType="Major" useGeneratedKeys="true" keyProperty="majorId">
+        <selectKey keyProperty="majorId" order="AFTER" resultType="java.lang.Long">
+            select LAST_INSERT_ID()
+        </selectKey>
         insert into sim_major
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="majorName != null and majorName != ''">major_name,</if>

+ 3 - 0
ruoyi-sim/src/main/resources/mapper/sim/RealExamCollectionDeptMapper.xml

@@ -32,6 +32,9 @@
 
     <insert id="insertRealExamCollectionDept" parameterType="RealExamCollectionDept" useGeneratedKeys="true"
             keyProperty="relId">
+        <selectKey keyProperty="relId" order="AFTER" resultType="java.lang.Long">
+            select LAST_INSERT_ID()
+        </selectKey>
         insert into sim_real_exam_collection_dept
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="examCollectionId != null">exam_collection_id,</if>

+ 3 - 0
ruoyi-sim/src/main/resources/mapper/sim/RealExamCollectionMapper.xml

@@ -69,6 +69,9 @@
 
     <insert id="insertRealExamCollection" parameterType="RealExamCollection" useGeneratedKeys="true"
             keyProperty="examCollectionId">
+        <selectKey keyProperty="examCollectionId" order="AFTER" resultType="java.lang.Long">
+            select LAST_INSERT_ID()
+        </selectKey>
         insert into sim_real_exam_collection
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="simType != null and simType != ''">sim_type,</if>

+ 3 - 0
ruoyi-sim/src/main/resources/mapper/sim/RealExamCompRequestMapper.xml

@@ -52,6 +52,9 @@
 
     <insert id="insertRealExamCompRequest" parameterType="RealExamCompRequest" useGeneratedKeys="true"
             keyProperty="relId">
+        <selectKey keyProperty="relId" order="AFTER" resultType="java.lang.Long">
+            select LAST_INSERT_ID()
+        </selectKey>
         insert into sim_real_exam_comp_request
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="examId != null">exam_id,</if>

+ 3 - 0
ruoyi-sim/src/main/resources/mapper/sim/RealExamFaultMapper.xml

@@ -73,6 +73,9 @@
     </select>
 
     <insert id="insertRealExamFault" parameterType="RealExamFault" useGeneratedKeys="true" keyProperty="refId">
+        <selectKey keyProperty="refId" order="AFTER" resultType="java.lang.Long">
+            select LAST_INSERT_ID()
+        </selectKey>
         insert into sim_real_exam_fault
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="examId != null">exam_id,</if>

+ 3 - 0
ruoyi-sim/src/main/resources/mapper/sim/RealExamMapper.xml

@@ -68,6 +68,9 @@
     </select>
 
     <insert id="insertRealExam" parameterType="RealExam">
+        <selectKey keyProperty="examId" order="AFTER" resultType="java.lang.Long">
+            select LAST_INSERT_ID()
+        </selectKey>
         insert into sim_real_exam
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="examId != null">exam_id,</if>

+ 3 - 0
ruoyi-sim/src/main/resources/mapper/sim/SeatMapper.xml

@@ -44,6 +44,9 @@
     </select>
 
     <insert id="insertSeat" parameterType="Seat" useGeneratedKeys="true" keyProperty="seatId">
+        <selectKey keyProperty="seatId" order="AFTER" resultType="java.lang.Long">
+            select LAST_INSERT_ID()
+        </selectKey>
         insert into sim_seat
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="seatNum != null">seat_num,</if>

+ 3 - 0
ruoyi-sim/src/main/resources/mapper/sim/SimMapper.xml

@@ -50,6 +50,9 @@
     </select>
 
     <insert id="insertSim" parameterType="Sim" useGeneratedKeys="true" keyProperty="simId">
+        <selectKey keyProperty="simId" order="AFTER" resultType="java.lang.Long">
+            select LAST_INSERT_ID()
+        </selectKey>
         insert into sim_sim
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="seatId != null">seat_id,</if>

+ 3 - 0
ruoyi-sim/src/main/resources/mapper/sim/SimMsg.xml

@@ -70,6 +70,9 @@
     </select>
 
     <insert id="insertSimMsg" parameterType="SimMsg" useGeneratedKeys="true" keyProperty="simMsgId">
+        <selectKey keyProperty="simMsgId" order="AFTER" resultType="java.lang.Long">
+            select LAST_INSERT_ID()
+        </selectKey>
         insert into sim_sim_msg
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="simId != null">sim_id,</if>

+ 3 - 0
ruoyi-sim/src/main/resources/mapper/sim/TaskFaultMapper.xml

@@ -32,6 +32,9 @@
     </select>
 
     <insert id="insertTaskFault" parameterType="TaskFault" useGeneratedKeys="true" keyProperty="relId">
+        <selectKey keyProperty="relId" order="AFTER" resultType="java.lang.Long">
+            select LAST_INSERT_ID()
+        </selectKey>
         insert into sim_task_fault
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="taskId != null">task_id,</if>

+ 1 - 1
ruoyi-sim/src/main/resources/mapper/sim/TaskMapper.xml

@@ -48,7 +48,7 @@
 
     <insert id="insertTask" parameterType="Task">
         <selectKey keyProperty="taskId" order="AFTER" resultType="java.lang.Long">
-            select last_insert_id()
+            select LAST_INSERT_ID()
         </selectKey>
         insert into sim_task
         <trim prefix="(" suffix=")" suffixOverrides=",">