| @@ -62,8 +62,8 @@ public interface WxCUserBasicInfoMapper extends CommonMapper<WxCUserBasicInfo, S | |||||
| long findGrowUserCount(@Param("finalTenantId")String finalTenantId); | long findGrowUserCount(@Param("finalTenantId")String finalTenantId); | ||||
| long findGrowUserCount1(@Param("tenantId")String tenantId,@Param("parentTenantId")String parentTenantId); | long findGrowUserCount1(@Param("tenantId")String tenantId,@Param("parentTenantId")String parentTenantId); | ||||
| long findImportUserCount(@Param("finalTenantId")String finalTenantId); | |||||
| long findImportUserCount1(@Param("tenantId")String tenantId,@Param("parentTenantId")String parentTenantId); | |||||
| //long findImportUserCount(@Param("finalTenantId")String finalTenantId); | |||||
| //long findImportUserCount1(@Param("tenantId")String tenantId,@Param("parentTenantId")String parentTenantId); | |||||
| void incActRecordById(Long id); | void incActRecordById(Long id); | ||||
| @@ -1151,17 +1151,18 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService,IExc | |||||
| @Override | @Override | ||||
| public long findImportUserCount(TenantEntity tenantEntity) { | public long findImportUserCount(TenantEntity tenantEntity) { | ||||
| if(StringUtils.isNotBlank(tenantEntity.getParentTenantId())){ | |||||
| //关联微信表查询 | |||||
| return wxCUserBasicInfoMapper.findImportUserCount1(tenantEntity.getTenantId(),tenantEntity.getParentTenantId()); | |||||
| }else{ | |||||
| //直接查询本表 | |||||
| String finalTenantId = tenantEntity.getTenantId(); | |||||
| if(StringUtils.isNotBlank(tenantEntity.getParentTenantId())){ | |||||
| finalTenantId = tenantEntity.getParentTenantId(); | |||||
| } | |||||
| return wxCUserBasicInfoMapper.findImportUserCount(finalTenantId); | |||||
| } | |||||
| // if(StringUtils.isNotBlank(tenantEntity.getParentTenantId())){ | |||||
| // //关联微信表查询 | |||||
| // return wxCUserBasicInfoMapper.findImportUserCount1(tenantEntity.getTenantId(),tenantEntity.getParentTenantId()); | |||||
| // }else{ | |||||
| // //直接查询本表 | |||||
| // String finalTenantId = tenantEntity.getTenantId(); | |||||
| // if(StringUtils.isNotBlank(tenantEntity.getParentTenantId())){ | |||||
| // finalTenantId = tenantEntity.getParentTenantId(); | |||||
| // } | |||||
| // return wxCUserBasicInfoMapper.findImportUserCount(finalTenantId); | |||||
| // } | |||||
| return 0; | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -1016,7 +1016,7 @@ | |||||
| </select> | </select> | ||||
| <select id="findImportUserCount" resultType="java.lang.Long"> | |||||
| <!-- <select id="findImportUserCount" 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 | left join wx_c_user cu on cubi.id=cu.user_id | ||||
| where cu.id is null | where cu.id is null | ||||
| @@ -1035,7 +1035,7 @@ | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | <if test=" null != parentTenantId and '' != parentTenantId"> | ||||
| and cu.`parent_tenant_id` = #{parentTenantId} | and cu.`parent_tenant_id` = #{parentTenantId} | ||||
| </if> | </if> | ||||
| </select> | |||||
| </select> --> | |||||
| <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 | ||||