田源
2023-10-11 3c45837d8350f29bd4a1636d0477eb86010aa0f3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?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>