java110
2023-05-30 0b3ff378a9faaf9d7a4831b7f0de67378fe0dfea
java110-db/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml
@@ -465,7 +465,10 @@
    <!-- 查询员工总量 -->
    <select id="getStaffCount" parameterType="Map" resultType="Map">
        select count(*) count from(select count(1) count
        <if test="orgIds != null and orgIds.length > 0">
        select count(*) count from(
        </if>
        select count(1) count
        from u_user u
        inner join s_store_user su on su.user_id = u.user_id
        <if test="(orgId !=null and orgId != '')||(orgIds != null and orgIds.length > 0)">
@@ -485,6 +488,9 @@
        </if>
        <if test="name !=null and name != ''">
            and u.name like concat('%',#{name},'%')
        </if>
        <if test="nameLike !=null and nameLike != ''">
            and u.name like concat('%',#{nameLike},'%')
        </if>
        <if test="staffName !=null and staffName != ''">
            and u.name like concat('%',#{staffName},'%')
@@ -511,7 +517,10 @@
            </foreach>
            and uosr.status_cd =0
            GROUP BY u.user_id
        </if>)a
        </if>
        <if test="orgIds != null and orgIds.length > 0">
            )a
        </if>
    </select>
    <!-- 查询员工总量 -->
@@ -544,6 +553,9 @@
        <if test="name !=null and name != ''">
            and u.name like concat('%',#{name},'%')
        </if>
        <if test="nameLike !=null and nameLike != ''">
            and u.name like concat('%',#{nameLike},'%')
        </if>
        <if test="staffName !=null and staffName != ''">
            and u.name like concat('%',#{staffName},'%')
        </if>
@@ -568,7 +580,8 @@
                #{item}
            </foreach>
            and uosr.status_cd =0
            GROUP BY u.user_id
            GROUP BY u.user_id,u.name,u.email,u.address,u.location_cd,
            u.age,u.sex,u.tel,u.level_cd ,u.b_id,su.rel_cd ,td.name
        </if>
        order by u.create_time desc
        <if test="page != -1 and page != null ">
@@ -592,9 +605,10 @@
            ,u_user_attr ua
        </if>
        where 1= 1
        <if test="openId != null and openId != ''">
            and u.user_id = ua.user_id
            and ua.spec_cd = '100201911001'
            and ua.spec_cd in ('100201911001','100201911003')
            and ua.value = #{openId}
            and ua.status_cd = '0'
        </if>
@@ -680,7 +694,7 @@
        where 1= 1
        <if test="openId != null and openId != ''">
            and u.user_id = ua.user_id
            and ua.spec_cd = '100201911001'
            and ua.spec_cd  in ('100201911001','100201911003')
            and ua.value = #{openId}
            and ua.status_cd = '0'
        </if>