<?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.base.manager.mapper.VwSyrkJzgjGxMapper">

    <select id="getCount" resultType="Integer">
        select count(1) from af_jcsj.vw_syrk_jzgj_gx a where xt_zxbz = '0'
        and a.jzd_fxjdm = "510109000000"
        <if test="dto.gldjdm != null and dto.gldjdm != ''">
            and a.gldjdm = #{dto.gldjdm}
        </if>
        <if test="dto.keyword != null and dto.keyword != ''">
            and match(a.JZD_DZXZ,a.GLDW) against (#{dto.keyword})
        </if>
    </select>

    <select id="getList" resultType="com.mosty.base.model.entity.afjcsj.VwSyrkJzgjGx">
        select * from af_jcsj.vw_syrk_jzgj_gx a where xt_zxbz = '0'
        and a.jzd_fxjdm = "510109000000"
        <if test="dto.gldjdm != null and dto.gldjdm != ''">
            and a.gldjdm = #{dto.gldjdm}
        </if>
        <if test="dto.keyword != null and dto.keyword != ''">
            and match(a.JZD_DZXZ,a.GLDW) against (#{dto.keyword})
        </if>
        limit #{pageIndex},#{pageSize}
    </select>

    <select id="getStatistics" resultType="java.util.Map">
        select count(a.gldjdm) count, a.gldjdm
        from af_jcsj.vw_syrk_jzgj_gx a
        where xt_zxbz = '0'
          and a.jzd_fxjdm = "510109000000"
        group by a.gldjdm
    </select>
</mapper>
