| @@ -30,7 +30,7 @@ | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| distinct wcubi.`id`,wcubi.`phone`,wcubi.`birthdate`,wcubi.`education`,wcubi.`sex`,wcubi.`email`, | |||
| wcubi.`id`,wcubi.`phone`,wcubi.`birthdate`,wcubi.`education`,wcubi.`sex`,wcubi.`email`, | |||
| wcubi.`address`,wcubi.`poins`,wcubi.`tag_id`,wcubi.`create_date`,wcubi.`update_date`, | |||
| wcubi.`final_tenant_id`,wcubi.`tenant_id`,wcubi.`parent_tenant_id`,wcubi.`name`,wcubi.`nick_name`, | |||
| wcubi.`avatar_url`,wcubi.`credit`,wcubi.`active_time`,wcubi.`login_count`,wcubi.`act_record`,wcubi.`qr_code` | |||
| @@ -287,7 +287,7 @@ | |||
| </update> | |||
| <select id="findCountBySex" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="java.lang.Long"> | |||
| select count(distinct wcubi.id) from wx_c_user_basic_info wcubi | |||
| select count(wcubi.id) from wx_c_user_basic_info wcubi | |||
| where wcubi.sex =#{sex} | |||
| <if test=" null != finalTenantId and '' != finalTenantId"> | |||
| and wcubi.`final_tenant_id` = #{finalTenantId} | |||
| @@ -301,7 +301,7 @@ | |||
| </select> | |||
| <select id="findCountBySex1" resultType="java.lang.Long"> | |||
| select count(distinct wcubi.id) from wx_c_user_basic_info wcubi | |||
| select count(wcubi.id) from wx_c_user_basic_info wcubi | |||
| where wcubi.sex =#{basicInfo.sex} | |||
| <if test=" null != basicInfo.startTime "> | |||
| and wcubi.create_date >= #{basicInfo.startTime} | |||
| @@ -316,7 +316,7 @@ | |||
| <select id="findCountByAge" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="java.lang.Long"> | |||
| select count(distinct wcubi.id) from wx_c_user_basic_info wcubi | |||
| select count(wcubi.id) from wx_c_user_basic_info wcubi | |||
| where 1=1 | |||
| <if test=" null != finalTenantId and '' != finalTenantId"> | |||
| and wcubi.`final_tenant_id` = #{finalTenantId} | |||
| @@ -343,7 +343,7 @@ | |||
| </select> | |||
| <select id="findCountByAge1" resultType="java.lang.Long"> | |||
| select count(distinct wcubi.id) from wx_c_user_basic_info wcubi | |||
| select count(wcubi.id) from wx_c_user_basic_info wcubi | |||
| where 1=1 | |||
| <if test=" null != basicInfo.startTime "> | |||
| and wcubi.create_date >= #{basicInfo.startTime} | |||
| @@ -370,7 +370,7 @@ | |||
| </select> | |||
| <select id="findCountByScore" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="java.lang.Long"> | |||
| select count(distinct wcubi.id) from wx_c_user_basic_info wcubi | |||
| select count(wcubi.id) from wx_c_user_basic_info wcubi | |||
| where 1=1 | |||
| <if test=" null != finalTenantId and '' != finalTenantId"> | |||
| and wcubi.`final_tenant_id` = #{finalTenantId} | |||
| @@ -397,7 +397,7 @@ | |||
| </select> | |||
| <select id="findCountByScore1" resultType="java.lang.Long"> | |||
| select count(distinct wcubi.id) from wx_c_user_basic_info wcubi | |||
| select count(wcubi.id) from wx_c_user_basic_info wcubi | |||
| where 1=1 | |||
| <if test=" null != basicInfo.startTime "> | |||
| and wcubi.create_date >= #{basicInfo.startTime} | |||
| @@ -425,7 +425,7 @@ | |||
| </select> | |||
| <sql id="allColumnsOfScoreList"> | |||
| distinct cub.id,cub.phone,cub.birthdate,cub.education,cub.sex,cub.email,cub.address,cub.poins,cub.tag_id, | |||
| cub.id,cub.phone,cub.birthdate,cub.education,cub.sex,cub.email,cub.address,cub.poins,cub.tag_id, | |||
| cub.create_date,cub.update_date,cub.name,cub.level,cub.nick_name,cub.score_date,cub.final_tenant_id | |||
| </sql> | |||
| @@ -497,7 +497,7 @@ | |||
| </select> | |||
| <select id="findCount" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="java.lang.Long"> | |||
| select count(distinct wcubi.id) from wx_c_user_basic_info wcubi | |||
| select count(wcubi.id) from wx_c_user_basic_info wcubi | |||
| where 1=1 | |||
| <if test=" null != finalTenantId and '' != finalTenantId"> | |||
| and wcubi.`final_tenant_id` = #{finalTenantId} | |||
| @@ -514,7 +514,7 @@ | |||
| </select> | |||
| <select id="findCount1" resultType="java.lang.Long"> | |||
| select count(distinct wcubi.id) from wx_c_user_basic_info wcubi | |||
| select count(wcubi.id) from wx_c_user_basic_info wcubi | |||
| where 1=1 | |||
| <if test=" null != basicInfo.startTime "> | |||
| and wcubi.create_date >= #{basicInfo.startTime} | |||
| @@ -532,7 +532,7 @@ | |||
| </select> | |||
| <select id="findCountHistory" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="com.iformall.domain.vo.UserCountVo"> | |||
| select count(distinct wcubi.id) as incCount, | |||
| select count(wcubi.id) as incCount, | |||
| <if test="1 == reportType "> | |||
| date_format(wcubi.create_date, '%Y-%m-%d') as reportTime, | |||
| </if> | |||
| @@ -544,7 +544,7 @@ | |||
| </if> | |||
| <if test="1 == reportType or 2 == reportType or 3 == reportType"> | |||
| (select count(distinct wcubi.id) from wx_c_user_basic_info wcubi | |||
| (select count(wcubi.id) from wx_c_user_basic_info wcubi | |||
| where | |||
| <if test="1 == reportType "> | |||
| date_format(wcubi.create_date, '%Y-%m-%d') <= reportTime | |||
| @@ -577,7 +577,7 @@ | |||
| </select> | |||
| <select id="findCountHistory1" resultType="com.iformall.domain.vo.UserCountVo"> | |||
| select count(distinct wcubi.id) as incCount, | |||
| select count(wcubi.id) as incCount, | |||
| <if test="1 == basicInfo.reportType "> | |||
| date_format(wcubi.create_date, '%Y-%m-%d') as reportTime, | |||
| </if> | |||
| @@ -589,7 +589,7 @@ | |||
| </if> | |||
| <if test="1 == basicInfo.reportType or 2 == basicInfo.reportType or 3 == basicInfo.reportType"> | |||
| (select count(distinct wcubi.id) from wx_c_user_basic_info wcubi | |||
| (select count(wcubi.id) from wx_c_user_basic_info wcubi | |||
| where | |||
| <if test="1 == basicInfo.reportType "> | |||
| date_format(wcubi.create_date, '%Y-%m-%d') <= reportTime | |||
| @@ -648,7 +648,7 @@ | |||
| </resultMap> | |||
| <sql id="allVoColumns"> | |||
| distinct cu.`id`,cu.`phone`,cu.`birthdate`,cu.`education`,cu.`sex`,cu.`email`,cu.`address`,cu.`poins`,cu.`tag_id`, | |||
| cu.`id`,cu.`phone`,cu.`birthdate`,cu.`education`,cu.`sex`,cu.`email`,cu.`address`,cu.`poins`,cu.`tag_id`, | |||
| cu.`create_date`,cu.`update_date`,cu.`name`,cu.`level`,cu.`nick_name`, | |||
| cut.`tags`, | |||
| cu.`credit`,cu.`active_time`,cu.`act_record`,cu.`final_tenant_id` | |||
| @@ -869,14 +869,14 @@ | |||
| <select id="countVoList" parameterType="com.iformall.domain.po.WxCUserBasicInfo" resultType="java.lang.Integer"> | |||
| select | |||
| count(distinct cu.id) | |||
| count(cu.id) | |||
| from wx_c_user_basic_info cu | |||
| <include refid="dynamicVoWhereConditions"/> | |||
| </select> | |||
| <select id="countVoList1" resultType="java.lang.Integer"> | |||
| select | |||
| count(distinct cu.id) | |||
| count(cu.id) | |||
| from wx_c_user_basic_info cu | |||
| left join wx_c_user_tags cut on cut.`id` = cu.`tag_id` | |||
| <include refid="dynamicVoWhereConditions1"/> | |||
| @@ -884,7 +884,7 @@ | |||
| <sql id="msgColumns"> | |||
| distinct cu.`id`,cu.`phone`,cu.`email` | |||
| cu.`id`,cu.`phone`,cu.`email` | |||
| </sql> | |||
| <sql id="filterWhereConditions"> | |||
| @@ -1090,7 +1090,7 @@ | |||
| </select> --> | |||
| <select id="findGrowUserCount" resultType="java.lang.Long"> | |||
| SELECT count(distinct cubi.id) FROM wx_c_user_basic_info cubi | |||
| SELECT count(cubi.id) FROM wx_c_user_basic_info cubi | |||
| <!-- left join wx_c_user cu on cubi.id=cu.user_id | |||
| where cu.id is not null --> | |||
| where 1 =1 | |||
| @@ -1100,7 +1100,7 @@ | |||
| </select> | |||
| <select id="findGrowUserCount1" resultType="java.lang.Long"> | |||
| SELECT count(distinct cubi.id) FROM wx_c_user_basic_info cubi | |||
| SELECT count(cubi.id) FROM wx_c_user_basic_info cubi | |||
| <!-- left join wx_c_user cu on cubi.id=cu.user_id | |||
| where cu.id is not null --> | |||
| where final_tenant_id = #{finalTenantId} | |||