| | |
| | | FROM |
| | | department d |
| | | WHERE 1=1 |
| | | <if test="departmentName != '' and departmentName != null"> |
| | | <if test="departmentName != null and departmentName != ''"> |
| | | AND d.department_name like CONCAT('%',#{departmentName},'%') |
| | | </if> |
| | | <if test="id != '' and id != null"> |
| | | <if test="id != null and id != ''"> |
| | | AND d.id like CONCAT('%',#{id},'%') |
| | | </if> |
| | | <choose> |
| | |
| | | where p.id = #{projectId}; |
| | | </select> |
| | | |
| | | <select id="findByIssueStatusId" resultType="java.util.HashMap" parameterType="kr.wisestone.owl.web.condition.DepartmentCondition"> |
| | | SELECT |
| | | d.id as id, |
| | | d.department_name as departmentName |
| | | FROM |
| | | department d |
| | | INNER JOIN workflow_department wd ON wd.department_id = d.id |
| | | WHERE 1=1 |
| | | <if test="issueStatusId != null and issueStatusId != ''"> |
| | | AND wd.issue_status_id = #{issueStatusId} |
| | | </if> |
| | | <if test="workflowId != null and workflowId != ''"> |
| | | AND wd.workflow_Id = #{workflowId} |
| | | </if> |
| | | <choose> |
| | | <when test="excludeIds != null and excludeIds.size != 0"> |
| | | AND d.id NOT IN |
| | | <foreach collection="excludeIds" item="item" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </when> |
| | | </choose> |
| | | <if test="pageSize != '' and pageSize != null"> |
| | | limit #{pageSize} offset #{page}; |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | </mapper> |