Browse Source

update -> 修改子查询问题

root 4 years ago
parent
commit
cdcd0298cf

+ 2 - 2
lift-common/src/main/java/cn/com/ty/lift/common/constants/SqlConstants.java

@@ -114,7 +114,7 @@ public interface SqlConstants {
 
     //物管。查询用户加入的项目的急修列表
     String QUERY_REPAIR_LIST =
-            "select                  distinct er.id               repairId," +
+            "select                  distinct er.id      repairId," +
                     "                p.project_name      projectName," +
                     "                er.is_critical      isCritical," +
                     "                er.repair_reason    repairReason," +
@@ -134,7 +134,7 @@ public interface SqlConstants {
                     "         left join project_lift_relevance plr on er.lift_id = plr.lift_id" +
                     "         left join user_info ui on er.worker_id = ui.user_id" +
                     "    where er.status = #{status}" +
-                    "            and er.project_id in (select er.project_id" +
+                    "            and er.project_id in (select pu.project_id" +
                     "                                  from project_user pu" +
                     "                                  where pu.user_id = #{userId}) order by er.create_date desc";