<?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.pl.client.mapper.ClientMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="clientResultMap" type="org.springblade.modules.pl.client.entity.ClientEntity">
        <result column="id" property="id"/>
        <result column="tenant_id" property="tenantId"/>
        <result column="factory_id" property="factoryId"/>
        <result column="name" property="name"/>
        <result column="code" property="code"/>
        <result column="address" property="address"/>
        <result column="phone" property="phone"/>
        <result column="contacts" property="contacts"/>
        <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"/>
    </resultMap>


    <select id="selectClientPage" resultMap="clientResultMap">
        select * from pl_client where is_deleted = 0
    </select>


    <select id="exportClient" resultType="org.springblade.modules.pl.client.excel.ClientExcel">
        SELECT * FROM pl_client ${ew.customSqlSegment}
    </select>

</mapper>
