Browse Source

Merge branch 'dev_issue_category' into dev_temp

master
sunyuchao 5 years ago
parent
commit
f9a5dd3ee7
  1. 29
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml

29
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml

@ -9,32 +9,41 @@
ip.category_name AS "name"
FROM
issue_category ic
INNER JOIN issue_project_category_dict ip ON ic.category_id = ip.id
INNER JOIN (
SELECT
a.id AS "idd",
a.customer_id AS "customer_id",
a.sort AS "sort",
CONCAT(b.category_name, '-', a.category_name) AS "category_name"
FROM issue_project_category_dict a
INNER JOIN issue_project_category_dict b ON a.pid = b.id
) ip ON ic.category_id = ip.idd
AND ic.customer_id = ip.customer_id
WHERE
ic.del_flag = '0'
AND ip.del_flag = '0'
AND ic.issue_id = #{issueId}
ORDER BY
ip.sort ASC
</select>
<select id="selectProjectCategoryList" resultType="com.epmet.dto.result.ProjectCategoryTagResultDTO">
SELECT
id AS "id",
category_name AS "name"
SELECT DISTINCT
ip.id AS "id",
CONCAT(cd.category_name,'-',ip.category_name) AS "name"
FROM
issue_project_category_dict
issue_project_category_dict ip
INNER JOIN issue_project_category_dict cd ON ip.pid = cd.id
WHERE
del_flag = '0'
AND customer_id = #{customerId}
ip.del_flag = '0'
AND cd.DEL_FLAG = '0'
AND ip.customer_id = #{customerId}
<if test="categoryIdList != null and categoryIdList.size() > 0">
<foreach collection="categoryIdList" item="id" open="AND( " separator=" OR " index="index" close=")">
id = #{id}
ip.id = #{id}
</foreach>
</if>
ORDER BY
sort ASC
ip.sort ASC
</select>
<select id="selectCategoryByIssue" resultType="com.epmet.dto.IssueCategoryDTO">

Loading…
Cancel
Save