|
@@ -51,6 +51,29 @@
|
|
|
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
+ <select id="getWChatIdByAccountId" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
+ select wexin_id, corp_id, wexin_name
|
|
|
+ from ctop_corp_wexin_user
|
|
|
+ where user_id = (select ctop_user_allocation.user_id
|
|
|
+ from ctop_user_allocation
|
|
|
+ where account_id = #{accountId} limit 1)
|
|
|
+ union all
|
|
|
+ select wexin_id, corp_id, wexin_name
|
|
|
+ from ctop_corp_wexin_user
|
|
|
+ where user_id = (select leader_id
|
|
|
+ from sys_user
|
|
|
+ where id = (SELECT ctop_user_allocation.user_id
|
|
|
+ FROM ctop_user_allocation
|
|
|
+ WHERE account_id = #{accountId}
|
|
|
+ LIMIT 1))
|
|
|
+ union all
|
|
|
+ select wexin_id, corp_id, wexin_name
|
|
|
+ from ctop_corp_wexin_user
|
|
|
+ where user_id = 'f6a6843879c949618e4a859140c8a127';
|
|
|
+
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="getUserNameByUserId" resultType="java.lang.String">
|
|
|
select
|
|
|
realname
|