Leo-zd commented on issue #33481:
URL:
https://github.com/apache/shardingsphere/issues/33481#issuecomment-2449296403
I modified it to the following format, which solves the problem, but is
there any other way to solve it
```
<select id="queryPage"
resultType="com.telecom.im.entity.view.MessageRecordViewEntity">
SELECT
msg_id,
id,
username,
avatar,
content,
timestamp,
msg_to,
to_user_name,
type,
group_id,
is_read,
req_state,
system_id,
stars,
tag
FROM (
SELECT
`a`.`id` AS `msg_id`,
`a`.`msg_from` AS `id`,
`b`.`username` AS `username`,
`b`.`avatar` AS `avatar`,
`a`.`content` AS `content`,
`a`.`create_time` AS `timestamp`,
`a`.`msg_to` AS `msg_to`,
`c`.`username` AS `to_user_name`,
`a`.`msg_type` AS `type`,
`a`.`group_id` AS `group_id`,
`a`.`is_read` AS `is_read`,
`a`.`req_state` AS `req_state`,
`a`.`system_id` AS `system_id`,
`a`.`stars` AS `stars`,
`a`.`tag` AS `tag`
FROM
`im_user_message` `a`
LEFT JOIN `im_user_account` `b` ON `a`.`msg_from` = `b`.`id`
LEFT JOIN `im_user_account` `c` ON `a`.`msg_to` = `c`.`id`
) t1
<if test="ew != null">
${ew.customSqlSegment}
</if>
</select>
```
--
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]