| @@ -27,10 +27,10 @@ public class BaseTenantEntity extends BaseEntity { | |||||
| protected String finalTenantId; | protected String finalTenantId; | ||||
| public String getFinalTenantId() { | public String getFinalTenantId() { | ||||
| finalTenantId = tenantId; | |||||
| if (StringUtils.isNotBlank(parentTenantId)) { | if (StringUtils.isNotBlank(parentTenantId)) { | ||||
| finalTenantId = parentTenantId; | finalTenantId = parentTenantId; | ||||
| } | } | ||||
| finalTenantId = tenantId; | |||||
| return finalTenantId; | return finalTenantId; | ||||
| } | } | ||||
| @@ -44,10 +44,10 @@ public class TenantEntity extends BaseEntity { | |||||
| } | } | ||||
| public String getFinalTenantId() { | public String getFinalTenantId() { | ||||
| finalTenantId = tenantId; | |||||
| if (StringUtils.isNotBlank(parentTenantId)) { | if (StringUtils.isNotBlank(parentTenantId)) { | ||||
| finalTenantId = parentTenantId; | finalTenantId = parentTenantId; | ||||
| } | } | ||||
| finalTenantId = tenantId; | |||||
| return finalTenantId; | return finalTenantId; | ||||
| } | } | ||||
| @@ -319,16 +319,16 @@ | |||||
| </select> | </select> | ||||
| <select id="findCountHistory" resultType="com.iformall.domain.vo.UserCountVo"> | |||||
| <select id="findCountHistory" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="com.iformall.domain.vo.UserCountVo"> | |||||
| select count(id) as incCount, | select count(id) as incCount, | ||||
| <if test="1 == reportType "> | <if test="1 == reportType "> | ||||
| date_format(create_date, '%Y-%m-%d') as reportTime, | |||||
| date_format(create_date, '%Y-%m-%d') as reportTime | |||||
| </if> | </if> | ||||
| <if test="2 == reportType "> | <if test="2 == reportType "> | ||||
| date_format(create_date, '%Y-%m') as reportTime, | |||||
| date_format(create_date, '%Y-%m') as reportTime | |||||
| </if> | </if> | ||||
| <if test="3 == reportType "> | <if test="3 == reportType "> | ||||
| date_format(create_date, '%Y') as reportTime, | |||||
| date_format(create_date, '%Y') as reportTime | |||||
| </if> | </if> | ||||
| from tt_c_user | from tt_c_user | ||||
| @@ -307,13 +307,13 @@ | |||||
| <select id="findCountHistory" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="com.iformall.domain.vo.UserCountVo"> | <select id="findCountHistory" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="com.iformall.domain.vo.UserCountVo"> | ||||
| select count(wcubi.id) as incCount, | select count(wcubi.id) as incCount, | ||||
| <if test="1 == reportType "> | <if test="1 == reportType "> | ||||
| date_format(wcubi.create_date, '%Y-%m-%d') as reportTime, | |||||
| date_format(wcubi.create_date, '%Y-%m-%d') as reportTime | |||||
| </if> | </if> | ||||
| <if test="2 == reportType "> | <if test="2 == reportType "> | ||||
| date_format(wcubi.create_date, '%Y-%m') as reportTime, | |||||
| date_format(wcubi.create_date, '%Y-%m') as reportTime | |||||
| </if> | </if> | ||||
| <if test="3 == reportType "> | <if test="3 == reportType "> | ||||
| 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 wcubi.`final_tenant_id` = #{finalTenantId} | ||||
| @@ -321,16 +321,16 @@ | |||||
| </select> | </select> | ||||
| <select id="findCountHistory" resultType="com.iformall.domain.vo.UserCountVo"> | |||||
| <select id="findCountHistory" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="com.iformall.domain.vo.UserCountVo"> | |||||
| select count(id) as incCount, | select count(id) as incCount, | ||||
| <if test="1 == reportType "> | <if test="1 == reportType "> | ||||
| date_format(create_date, '%Y-%m-%d') as reportTime, | |||||
| date_format(create_date, '%Y-%m-%d') as reportTime | |||||
| </if> | </if> | ||||
| <if test="2 == reportType "> | <if test="2 == reportType "> | ||||
| date_format(create_date, '%Y-%m') as reportTime, | |||||
| date_format(create_date, '%Y-%m') as reportTime | |||||
| </if> | </if> | ||||
| <if test="3 == reportType "> | <if test="3 == reportType "> | ||||
| date_format(create_date, '%Y') as reportTime, | |||||
| date_format(create_date, '%Y') as reportTime | |||||
| </if> | </if> | ||||
| from wx_c_user | from wx_c_user | ||||
| where `tenant_id` = #{tenantId} | where `tenant_id` = #{tenantId} | ||||