<?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="cn.stylefeng.guns.tenant.mapper.TenantInfoMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="cn.stylefeng.guns.base.tenant.entity.TenantInfo">
|
<id column="tenant_id" property="tenantId" />
|
<result column="name" property="name" />
|
<result column="code" property="code" />
|
<result column="db_name" property="dbName" />
|
<result column="create_time" property="createTime" />
|
<result column="create_user" property="createUser" />
|
<result column="update_time" property="updateTime" />
|
<result column="update_user" property="updateUser" />
|
</resultMap>
|
|
<!-- 通用查询结果列 -->
|
<sql id="Base_Column_List">
|
tenant_id AS "tenantId", name AS "name", code AS "code", db_name AS "dbName", create_time AS "createTime", create_user AS "createUser", update_time AS "updateTime", update_user AS "updateUser"
|
</sql>
|
|
|
<select id="customList" resultType="cn.stylefeng.guns.base.tenant.model.result.TenantInfoResult" parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam">
|
select
|
<include refid="Base_Column_List"/>
|
from tenant_info where 1 = 1
|
<if test="paramCondition.name != null and paramCondition.name != ''">
|
and name like CONCAT('%',#{paramCondition.name},'%')
|
</if>
|
<if test="paramCondition.code != null and paramCondition.code != ''">
|
and code like CONCAT('%',#{paramCondition.code},'%')
|
</if>
|
</select>
|
|
<select id="customList" resultType="cn.stylefeng.guns.base.tenant.model.result.TenantInfoResult"
|
parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="mssql">
|
select
|
<include refid="Base_Column_List"/>
|
from tenant_info where 1 = 1
|
<if test="paramCondition.name != null and paramCondition.name != ''">
|
and name like CONCAT('%',#{paramCondition.name},'%')
|
</if>
|
<if test="paramCondition.code != null and paramCondition.code != ''">
|
and code like CONCAT('%',#{paramCondition.code},'%')
|
</if>
|
</select>
|
|
<select id="customList" resultType="cn.stylefeng.guns.base.tenant.model.result.TenantInfoResult"
|
parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="pgsql">
|
select
|
<include refid="Base_Column_List"/>
|
from tenant_info where 1 = 1
|
<if test="paramCondition.name != null and paramCondition.name != ''">
|
and name like '%' || #{paramCondition.name} || '%'
|
</if>
|
<if test="paramCondition.code != null and paramCondition.code != ''">
|
and code like '%' || #{paramCondition.code} || '%'
|
</if>
|
</select>
|
|
<select id="customList" resultType="cn.stylefeng.guns.base.tenant.model.result.TenantInfoResult"
|
parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="oracle">
|
select
|
<include refid="Base_Column_List"/>
|
from tenant_info where 1 = 1
|
<if test="paramCondition.name != null and paramCondition.name != ''">
|
and name like '%' || #{paramCondition.name} || '%'
|
</if>
|
<if test="paramCondition.code != null and paramCondition.code != ''">
|
and code like '%' || #{paramCondition.code} || '%'
|
</if>
|
</select>
|
|
<select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam">
|
select
|
<include refid="Base_Column_List"/>
|
from tenant_info where 1 = 1
|
<if test="paramCondition.name != null and paramCondition.name != ''">
|
and name like CONCAT('%',#{paramCondition.name},'%')
|
</if>
|
<if test="paramCondition.code != null and paramCondition.code != ''">
|
and code like CONCAT('%',#{paramCondition.code},'%')
|
</if>
|
</select>
|
|
<select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="mssql">
|
select
|
<include refid="Base_Column_List"/>
|
from tenant_info where 1 = 1
|
<if test="paramCondition.name != null and paramCondition.name != ''">
|
and name like CONCAT('%',#{paramCondition.name},'%')
|
</if>
|
<if test="paramCondition.code != null and paramCondition.code != ''">
|
and code like CONCAT('%',#{paramCondition.code},'%')
|
</if>
|
</select>
|
|
<select id="customMapList" resultType="map"
|
parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="pgsql">
|
select
|
<include refid="Base_Column_List"/>
|
from tenant_info where 1 = 1
|
<if test="paramCondition.name != null and paramCondition.name != ''">
|
and name like '%' || #{paramCondition.name} || '%'
|
</if>
|
<if test="paramCondition.code != null and paramCondition.code != ''">
|
and code like '%' || #{paramCondition.code} || '%'
|
</if>
|
</select>
|
|
<select id="customMapList" resultType="map"
|
parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="oracle">
|
select
|
<include refid="Base_Column_List"/>
|
from tenant_info where 1 = 1
|
<if test="paramCondition.name != null and paramCondition.name != ''">
|
and name like '%' || #{paramCondition.name} || '%'
|
</if>
|
<if test="paramCondition.code != null and paramCondition.code != ''">
|
and code like '%' || #{paramCondition.code} || '%'
|
</if>
|
</select>
|
|
<select id="customPageList" resultType="cn.stylefeng.guns.base.tenant.model.result.TenantInfoResult" parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam">
|
select
|
<include refid="Base_Column_List"/>
|
from tenant_info where 1 = 1
|
<if test="paramCondition.name != null and paramCondition.name != ''">
|
and name like CONCAT('%',#{paramCondition.name},'%')
|
</if>
|
<if test="paramCondition.code != null and paramCondition.code != ''">
|
and code like CONCAT('%',#{paramCondition.code},'%')
|
</if>
|
</select>
|
|
<select id="customPageList" resultType="cn.stylefeng.guns.base.tenant.model.result.TenantInfoResult"
|
parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="mssql">
|
select
|
<include refid="Base_Column_List"/>
|
from tenant_info where 1 = 1
|
<if test="paramCondition.name != null and paramCondition.name != ''">
|
and name like CONCAT('%',#{paramCondition.name},'%')
|
</if>
|
<if test="paramCondition.code != null and paramCondition.code != ''">
|
and code like CONCAT('%',#{paramCondition.code},'%')
|
</if>
|
</select>
|
|
<select id="customPageList" resultType="cn.stylefeng.guns.base.tenant.model.result.TenantInfoResult"
|
parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="pgsql">
|
select
|
<include refid="Base_Column_List"/>
|
from tenant_info where 1 = 1
|
<if test="paramCondition.name != null and paramCondition.name != ''">
|
and name like '%' || #{paramCondition.name} || '%'
|
</if>
|
<if test="paramCondition.code != null and paramCondition.code != ''">
|
and code like '%' || #{paramCondition.code} || '%'
|
</if>
|
</select>
|
|
<select id="customPageList" resultType="cn.stylefeng.guns.base.tenant.model.result.TenantInfoResult"
|
parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="oracle">
|
select
|
<include refid="Base_Column_List"/>
|
from tenant_info where 1 = 1
|
<if test="paramCondition.name != null and paramCondition.name != ''">
|
and name like '%' || #{paramCondition.name} || '%'
|
</if>
|
<if test="paramCondition.code != null and paramCondition.code != ''">
|
and code like '%' || #{paramCondition.code} || '%'
|
</if>
|
</select>
|
|
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam">
|
select
|
<include refid="Base_Column_List"/>
|
from tenant_info where 1 = 1
|
<if test="paramCondition.name != null and paramCondition.name != ''">
|
and name like CONCAT('%',#{paramCondition.name},'%')
|
</if>
|
<if test="paramCondition.code != null and paramCondition.code != ''">
|
and code like CONCAT('%',#{paramCondition.code},'%')
|
</if>
|
</select>
|
|
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="mssql">
|
select
|
<include refid="Base_Column_List"/>
|
from tenant_info where 1 = 1
|
<if test="paramCondition.name != null and paramCondition.name != ''">
|
and name like CONCAT('%',#{paramCondition.name},'%')
|
</if>
|
<if test="paramCondition.code != null and paramCondition.code != ''">
|
and code like CONCAT('%',#{paramCondition.code},'%')
|
</if>
|
</select>
|
|
<select id="customPageMapList" resultType="map"
|
parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="pgsql">
|
select
|
<include refid="Base_Column_List"/>
|
from tenant_info where 1 = 1
|
<if test="paramCondition.name != null and paramCondition.name != ''">
|
and name like '%' || #{paramCondition.name} || '%'
|
</if>
|
<if test="paramCondition.code != null and paramCondition.code != ''">
|
and code like '%' || #{paramCondition.code} || '%'
|
</if>
|
</select>
|
|
<select id="customPageMapList" resultType="map"
|
parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="oracle">
|
select
|
<include refid="Base_Column_List"/>
|
from tenant_info where 1 = 1
|
<if test="paramCondition.name != null and paramCondition.name != ''">
|
and name like '%' || #{paramCondition.name} || '%'
|
</if>
|
<if test="paramCondition.code != null and paramCondition.code != ''">
|
and code like '%' || #{paramCondition.code} || '%'
|
</if>
|
</select>
|
|
</mapper>
|