<?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="com.mosty.rzzx.mapper.RzzxStatisticsMapper">
    <select id="sjfktj" resultType="java.util.Map">
        select ssxgajdm, fklx, count(1) as sl
        from tb_rz_xtfk
        where xt_sjzt = '1'
          and xt_scbz = '0'
        <if test="ssbmdm != null and ssbmdm != ''">
            and  ssbmdm like concat(#{ssbmdm,jdbcType=VARCHAR},'%')
        </if>
        group by ssxgajdm, fklx
    </select>

    <select id="xjfktj" resultType="java.util.Map">
        select ssbmdm, fklx, count(1) as sl
        from tb_rz_xtfk
        where xt_sjzt = '1'
          and xt_scbz = '0'
        <if test="ssbmdm != null and ssbmdm != ''">
            and  ssbmdm like concat(#{ssbmdm,jdbcType=VARCHAR},'%')
        </if>
        group by ssbmdm, fklx
    </select>

    <select id="glfktj" resultType="java.util.Map">
        select fklx, count(1) as sl
        from tb_rz_xtfk
        where xt_sjzt = '1'
          and xt_scbz = '0'
        <if test="ssbmdm != null and ssbmdm != ''">
            and  ssbmdm like concat(#{ssbmdm,jdbcType=VARCHAR},'%')
        </if>
        group by fklx
    </select>

    <select id="gxtfktj" resultType="java.util.Map">
        select fkxt, count(1) as sl
        from tb_rz_xtfk
        where xt_sjzt = '1'
          and xt_scbz = '0'
        <if test="ssbmdm != null and ssbmdm != ''">
            and  ssbmdm like concat(#{ssbmdm,jdbcType=VARCHAR},'%')
        </if>
        group by fkxt
    </select>

    <select id="lbcxCount" resultType="int">
        select count(1)
        from tb_rz_xtfk
        where xt_sjzt = '1'
          and xt_scbz = '0'
        <if test="ssbmdm != null and ssbmdm != ''">
            and  ssbmdm like concat(#{ssbmdm,jdbcType=VARCHAR},'%')
        </if>
    </select>

    <select id="lbcxList" resultType="java.util.Map">
        select *
        from tb_rz_xtfk
        where xt_sjzt = '1'
          and xt_scbz = '0'
        <if test="ssbmdm != null and ssbmdm != ''">
            and  ssbmdm like concat(#{ssbmdm,jdbcType=VARCHAR},'%')
        </if>
        order by xt_cjsj desc
                limit #{pageIndex}, #{pageSize}
    </select>
</mapper>