db_topic_comment 表名与数据库脚本修改一致

select 语句改成right join 使得查数据库的时候不会有空的数据返回,导致BeanUtils.copyProperties(topic, vo); 出错
This commit is contained in:
sunjunchen 2024-12-15 16:46:51 +08:00
parent 9fd0d8163d
commit 29700b4998
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ import lombok.Data;
import java.util.Date;
@Data
@TableName("db_topic_comments")
@TableName("db_topic_comment")
public class TopicComment {
@TableId(type = IdType.AUTO)
Integer id;

View File

@ -43,7 +43,7 @@ public interface TopicMapper extends BaseMapper<Topic> {
int userInteractCount(int tid, int uid, String type);
@Select("""
select * from db_topic_interact_collect left join db_topic on tid = id where db_topic_interact_collect.uid = #{uid}
select * from db_topic_interact_collect right join db_topic on tid = id where db_topic_interact_collect.uid = #{uid}
""")
List<Topic> collectTopics(int uid);
}