<?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="org.springblade.modules.jwtdSpglBhjl.mapper.JwtdSpglBhjlMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="jwtdSpglBhjlResultMap" type="org.springblade.modules.jwtdSpglBhjl.pojo.entity.JwtdSpglBhjlEntity">
        <result column="sp_id" property="spId"/>
        <result column="kcl" property="kcl"/>
        <result column="bhl" property="bhl"/>
    </resultMap>

    <select id="selectJwtdSpglBhjlPage" resultMap="jwtdSpglBhjlResultMap">
        select * from jwtd_spgl_bhjl where is_deleted = 0
    </select>

    <select id="exportJwtdSpglBhjl" resultType="org.springblade.modules.jwtdSpglBhjl.excel.JwtdSpglBhjlExcel">
        SELECT * FROM jwtd_spgl_bhjl ${ew.customSqlSegment}
    </select>

    <select id="selectBhjl" resultMap="jwtdSpglBhjlResultMap">
        select * from jwtd_spgl_bhjl where is_deleted = 0 and sp_id = #{id} order by create_time desc
    </select>
</mapper>
