2023-03-23 17:57:02 +08:00
|
|
|
<?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.cm.bigdata.dao2.kpi.ICommunityBossDao">
|
|
|
|
|
|
|
|
<resultMap id="communityBossPO" type="com.cm.bigdata.pojo.pos.kpi.CommunityBossPO">
|
|
|
|
<id column="id" property="id"/>
|
|
|
|
<result column="community_boss_id" property="communityBossId"/>
|
|
|
|
<result column="community_boss_user_id" property="communityBossUserId"/>
|
|
|
|
<result column="community_boss_parent_id" property="communityBossParentId"/>
|
|
|
|
<result column="community_boss_parent_user_id" property="communityBossParentUserId"/>
|
|
|
|
<result column="community_boss_level" property="communityBossLevel"/>
|
|
|
|
<result column="area_id" property="areaId"/>
|
|
|
|
<result column="area_name" property="areaName"/>
|
|
|
|
<result column="grid_summary" property="gridSummary"/>
|
|
|
|
<result column="creator" property="creator"/>
|
|
|
|
<result column="gmt_create" property="gmtCreate"/>
|
|
|
|
</resultMap>
|
|
|
|
|
2023-03-30 17:56:57 +08:00
|
|
|
<resultMap id="communityBossDTO" type="com.cm.bigdata.pojo.dtos.kpi.CommunityBossDTO">
|
|
|
|
<result column="community_boss_id" property="communityBossId"/>
|
|
|
|
<result column="community_boss_user_id" property="communityBossUserId"/>
|
|
|
|
<result column="community_boss_parent_id" property="communityBossParentId"/>
|
|
|
|
<result column="community_boss_parent_user_id" property="communityBossParentUserId"/>
|
|
|
|
<result column="community_boss_level" property="communityBossLevel"/>
|
|
|
|
<result column="area_id" property="areaId"/>
|
|
|
|
<result column="area_name" property="areaName"/>
|
|
|
|
<result column="community_id" property="communityId"/>
|
|
|
|
<result column="community_name" property="communityName"/>
|
|
|
|
<result column="user_name" property="userName"/>
|
2023-05-13 01:20:34 +08:00
|
|
|
<result column="user_username" property="userUsername"/>
|
2023-03-30 17:56:57 +08:00
|
|
|
</resultMap>
|
|
|
|
|
2023-03-23 17:57:02 +08:00
|
|
|
<select id="listPO" parameterType="map" resultMap="communityBossPO">
|
|
|
|
SELECT
|
|
|
|
id,
|
|
|
|
community_boss_id,
|
|
|
|
community_boss_user_id,
|
|
|
|
community_boss_parent_id,
|
|
|
|
community_boss_parent_user_id,
|
|
|
|
community_boss_level,
|
|
|
|
area_id,
|
|
|
|
area_name,
|
|
|
|
grid_summary,
|
|
|
|
creator,
|
|
|
|
gmt_create
|
|
|
|
FROM
|
|
|
|
city_community_boss
|
|
|
|
WHERE
|
|
|
|
is_delete = 0
|
2023-03-30 17:56:57 +08:00
|
|
|
<if test="areaId != null and areaId != ''">
|
|
|
|
AND
|
|
|
|
area_id = #{areaId}
|
|
|
|
</if>
|
2023-03-23 17:57:02 +08:00
|
|
|
<if test="communityBossLevel != null and communityBossLevel != ''">
|
|
|
|
AND
|
|
|
|
community_boss_level = #{communityBossLevel}
|
|
|
|
</if>
|
|
|
|
</select>
|
|
|
|
|
2023-03-30 17:56:57 +08:00
|
|
|
<select id="list" parameterType="map" resultMap="communityBossDTO">
|
|
|
|
SELECT
|
|
|
|
cc.community_id,
|
|
|
|
cc.community_name,
|
|
|
|
ccb.community_boss_id,
|
|
|
|
ccb.community_boss_user_id,
|
|
|
|
ccb.community_boss_parent_id,
|
|
|
|
ccb.community_boss_parent_user_id,
|
|
|
|
ccb.community_boss_level,
|
|
|
|
ccb.area_id,
|
|
|
|
ccb.area_name,
|
2023-05-13 01:20:34 +08:00
|
|
|
su.user_name,
|
|
|
|
su.user_username
|
2023-03-30 17:56:57 +08:00
|
|
|
FROM
|
|
|
|
city_community_boss_community ccbc
|
|
|
|
INNER JOIN
|
|
|
|
city_community cc
|
|
|
|
ON
|
|
|
|
ccbc.community_id = cc.community_id
|
|
|
|
INNER JOIN
|
|
|
|
city_community_boss ccb
|
|
|
|
ON
|
|
|
|
ccb.community_boss_id = ccbc.community_boss_id
|
|
|
|
INNER JOIN
|
|
|
|
sys_user su
|
|
|
|
ON
|
|
|
|
ccb.community_boss_user_id = su.user_id
|
|
|
|
WHERE
|
|
|
|
cc.is_delete = 0
|
|
|
|
AND
|
|
|
|
ccb.is_delete = 0
|
|
|
|
AND
|
|
|
|
su.is_delete = 0
|
|
|
|
<if test="areaId != null and areaId != ''">
|
|
|
|
AND
|
|
|
|
ccb.area_id = #{areaId}
|
|
|
|
</if>
|
|
|
|
<if test="communityId != null and communityId != ''">
|
|
|
|
AND
|
|
|
|
ccbc.community_id = #{communityId}
|
|
|
|
</if>
|
|
|
|
<if test="communityBossLevel != null and communityBossLevel != ''">
|
|
|
|
AND
|
|
|
|
ccb.community_boss_level = #{communityBossLevel}
|
|
|
|
</if>
|
|
|
|
</select>
|
|
|
|
|
2023-03-23 17:57:02 +08:00
|
|
|
</mapper>
|