bug: 修改默认排序规则,分页查询
This commit is contained in:
+12
-6
@@ -54,6 +54,12 @@
|
||||
<if test="meetingOrganizer != null and meetingOrganizer != ''" >
|
||||
and MEETING_ORGANIZER like concat('%',#{meetingOrganizer},'%')
|
||||
</if>
|
||||
<if test="meetingTimeBegin!= null and meetingTimeEnd == null">
|
||||
and MEETING_TIME >= DATE_FORMAT(#{meetingTimeBegin}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="meetingTimeBegin == null and meetingTimeEnd != null">
|
||||
and MEETING_TIME <= DATE_FORMAT(#{meetingTimeEnd}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="meetingTimeBegin != null and meetingTimeEnd != null">
|
||||
and MEETING_TIME between DATE_FORMAT(#{meetingTimeBegin}, '%Y-%m-%d') and DATE_FORMAT(#{meetingTimeEnd}, '%Y-%m-%d')
|
||||
</if>
|
||||
@@ -90,24 +96,24 @@
|
||||
</sql>
|
||||
<select id="queryByPageCount" resultType="java.lang.Integer">
|
||||
select count(1) from (
|
||||
select count(1) from inside_outside_meeting iom join meeting_topic mt on iom.ID = mt.MEETING_ID
|
||||
select count(1)
|
||||
from (select * from inside_outside_meeting where VALID_FLAG = 0 <include refid="Base_Where_Clause" /> ) 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" />
|
||||
group by iom.ID
|
||||
) subquery
|
||||
group by iom.ID
|
||||
) a
|
||||
</select>
|
||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.InsideOntSideMeeting.entity.InsideOutsideMeetingVO">
|
||||
select <include refid="Base_Column_Join_MeetingTopic_List" />
|
||||
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
|
||||
) as agendaNameStr from inside_outside_meeting where VALID_FLAG = 0 <include refid="Base_Where_Clause"/>
|
||||
<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>
|
||||
|
||||
+6
@@ -52,6 +52,12 @@
|
||||
<if test="name != null and name != ''">
|
||||
and `NAME` like concat('%',#{name},'%')
|
||||
</if>
|
||||
<if test="uploadTimeBegin != null and uploadTimeEnd == null">
|
||||
and UPLOAD_TIME >= DATE_FORMAT(#{uploadTimeBegin}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="uploadTimeBegin == null and uploadTimeEnd!= null">
|
||||
and UPLOAD_TIME <= DATE_FORMAT(#{uploadTimeEnd}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="uploadTimeBegin != null and uploadTimeEnd != null">
|
||||
and UPLOAD_TIME between DATE_FORMAT(#{uploadTimeBegin}, '%Y-%m-%d') and DATE_FORMAT(#{uploadTimeEnd}, '%Y-%m-%d')
|
||||
</if>
|
||||
|
||||
@@ -114,6 +114,12 @@
|
||||
<if test="participatingUnit != null and participatingUnit != ''" >
|
||||
and PARTICIPATING_UNIT like concat('%',#{participatingUnit},'%')
|
||||
</if>
|
||||
<if test="startTimeBegin!= null and startTimeEnd == null">
|
||||
and START_TIME >= DATE_FORMAT(#{startTimeBegin}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="startTimeBegin == null and startTimeEnd != null" >
|
||||
and START_TIME <= DATE_FORMAT(#{startTimeEnd}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="startTimeBegin != null and startTimeEnd != null">
|
||||
and START_TIME between DATE_FORMAT(#{startTimeBegin}, '%Y-%m-%d') and DATE_FORMAT(#{startTimeEnd}, '%Y-%m-%d')
|
||||
</if>
|
||||
@@ -135,12 +141,6 @@
|
||||
<if test="meetingAddress != null and meetingAddress != ''">
|
||||
and sltm.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>-->
|
||||
<if test="participants != null and participants != ''">
|
||||
and sltm.PARTICIPANTS like concat('%',#{participants},'%')
|
||||
</if>
|
||||
@@ -182,26 +182,28 @@
|
||||
</sql>
|
||||
|
||||
<select id="queryByPageCount" resultType="java.lang.Integer">
|
||||
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 count(1) from (
|
||||
select count(slt.ID) from (select * from sar_laws_topic where VALID_FLAG = 0 <include refid="Base_Where_Clause"/>) 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="TopicMeeting_where" />
|
||||
<include refid="ContactInformation_where" />
|
||||
group by slt.ID
|
||||
) a
|
||||
</select>
|
||||
<select id="queryByPage" resultMap="BaseResultMap">
|
||||
select <include refid="Base_Join_Column_List" />
|
||||
from sar_laws_topic slt left join sar_laws_topic_meeting sltm on slt.ID = sltm.LAWS_TOPIC_ID
|
||||
from (select <include refid="Base_Column_List" /> from sar_laws_topic where VALID_FLAG = 0 <include refid="Base_Where_Clause"/>
|
||||
order by ${sortField} ${sortMode} limit ${pager.startIndex-1},${pageSize}) 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" />
|
||||
order by slt.${sortField} ${sortMode}
|
||||
limit ${pager.startIndex-1},${pageSize}
|
||||
</select>
|
||||
<select id="getLawsTopicByIds" resultMap="BaseResultMap">
|
||||
select <include refid="Base_Join_Column_List" />
|
||||
|
||||
Reference in New Issue
Block a user