浏览代码

修改接口年限查询出错问题

DESKTOP-2K9OVK9\siwei 4 月之前
父节点
当前提交
9a53fa62b2

+ 3 - 0
onemap-modules/onemap-apply/src/main/resources/mapper/postgresql/gdbh/TGdbhGdServerMapper.xml

@@ -22,6 +22,9 @@
     <select id="selectTGdbhGdServerList" parameterType="TGdbhGdServerDTO" resultMap="TGdbhGdServerDTOResult">
         select t1.*,t2.url serverurl,t2.fwmc serverfwmc,t2.fwgzkj serverfwgzkj  from (
         <include refid="selectTGdbhGdServerVo"/>
+        <if test="year!=null and year!=''">
+            where year = #{year}
+        </if>
         order by year desc)t1
         left join t_yzt_zyml t2 on t2.bsm = t1.serverid
     </select>

+ 3 - 0
onemap-modules/onemap-apply/src/main/resources/mapper/postgresql/gdbh/TGdbhYjjbntServerMapper.xml

@@ -22,6 +22,9 @@
     <select id="selectTGdbhYjjbntServerList" parameterType="TGdbhYjjbntServerDTO" resultMap="TGdbhYjjbntServerDTOResult">
         select t1.*,t2.url serverurl,t2.fwmc serverfwmc,t2.fwgzkj serverfwgzkj  from (
         <include refid="selectTGdbhYjjbntServerVo"/>
+        <if test="year!=null and year!=''">
+            where year = #{year}
+        </if>
         order by year desc)t1
         left join t_yzt_zyml t2 on t2.bsm = t1.serverid
     </select>