xiaoyong931011
2021-07-16 70fe5c913f04360b226a8e7b9c282be66e1a1182
gc-user/src/main/resources/mapper/user/AccountMapper.xml
@@ -289,11 +289,8 @@
        <where>
            1=1
            and a.is_head = 1
            <if test="record.name != null and record.name != ''">
                and b.nick_name like concat('%',#{record.name},'%')
            </if>
            <if test="record.phone != null and record.phone != ''">
                and b.mobile_phone like concat('%',#{record.phone},'%')
            <if test="record.queryCol != null and record.queryCol != ''">
                and (b.nick_name like concat('%',#{record.name},'%') or b.mobile_phone like concat('%',#{record.phone},'%'))
            </if>
            <if test="record.reserveTimeStart != null">
                and b.regist_time >= #{record.reserveTimeStart}
@@ -372,7 +369,8 @@
        SELECT
        IFNULL(count(1), 0) cnt,
        SUM((select IFNULL(count(1), 0) from xzx_user_head_details where head_user_id = a.user_id) ) orderCnt,
        SUM((select IFNULL(sum(amount), 0) from xzx_user_head_details where head_user_id = a.user_id) ) amount
        SUM((select IFNULL(sum(amount), 0) from xzx_user_head_details where head_user_id = a.user_id) ) amount,
        SUM((select IFNULL(sum(score), 0) from xzx_user_head_details where head_user_id = a.user_id) ) score
        FROM
        xzx_account_info a
        where