-
Notifications
You must be signed in to change notification settings - Fork 999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Improve the search_owner when query the app list #1828
Changes from 6 commits
77bd287
e53b451
c606f37
c8b2a7f
e430a83
ece8214
09d689d
e6bc850
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,4 +59,34 @@ | |
order by ${user.sortField} ${user.sortOrder} | ||
</if> | ||
</select> | ||
|
||
<select id="getNoTokenUser" resultType="user" parameterType="user"> | ||
select u.* from t_user u left join t_access_token t | ||
on u.user_id = t.user_id | ||
where t.user_id is null | ||
</select> | ||
|
||
<select id="findByAppOwner" resultType="user" parameterType="user"> | ||
select u.* from t_user u | ||
inner join ( | ||
select distinct(user_id) as user_id from ( | ||
select a.user_id | ||
from t_user a | ||
inner join t_flink_app b | ||
on a.user_id = b.user_id | ||
where a.user_id = #{userId} | ||
and a.user_type = 1 | ||
union all | ||
select u.user_id | ||
from t_user u | ||
inner join t_member m | ||
on u.user_id = m.user_id | ||
inner join t_flink_app p | ||
on u.user_id = p.user_id | ||
where m.team_id = #{teamId} | ||
) | ||
) as t | ||
where u.user_id = t.user_id | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why don't use this sql?
The new sql has some advantages:
The new sql is simple and feature rich, why use a complex sql? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
oh, Perfect 👍 😂 |
||
</select> | ||
|
||
</mapper> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi, @wolfboys Thank you for your contribution。Strings with special meanings are recommended to be extracted as public variables,do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great suggestion, I agree with you. I'll fix it later