<?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.sjzx.mapper.TbSjSpbfMapper">
    <resultMap type="com.mosty.base.model.entity.sjzx.TbSjSpbf" id="TbSjSpbfMap">
        <result property="id" column="id" jdbcType="VARCHAR"/>
        <result property="sjId" column="sj_id" jdbcType="VARCHAR"/>
        <result property="sxtId" column="sxt_id" jdbcType="VARCHAR"/>
        <result property="bfkssj" column="bfkssj" jdbcType="TIMESTAMP"/>
        <result property="bfjssj" column="bfjssj" jdbcType="TIMESTAMP"/>
        <result property="wz" column="wz" jdbcType="VARCHAR"/>
        <result property="tpId" column="tp_id" jdbcType="VARCHAR"/>
        <result property="ssbm" column="ssbm" jdbcType="VARCHAR"/>
        <result property="ssbmdm" column="ssbmdm" jdbcType="VARCHAR"/>
        <result property="ssxgaj" column="ssxgaj" jdbcType="VARCHAR"/>
        <result property="ssxgajdm" column="ssxgajdm" jdbcType="VARCHAR"/>
        <result property="sssgaj" column="sssgaj" jdbcType="VARCHAR"/>
        <result property="sssgajdm" column="sssgajdm" jdbcType="VARCHAR"/>
        <result property="xtSjly" column="xt_sjly" jdbcType="VARCHAR"/>
        <result property="xtSjzt" column="xt_sjzt" jdbcType="VARCHAR"/>
        <result property="xtScbz" column="xt_scbz" jdbcType="VARCHAR"/>
        <result property="xtCjip" column="xt_cjip" jdbcType="VARCHAR"/>
        <result property="xtCjsj" column="xt_cjsj" jdbcType="VARCHAR"/>
        <result property="xtCjrId" column="xt_cjr_id" jdbcType="VARCHAR"/>
        <result property="xtCjr" column="xt_cjr" jdbcType="VARCHAR"/>
        <result property="xtCjbmdm" column="xt_cjbmdm" jdbcType="VARCHAR"/>
        <result property="xtCjbmmc" column="xt_cjbmmc" jdbcType="VARCHAR"/>
        <result property="xtZhgxip" column="xt_zhgxip" jdbcType="VARCHAR"/>
        <result property="xtZhgxsj" column="xt_zhgxsj" jdbcType="VARCHAR"/>
        <result property="xtZhgxrid" column="xt_zhgxrid" jdbcType="VARCHAR"/>
        <result property="xtZhgxr" column="xt_zhgxr" jdbcType="VARCHAR"/>
        <result property="xtZhgxbmdm" column="xt_zhgxbmdm" jdbcType="VARCHAR"/>
        <result property="xtZhgxbm" column="xt_zhgxbm" jdbcType="VARCHAR"/>
        <result property="bz" column="bz" jdbcType="VARCHAR"/>
        <result property="sssgajid" column="sssgajid" jdbcType="VARCHAR"/>
        <result property="ssxgajid" column="ssxgajid" jdbcType="VARCHAR"/>
        <result property="ssbmid" column="ssbmid" jdbcType="VARCHAR"/>
    </resultMap>

    <!--查询所有-->
    <select id="queryAll" resultMap="TbSjSpbfMap">
        select * from tb_sj_spbf where xt_sjzt = '1' and xt_scbz = '0'
        ${useSql}
    </select>

    <!--查询单个-->
    <select id="queryById" resultMap="TbSjSpbfMap">
        select * from tb_sj_spbf where xt_sjzt = '1' and xt_scbz = '0'
        and id = #{id}
    </select>

    <!--通过主键删除-->
    <delete id="deleteById">
        delete
        from tb_sj_spbf
        where id = #{id}
    </delete>
</mapper>


