<?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.manager.mapper.SignPfxFileMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="signPfxFileResultMap" type="org.springblade.manager.entity.SignPfxFile">
        <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="certificate_user_name" property="certificateUserName"/>
        <result column="certificate_user_id" property="certificateUserId"/>
        <result column="certificate_id" property="certificateId"/>
        <result column="certificate_number" property="certificateNumber"/>
        <result column="certificate_password" property="certificatePassword"/>
        <result column="certificate_file_url" property="certificateFileUrl"/>
        <result column="enterprise_unified_code" property="enterpriseUnifiedCode"/>
        <result column="signature_file_url" property="signatureFileUrl"/>
        <result column="certificate_type" property="certificateType"/>
        <result column="is_register" property="isRegister"/>
        <result column="project_contract_role" property="projectContractRole"/>
    </resultMap>

    <select id="countSignPfxFile" resultType="java.lang.Integer">
        select count(id) from m_sign_pfx_file where is_deleted = 0
    </select>

    <select id="selectSignPfxFilePage" resultMap="signPfxFileResultMap">
        select * from m_sign_pfx_file where is_deleted = 0 order by create_time DESC limit #{current},#{size}
    </select>

</mapper>
