Browse Source

优化更新功能

qitz 2 years ago
parent
commit
23f4c31338

+ 2
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/ColumnValueMapper.java View File

@@ -32,4 +32,6 @@ public interface ColumnValueMapper {
32 32
      */
33 33
     void batchUpdate(@Param("list") List<ColumnValue> list);
34 34
 
35
+    int updateColumnValue(ColumnValue columnValue);
36
+
35 37
 }

+ 11
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/ColumnValueMapper.xml View File

@@ -29,6 +29,17 @@
29 29
             where id=#{item.id};
30 30
         </foreach>
31 31
     </update>
32
+
33
+    <update id="updateColumnValue"  parameterType="ColumnValue">
34
+        update  column_value
35
+        <set>
36
+            <if test="value != null and value != ''">
37
+                `VALUE` = #{value},
38
+            </if>
39
+        </set>
40
+        where id=#{id}
41
+    </update>
42
+
32 43
     <select id="listByCaseId" resultMap="BaseResultMap">
33 44
         select * from column_value where case_id=#{caseId}
34 45
     </select>