fuliqi
2024-11-28 a1fc7e3e337393954a95b5f85c1a3f59d61208c4
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?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.ProjectInfoMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ycl.domain.entity.ProjectInfo">
        <id column="id" property="id"/>
        <result column="project_name" property="projectName" />
        <result column="project_code" property="projectCode" />
        <result column="content" property="content" />
        <result column="project_type" property="projectType" />
        <result column="project_status" property="projectStatus" />
        <result column="fund_type" property="fundType" />
        <result column="invest_type" property="investType" />
        <result column="project_phase" property="projectPhase" />
        <result column="tag" property="tag" />
        <result column="competent_department" property="competentDepartment" />
        <result column="area" property="area" />
        <result column="management_centralization" property="managementCentralization" />
        <result column="project_approval_type" property="projectApprovalType" />
        <result column="importance_type" property="importanceType" />
        <result column="year" property="year" />
        <result column="year_invest_amount" property="yearInvestAmount" />
        <result column="create_project_time" property="createProjectTime" />
        <result column="plan_start_time" property="planStartTime" />
        <result column="plan_complete_time" property="planCompleteTime" />
        <result column="win_unit" property="winUnit" />
        <result column="win_amount" property="winAmount" />
        <result column="win_time" property="winTime" />
        <result column="project_address" property="projectAddress" />
        <result column="longitude" property="longitude" />
        <result column="latitude" property="latitude" />
        <result column="project_owner_unit" property="projectOwnerUnit" />
        <result column="project_contact_person" property="projectContactPerson" />
        <result column="contact" property="contact" />
        <result column="gmt_create" property="gmtCreate" />
        <result column="gmt_update" property="gmtUpdate" />
        <result column="update_by" property="updateBy" />
        <result column="create_by" property="createBy" />
    </resultMap>
 
 
    <select id="getById" resultMap="BaseResultMap">
        SELECT
            TPI.project_name,
            TPI.project_code,
            TPI.content,
            TPI.project_type,
            TPI.project_status,
            TPI.fund_type,
            TPI.invest_type,
            TPI.project_phase,
            TPI.tag,
            TPI.competent_department,
            TPI.area,
            TPI.management_centralization,
            TPI.project_approval_type,
            TPI.importance_type,
            TPI.year,
            TPI.year_invest_amount,
            TPI.create_project_time,
            TPI.plan_start_time,
            TPI.plan_complete_time,
            TPI.win_unit,
            TPI.win_amount,
            TPI.win_time,
            TPI.project_address,
            TPI.longitude,
            TPI.latitude,
            TPI.project_owner_unit,
            TPI.project_contact_person,
            TPI.contact,
            TPI.gmt_create,
            TPI.gmt_update,
            TPI.update_by,
            TPI.create_by,
            TPI.id
        FROM
            t_project_info TPI
        WHERE
            TPI.id = #{id} AND TPI.deleted = 0
    </select>
 
 
    <select id="getPage" resultMap="BaseResultMap">
        SELECT
            TPI.project_name,
            TPI.project_code,
            TPI.content,
            TPI.project_type,
            TPI.project_status,
            TPI.fund_type,
            TPI.invest_type,
            TPI.project_phase,
            TPI.tag,
            TPI.competent_department,
            TPI.area,
            TPI.management_centralization,
            TPI.project_approval_type,
            TPI.importance_type,
            TPI.year,
            TPI.year_invest_amount,
            TPI.create_project_time,
            TPI.plan_start_time,
            TPI.plan_complete_time,
            TPI.win_unit,
            TPI.win_amount,
            TPI.win_time,
            TPI.project_address,
            TPI.longitude,
            TPI.latitude,
            TPI.project_owner_unit,
            TPI.project_contact_person,
            TPI.contact,
            TPI.gmt_create,
            TPI.gmt_update,
            TPI.update_by,
            TPI.create_by,
            TPI.id
        FROM
            t_project_info TPI
        WHERE
            TPI.deleted = 0
    </select>
 
</mapper>