| @@ -6,6 +6,7 @@ import java.util.Map; | |||||
| import com.iformall.common.CommonMapper; | import com.iformall.common.CommonMapper; | ||||
| import com.iformall.domain.dto.WxCUserBasicInfoDto; | import com.iformall.domain.dto.WxCUserBasicInfoDto; | ||||
| import com.iformall.domain.po.WxCUser; | import com.iformall.domain.po.WxCUser; | ||||
| import com.iformall.domain.po.base.BaseCUserEntity; | |||||
| import com.iformall.domain.vo.UserCountVo; | import com.iformall.domain.vo.UserCountVo; | ||||
| public interface WxCUserMapper extends CommonMapper<WxCUser, Long> { | public interface WxCUserMapper extends CommonMapper<WxCUser, Long> { | ||||
| @@ -16,7 +17,7 @@ public interface WxCUserMapper extends CommonMapper<WxCUser, Long> { | |||||
| WxCUser findByUnionId(WxCUser record); | WxCUser findByUnionId(WxCUser record); | ||||
| WxCUser findByToken(String token); | |||||
| BaseCUserEntity findByToken(String token); | |||||
| long findCount(WxCUserBasicInfoDto dto); | long findCount(WxCUserBasicInfoDto dto); | ||||
| @@ -1032,8 +1032,8 @@ | |||||
| <select id="findGrowUserCount" resultType="java.lang.Long"> | <select id="findGrowUserCount" resultType="java.lang.Long"> | ||||
| SELECT count(distinct cubi.id) FROM wx_c_user_basic_info cubi | SELECT count(distinct 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 | |||||
| left join wx_c_user cu on cubi.id=cu.user_id | |||||
| where cu.id is not null | |||||
| <if test=" null != finalTenantId and '' != finalTenantId"> | <if test=" null != finalTenantId and '' != finalTenantId"> | ||||
| and cubi.`final_tenant_id` = #{finalTenantId} | and cubi.`final_tenant_id` = #{finalTenantId} | ||||
| </if> | </if> | ||||
| @@ -1041,8 +1041,8 @@ | |||||
| <select id="findGrowUserCount1" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="java.lang.Long"> | <select id="findGrowUserCount1" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="java.lang.Long"> | ||||
| SELECT count(distinct cubi.id) FROM wx_c_user_basic_info cubi | SELECT count(distinct 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 | |||||
| left join wx_c_user cu on cubi.id=cu.user_id | |||||
| where cu.id is not null | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and cu.`tenant_id` = #{tenantId} | and cu.`tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||
| @@ -241,7 +241,16 @@ | |||||
| </select> | </select> | ||||
| <select id="findByToken" resultMap="BaseResultMap"> | |||||
| <resultMap id="BaseCUserResultMap" type="com.iformall.domain.po.base.BaseCUserEntity"> | |||||
| <id column="id" jdbcType="BIGINT" property="id"/> | |||||
| <result column="user_id" jdbcType="BIGINT" property="userId"/> | |||||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | |||||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/> | |||||
| <result column="token" jdbcType="VARCHAR" property="token"/> | |||||
| <result column="expire_time" jdbcType="TIMESTAMP" property="expireTime"/> | |||||
| </resultMap> | |||||
| <select id="findByToken" resultMap="BaseCUserResultMap"> | |||||
| select * from wx_c_user | select * from wx_c_user | ||||
| where `token` = #{token} | where `token` = #{token} | ||||
| </select> | </select> | ||||