Sfoglia il codice sorgente

[用户人群][新增]新增用户人群选择接口

release_toaliyun_real
jinguo24@163.com 7 anni fa
parent
commit
b7f8d35dba
2 ha cambiato i file con 27 aggiunte e 3 eliminazioni
  1. +23
    -2
      mallinkAdmin/src/main/java/com/simple/controller/WxTagsController.java
  2. +4
    -1
      mallinkService/src/main/resources/mapper/WxTagsMapper.xml

+ 23
- 2
mallinkAdmin/src/main/java/com/simple/controller/WxTagsController.java Vedi File

@@ -57,10 +57,31 @@ public class WxTagsController extends BaseController
}
type1List.add(vo);
}
return new ResultData(Result.SUCCESS,"ok",type1List);
return new ResultData(Result.SUCCESS,"查询成功",type1List);
}
@GetMapping("getPeopleTagList")
@ApiOperation("用户人群tag接口")
public ResultData getPeopleTagList() {
List<WxTagsVo> type2List =new ArrayList<>();
List<WxTags> type2s = wxTagsService.findType2Value(null);
for(WxTags wt:type2s) {
WxTagsVo v = new WxTagsVo();
v.setValue(wt.getType2());
List<WxTagsVo> list = new ArrayList<>();
WxTags tag = new WxTags();
tag.setType2(wt.getType2());
PageInfo<WxTags> page = wxTagsService.listAsPage(tag, 1, 1000);
for(WxTags wxT : page.getList()) {
WxTagsVo wxVo = new WxTagsVo();
wxVo.setValue(wxT.getName());
list.add(wxVo);
}
v.setSubTags(list);
type2List.add(v);
}
return new ResultData(Result.SUCCESS,"查询成功",type2List);
}
// @ApiOperation("分页列表接口")
// @GetMapping("list")


+ 4
- 1
mallinkService/src/main/resources/mapper/WxTagsMapper.xml Vedi File

@@ -71,7 +71,10 @@
</select>
<select id="findType2Value" parameterType="String" resultMap="BaseResultMap">
select DISTINCT type2 from wx_tags where type1=#{type1}
select DISTINCT type2 from wx_tags where 1=1
<if test="null != type1" >
and type1=#{type1}
</if>
</select>
</mapper>

Caricamento…
Annulla
Salva