| @@ -12,9 +12,9 @@ public interface WxCUserTagsMapper extends CommonMapper<WxCUserTags, String> { | |||||
| WxCUserTags selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | WxCUserTags selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | ||||
| List<WxCUserTags> findList(WxCUserTags wxCUserTags); | List<WxCUserTags> findList(WxCUserTags wxCUserTags); | ||||
| List<Long> findIdList(@Param("tenantId")String tenantId, @Param("tagIdList")List<Long> tagIdList); | |||||
| List<Long> findIdList(@Param("tenantId")String tenantId, @Param("tagCodes")String tagCodes); | |||||
| List<Long> findUserIdList(@Param("tagIds")String tagIds,@Param("tenantId")String tenantId); | |||||
| List<Long> findUserIdList(@Param("tagCodes")String tagCodes,@Param("tenantId")String tenantId); | |||||
| void updateNewId(CUserTagNewIdVo record); | void updateNewId(CUserTagNewIdVo record); | ||||
| @@ -1,5 +1,6 @@ | |||||
| package com.iformall.service.impl; | package com.iformall.service.impl; | ||||
| import com.alibaba.fastjson.JSON; | |||||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||||
| import com.github.pagehelper.PageHelper; | import com.github.pagehelper.PageHelper; | ||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| @@ -439,7 +440,8 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService,IExc | |||||
| } | } | ||||
| }); | }); | ||||
| if(!tagIdList.isEmpty()){ | if(!tagIdList.isEmpty()){ | ||||
| List<Long> tagIds = wxCUserTagsMapper.findIdList(tenantEntity.getTenantId(),tagIdList); | |||||
| String tagCodes = JSON.toJSONString(tagIdList); | |||||
| List<Long> tagIds = wxCUserTagsMapper.findIdList(tenantEntity.getTenantId(),tagCodes); | |||||
| if(!tagIds.isEmpty()){ | if(!tagIds.isEmpty()){ | ||||
| dto.setTagIds(tagIds); | dto.setTagIds(tagIds); | ||||
| } | } | ||||
| @@ -85,6 +85,7 @@ public class WxCUserTagsServiceImpl implements WxCUserTagsService { | |||||
| }else{ | }else{ | ||||
| WxCUserBasicInfoDto dto = new WxCUserBasicInfoDto(); | WxCUserBasicInfoDto dto = new WxCUserBasicInfoDto(); | ||||
| dto.updateTenantInfo(tenantEntity); | dto.updateTenantInfo(tenantEntity); | ||||
| dto.setIds(userIds); | |||||
| dto.setStartTime(startTime); | dto.setStartTime(startTime); | ||||
| dto.setEndTime(endTime); | dto.setEndTime(endTime); | ||||
| return wxCUserBasicInfoMapper.findCount(dto); | return wxCUserBasicInfoMapper.findCount(dto); | ||||
| @@ -74,10 +74,7 @@ | |||||
| select id | select id | ||||
| from wx_c_user_tags | from wx_c_user_tags | ||||
| where tenant_id = #{tenantId} | where tenant_id = #{tenantId} | ||||
| and | |||||
| <foreach collection="tagIdList" index="index" item="tagId" open="(" separator=" or " close=")"> | |||||
| JSON_CONTAINS(tags,#{tagId}) | |||||
| </foreach> | |||||
| and JSON_CONTAINS(tags,#{tagCodes}) | |||||
| </select> | </select> | ||||
| <update id="updateNewId" parameterType="com.iformall.domain.vo.CUserTagNewIdVo"> | <update id="updateNewId" parameterType="com.iformall.domain.vo.CUserTagNewIdVo"> | ||||
| @@ -92,7 +89,7 @@ | |||||
| from wx_c_user_tags | from wx_c_user_tags | ||||
| where tenant_id = #{tenantId} | where tenant_id = #{tenantId} | ||||
| <if test=" null != tagIds"> | <if test=" null != tagIds"> | ||||
| and JSON_CONTAINS(tags,#{tagIds}) | |||||
| and JSON_CONTAINS(tags,#{tagCodes}) | |||||
| </if> | </if> | ||||
| </select> | </select> | ||||