bug: 修改政策课题总条数不正确问题

This commit is contained in:
wxyclub
2023-11-08 14:53:53 +08:00
parent 81dff4f27a
commit 3e681cbd11
3 changed files with 4 additions and 3 deletions
@@ -17,7 +17,7 @@ import java.util.List;
@Mapper
public interface SarLawsTopicMapper extends BaseMapper<SarLawsTopic> {
Integer queryByPageCount(SarLawsTopicVO page);
List<Integer> queryByPageCount(SarLawsTopicVO page);
List<SarLawsTopicVO> queryByPage(SarLawsTopicVO page);
@@ -217,7 +217,7 @@ public class SarLawsTopicServiceImpl extends ServiceImpl<SarLawsTopicMapper, Sar
page.setSortField("ID");
page.setSortMode("asc");
}
Integer rowCount = this.baseMapper.queryByPageCount(page);
int rowCount = this.baseMapper.queryByPageCount(page).size();
page.getPager().setRowCount(rowCount);
List<SarLawsTopicVO> sarLawsTopicVOList = this.baseMapper.queryByPage(page);
for (SarLawsTopicVO lawsTopicVO : sarLawsTopicVOList) {
@@ -185,13 +185,14 @@
</sql>
<select id="queryByPageCount" resultType="java.lang.Integer">
select count(1) from sar_laws_topic slt left join sar_laws_topic_meeting sltm on slt.ID = sltm.LAWS_TOPIC_ID
select count(slt.ID) from sar_laws_topic slt left join sar_laws_topic_meeting sltm on slt.ID = sltm.LAWS_TOPIC_ID
left join sar_laws_contact_information slci1 on slt.ID = slci1.LAWS_TOPIC_ID and slci1.GROUP_TYPE = 'topicGroup'
left join sar_laws_contact_information slci2 on slt.ID = slci2.LAWS_TOPIC_ID and slci2.GROUP_TYPE = 'inside'
where slt.VALID_FLAG = 0
<include refid="Base_Where_Clause"/>
<include refid="TopicMeeting_where" />
<include refid="ContactInformation_where" />
group by slt.ID
</select>
<select id="queryByPage" resultMap="BaseResultMap">
select <include refid="Base_Join_Column_List" />