<?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.template.mapper.SmartIdentityMapper">

    <resultMap type="com.template.model.pojo.SmartIdentity" id="smartIdentityMap">
        <result property="id" column="id"/>
        <result property="name" column="name"/>
        <result property="applyId" column="apply_id"/>
        <result property="createTime" column="create_time"/>
        <result property="updateTime" column="update_time"/>
        <result property="createUser" column="create_user"/>
        <result property="updateUser" column="update_user"/>
        <result property="deleted" column="deleted"/>
    </resultMap>
    <select id="querySmartIdentityDatas" resultType="com.template.model.pojo.SmartIdentity" resultMap="smartIdentityMap">
        select * from smart_identity where deleted = 0
        <if test="id != null and id != ''">
            and FIND_IN_SET(#{id},apply_id)
        </if>
    </select>

</mapper>
