| | |
| | | FROM issue issue |
| | | LEFT OUTER JOIN issue_department isd ON issue.id = isd.issue_id |
| | | LEFT OUTER JOIN issue_status iss ON iss.id = issue.issue_status_id |
| | | LEFT OUTER JOIN user_department ud ON ud.department_id = isd.department_id |
| | | WHERE 1=1 |
| | | AND issue.parent_issue_id IS NULL |
| | | <if test="title != null and !title.equals('') "> |
| | |
| | | </choose> |
| | | |
| | | <choose> |
| | | <when test="departmentIds.size != 0 and myDepartmentIds != null and myDepartmentIds.size != 0"> |
| | | AND isd.department_id IN |
| | | <foreach collection="myDepartmentIds" item="item" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </when> |
| | | </choose> |
| | | |
| | | <choose> |
| | | <when test="registerIds.size != 0"> |
| | | AND issue.register_id IN |
| | | <foreach collection="registerIds" item="item" index="index" separator="," open="(" close=")"> |