<?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.shkj.wms.mapper.SysSeqManaMapper">

    <resultMap type="com.shkj.wms.domain.SysSeqMana" id="SysSeqManaResult">
            <result property="id" column="id"/>
            <result property="seqName" column="seq_name"/>
            <result property="seqType" column="seq_type"/>
            <result property="seqCode" column="seq_code"/>
            <result property="seqPrefix" column="seq_prefix"/>
            <result property="seqDigit" column="seq_digit"/>
            <result property="seqDate" column="seq_date"/>
            <result property="seqIncrease" column="seq_increase"/>
            <result property="seqMax" column="seq_max"/>
            <result property="seqCurrent" column="seq_current"/>
            <result property="remark" column="remark"/>
            <result property="branchId" column="branch_id"/>
            <result property="isDel" column="is_del"/>
            <result property="createTime" column="create_time"/>
            <result property="createBy" column="create_by"/>
            <result property="updateTime" column="update_time"/>
            <result property="updateBy" column="update_by"/>
    </resultMap>
    <select id="queryList" resultType="com.shkj.wms.vo.SysSeqManaVo"
            parameterType="com.shkj.wms.bo.SysSeqManaQueryBo">

            select * from sys_seq_mana s
            where
            is_del = '0'
            <if test="seqType != null and seqType != ''">
                    and s.seq_type = #{seqType}
            </if>
            <if test="seqCode != null and seqCode != ''">
                    and LOWER(s.seq_code) like LOWER(concat('%',#{seqCode}, '%'))
            </if>
            ${branchParams.dataScopeBranch}
            order by s.create_time
    </select>
</mapper>