洪城义警-正式版后台
zengh
2021-07-04 00cb7fea9c8ed32968ac43ef01ac1fe4e4d0931f
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>