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