刘光辉
15 小时以前 34981c30a78e8bbd7791131059a9210f9928b62c
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
<?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="jnpf.dmsMapper.DmsWenjianBianhaoGuizeMapper">
 
    <resultMap id="BaseResultMap" type="jnpf.dmsEntity.DmsWenjianBianhaoGuizeEntity">
        <id column="f_id" property="id"/>
        <result column="f_tenant_id" property="tenantId"/>
        <result column="f_delete_mark" property="deleteMark"/>
        <result column="guize_mingcheng" property="guizeMingcheng"/>
        <result column="guize_leixing" property="guizeLeixing"/>
        <result column="wenjian_mulu" property="wenjianMulu"/>
        <result column="biz_enabled" property="bizEnabled"/>
    </resultMap>
 
    <sql id="BaseColumns">
        f_id, f_tenant_id, f_delete_mark, guize_mingcheng, guize_leixing,
        wenjian_mulu, biz_enabled
    </sql>
 
    <select id="selectEnabled" resultMap="BaseResultMap">
        SELECT <include refid="BaseColumns"/>
        FROM dms_wenjian_bianhao_guize
        WHERE f_tenant_id = #{tenantId}
          AND (f_delete_mark IS NULL OR f_delete_mark &lt;&gt; 1)
          AND (biz_enabled IS NULL OR biz_enabled &lt;&gt; 'disabled')
        ORDER BY guize_mingcheng ASC, f_id ASC
    </select>
 
    <select id="selectActiveById" resultMap="BaseResultMap">
        SELECT <include refid="BaseColumns"/>
        FROM dms_wenjian_bianhao_guize
        WHERE f_tenant_id = #{tenantId}
          AND f_id = #{id}
          AND (f_delete_mark IS NULL OR f_delete_mark &lt;&gt; 1)
    </select>
 
</mapper>