|
|
@ -7,14 +7,16 @@ |
|
|
|
<resultMap id="categoryTree" type="com.epmet.dto.result.CustomerCategoryListResultDTO"> |
|
|
|
<id column="id" property="id"/> |
|
|
|
<result column="name" property="name"/> |
|
|
|
<result column="customerId" property="customerId"/> |
|
|
|
|
|
|
|
<collection property="subCategory" column="id" ofType="com.epmet.dto.result.CustomerCategoryListResultDTO" select="subCategoryList"> |
|
|
|
<collection property="subCategory" column="{id = id,customerId = customerId}" ofType="com.epmet.dto.result.CustomerCategoryListResultDTO" select="subCategoryList"> |
|
|
|
</collection> |
|
|
|
</resultMap> |
|
|
|
<select id="selectCustomerCategoryList" resultMap="categoryTree"> |
|
|
|
SELECT |
|
|
|
id AS "id", |
|
|
|
category_name AS "name" |
|
|
|
category_name AS "name", |
|
|
|
customer_id AS "customerId" |
|
|
|
FROM |
|
|
|
issue_project_category_dict |
|
|
|
WHERE |
|
|
@ -26,12 +28,14 @@ |
|
|
|
<select id="subCategoryList" resultMap="categoryTree"> |
|
|
|
SELECT |
|
|
|
id AS "id", |
|
|
|
category_name AS "name" |
|
|
|
category_name AS "name", |
|
|
|
customer_id AS "customerId" |
|
|
|
FROM |
|
|
|
issue_project_category_dict |
|
|
|
WHERE |
|
|
|
del_flag = '0' |
|
|
|
AND pid = #{id} |
|
|
|
AND customer_id = #{customerId} |
|
|
|
ORDER BY sort ASC |
|
|
|
</select> |
|
|
|
<!-- sql递归 查询客户议题项目的分类信息以及递归查询二级分类信息 end--> |
|
|
|