From 5d782aa8646d131409e0c3be1cf6db66cd0476d6 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Fri, 25 Jun 2021 17:00:18 +0800
Subject: [PATCH] 1.业主模糊查询接口修改 2.资讯上传图片时bug修复,修改 xss 3.业主附表医院,学习查询详情接口修改,sql修改为格式化时间后返回

---
 src/main/java/org/springblade/modules/system/mapper/TenantMapper.xml |   39 +++++++++++++++++++++++++++------------
 1 files changed, 27 insertions(+), 12 deletions(-)

diff --git a/src/main/java/org/springblade/modules/system/mapper/TenantMapper.xml b/src/main/java/org/springblade/modules/system/mapper/TenantMapper.xml
index dbd51a2..70156b1 100644
--- a/src/main/java/org/springblade/modules/system/mapper/TenantMapper.xml
+++ b/src/main/java/org/springblade/modules/system/mapper/TenantMapper.xml
@@ -24,54 +24,54 @@
     </resultMap>
     <!--医院信息新增-->
     <insert id="inserts">
-        insert into jfptPublicSecurity.sys_hospital(dj,had,ht,ctime,content,hn) values(#{dj},#{had},#{ht},#{ctime},#{content},#{hn})
+        insert into sys_hospital(dj,had,ht,ctime,content,hn) values(#{dj},#{had},#{ht},#{ctime},#{content},#{hn})
     </insert>
     <!--医院信息修改-->
     <update id="updateInfoy" >
-        UPDATE  jfptPublicSecurity.sys_hospital SET dj=#{dj},had=#{had},ctime=#{ctime},content=#{content},ht=#{ht} WHERE hn=#{hn}
+        UPDATE  sys_hospital SET dj=#{dj},had=#{had},ctime=#{ctime},content=#{content},ht=#{ht} WHERE hn=#{hn}
     </update>
 
     <select id="selectTy" resultType="java.util.HashMap">
-        select * from jfptPublicSecurity.sys_hospital where hn=#{hn}
+        select id,dj,had,ht,DATE_FORMAT(ctime,'%Y-%m-%d') as ctime,content,hn from sys_hospital where hn=#{hn}
     </select>
 
 
     <!--学校信息新增-->
     <insert id="insertss">
-        insert into jfptPublicSecurity.sys_school(nature,had,motto,ctime,content,hn) values(#{nature},#{had},#{motto},#{ctime},#{content},#{hn})
+        insert into sys_school(nature,had,motto,ctime,content,hn) values(#{nature},#{had},#{motto},#{ctime},#{content},#{hn})
     </insert>
     <!--学校信息修改-->
     <update id="updateInfos" >
-        UPDATE  jfptPublicSecurity.sys_school SET nature=#{nature},had=#{had},ctime=#{ctime},content=#{content},motto=#{motto} WHERE hn=#{hn}
+        UPDATE  sys_school SET nature=#{nature},had=#{had},ctime=#{ctime},content=#{content},motto=#{motto} WHERE hn=#{hn}
     </update>
 
     <select id="selectTs" resultType="java.util.HashMap">
-        select * from jfptPublicSecurity.sys_school where hn=#{hn}
+        select id,nature,motto,DATE_FORMAT(ctime,'%Y-%m-%d') as ctime,had,content,hn from sys_school where hn=#{hn}
     </select>
 
 
     <!--小区信息新增-->
     <insert id="insertsr">
-        insert into jfptPublicSecurity.sys_residential(category,attributes,developers,housetype,content,hn) values(#{category},#{attributes},#{developers},#{housetype},#{content},#{hn})
+        insert into sys_residential(category,attributes,developers,housetype,content,hn) values(#{category},#{attributes},#{developers},#{housetype},#{content},#{hn})
     </insert>
     <!--小区信息修改-->
     <update id="updateInfor" >
-        UPDATE  jfptPublicSecurity.sys_residential SET category=#{category},attributes=#{attributes},developers=#{developers},had=#{had},housetype=#{housetype},content=#{content} WHERE hn=#{hn}
+        UPDATE  sys_residential SET category=#{category},attributes=#{attributes},developers=#{developers},had=#{had},housetype=#{housetype},content=#{content} WHERE hn=#{hn}
     </update>
 
     <select id="selectTr" resultType="java.util.HashMap">
-        select * from jfptPublicSecurity.sys_residential where hn=#{hn}
+        select * from sys_residential where hn=#{hn}
     </select>
 
 
     <delete id="deletey">
-        delete from jfptPublicSecurity.sys_hospital where hn = #{hn}
+        delete from sys_hospital where hn = #{hn}
     </delete>
     <delete id="deletes">
-        delete from jfptPublicSecurity.sys_school where hn = #{hn}
+        delete from sys_school where hn = #{hn}
     </delete>
     <delete id="deleter">
-        delete from jfptPublicSecurity.sys_residential where hn = #{hn}
+        delete from sys_residential where hn = #{hn}
     </delete>
 
 
@@ -84,6 +84,21 @@
 
     <select id="selectTenantPage" resultMap="tenantResultMap">
         select * from blade_tenant where is_deleted = 0
+        <if test="tenant.tenantName!=null and tenant.tenantName!=''">
+            and tenant_name like concat('%',#{tenant.tenantName},'%')
+        </if>
+        <if test="tenant.linkman!=null and tenant.linkman!=''">
+            and linkman like concat('%',#{tenant.linkman},'%')
+        </if>
+        <if test="tenant.province!=null and tenant.province!=''">
+            and province=#{tenant.province}
+        </if>
+        <if test="tenant.city!=null and tenant.city!=''">
+            and city=#{tenant.city}
+        </if>
+        <if test="tenant.district!=null and tenant.district!=''">
+            and district=#{tenant.district}
+        </if>
     </select>
 
 </mapper>

--
Gitblit v1.9.3