<?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.ComActNeighborCircleTopicMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActNeighborCircleTopicDO">
|
<id column="id" property="id" />
|
<result column="community_id" property="communityId" />
|
<result column="name" property="name" />
|
<result column="status" property="status" />
|
<result column="create_at" property="createAt" />
|
<result column="create_by" property="createBy" />
|
</resultMap>
|
|
<!-- 通用查询结果列 -->
|
<sql id="Base_Column_List">
|
id, community_id, name, status, create_at, create_by
|
</sql>
|
|
<select id="pageNeighborTopicByAdmin" parameterType="com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleTopicAdminDTO"
|
resultType="com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleTopicAdminVO">
|
SELECT
|
canct.id,
|
canct.`name`,
|
canct.`status`,
|
canct.create_at,
|
su.`name` as createBy
|
FROM
|
com_act_neighbor_circle_topic AS canct
|
LEFT JOIN sys_user AS su ON su.user_id = canct.create_by
|
<where>
|
<if test="circleTopicAdminDTO.communityId != null">
|
and canct.community_id = #{circleTopicAdminDTO.communityId}
|
</if>
|
<if test="circleTopicAdminDTO.status != null">
|
and canct.status = #{circleTopicAdminDTO.status}
|
</if>
|
<if test="circleTopicAdminDTO.name != null and circleTopicAdminDTO.name != """>
|
and canct.name like concat(#{circleTopicAdminDTO.name},'%')
|
</if>
|
</where>
|
order by canct.create_at desc
|
</select>
|
|
<select id="getNeighborTopicByApp" resultType="com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleTopicAppVO">
|
select id,`name` from com_act_neighbor_circle_topic where `status` = 1 and community_id = #{communityId}
|
</select>
|
</mapper>
|