张天森
2022-07-14 a5e69c038c7c72239e8077d4373eeb88b7ac1248
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml
@@ -564,7 +564,7 @@
        select check_unit_id from com_pb_member where phone = #{phone} limit 1
    </select>
    <select id="userAnalysis" resultType="com.panzhihua.common.model.vos.user.UserProportion">
        select cs.area_code,cs.name as streetName,ac.name as communityName,count(su.user_id) as user from sys_user as su
        select cs.area_code,cs.name as streetName,ac.name as communityName,count(su.user_id) as user,su.community_id as communityId from sys_user as su
        left join com_act as ac on su.community_id=ac.community_id
        left join com_street as cs on ac.street_id=cs.street_id
        where su.community_id&lt;>''
@@ -599,7 +599,8 @@
        limit 10
    </select>
    <select id="realUserCount" resultType="com.panzhihua.common.model.vos.user.RealUser">
        select cs.area_code as areaCode,cs.street_id,ac.name as communityName,cs.name as StreetName,count(su.user_id) as count from sys_user as su
        select cs.area_code as areaCode,cs.street_id,ac.name as communityName,su.community_id as communityId,
        cs.name as StreetName,count(su.user_id) as count from sys_user as su
        left join com_act as ac on su.community_id=ac.community_id
        left join com_street as cs on ac.street_id=cs.street_id
        where su.community_id&lt;>''
@@ -690,5 +691,21 @@
    <select id="selectComActAcidMember" resultType="com.panzhihua.common.model.vos.community.acid.ComActAcidMemberVO">
        select * from com_act_acid_member where id = #{id}
    </select>
    <select id="getMonthUsers" resultType="java.lang.Integer">
        SELECT count(user_id)
        FROM
        sys_user t LEFT JOIN com_act t1 on t.community_id = t1.community_id
        where t.type=1 and t.community_id is not null
        and t.community_id&lt;>11
        <if test="streetId != null">
            and t1.street_id=#{streetId}
        </if>
        <if test="areaCode != null">
            and t1.area_code=#{areaCode}
        </if>
        <if test="range != null and range != ''">
            and t.create_at >= #{range}
        </if>
    </select>
</mapper>