<?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.ActModelMapper">
|
|
<!--模型表名 -->
|
<sql id="tableName">
|
ACT_RE_MODEL
|
</sql>
|
|
<!--数据字典表名 -->
|
<sql id="dicTableName">
|
SYS_DICTIONARIES
|
</sql>
|
|
<!-- 列表 -->
|
<select id="datalistPage" resultType="java.util.Map">
|
select
|
a.ID_,
|
a.REV_,
|
a.NAME_,
|
a.KEY_,
|
a.CATEGORY_,
|
a.CREATE_TIME_,
|
a.LAST_UPDATE_TIME_,
|
a.VERSION_,
|
d.BIANMA,
|
d.NAME DNAME
|
from
|
<include refid="tableName"></include> a
|
left join
|
<include refid="dicTableName"></include> d
|
on a.CATEGORY_ = d.BIANMA
|
where 1=1
|
<if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 -->
|
and
|
(
|
a.NAME_ LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%')
|
)
|
</if>
|
<if test="pd.category != null and pd.category != ''"><!-- 分类检索 -->
|
and a.CATEGORY_=#{pd.category}
|
</if>
|
order by a.LAST_UPDATE_TIME_ desc
|
</select>
|
|
<select id="datalistPage" resultType="java.util.Map" databaseId="oracle">
|
select
|
a.ID_,
|
a.REV_,
|
a.NAME_,
|
a.KEY_,
|
a.CATEGORY_,
|
a.CREATE_TIME_,
|
a.LAST_UPDATE_TIME_,
|
a.VERSION_,
|
d.BIANMA,
|
d.NAME DNAME
|
from
|
<include refid="tableName"></include> a
|
left join
|
<include refid="dicTableName"></include> d
|
on a.CATEGORY_ = d.BIANMA
|
where 1=1
|
<if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 -->
|
and
|
(
|
a.NAME_ LIKE '%' || #{pd.keywords} || '%'
|
)
|
</if>
|
<if test="pd.category != null and pd.category != ''"><!-- 分类检索 -->
|
and a.CATEGORY_=#{pd.category}
|
</if>
|
order by a.LAST_UPDATE_TIME_ desc
|
</select>
|
|
<!-- 通过ID获取数据 -->
|
<select id="findById" resultType="java.util.Map">
|
select
|
ID_,
|
CATEGORY_
|
from
|
<include refid="tableName"></include>
|
where
|
ID_ = #{modelId}
|
</select>
|
|
<select id="findById" resultType="java.util.Map" databaseId="oracle">
|
select
|
ID_,
|
CATEGORY_
|
from
|
<include refid="tableName"></include>
|
where
|
ID_ = #{modelId}
|
</select>
|
|
<!-- 修改类型 -->
|
<update id="edit">
|
update
|
<include refid="tableName"></include>
|
set
|
CATEGORY_ = #{category}
|
where
|
ID_ = #{modelId}
|
</update>
|
|
<update id="edit" databaseId="oracle">
|
update
|
<include refid="tableName"></include>
|
set
|
CATEGORY_ = #{category}
|
where
|
ID_ = #{modelId}
|
</update>
|
|
</mapper>
|