Skip to content

Commit 30884d4

Browse files
committed
refactor: 修正SQLite查询中的SELECT语句,确保返回正确的字段
1 parent 7d96bde commit 30884d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/jmal/clouddisk/dao/impl/jpa/repository/GroupRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public interface GroupRepository extends JpaRepository<GroupDO, String>, JpaSpec
3333
nativeQuery = true)
3434
List<GroupDO> findAllByRoleIdList_MySQL(@Param("roleIdListAsJson") String roleIdListAsJson);
3535

36-
@Query(value = "SELECT DISTINCT * FROM user_groups g, json_each(g.roles) je WHERE je.value IN (:roleIdList)",
36+
@Query(value = "SELECT DISTINCT g.* FROM user_groups g, json_each(g.roles) je WHERE je.value IN (:roleIdList)",
3737
nativeQuery = true)
3838
List<GroupDO> findAllByRoleIdList_SQLite(@Param("roleIdList") Collection<String> roleIdList);
3939
}

0 commit comments

Comments
 (0)