<?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.ComClusterOrganizationMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComClusterOrganizationDO">
|
<id column="id" property="id" />
|
<result column="name" property="name" />
|
<result column="phone" property="phone" />
|
<result column="address" property="address" />
|
<result column="status" property="status" />
|
<result column="logo" property="logo" />
|
<result column="is_del" property="isDel" />
|
<result column="create_at" property="createAt" />
|
<result column="update_at" property="updateAt" />
|
<result column="community_id" property="communityId" />
|
<result column="lng" property="lng" />
|
<result column="lat" property="lat" />
|
</resultMap>
|
|
<!-- 通用查询结果列 -->
|
<sql id="Base_Column_List">
|
id, name, phone, address, status, logo, is_del, create_at, update_at,community_id, lng, lat
|
</sql>
|
|
<select id="listClusterApplets" resultType="com.panzhihua.common.model.vos.community.cluster.PageClusterVo">
|
select id,`name` from com_cluster_organization where status = 1 and is_del = 2 and community_id = ${communityId} order by create_at desc
|
</select>
|
|
<select id="pageClusterAdmin" resultType="com.panzhihua.common.model.vos.community.cluster.admin.PageClusterAdminVo">
|
SELECT
|
id,
|
`name`,
|
logo,
|
phone,
|
address,
|
`status`
|
FROM
|
com_cluster_organization
|
WHERE
|
is_del = 2
|
<if test="pageClusterAdminDto.communityId != null">
|
and community_id = ${pageClusterAdminDto.communityId}
|
</if>
|
<if test="pageClusterAdminDto.status != null">
|
and status = #{pageClusterAdminDto.status}
|
</if>
|
<if test="pageClusterAdminDto.keyWord != null and pageClusterAdminDto.keyWord != """>
|
and (
|
`name` like concat(#{pageClusterAdminDto.keyWord}, '%' ) or
|
phone like concat(#{pageClusterAdminDto.keyWord}, '%' )
|
)
|
</if>
|
ORDER BY
|
create_at DESC
|
</select>
|
|
</mapper>
|