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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
| <?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.ycl.mapper.CodingRulerMapper">
|
| <!-- 通用查询映射结果 -->
| <resultMap id="BaseResultMap" type="com.ycl.domain.vo.CodingRulerVO">
| <result column="project_code_type" property="projectCodeType" />
| <result column="interval_type" property="intervalType" />
| <result column="left_symbol" property="leftSymbol" />
| <result column="left_value" property="leftValue" />
| <result column="right_symbol" property="rightSymbol" />
| <result column="right_value" property="rightValue" />
| <result column="status" property="status"/>
| </resultMap>
|
| <select id="getStartRuler" resultMap="BaseResultMap">
| select
| TCR.project_code_type,
| TCR.interval_type,
| TCR.left_symbol,
| TCR.left_value,
| TCR.right_symbol,
| TCR.right_value,
| TCR.id,
| TCR.status
| FROM
| t_coding_ruler TCR
| WHERE
| TCR.status = 1 AND TCR.deleted = 0;
| </select>
|
| <select id="getById" resultMap="BaseResultMap">
| SELECT
| TCR.project_code_type,
| TCR.interval_type,
| TCR.left_symbol,
| TCR.left_value,
| TCR.right_symbol,
| TCR.right_value,
| TCR.id,
| TCR.status
| FROM
| t_coding_ruler TCR
| WHERE
| TCR.id = #{id} AND TCR.deleted = 0
| </select>
|
|
| <select id="getPage" resultMap="BaseResultMap">
| SELECT
| TCR.project_code_type,
| TCR.interval_type,
| TCR.left_symbol,
| TCR.left_value,
| TCR.right_symbol,
| TCR.right_value,
| TCR.id,
| TCR.status
| FROM
| t_coding_ruler TCR
| WHERE 1=1
| <if test="query.projectCodeType != '' and query.projectCodeType != null ">
| AND TCR.project_code_type = #{query.projectCodeType}
| </if>
| <if test="query.intervalType != '' and query.intervalType != null ">
| AND TCR.interval_type = #{query.intervalType}
| </if>
| AND TCR.deleted = 0
| order by TCR.gmt_update DESC
| </select>
|
| </mapper>
|
|