251118_01_ENH : 인트라넷 확장 초기 세팅 및 프로젝트, 사용자 조회 구현
This commit is contained in:
33
src/main/resources/mybatis/mapper/ProjectMapper.xml
Normal file
33
src/main/resources/mybatis/mapper/ProjectMapper.xml
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.kri.intranet.extension.mapper.ProjectMapper">
|
||||
<select id="selectProjectTop10" resultType="com.kri.intranet.extension.entity.project.ProjectBasicInfoEntity">
|
||||
SELECT TOP(10)
|
||||
p_child_sn AS pChildSn
|
||||
, CASE WHEN p_intention IS NOT NULL
|
||||
THEN p_subject + ' <![CDATA[<' + p_intention + '>]]>'
|
||||
ELSE p_subject
|
||||
END AS pTitle
|
||||
, d.Code AS pRschTeam
|
||||
, d.T_Name AS pRschTeamName
|
||||
FROM project2.dbo.V_PROJECT_METHOD pm WITH (NOLOCK)
|
||||
LEFT JOIN project2.dbo.v_Department d
|
||||
ON pm.p_rsch_dept = d.before_t_cd1
|
||||
OR pm.p_rsch_dept = d.T_CODE
|
||||
WHERE 1 = 1
|
||||
<!-- p_child_sn LIKE 검색 (파라미터1) -->
|
||||
<if test="childSn != null and childSn != ''">
|
||||
AND p_child_sn LIKE '%' + #{childSn} + '%'
|
||||
</if>
|
||||
<!-- p_subject / p_intention 공용 키워드 (파라미터2) -->
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (
|
||||
p_subject LIKE '%' + #{keyword} + '%'
|
||||
OR p_intention LIKE '%' + #{keyword} + '%'
|
||||
)
|
||||
</if>
|
||||
ORDER BY p_input_dt DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user