【发布时间】:2022-10-04 22:26:43
【问题描述】:
我需要用户 id、用户名、asesor nombre、asesor telefono、asesor correo 和 tipo asesor,但 json 响应重复数据。
这是 spring 存储库中的 sql 查询。
'''
@Query( value = "SELECT U.id as userid, u.name as cliente," +
"A.nombre, A.correo, A.telefono, TA.tipo as asesoria " +
"from tc_users U, tc_usuario_asesores UA , " +
"tc_asesor A,tc_tip_asesor TA " +
"where U.id = UA.userid " +
"and UA.asesorid= A.id " +
"and A.tipo_asesor = TA.id",
nativeQuery = true)
'''
并且 sql 工作台中的这个查询返回这个数据
但 json 响应返回此数据
并且不知道因为这已经发生,需要帮助,对不起我的英语不好。
【问题讨论】:
标签: spring-boot