<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.panzhihua.service_community.dao.ComActAnnouncementDao">
|
|
<resultMap type="com.panzhihua.service_community.entity.ComActAnnouncement" id="ComActAnnouncementBaseResultMap">
|
<result property="id" column="id"/>
|
<result property="content" column="content"/>
|
<result property="createTime" column="create_time"/>
|
<result property="userId" column="user_id"/>
|
<result property="columnId" column="column_id"/>
|
<result property="communityId" column="community_id"/>
|
</resultMap>
|
|
<select id="pageList" resultType="com.panzhihua.common.model.vos.community.ComActAnnouncementVO">
|
select t.*,t1.name as username,t2.name as columnName from com_act_announcement t left join sys_user t1 on t.user_id = t1.user_id left join com_act_column t2 on t.column_id = t2.id
|
<where>
|
1=1
|
<if test="commonPage.communityId!=null">
|
and t.community_id = ${commonPage.communityId}
|
</if>
|
<if test="commonPage.paramId!=null">
|
and t.column_id =#{commonPage.paramId}
|
</if>
|
<if test="commonPage.keyword!=null and commonPage.keyword !=''">
|
and t.content like concat('%',#{commonPage.keyword},'%')
|
</if>
|
<if test="commonPage.propertyId!=null and commonPage.propertyId !=''">
|
and t.property_id=#{commonPage.propertyId}
|
</if>
|
</where>
|
order by t.create_time desc
|
</select>
|
|
</mapper>
|