<?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.fzm.mall.server.admin.system.mapper.SysBlockChainPassMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.fzm.mall.server.admin.system.model.SysBlockChainPass">
        <id column="id" property="id" />
        <result column="block_chain_id" property="blockChainId" />
        <result column="pass_id" property="passId" />
        <result column="pass_identification" property="passIdentification" />
        <result column="name" property="name" />
        <result column="remark" property="remark" />
        <result column="status" property="status" />
        <result column="create_time" property="createTime" />
        <result column="update_time" property="updateTime" />
    </resultMap>

    <select id="page" resultType="com.fzm.mall.server.admin.system.entity.dto.SysBlockChainPassDTO">
        select *
        from sys_block_chain_pass
        <where>
            status in ('1', '2')
            <if test="keyword != null and keyword != ''">
                and (
                name like CONCAT('%', #{keyword},'%')
                or
                pass_identification like CONCAT('%', #{keyword},'%')
                )
            </if>
        </where>
        order by create_time desc
    </select>
</mapper>
