<?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.workflow.modular.mapper.ModelMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="cn.stylefeng.guns.workflow.modular.entity.Model">
|
<id column="ID_" property="id" />
|
<result column="REV_" property="rev" />
|
<result column="NAME_" property="name" />
|
<result column="KEY_" property="key" />
|
<result column="CATEGORY_" property="category" />
|
<result column="CREATE_TIME_" property="createTime" />
|
<result column="LAST_UPDATE_TIME_" property="lastUpdateTime" />
|
<result column="VERSION_" property="version" />
|
<result column="META_INFO_" property="metaInfo" />
|
<result column="DEPLOYMENT_ID_" property="deploymentId" />
|
<result column="EDITOR_SOURCE_VALUE_ID_" property="editorSourceValueId" />
|
<result column="EDITOR_SOURCE_EXTRA_VALUE_ID_" property="editorSourceExtraValueId" />
|
<result column="TENANT_ID_" property="tenantId" />
|
</resultMap>
|
|
<!-- 通用查询结果列 -->
|
<sql id="Base_Column_List">
|
ID_ AS "id", REV_ AS "rev", NAME_ AS "name", KEY_ AS "key", CATEGORY_ AS "category", CREATE_TIME_ AS "createTime", LAST_UPDATE_TIME_ AS "lastUpdateTime", VERSION_ AS "version", META_INFO_ AS "metaInfo", DEPLOYMENT_ID_ AS "deploymentId", EDITOR_SOURCE_VALUE_ID_ AS "editorSourceValueId", EDITOR_SOURCE_EXTRA_VALUE_ID_ AS "editorSourceExtraValueId", TENANT_ID_ AS "tenantId"
|
</sql>
|
|
|
<select id="customList" resultType="cn.stylefeng.guns.workflow.modular.model.result.ModelResult" parameterType="cn.stylefeng.guns.workflow.modular.model.params.ModelParam">
|
select
|
<include refid="Base_Column_List"/>
|
from act_re_model where 1 = 1
|
</select>
|
|
<select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.workflow.modular.model.params.ModelParam">
|
select
|
<include refid="Base_Column_List"/>
|
from act_re_model where 1 = 1
|
</select>
|
|
<select id="customPageList" resultType="cn.stylefeng.guns.workflow.modular.model.result.ModelResult" parameterType="cn.stylefeng.guns.workflow.modular.model.params.ModelParam">
|
select
|
<include refid="Base_Column_List"/>
|
from act_re_model where 1 = 1
|
</select>
|
|
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.workflow.modular.model.params.ModelParam">
|
select
|
<include refid="Base_Column_List"/>,
|
dict.name as cateName
|
from act_re_model model
|
inner join sys_dict dict on model.CATEGORY_ = dict.code
|
<where>
|
<if test="paramCondition.name != null and paramCondition.name != ''">
|
model.NAME_ like CONCAT('%',#{paramCondition.name},'%')
|
</if>
|
<if test="paramCondition.category != null and paramCondition.category != ''">
|
and model.CATEGORY_ like CONCAT('%',#{paramCondition.category},'%')
|
</if>
|
</where>
|
order by model.LAST_UPDATE_TIME_ desc
|
</select>
|
|
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.workflow.modular.model.params.ModelParam" databaseId="mssql">
|
select
|
<include refid="Base_Column_List"/>,
|
dict.name as cateName
|
from act_re_model model
|
inner join sys_dict dict on model.CATEGORY_ = dict.code
|
<where>
|
<if test="paramCondition.name != null and paramCondition.name != ''">
|
model.NAME_ like CONCAT('%',#{paramCondition.name},'%')
|
</if>
|
<if test="paramCondition.category != null and paramCondition.category != ''">
|
and model.CATEGORY_ like CONCAT('%',#{paramCondition.category},'%')
|
</if>
|
</where>
|
order by model.LAST_UPDATE_TIME_ desc
|
</select>
|
|
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.workflow.modular.model.params.ModelParam" databaseId="pgsql">
|
select
|
<include refid="Base_Column_List"/>,
|
dict.name as "cateName"
|
from act_re_model m
|
inner join sys_dict dict on m.CATEGORY_ = dict.code
|
<where>
|
<if test="paramCondition.name != null and paramCondition.name != ''">
|
m.NAME_ like '%' || #{paramCondition.name} || '%'
|
</if>
|
<if test="paramCondition.category != null and paramCondition.category != ''">
|
and m.CATEGORY_ like '%' || #{paramCondition.category} || '%'
|
</if>
|
</where>
|
order by m.LAST_UPDATE_TIME_ desc
|
</select>
|
|
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.workflow.modular.model.params.ModelParam" databaseId="oracle">
|
select
|
<include refid="Base_Column_List"/>,
|
dict.name as "cateName"
|
from act_re_model m
|
inner join sys_dict dict on m.CATEGORY_ = dict.code
|
<where>
|
<if test="paramCondition.name != null and paramCondition.name != ''">
|
m.NAME_ like '%' || #{paramCondition.name} || '%'
|
</if>
|
<if test="paramCondition.category != null and paramCondition.category != ''">
|
and m.CATEGORY_ like '%' || #{paramCondition.category} || '%'
|
</if>
|
</where>
|
order by m.LAST_UPDATE_TIME_ desc
|
</select>
|
|
</mapper>
|