<?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.vci.ubcs.omd.mapper.LifeCycleMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="baseResultMap" type="com.vci.ubcs.omd.entity.LifeCycleRule">
|
<id column="OID" jdbcType="VARCHAR" property="oid"/>
|
<result column="ID" jdbcType="VARCHAR" property="id"/>
|
<result column="NAME" jdbcType="VARCHAR" property="name"/>
|
<result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="CREATOR" jdbcType="VARCHAR" property="creator" />
|
<result column="LAST_MODIFIER" jdbcType="VARCHAR" property="lastModifier" />
|
<result column="LAST_MODIFY_TIME" jdbcType="TIMESTAMP" property="lastModifyTime" />
|
<result column="TS" jdbcType="TIMESTAMP" property="ts"/>
|
<result column="START_STATUS" jdbcType="VARCHAR" property="startStatus" />
|
<result column="START_STATUS_NAME" jdbcType="VARCHAR" property="startStatusName" />
|
<result column="DESCRIPTION" jdbcType="VARCHAR" property="description" />
|
|
</resultMap>
|
<sql id="tableName">
|
pl_omd_life_cycle_rule
|
</sql>
|
<sql id="base_query_column">
|
OID, ID, NAME, CREATOR, CREATE_TIME, LAST_MODIFIER, LAST_MODIFY_TIME, TS, START_STATUS, START_STATUS_NAME,DESCRIPTION
|
</sql>
|
<!--查询总数-->
|
<select id="selectAll" resultMap="baseResultMap">
|
select
|
<include refid="base_query_column"/>
|
from
|
<include refid="tableName"/>
|
</select>
|
<!--查询总数-->
|
<select id="checkIdExist" resultType="java.lang.Long">
|
select COUNT(*) FROM
|
<include refid="tableName"/>
|
where LOWER(ID) = #{id}
|
<if test="oid != null">
|
and OID != #{oid}
|
</if>
|
</select>
|
</mapper>
|