Browse Source

解决SQL注入问题

songxy 1 year ago
parent
commit
a1de319c96
1 changed files with 6 additions and 1 deletions
  1. 6 1
      BJYSYBZ_S/src/main/resources/mapper/YbzBJMapper.xml

+ 6 - 1
BJYSYBZ_S/src/main/resources/mapper/YbzBJMapper.xml

@@ -858,7 +858,12 @@
             dqsj = null,
         </if>
         lxfs = #{lxfs}
-        where xh = #{id} and objectid = ${num}
+        <where>
+            xh = #{id}
+            <if test="num != null">
+                and objectid = #{num}
+            </if>
+        </where>
     </update>
     <update id="updateManageGddwByDkId">
         update sde.bjwkfly2000