|
|
@@ -4,7 +4,7 @@
|
|
|
<mapper namespace="com.cyksj.mapper.corp.CorpUserTagMapper">
|
|
|
|
|
|
<select id="selectCorpUserDetailByCondition" resultType="com.cyksj.model.views.CorpUserView">
|
|
|
- select cu.id,
|
|
|
+ select * from (select cu.id,
|
|
|
cu.unionid,
|
|
|
any_value(remark) as nickname,
|
|
|
group_concat(ct.tag_name) as tagNames,
|
|
|
@@ -24,7 +24,7 @@
|
|
|
left join corp_follow cf on cf.userid = cfr.follow_id
|
|
|
left join corp_user_auth cua on cua.external_userid = cfr.corp_user_id
|
|
|
left join corp_user cu on cu.id = cua.corp_user_id and cu.unionid != ''
|
|
|
- group by cu.id, cu.unionid
|
|
|
+ group by cu.id, cu.unionid) s order by s.createdTime desc
|
|
|
</select>
|
|
|
|
|
|
<select id="exportUserTagDetail" resultType="com.cyksj.model.excel.CorpUserTagExcelData">
|
|
|
@@ -33,7 +33,7 @@
|
|
|
any_value(remark) as nickname,
|
|
|
group_concat(ct.tag_name) as tagNames,
|
|
|
group_concat(cf.name) as customers,
|
|
|
- any_value(ct.created_time) as createdTime,
|
|
|
+ any_value(ct.created_time) as tagTime,
|
|
|
u.id as userId,
|
|
|
u.nickname,
|
|
|
u.headimgurl
|
|
|
@@ -58,7 +58,7 @@
|
|
|
left join corp_follow cf on cf.userid = cfr.follow_id
|
|
|
left join corp_user_auth cua on cua.external_userid = cfr.corp_user_id
|
|
|
left join corp_user cu on cu.id = cua.corp_user_id and cu.unionid != ''
|
|
|
- left join user u on u.unionid = cu.unionid
|
|
|
+ left join user u on u.id = cu.user_id
|
|
|
group by cu.id, cu.unionid
|
|
|
</select>
|
|
|
</mapper>
|