xhxu 5 лет назад
Родитель
Сommit
3f41584e31
3 измененных файлов: 16 добавлений и 6 удалений
  1. +2
    -1
      mallinkService/src/main/java/com/iformall/mapper/WxCUserMapper.java
  2. +4
    -4
      mallinkService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml
  3. +10
    -1
      mallinkService/src/main/resources/mapper/WxCUserMapper.xml

+ 2
- 1
mallinkService/src/main/java/com/iformall/mapper/WxCUserMapper.java Просмотреть файл

@@ -6,6 +6,7 @@ import java.util.Map;
import com.iformall.common.CommonMapper;
import com.iformall.domain.dto.WxCUserBasicInfoDto;
import com.iformall.domain.po.WxCUser;
import com.iformall.domain.po.base.BaseCUserEntity;
import com.iformall.domain.vo.UserCountVo;

public interface WxCUserMapper extends CommonMapper<WxCUser, Long> {
@@ -16,7 +17,7 @@ public interface WxCUserMapper extends CommonMapper<WxCUser, Long> {

WxCUser findByUnionId(WxCUser record);

WxCUser findByToken(String token);
BaseCUserEntity findByToken(String token);
long findCount(WxCUserBasicInfoDto dto);



+ 4
- 4
mallinkService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml Просмотреть файл

@@ -1032,8 +1032,8 @@

<select id="findGrowUserCount" resultType="java.lang.Long">
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">
and cubi.`final_tenant_id` = #{finalTenantId}
</if>
@@ -1041,8 +1041,8 @@

<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
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">
and cu.`tenant_id` = #{tenantId}
</if>


+ 10
- 1
mallinkService/src/main/resources/mapper/WxCUserMapper.xml Просмотреть файл

@@ -241,7 +241,16 @@
</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
where `token` = #{token}
</select>


Загрузка…
Отмена
Сохранить