<?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.person.mapper.PrisonerMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="prisonerResultMap" type="org.springblade.person.entity.Prisoner">
        <result column="id" property="id"/>
        <result column="create_user" property="createUser"/>
        <result column="create_dept" property="createDept"/>
        <result column="create_time" property="createTime"/>
        <result column="update_user" property="updateUser"/>
        <result column="update_time" property="updateTime"/>
        <result column="status" property="status"/>
        <result column="is_deleted" property="isDeleted"/>
        <result column="parent_id" property="parentId"/>
        <result column="name" property="name"/>
        <result column="recidivism" property="recidivism"/>
        <result column="release_date" property="releaseDate"/>
        <result column="crime" property="crime"/>
        <result column="prison_date" property="prisonDate"/>
        <result column="prison_name" property="prisonName"/>
        <result column="danger_type" property="dangerType"/>
        <result column="link_up_date" property="linkUpDate"/>
        <result column="link_up_situation" property="linkUpSituation"/>
        <result column="arrange_date" property="arrangeDate"/>
        <result column="arrange_situation" property="arrangeSituation"/>
        <result column="no_arrange" property="noArrange"/>
        <result column="teach_situation" property="teachSituation"/>
        <result column="crime_again" property="crimeAgain"/>
        <result column="crime_again_name" property="crimeAgainName"/>
        <result column="crime_again_date" property="crimeAgainDate"/>
        <result column="type" property="type"/>
        <result column="emphasis_control" property="emphasisControl"/>
        <result column="profession" property="profession"/>
    </resultMap>


    <select id="selectPrisonerPage" resultMap="prisonerResultMap">
        select * from personnel_prisoner where is_deleted = 0
    </select>

</mapper>
