Browse Source

'解决删除bjlsyd表SQL注入报错'

songxy 1 năm trước cách đây
mục cha
commit
e320225cd4

+ 3 - 3
BJYSYBZ_S/src/main/resources/mapper/YbzBJMapper.xml

@@ -787,7 +787,7 @@
         delete
         delete
         from
         from
         sde.bjlsyd
         sde.bjlsyd
-        where xh = #{id} and objectid = ${num}
+        where xh = #{id} and objectid = #{num}
     </delete>
     </delete>
 
 
     <select id="lsydList" parameterType="com.zjugis.ysgzybz.domain.dto.CommonDTO" resultType="java.util.Map">
     <select id="lsydList" parameterType="com.zjugis.ysgzybz.domain.dto.CommonDTO" resultType="java.util.Map">
@@ -797,10 +797,10 @@
         sde.bjlsyd
         sde.bjlsyd
         where 1=1
         where 1=1
         <if test="dto.big != null">
         <if test="dto.big != null">
-            and spmj &lt;= ${dto.big} / 0.0015
+            and spmj &lt;= #{dto.big} / 0.0015
         </if>
         </if>
         <if test="dto.small != null">
         <if test="dto.small != null">
-            and spmj &gt;= ${dto.small} / 0.0015
+            and spmj &gt;= #{dto.small} / 0.0015
         </if>
         </if>
         <if test="dto.name != null and dto.name !=''">
         <if test="dto.name != null and dto.name !=''">
             and xmmc like concat('%', concat(#{dto.name}, '%'))
             and xmmc like concat('%', concat(#{dto.name}, '%'))