db_topic_comment 表名与数据库脚本修改一致
select 语句改成right join 使得查数据库的时候不会有空的数据返回,导致BeanUtils.copyProperties(topic, vo); 出错
This commit is contained in:
parent
9fd0d8163d
commit
29700b4998
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user