| @@ -40,7 +40,7 @@ | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| where wcubi.`final_tenant_id` = #{finalTenantId} | |||||
| where 1=1 | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') | and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') | ||||
| @@ -128,7 +128,6 @@ | |||||
| select <include refid="allColumns"/> | select <include refid="allColumns"/> | ||||
| from wx_c_user_basic_info wcubi | from wx_c_user_basic_info wcubi | ||||
| where wcubi.id =#{id} | where wcubi.id =#{id} | ||||
| and wcubi.final_tenant_id = #{finalTenantId} | |||||
| </select> | </select> | ||||
| <select id="findList" parameterType="com.iformall.domain.po.WxCUserBasicInfo" resultMap="BaseResultMap"> | <select id="findList" parameterType="com.iformall.domain.po.WxCUserBasicInfo" resultMap="BaseResultMap"> | ||||
| @@ -141,7 +140,7 @@ | |||||
| <select id="findListPhoneAndNameByIds" parameterType="com.iformall.domain.po.WxCUserBasicInfo" resultMap="BaseResultMap"> | <select id="findListPhoneAndNameByIds" parameterType="com.iformall.domain.po.WxCUserBasicInfo" resultMap="BaseResultMap"> | ||||
| select id, phone, nick_name, name, sex | select id, phone, nick_name, name, sex | ||||
| from wx_c_user_basic_info wcubi | from wx_c_user_basic_info wcubi | ||||
| where wcubi.`final_tenant_id` = #{finalTenantId} | |||||
| where 1=1 | |||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and wcubi.id in | and wcubi.id in | ||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | ||||
| @@ -183,7 +182,6 @@ | |||||
| select count(wcubi.id) | select count(wcubi.id) | ||||
| from wx_c_user_basic_info wcubi | from wx_c_user_basic_info wcubi | ||||
| where wcubi.sex =#{sex} | where wcubi.sex =#{sex} | ||||
| and wcubi.`final_tenant_id` = #{finalTenantId} | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') | and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') | ||||
| </if> | </if> | ||||
| @@ -198,7 +196,7 @@ | |||||
| <select id="findCountByAge" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="java.lang.Long"> | <select id="findCountByAge" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="java.lang.Long"> | ||||
| select count(wcubi.id) from wx_c_user_basic_info wcubi | select count(wcubi.id) from wx_c_user_basic_info wcubi | ||||
| where wcubi.`final_tenant_id` = #{finalTenantId} | |||||
| where 1=1 | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') | and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') | ||||
| </if> | </if> | ||||
| @@ -226,7 +224,7 @@ | |||||
| <select id="findCountByScore" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="java.lang.Long"> | <select id="findCountByScore" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="java.lang.Long"> | ||||
| select count(wcubi.id) | select count(wcubi.id) | ||||
| from wx_c_user_basic_info wcubi | from wx_c_user_basic_info wcubi | ||||
| where wcubi.`final_tenant_id` = #{finalTenantId} | |||||
| where 1=1 | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') | and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') | ||||
| </if> | </if> | ||||
| @@ -260,7 +258,6 @@ | |||||
| select <include refid="allColumnsOfScoreList"/> | select <include refid="allColumnsOfScoreList"/> | ||||
| from wx_c_user_basic_info wcubi | from wx_c_user_basic_info wcubi | ||||
| where wcubi.status=0 | where wcubi.status=0 | ||||
| and wcubi.`final_tenant_id` = #{finalTenantId} | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') | and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') | ||||
| </if> | </if> | ||||
| @@ -281,7 +278,6 @@ | |||||
| select <include refid="allColumnsOfScoreList"/> | select <include refid="allColumnsOfScoreList"/> | ||||
| from wx_c_user_basic_info wcubi | from wx_c_user_basic_info wcubi | ||||
| where wcubi.status = 0 | where wcubi.status = 0 | ||||
| and wcubi.`final_tenant_id` = #{finalTenantId} | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') | and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') | ||||
| </if> | </if> | ||||
| @@ -293,7 +289,7 @@ | |||||
| <select id="findCount" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="java.lang.Long"> | <select id="findCount" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="java.lang.Long"> | ||||
| select count(wcubi.id) | select count(wcubi.id) | ||||
| from wx_c_user_basic_info wcubi | from wx_c_user_basic_info wcubi | ||||
| where wcubi.`final_tenant_id` = #{finalTenantId} | |||||
| where 1=1 | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') | and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') | ||||
| </if> | </if> | ||||
| @@ -326,7 +322,7 @@ | |||||
| date_format(wcubi.create_date, '%Y') as reportTime | date_format(wcubi.create_date, '%Y') as reportTime | ||||
| </if> | </if> | ||||
| from wx_c_user_basic_info wcubi | from wx_c_user_basic_info wcubi | ||||
| where wcubi.`final_tenant_id` = #{finalTenantId} | |||||
| where 1=1 | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') | and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') | ||||
| </if> | </if> | ||||
| @@ -368,7 +364,7 @@ | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="dynamicVoWhereConditions"> | <sql id="dynamicVoWhereConditions"> | ||||
| where wcubi.`final_tenant_id` = #{finalTenantId} | |||||
| where 1=1 | |||||
| <if test=" null != id "> | <if test=" null != id "> | ||||
| and wcubi.`id` = #{id} | and wcubi.`id` = #{id} | ||||
| @@ -464,7 +460,7 @@ | |||||
| <sql id="filterWhereConditions"> | <sql id="filterWhereConditions"> | ||||
| where wcubi.`final_tenant_id` = #{finalTenantId} | |||||
| where 1=1 | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') | and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') | ||||
| </if> | </if> | ||||
| @@ -550,7 +546,7 @@ | |||||
| <select id="findGrowUserCount" resultType="java.lang.Long"> | <select id="findGrowUserCount" resultType="java.lang.Long"> | ||||
| SELECT count(wcubi.id) | SELECT count(wcubi.id) | ||||
| FROM wx_c_user_basic_info wcubi | FROM wx_c_user_basic_info wcubi | ||||
| where wcubi.`final_tenant_id` = #{finalTenantId} | |||||
| where 1=1 | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') | and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') | ||||
| </if> | </if> | ||||
| @@ -559,7 +555,7 @@ | |||||
| <select id="getTotalCreditAmount" resultType="java.lang.Long"> | <select id="getTotalCreditAmount" resultType="java.lang.Long"> | ||||
| SELECT IFNULL(SUM(wcubi.credit),0) | SELECT IFNULL(SUM(wcubi.credit),0) | ||||
| FROM wx_c_user_basic_info wcubi | FROM wx_c_user_basic_info wcubi | ||||
| where wcubi.`final_tenant_id` = #{finalTenantId} | |||||
| where 1=1 | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') | and wcubi.`tenant_id` like concat('%,', #{tenantId},',%') | ||||
| </if> | </if> | ||||
| @@ -567,7 +563,7 @@ | |||||
| <update id="incActRecordById" parameterType="java.util.HashMap"> | <update id="incActRecordById" parameterType="java.util.HashMap"> | ||||
| UPDATE wx_c_user_basic_info set act_record = act_record +1 where id = #{id} and final_tenant_id = #{finalTenantId} | |||||
| UPDATE wx_c_user_basic_info set act_record = act_record +1 where id = #{id} | |||||
| </update> | </update> | ||||
| <!--<select id="selectNotCUserList" resultMap="BaseResultMap"> | <!--<select id="selectNotCUserList" resultMap="BaseResultMap"> | ||||