bug: 内外部会议分页bug修改

This commit is contained in:
wxyclub
2023-11-22 15:56:27 +08:00
parent d65a5da9b5
commit 9c1e8b45fd
4 changed files with 29 additions and 27 deletions
@@ -10,6 +10,7 @@
<result column="MEETING_ORGANIZER" property="meetingOrganizer" />
<result column="MEETING_TIME" property="meetingTime" />
<result column="MEETING_ADDRESS" property="meetingAddress" />
<result column="agendaNameStr" property="agendaNameStr" />
<result column="PARTICIPANTS" property="participants" />
<result column="MEETING_MINUTES" property="meetingMinutes" />
<result column="MEETING_CONTENT" property="meetingContent" />
@@ -39,7 +40,8 @@
iom.PARTICIPANTS,iom.MEETING_MINUTES,iom.MEETING_CONTENT,iom.FIRST_MEETING_TYPE,iom.SECOND_MEETING_TYPE,
mt.ID as mtId,mt.MEETING_ID,mt.AGENDA_NAME,mt.AGENDA_MATERIALS,mt.REPORTER,mt.REPORTING_UNIT,
mt.AGENDA_CONTENT,
iom.VALID_FLAG,iom.CREATE_TIME,iom.MODIFY_TIME
iom.VALID_FLAG,iom.CREATE_TIME,iom.MODIFY_TIME,
iom.agendaNameStr
</sql>
<sql id="Base_Where_Clause">
<trim suffixOverrides="," >
@@ -58,11 +60,8 @@
<if test="meetingAddress != null and meetingAddress != ''" >
and MEETING_ADDRESS like concat('%',#{meetingAddress},'%')
</if>
<if test="participantsList != null and participantsList.size() > 0" >
and PARTICIPANTS in
<foreach collection="participantsList" separator="," open="(" close=")" item="participant">
#{participant}
</foreach>
<if test="participants != null and participants != ''">
and PARTICIPANTS like concat('%',#{participants},'%')
</if>
<if test="meetingContent != null" >
and MEETING_CONTENT like concat('%',#{meetingContent},'%')
@@ -90,30 +89,35 @@
</if>
</sql>
<select id="queryByPageCount" resultType="java.lang.Integer">
select count(iom.ID) from inside_outside_meeting iom join meeting_topic mt on iom.ID = mt.MEETING_ID
where iom.VALID_FLAG = 0
<include refid="Base_Where_Clause"/>
<include refid="MeetingTopic_where" />
group by iom.ID
select count(1) from (
select count(1) from inside_outside_meeting iom join meeting_topic mt on iom.ID = mt.MEETING_ID
where iom.VALID_FLAG = 0
<include refid="Base_Where_Clause"/>
<include refid="MeetingTopic_where" />
group by iom.ID
) subquery
</select>
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.InsideOntSideMeeting.entity.InsideOutsideMeetingVO">
select <include refid="Base_Column_Join_MeetingTopic_List" />
from inside_outside_meeting iom join meeting_topic mt on iom.ID = mt.MEETING_ID
from (select <include refid="Base_Column_List" />,(
select GROUP_CONCAT(AGENDA_NAME SEPARATOR ',') from meeting_topic where inside_outside_meeting.ID = meeting_topic.MEETING_ID
) as agendaNameStr from inside_outside_meeting where VALID_FLAG = 0
<if test="sortField != 'AGENDA_NAME'">
order by ${sortField} ${sortMode}
</if>
limit ${pager.startIndex-1},${pageSize}) iom left join meeting_topic mt on iom.ID = mt.MEETING_ID
where iom.VALID_FLAG = 0
<include refid="Base_Where_Clause" />
<include refid="MeetingTopic_where" />
order by
<choose>
<when test="sortField == 'AGENDA_NAME'">
mt.${sortField} ${sortMode},
mt.AGENDA_NAME asc
mt.${sortField} ${sortMode}
</when>
<otherwise>
iom.${sortField} ${sortMode},
mt.AGENDA_NAME asc
iom.${sortField} ${sortMode}
</otherwise>
</choose>
limit ${pager.startIndex-1},${pageSize}
</select>
<select id="queryMeetingById" resultMap="BaseResultMap">
select <include refid="Base_Column_Join_MeetingTopic_List" />