<?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.qwzx.mapper.QwzxQwlbMapper">

    <select id="qxjMjlb" resultType="java.util.Map">
        select * from mosty_qwgl.tb_qw_qxj
        where xt_sjzt = '1' and xt_scbz = '0'
        <if test="dto.qjrq != null and dto.qjrq != ''">
            and #{dto.qjrq} between date_format(kssj,'%Y-%m-%d') and date_format(jssj,'%Y-%m-%d')
        </if>
        <if test="dto.ssbmdm != null and dto.ssbmdm != ''">
            and ssbmid like concat(#{dto.ssbmdm,jdbcType=VARCHAR},'%')
        </if>

<!--        ${useSql}-->
    </select>

    <select id="jmxz" resultType="java.util.Map">
        select *  from tb_qw_xfbb where xt_scbz='0' and xt_sjzt='1'

        <if test="dto.ssbmdm != null and dto.ssbmdm != ''">
            and ssbmdm like concat(#{dto.ssbmdm,jdbcType=VARCHAR},'%')
        </if>

<!--        <if test="dto.ssbmid != null and dto.ssbmid != ''">-->
<!--            and ssbmid = #{dto.ssbmid}-->
<!--        </if>-->
<!--        ${useSql}-->
        limit #{pageIndex},#{pageSize}
    </select>

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

<!--        <if test="dto.ssbmid != null and dto.ssbmid != ''">-->
<!--            and ssbmid = #{dto.ssbmid}-->
<!--        </if>-->
<!--        ${useSql}-->
    </select>
</mapper>