Explorar el Código

解决SQL注入问题

songxy hace 1 año
padre
commit
a1de319c96
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  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