From 62b3663030dda232e9792707b549f3bb02e2c4cd Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Sun, 27 Jun 2021 22:58:11 +0800
Subject: [PATCH] 客户模糊查询代码同步修改
---
blade-service/blade-system/src/main/java/org/springblade/system/mapper/TenantMapper.xml | 47 +++++++++++++++++++++++++++--------------------
1 files changed, 27 insertions(+), 20 deletions(-)
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/mapper/TenantMapper.xml b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/TenantMapper.xml
index 7d69c90..3530e01 100644
--- a/blade-service/blade-system/src/main/java/org/springblade/system/mapper/TenantMapper.xml
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/TenantMapper.xml
@@ -30,79 +30,86 @@
</resultMap>
- <select id="selectTenantPage" resultMap="tenantResultMap">
- select * from blade_tenant where is_deleted = 0 and tenant_id!=000000
+ <select id="selectTenantPage" resultType="org.springblade.system.vo.TenantVo">
+ select bt.*,bd.id deptId from blade_tenant bt
+ left join
+ blade_dept bd
+ on
+ bt.tenant_name=bd.dept_name
+ where bt.is_deleted = 0
+ AND bt.tenant_id != 000000
+
<if test="tenant.tenantName!=null and tenant.tenantName!=''">
- and tenant_name=#{tenant.tenantName}
+ and bt.tenant_name like concat('%',#{tenant.tenantName},'%')
</if>
<if test="tenant.linkman!=null and tenant.linkman!=''">
- and tenant.linkman=#{tenant.linkman}
+ and bt.linkman like concat('%',#{tenant.linkman},'%')
</if>
<if test="tenant.province!=null and tenant.province!=''">
- and tenant.province=#{tenant.province}
+ and bt.province=#{tenant.province}
</if>
<if test="tenant.city!=null and tenant.city!=''">
- and tenant.city=#{tenant.city}
+ and bt.city=#{tenant.city}
</if>
<if test="tenant.district!=null and tenant.district!=''">
- and tenant.district=#{tenant.district}
+ and bt.district=#{tenant.district}
</if>
</select>
<!--医院信息新增-->
<insert id="inserts">
- insert into jfpt.sys_hospital(dj,had,ht,ctime,content,hn) values(#{dj},#{had},#{ht},#{ctime},#{content},#{hn})
+ insert into jfpt0.sys_hospital(dj,had,ht,ctime,content,hn) values(#{dj},#{had},#{ht},#{ctime},#{content},#{hn})
</insert>
<!--医院信息修改-->
<update id="updateInfoy" >
- UPDATE jfpt.sys_hospital SET dj=#{dj},had=#{had},ctime=#{ctime},content=#{content},ht=#{ht} WHERE hn=#{hn}
+ UPDATE jfpt0.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 jfpt.sys_hospital where hn=#{hn}
+ select * from jfpt0.sys_hospital where hn=#{hn}
</select>
<!--学校信息新增-->
<insert id="insertss">
- insert into jfpt.sys_school(nature,had,motto,ctime,content,hn) values(#{dj},#{had},#{motto},#{ctime},#{content},#{hn})
+ insert into jfpt0.sys_school(nature,had,motto,ctime,content,hn) values(#{nature},#{had},#{motto},#{ctime},#{content},#{hn})
</insert>
<!--学校信息修改-->
<update id="updateInfos" >
- UPDATE jfpt.sys_school SET nature=#{nature},had=#{had},ctime=#{ctime},content=#{content},motto=#{motto} WHERE hn=#{hn}
+ UPDATE jfpt0.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 jfpt.sys_school where hn=#{hn}
+ select * from jfpt0.sys_school where hn=#{hn}
</select>
<!--小区信息新增-->
<insert id="insertsr">
- insert into jfpt.sys_residential(category,attributes,developers,had,housetype,content,hn) values(#{category},#{attributes},#{developers},#{had},#{housetype},#{content},#{hn})
+ insert into jfpt0.sys_residential(category,attributes,developers,housetype,content,hn) values(#{category},#{attributes},#{developers},#{housetype},#{content},#{hn})
</insert>
<!--小区信息修改-->
<update id="updateInfor" >
- UPDATE jfpt.sys_residential SET category=#{category},attributes=#{attributes},developers=#{developers},had=#{had},housetype=#{housetype},content=#{content} WHERE hn=#{hn}
+ UPDATE jfpt0.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 jfpt.sys_residential where hn=#{hn}
+ select * from jfpt0.sys_residential where hn=#{hn}
</select>
<delete id="deletey">
- delete from jfpt.sys_hospital where hn = #{hn}
+ delete from jfpt0.sys_hospital where hn = #{hn}
</delete>
<delete id="deletes">
- delete from jfpt.sys_school where hn = #{hn}
+ delete from jfpt0.sys_school where hn = #{hn}
</delete>
<delete id="deleter">
- delete from jfpt.sys_residential where hn = #{hn}
+ delete from jfpt0.sys_residential where hn = #{hn}
</delete>
- <select id="selectList" resultType="java.util.HashMap">
+ <select id="selectListTe" resultType="java.util.HashMap">
select * from blade_tenant where is_deleted = 0 and tenant_id!=000000
<if test="type!=null and type!=''">
and tenant.type=#{tenant.type}
--
Gitblit v1.9.3