101captain
2021-12-30 e9d5fb4b01c383fa5b01bf5e730d4e3da73f266e
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml
@@ -48,14 +48,14 @@
    <select id="indexDataCommunityBackstage" resultType="com.panzhihua.common.model.vos.IndexDataVO">
        SELECT
        COUNT(DISTINCT u.user_id)allUser,
        (select COUNT(m.id) from com_mng_volunteer_mng m where m.community_id = #{communityId} and m.`state`=2)volunteerUser,
         (select count(id) from com_pb_member cpm where cpm.audit_result = 1 and cpm.community_id = #{communityId}) partymemberUser,
        (select COUNT(m.id) from com_mng_volunteer_mng m where m.community_id = ${communityId} and m.`state`=2)volunteerUser,
         (select count(id) from com_pb_member cpm where cpm.audit_result = 1 and cpm.community_id = ${communityId}) partymemberUser,
        COUNT(h.id)house
        FROM
        sys_user u
        JOIN com_act c ON u.community_id = c.community_id
        LEFT JOIN com_mng_struct_house_user h on u.user_id=h.user_id
        WHERE u.community_id = #{communityId} and u.type=1
        WHERE u.community_id = ${communityId} and u.type=1
    </select>
    <update id="timedTaskContinuousLandingDays">
@@ -78,7 +78,7 @@
        FROM
             com_pb_member_role a
        WHERE
             a.phone = #{phone} and community_id = #{userCommunityId}
             a.phone = #{phone} and community_id = ${userCommunityId}
    </select>
    <select id="pageUserAppletsBackstage" resultType="com.panzhihua.common.model.vos.user.SysUserVO">
@@ -100,7 +100,7 @@
            and u.phone=#{pageUserAppletsBackstageDTO.phone}
        </if>
        <if test='pageUserAppletsBackstageDTO.communityId != null and pageUserAppletsBackstageDTO.communityId != 0'>and
            u.community_id = #{pageUserAppletsBackstageDTO.communityId}
            u.community_id = ${pageUserAppletsBackstageDTO.communityId}
        </if>
        <if test='pageUserAppletsBackstageDTO.status != null and pageUserAppletsBackstageDTO.status != 0'>and
            u.status=#{pageUserAppletsBackstageDTO.status}
@@ -249,7 +249,7 @@
    <select id="getGridsMemberList"
            resultType="com.panzhihua.common.model.vos.community.screen.event.EventGridMemberVO">
        select user_id,nick_name,phone from sys_user where type = 6 and community_id = #{communityId} limit 3
        select user_id,nick_name,phone from sys_user where type = 6 and community_id = ${communityId} limit 3
    </select>
    <update id="updateUserArchives">
@@ -266,7 +266,7 @@
        FROM
             sys_user u LEFT JOIN sys_user_role ur ON u.user_id = ur.user_id
             LEFT JOIN sys_role r ON ur.role_id = r.role_id
        WHERE ur.role_id IS  NOT NULL AND  u.phone = #{phone}  and r.community_id = #{userCommunityId}
        WHERE ur.role_id IS  NOT NULL AND  u.phone = #{phone}  and r.community_id = ${userCommunityId}
    </select>
    <delete id="delGridMemberRelation">
@@ -282,12 +282,12 @@
    </update>
    <select id="getServiceTeamList" resultType="com.panzhihua.common.model.vos.partybuilding.ComPbServiceTeamWishVO">
        select id as managerId,`name` from com_pb_service_team where community_id = #{communityId}
        select id as managerId,`name` from com_pb_service_team where community_id = ${communityId}
        <if test='param != null and param != &quot;&quot;'>AND `name` like concat(#{param},'%')</if>
    </select>
    <select id="getUserListByCommunityId" resultType="com.panzhihua.common.model.vos.user.SysUserVO">
        select user_id,`name` from sys_user as su where type = 3 and community_id = #{communityId}
        select user_id,`name` from sys_user as su where type = 3 and community_id = ${communityId}
    </select>
    <select id="pageUserFace" resultType="com.panzhihua.common.model.vos.LoginUserInfoVO">
@@ -307,7 +307,7 @@
        <if test='loginUserInfoVO.communityName != null and loginUserInfoVO.communityName.trim() != &quot;&quot;'>
            AND c.`area_name` like concat(#{loginUserInfoVO.communityName},'%')
        </if>
        where u.face_state is not null and u.type=1 and u.community_id = #{loginUserInfoVO.communityId}
        where u.face_state is not null and u.type=1 and u.community_id = ${loginUserInfoVO.communityId}
        <if test='loginUserInfoVO.name != null and loginUserInfoVO.name.trim() != &quot;&quot;'>
            and u.`name` like concat(#{loginUserInfoVO.name},'%')
        </if>
@@ -331,7 +331,7 @@
        FROM
             com_pb_service_team a
        WHERE
             a.phone = #{phone} and community_id = #{userCommunityId}
             a.phone = #{phone} and community_id = ${userCommunityId}
    </select>
    <select id="selectExport" resultType="com.panzhihua.common.model.dtos.user.EexcelUserDTO">
@@ -372,7 +372,7 @@
        <if test='exportUserDTO.areaName != null and exportUserDTO.areaName.trim() != &quot;&quot;'>AND c.`area_name`
            like concat(#{exportUserDTO.areaName},'%')
        </if>
        where u.community_id = #{exportUserDTO.communityId} and u.type=1
        where u.community_id = ${exportUserDTO.communityId} and u.type=1
        <if
                test='exportUserDTO.name != null and exportUserDTO.name.trim() != &quot;&quot;'>and u.`name` like
            concat(#{exportUserDTO.name},'%')
@@ -429,7 +429,7 @@
    </update>
    <select id="selectCommunity" resultType="com.panzhihua.common.model.vos.community.ComActVO">
       select name from com_act where community_id = #{communityId}
       select name from com_act where community_id = ${communityId}
    </select>
    <delete id="delLcMember">
@@ -521,7 +521,7 @@
    <select id="countPropertyWorker" resultType="integer">
        SELECT COUNT(id) FROM com_property
        WHERE user_id = #{userId} AND community_id = #{communityId}
        WHERE user_id = #{userId} AND community_id = ${communityId}
    </select>
</mapper>