郑永安
2023-06-19 7a6abd05683528032687c75e80e0bd2030a3e46c
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
<?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.gkhy.safePlatform.account.repository.ProjectInfoRepository" >
 
    <resultMap id="ProjectDo" type="com.gkhy.safePlatform.account.entity.user.ProjectInfo">
        <result property="id" column="id"/>
        <result property="code" column="code"/>
        <result property="name" column="name" />
        <result property="status" column="status"/>
    </resultMap>
    <select id="listAllProject" parameterType="long" resultMap="ProjectDo">
        select
        project.id,
        project.code,
        project.name,
        project.status
        from sys_project as project
        <where>
           <if test="status">
               status = #{status}
           </if>
        </where>
    </select>
    <select id="getProjectById" parameterType="long" resultMap="ProjectDo">
        select
        project.id,
        project.code,
        project.name,
        project.status
        from sys_project as project
        where  project.id = #{projectId}
    </select>
 
 
</mapper>