|
@@ -962,13 +962,12 @@
|
|
<select id="countTag" resultType="FsUserSummaryCountTagVO">
|
|
<select id="countTag" resultType="FsUserSummaryCountTagVO">
|
|
SELECT
|
|
SELECT
|
|
company_tag.tag AS tagName,
|
|
company_tag.tag AS tagName,
|
|
- count( fs_user.user_id ) AS number
|
|
|
|
|
|
+ count( ucu.user_id ) AS number
|
|
FROM
|
|
FROM
|
|
- company_tag_user
|
|
|
|
- LEFT JOIN fs_user ON fs_user.user_id = company_tag_user.user_id
|
|
|
|
- LEFT JOIN company_tag ON FIND_IN_SET( company_tag.tag_id, company_tag_user.tag_ids ) > 0
|
|
|
|
- left join fs_user_company_user ucu on ucu.user_id = fs_user.user_id
|
|
|
|
- LEFT JOIN company_user ON ucu.company_user_id = company_user.user_id
|
|
|
|
|
|
+ fs_user_project_tag upt
|
|
|
|
+ inner join fs_user_company_user ucu on ucu.id = upt.user_company_user_id
|
|
|
|
+ inner join company_tag ON upt.tag_id = company_tag.tag_id
|
|
|
|
+ left join company_user on company_user.user_id = ucu.company_user_id
|
|
<where>
|
|
<where>
|
|
<if test="userId != null and userId != 0 ">
|
|
<if test="userId != null and userId != 0 ">
|
|
and (ucu.company_user_id = #{userId} OR company_user.parent_id = #{userId} )
|
|
and (ucu.company_user_id = #{userId} OR company_user.parent_id = #{userId} )
|
|
@@ -976,7 +975,6 @@
|
|
<if test="companyId != null ">
|
|
<if test="companyId != null ">
|
|
and ucu.company_id = #{companyId}
|
|
and ucu.company_id = #{companyId}
|
|
</if>
|
|
</if>
|
|
- and company_tag.tag_id is not null
|
|
|
|
</where>
|
|
</where>
|
|
GROUP BY
|
|
GROUP BY
|
|
company_tag.tag_id
|
|
company_tag.tag_id
|