|
|
|
@@ -1,16 +1,24 @@ |
|
|
|
package com.simple.service.impl; |
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.simple.common.IdWorker; |
|
|
|
import com.simple.domain.po.WxCUser; |
|
|
|
import com.simple.domain.po.WxCUserTags; |
|
|
|
import com.simple.domain.po.WxTags; |
|
|
|
import com.simple.domain.vo.WxChooseTagVo; |
|
|
|
import com.simple.mapper.WxCUserMapper; |
|
|
|
import com.simple.mapper.WxCUserTagsMapper; |
|
|
|
import com.simple.mapper.WxTagsMapper; |
|
|
|
import com.simple.service.WxCUserTagsService; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import com.simple.common.IdWorker; |
|
|
|
|
|
|
|
@Service |
|
|
|
public class WxCUserTagsServiceImpl implements WxCUserTagsService { |
|
|
|
@@ -20,6 +28,9 @@ public class WxCUserTagsServiceImpl implements WxCUserTagsService { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
WxCUserMapper wxCUserMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
WxTagsMapper wxTagsMapper; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@@ -61,6 +72,25 @@ public class WxCUserTagsServiceImpl implements WxCUserTagsService { |
|
|
|
wxCUser.setIds(userIds); |
|
|
|
return wxCUserMapper.findList(wxCUser); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public WxChooseTagVo findChooseTag(List<Long> tagIds) { |
|
|
|
WxTags wxTags =new WxTags(); |
|
|
|
wxTags.setIds(tagIds); |
|
|
|
List<WxTags> list = wxTagsMapper.findList(wxTags); |
|
|
|
StringBuffer names= new StringBuffer(); |
|
|
|
for(WxTags t:list) { |
|
|
|
names.append(t.getName()+"/"); |
|
|
|
} |
|
|
|
String endName=""; |
|
|
|
if(names.length()>0) { |
|
|
|
endName = names.toString().substring(0,names.length()-1); |
|
|
|
} |
|
|
|
WxChooseTagVo vo =new WxChooseTagVo(); |
|
|
|
vo.setNames(endName); |
|
|
|
vo.setUserCount(findCountByTag(tagIds)); |
|
|
|
return vo; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|