wolfboys commented on code in PR #1915:
URL:
https://github.com/apache/incubator-streampark/pull/1915#discussion_r1006457733
##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/mapper/ApplicationMapper.java:
##########
@@ -38,7 +38,15 @@ public interface ApplicationMapper extends
BaseMapper<Application> {
@Select("select * from t_flink_app where project_id=#{projectId}")
List<Application> getByProjectId(@Param("projectId") Long projectId);
- @Select("select * from t_flink_app where team_id=#{teamId}")
+ @Select("select a.*, " +
+ " u.username, " +
+ " case when trim(u.nick_name) = ''" +
+ " then u.username" +
+ " else u.nick_name" +
+ " end as nick_name " +
+ "from t_flink_app a, t_user u " +
+ "where a.user_id = u.user_id " +
+ " and a.team_id=#{teamId}")
List<Application> getByTeamId(@Param("teamId") Long teamId);
Review Comment:
I recommend write the query sql to mapper.xml
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]