南昌市物联网技防平台-学校版后台
Administrator
2021-06-25 4bf16941466d36d2b46b15aad52edbad79528b30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.system.mapper.TenantMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="tenantResultMap" type="org.springblade.system.entity.Tenant">
        <result column="id" property="id"/>
        <result column="create_user" property="createUser"/>
        <result column="create_time" property="createTime"/>
        <result column="update_user" property="updateUser"/>
        <result column="update_time" property="updateTime"/>
        <result column="status" property="status"/>
        <result column="is_deleted" property="isDeleted"/>
        <result column="tenant_id" property="tenantId"/>
        <result column="tenant_name" property="tenantName"/>
        <result column="domain" property="domain"/>
        <result column="background_url" property="backgroundUrl"/>
        <result column="linkman" property="linkman"/>
        <result column="contact_number" property="contactNumber"/>
        <result column="address" property="address"/>
        <result column="account_number" property="accountNumber"/>
        <result column="expire_time" property="expireTime"/>
        <result column="license_key" property="licenseKey"/>
        <result column="type" property="type"/>
        <result column="province" property="province"/>
        <result column="city" property="city"/>
        <result column="district" property="district"/>
        <result column="jd" property="jd"/>
        <result column="wd" property="wd"/>
    </resultMap>
 
 
    <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 bt.tenant_name like concat('%',#{tenant.tenantName},'%')
        </if>
        <if test="tenant.linkman!=null and tenant.linkman!=''">
            and bt.linkman like concat('%',#{tenant.linkman},'%')
        </if>
        <if test="tenant.province!=null and tenant.province!=''">
            and bt.province=#{tenant.province}
        </if>
        <if test="tenant.city!=null and tenant.city!=''">
            and bt.city=#{tenant.city}
        </if>
        <if test="tenant.district!=null and tenant.district!=''">
            and bt.district=#{tenant.district}
        </if>
    </select>
 
    <!--医院信息新增-->
    <insert id="inserts">
        insert into jfpt0.sys_hospital(dj,had,ht,ctime,content,hn) values(#{dj},#{had},#{ht},#{ctime},#{content},#{hn})
    </insert>
    <!--医院信息修改-->
    <update id="updateInfoy" >
        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 jfpt0.sys_hospital where hn=#{hn}
    </select>
 
 
    <!--学校信息新增-->
    <insert id="insertss">
        insert into jfpt0.sys_school(nature,had,motto,ctime,content,hn) values(#{nature},#{had},#{motto},#{ctime},#{content},#{hn})
    </insert>
    <!--学校信息修改-->
    <update id="updateInfos" >
        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 jfpt0.sys_school where hn=#{hn}
    </select>
 
 
    <!--小区信息新增-->
    <insert id="insertsr">
        insert into jfpt0.sys_residential(category,attributes,developers,housetype,content,hn) values(#{category},#{attributes},#{developers},#{housetype},#{content},#{hn})
    </insert>
    <!--小区信息修改-->
    <update id="updateInfor" >
        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 jfpt0.sys_residential where hn=#{hn}
    </select>
 
 
    <delete id="deletey">
        delete from jfpt0.sys_hospital where hn = #{hn}
    </delete>
    <delete id="deletes">
        delete from jfpt0.sys_school where hn = #{hn}
    </delete>
    <delete id="deleter">
        delete from jfpt0.sys_residential where hn = #{hn}
    </delete>
 
 
    <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}
        </if>
    </select>
</mapper>