<?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.nantian.cloud.jljc.mapper.TFaAccreditingBodyMapper">

    <resultMap id="tFaAccreditingBodyMap" type="com.nantian.cloud.jljc.entity.TFaAccreditingBody">
        <result property="id" column="id"/>
        <result property="personName" column="person_name"/>
        <result property="personUsername" column="person_username"/>
        <result property="specialist" column="specialist"/>
        <result property="functionalPerson" column="functional_person"/>
        <result property="timeLimit" column="time_limit"/>
        <result property="projectId" column="project_id"/>
        <result property="delFlag" column="del_flag"/>
        <result property="userId" column="user_id"/>
        <result property="deptId" column="dept_id"/>
        <result property="updateTime" column="update_time"/>
    </resultMap>

    <sql id="Base_Column_List">
        id,person_name,person_username,specialist,functional_person,time_limit,project_id,del_flag,user_id,dept_id,update_time,suspend_time,action_time,restart_time
    </sql>
    <select id="getPage" resultType="com.nantian.cloud.jljc.entity.TFaAccreditingBody">
        select <include refid="Base_Column_List"></include>
        from t_fa_accrediting_body
        where del_flag = "1"
        <if test="query.personName!=null and query.personName!=''">
            and person_name like concat("%",#{query.personName},"%")
        </if>
    </select>
    <select id="getProjectTime" resultType="com.nantian.cloud.jljc.entity.TFaAccreditingBody">
        select <include refid="Base_Column_List"></include>
        from t_fa_accrediting_body
        where del_flag = "1"
    </select>
</mapper>
