You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by GitBox <gi...@apache.org> on 2022/10/27 06:42:49 UTC

[GitHub] [incubator-streampark] wolfboys commented on a diff in pull request #1915: [Feature] Supports viewing which applications a variable is referenced by

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: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org