|
|
|
@@ -96,27 +96,27 @@ public class WxTagsController extends BaseController |
|
|
|
@ApiOperation("查询用户人群") |
|
|
|
@GetMapping("findUserByTag") |
|
|
|
public Result findUserByTag(Long[] tagIds) { |
|
|
|
WxTags wxTags = new WxTags(); |
|
|
|
List<Long> ids = new ArrayList<>(); |
|
|
|
for(Long id :tagIds) { |
|
|
|
ids.add(id); |
|
|
|
} |
|
|
|
wxTags.setIds(ids); |
|
|
|
PageInfo<WxTags> page = wxTagsService.listAsPage(wxTags, 1, 5000); |
|
|
|
List<WxTags> list = page.getList(); |
|
|
|
StringBuffer names= new StringBuffer(); |
|
|
|
for(WxTags t:list) { |
|
|
|
names.append(t.getName()+"/"); |
|
|
|
} |
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
String endName=""; |
|
|
|
if(names.length()>0) { |
|
|
|
endName = names.toString().substring(0,names.length()-1); |
|
|
|
} |
|
|
|
map.put("names",endName ); |
|
|
|
map.put("ids", ids); |
|
|
|
map.put("userCout", wxCUserTagsService.findCountByTag(Arrays.asList(tagIds))); |
|
|
|
return new ResultData(Result.SUCCESS,"查询成功",map); |
|
|
|
// WxTags wxTags = new WxTags(); |
|
|
|
// List<Long> ids = new ArrayList<>(); |
|
|
|
// for(Long id :tagIds) { |
|
|
|
// ids.add(id); |
|
|
|
// } |
|
|
|
// wxTags.setIds(ids); |
|
|
|
// PageInfo<WxTags> page = wxTagsService.listAsPage(wxTags, 1, 5000); |
|
|
|
// List<WxTags> list = page.getList(); |
|
|
|
// StringBuffer names= new StringBuffer(); |
|
|
|
// for(WxTags t:list) { |
|
|
|
// names.append(t.getName()+"/"); |
|
|
|
// } |
|
|
|
// Map<String,Object> map = new HashMap<>(); |
|
|
|
// String endName=""; |
|
|
|
// if(names.length()>0) { |
|
|
|
// endName = names.toString().substring(0,names.length()-1); |
|
|
|
// } |
|
|
|
// map.put("names",endName ); |
|
|
|
// map.put("tagIds", ids); |
|
|
|
long count = wxCUserTagsService.findCountByTag(Arrays.asList(tagIds)); |
|
|
|
return new ResultData(Result.SUCCESS,"查询成功",count); |
|
|
|
} |
|
|
|
|
|
|
|
// @ApiOperation("分页列表接口") |
|
|
|
|