SysAutoDictItemMapper.xml 6.3 KB
<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~
  ~      Copyright (c) 2018-2025, lengleng All rights reserved.
  ~
  ~  Redistribution and use in source and binary forms, with or without
  ~  modification, are permitted provided that the following conditions are met:
  ~
  ~ Redistributions of source code must retain the above copyright notice,
  ~  this list of conditions and the following disclaimer.
  ~  Redistributions in binary form must reproduce the above copyright
  ~  notice, this list of conditions and the following disclaimer in the
  ~  documentation and/or other materials provided with the distribution.
  ~  Neither the name of the yifu4cloud.com developer nor the names of its
  ~  contributors may be used to endorse or promote products derived from
  ~  this software without specific prior written permission.
  ~  Author: lengleng (wangiegie@gmail.com)
  ~
  -->

<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.SysAutoDictItemMapper">

  <resultMap id="sysAutoDictItemMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.SysAutoDictItem">
    <id property="id" column="id"/>
    <result property="dictId" column="dict_id"/>
    <result property="value" column="value"/>
    <result property="label" column="label"/>
    <result property="type" column="type"/>
    <result property="description" column="description"/>
    <result property="sortOrder" column="sort_order"/>
    <result property="remark" column="remark"/>
    <result property="delFlag" column="del_flag"/>
    <result property="parentId" column="parent_id"/>
    <result property="createTime" column="create_time"/>
    <result property="createBy" column="create_by"/>
    <result property="updateBy" column="update_by"/>
    <result property="updateTime" column="update_time"/>
    <result property="createName" column="create_name"/>
    <result property="clientId" column="client_id"/>
    <result property="disable" column="disable"/>
    <result property="deptNo" column="dept_no"/>
  </resultMap>
    <sql id="Base_Column_List">
                a.id,
                a.dict_id,
                a.value,
                a.label,
                a.type,
                a.description,
                a.sort_order,
                a.remark,
                a.del_flag,
                a.parent_id,
                a.create_time,
                a.create_by,
                a.update_by,
                a.update_time,
                a.create_name,
                a.client_id,
                a.disable,
                a.dept_no
    </sql>
    <sql id="sysAutoDictItem_where">
        <if test="sysAutoDictItem != null">
                    <if test="sysAutoDictItem.id != null">
                        AND a.id = #{sysAutoDictItem.id}
                    </if>
                    <if test="sysAutoDictItem.dictId != null">
                        AND a.dict_id = #{sysAutoDictItem.dictId}
                    </if>
                    <if test="sysAutoDictItem.value != null and sysAutoDictItem.value.trim() != ''">
                        AND a.value = #{sysAutoDictItem.value}
                    </if>
                    <if test="sysAutoDictItem.label != null and sysAutoDictItem.label.trim() != ''">
                        AND a.label = #{sysAutoDictItem.label}
                    </if>
                    <if test="sysAutoDictItem.type != null and sysAutoDictItem.type.trim() != ''">
                        AND a.type = #{sysAutoDictItem.type}
                    </if>
                    <if test="sysAutoDictItem.description != null and sysAutoDictItem.description.trim() != ''">
                        AND a.description = #{sysAutoDictItem.description}
                    </if>
                    <if test="sysAutoDictItem.sortOrder != null">
                        AND a.sort_order = #{sysAutoDictItem.sortOrder}
                    </if>
                    <if test="sysAutoDictItem.remark != null and sysAutoDictItem.remark.trim() != ''">
                        AND a.remark = #{sysAutoDictItem.remark}
                    </if>
                    <if test="sysAutoDictItem.delFlag != null and sysAutoDictItem.delFlag.trim() != ''">
                        AND a.del_flag = #{sysAutoDictItem.delFlag}
                    </if>
                    <if test="sysAutoDictItem.parentId != null">
                        AND a.parent_id = #{sysAutoDictItem.parentId}
                    </if>
                    <if test="sysAutoDictItem.createTime != null">
                        AND a.create_time = #{sysAutoDictItem.createTime}
                    </if>
                    <if test="sysAutoDictItem.createBy != null and sysAutoDictItem.createBy.trim() != ''">
                        AND a.create_by = #{sysAutoDictItem.createBy}
                    </if>
                    <if test="sysAutoDictItem.updateBy != null and sysAutoDictItem.updateBy.trim() != ''">
                        AND a.update_by = #{sysAutoDictItem.updateBy}
                    </if>
                    <if test="sysAutoDictItem.updateTime != null">
                        AND a.update_time = #{sysAutoDictItem.updateTime}
                    </if>
                    <if test="sysAutoDictItem.createName != null and sysAutoDictItem.createName.trim() != ''">
                        AND a.create_name = #{sysAutoDictItem.createName}
                    </if>
                    <if test="sysAutoDictItem.clientId != null and sysAutoDictItem.clientId.trim() != ''">
                        AND a.client_id = #{sysAutoDictItem.clientId}
                    </if>
                    <if test="sysAutoDictItem.disable != null and sysAutoDictItem.disable.trim() != ''">
                        AND a.disable = #{sysAutoDictItem.disable}
                    </if>
                    <if test="sysAutoDictItem.deptNo != null and sysAutoDictItem.deptNo.trim() != ''">
                        AND a.dept_no = #{sysAutoDictItem.deptNo}
                    </if>
        </if>
    </sql>
    <!--sysAutoDictItem简单分页查询-->
    <select id="getSysAutoDictItemPage" resultMap="sysAutoDictItemMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM sys_auto_dict_item a
        <where>
            1=1
            <include refid="sysAutoDictItem_where"/>
        </where>
    </select>
</mapper>