문자열 null 체크 수정

dev
이범준 4 months ago
parent 0e74e6cec0
commit d119829b4d

@ -17,7 +17,9 @@ SELECT A.GRP_ID
FROM TB_ACTION_GRP A
<where>
<if test="groupIDs != null">AND GRP_ID IN (<foreach collection="groupIDs" item="groupID" separator=",">#{groupID}</foreach>)</if>
<if test="by != null and term != null">AND ${by} LIKE CONCAT('%', #{term}, '%')</if>
<if test="@org.egovframe.rte.fdl.string.EgovStringUtil@isNotEmpty(by) and @org.egovframe.rte.fdl.string.EgovStringUtil@isNotEmpty(term)">
AND ${by} LIKE CONCAT('%', #{term}, '%')
</if>
</where>
<include refid="utility.paging-suffix" /></sql>

@ -53,7 +53,9 @@ SELECT *
) A
<where>
<if test="authIDs != null">AND AUTH_ID IN (<foreach collection="authIDs" item="authID" separator=",">#{authID}</foreach>)</if>
<if test="by != null and term != null">AND ${by} LIKE CONCAT('%', #{term}, '%')</if>
<if test="@org.egovframe.rte.fdl.string.EgovStringUtil@isNotEmpty(by) and @org.egovframe.rte.fdl.string.EgovStringUtil@isNotEmpty(term)">
AND ${by} LIKE CONCAT('%', #{term}, '%')
</if>
</where>
<include refid="utility.orderBy"/>
<include refid="utility.paging-suffix" /></sql>

@ -37,7 +37,10 @@
<select id="selectDepartmentList" parameterType="map" resultType="dataobject">/* 부서 정보 목록 조회(departmentMapper.selectDepartmentList) */
<include refid="utility.paging-prefix" />
<include refid="select" />
<where><if test="by != null and term != null"> AND ${by} LIKE CONCAT('%', #{term}, '%')</if>
<where>
<if test="@org.egovframe.rte.fdl.string.EgovStringUtil@isNotEmpty(by) and @org.egovframe.rte.fdl.string.EgovStringUtil@isNotEmpty(term)">
AND ${by} LIKE CONCAT('%', #{term}, '%')
</if>
<if test="sggID != null"> AND SGG_CD = #{sggID}</if>
<if test="instCode != null"> AND INST_CD = #{instCode}</if>
<if test="deptIDs != null"> AND DEPT_CD IN (<foreach collection="deptIDs" item="deptID" separator=",">#{deptID}</foreach>)</if>

@ -79,7 +79,7 @@ SELECT A.FILE_ID
<where>
<if test="infoType != null"> AND A.INF_TYPE = #{infoType}</if>
<if test="infoKeys != null"> AND INF_KEY IN (<foreach collection="infoKeys" item="infoKey" separator=",">#{infoKey}</foreach>)</if>
<if test="by != null and term != null">
<if test="@org.egovframe.rte.fdl.string.EgovStringUtil@isNotEmpty(by) and @org.egovframe.rte.fdl.string.EgovStringUtil@isNotEmpty(term)">
AND ${by} = #{term}
</if>
AND USE_YN = 'Y'

@ -28,7 +28,9 @@
SELECT A.*
FROM TB_PROGRAM A
<where>
<if test="by != null and term != null">${by} LIKE CONCAT('%', #{term}, '%')</if>
<if test="@org.egovframe.rte.fdl.string.EgovStringUtil@isNotEmpty(by) and @org.egovframe.rte.fdl.string.EgovStringUtil@isNotEmpty(term)">
${by} LIKE CONCAT('%', #{term}, '%')
</if>
<if test='filenames != null'>PGRM_FILE_NM IN (<foreach collection="filenames" item="filename" separator=",">#{filename}</foreach>)</if>
</where>
ORDER BY<if test='by != null'>${by}</if><if test='by == null'>PGRM_FILE_NM</if>
@ -77,7 +79,9 @@ SELECT A.*
<where>
<if test='fromReqDate != null'>REQ_DT >= #{fromReqDate}</if>
<if test='toReqDate != null'>REQ_DT &lt;= #{toReqDate}</if>
<if test="by != null and term != null">${by} LIKE CONCAT('%', #{term}, '%')</if>
<if test="@org.egovframe.rte.fdl.string.EgovStringUtil@isNotEmpty(by) and @org.egovframe.rte.fdl.string.EgovStringUtil@isNotEmpty(term)">
${by} LIKE CONCAT('%', #{term}, '%')
</if>
<if test='filenames != null'>PGRM_FILE_NAME IN (<foreach collection="filenames" item="filename" separator=",">#{filename}</foreach>)</if>
<if test='reqIDs != null'>REQ_ID IN (<foreach collection="reqIDs" item="reqID" separator=",">#{reqID}</foreach>)</if>
</where>

@ -45,7 +45,10 @@
<select id="selectSigunguList" parameterType="map" resultType="dataobject">/* 시군구 목록 조회(sigunguMapper.selectSigunguList) */
<include refid="utility.paging-prefix" />
<include refid="select" />
<where><if test="by != null and term != null"> AND ${by} LIKE CONCAT('%', #{term}, '%')</if>
<where>
<if test="@org.egovframe.rte.fdl.string.EgovStringUtil@isNotEmpty(by) and @org.egovframe.rte.fdl.string.EgovStringUtil@isNotEmpty(term)">
AND ${by} LIKE CONCAT('%', #{term}, '%')
</if>
<if test="sggIDs != null"> AND SGG_CD IN (<foreach collection="sggIDs" item="sggID" separator=",">#{sggID}</foreach>)</if>
<if test="instCodes != null"> AND INST_CD IN (<foreach collection="instCodes" item="instCode" separator=",">#{instCode}</foreach>)</if>
<if test="!includeAll">AND USE_YN = 'Y'</if></where>
@ -54,7 +57,10 @@
<select id="selectSigungus" parameterType="map" resultMap="sggRow">/* 시군구 객체 가져오기(sigunguMapper.selectSigungus) */
<include refid="select" />
<where><if test="by != null and term != null"> AND ${by} LIKE CONCAT('%', #{term}, '%')</if>
<where>
<if test="@org.egovframe.rte.fdl.string.EgovStringUtil@isNotEmpty(by) and @org.egovframe.rte.fdl.string.EgovStringUtil@isNotEmpty(term)">
AND ${by} LIKE CONCAT('%', #{term}, '%')
</if>
<if test="sggIDs != null">AND SGG_CD IN (<foreach collection="sggIDs" item="sggID" separator=",">#{sggID}</foreach>)</if>
<if test="instCodes != null">AND INST_CD IN (<foreach collection="instCodes" item="instCode" separator=",">#{instCode}</foreach>)</if>
<if test="!includeAll"> AND USE_YN = 'Y'</if></where>

@ -74,7 +74,10 @@ SELECT USER_ID
LEFT OUTER JOIN (
<include refid="cokr.xit.base.user.dao.DepartmentMapper.sggDepts" />
) B ON ORG_ID = B.SGG_CD AND A.NSTT_CD = B.INST_CD AND A.DEPT_CD = B.DEPT_CD
<where><if test="by != null and term != null">AND ${by} LIKE CONCAT('%', #{term}, '%')</if>
<where>
<if test="@org.egovframe.rte.fdl.string.EgovStringUtil@isNotEmpty(by) and @org.egovframe.rte.fdl.string.EgovStringUtil@isNotEmpty(term)">
AND ${by} LIKE CONCAT('%', #{term}, '%')
</if>
<if test="userIDs != null">USER_ID IN (<foreach collection="userIDs" item="userID" separator=",">#{userID}</foreach>)</if>
<if test="status == null and userIDs == null">AND STTS != 'D'</if>
<if test="status != null">AND STTS = #{status}</if></where>

Loading…
Cancel
Save