|
|
|
@@ -1,7 +1,9 @@ |
|
|
|
package com.simple.controller; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
import org.apache.log4j.Logger; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
@@ -48,6 +50,7 @@ public class WxTagsController extends BaseController |
|
|
|
PageInfo<WxTags> page = wxTagsService.listAsPage(tag, 1, 1000); |
|
|
|
for(WxTags wxT : page.getList()) { |
|
|
|
WxTagsVo wxVo = new WxTagsVo(); |
|
|
|
wxVo.setId(wxT.getId()); |
|
|
|
wxVo.setValue(wxT.getName()); |
|
|
|
list.add(wxVo); |
|
|
|
} |
|
|
|
@@ -75,6 +78,7 @@ public class WxTagsController extends BaseController |
|
|
|
for(WxTags wxT : page.getList()) { |
|
|
|
WxTagsVo wxVo = new WxTagsVo(); |
|
|
|
wxVo.setValue(wxT.getName()); |
|
|
|
wxVo.setId(wxT.getId()); |
|
|
|
list.add(wxVo); |
|
|
|
} |
|
|
|
v.setSubTags(list); |
|
|
|
@@ -82,6 +86,29 @@ public class WxTagsController extends BaseController |
|
|
|
} |
|
|
|
return new ResultData(Result.SUCCESS,"查询成功",type2List); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@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<>(); |
|
|
|
map.put("names", names.toString().substring(0,names.length()-1)); |
|
|
|
map.put("ids", ids); |
|
|
|
map.put("userCout", 0); |
|
|
|
return new ResultData(Result.SUCCESS,"查询成功"); |
|
|
|
} |
|
|
|
|
|
|
|
// @ApiOperation("分页列表接口") |
|
|
|
// @GetMapping("list") |
|
|
|
|