|
|
|
@@ -18,10 +18,12 @@ import com.github.pagehelper.PageInfo; |
|
|
|
import com.simple.common.ResultData;
|
|
|
|
import com.simple.domain.dto.WxCuerBasicInfoDto;
|
|
|
|
import com.simple.domain.po.WxCUser;
|
|
|
|
import com.simple.domain.po.WxUserChannel;
|
|
|
|
import com.simple.domain.vo.UserStructureVo;
|
|
|
|
import com.simple.enums.EnumAgeInfo;
|
|
|
|
import com.simple.service.WxCUserBasicInfoService;
|
|
|
|
import com.simple.service.WxCUserService;
|
|
|
|
import com.simple.service.WxUserChannelService;
|
|
|
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
|
@@ -38,6 +40,8 @@ public class WxUserStructureController { |
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private WxCUserService wxCUserService;
|
|
|
|
@Autowired
|
|
|
|
private WxUserChannelService wxUserChannelService;
|
|
|
|
|
|
|
|
@ApiOperation("查询会员性别结构")
|
|
|
|
@GetMapping("/findUserSexStructure")
|
|
|
|
@@ -163,10 +167,21 @@ public class WxUserStructureController { |
|
|
|
@ApiImplicitParams({
|
|
|
|
@ApiImplicitParam(name="pageNum",value="页数",dataType="int", paramType = "query",required=true),
|
|
|
|
@ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)})
|
|
|
|
private ResultData findUserByChannel(String channelName,Integer pageNum, Integer pageSize) {
|
|
|
|
public ResultData findUserByChannel(String channelName,Integer pageNum, Integer pageSize) {
|
|
|
|
PageInfo<WxCUser> list = wxCUserService.listByChannel(null, pageNum, pageSize);
|
|
|
|
return new ResultData(list);
|
|
|
|
}
|
|
|
|
|
|
|
|
@ApiOperation("获取用户所有渠道")
|
|
|
|
@GetMapping("/findAllUserChannel")
|
|
|
|
public ResultData findAllUserChannel() {
|
|
|
|
List<WxUserChannel> channels=wxUserChannelService.findDistinctChannel();
|
|
|
|
List<String> vos = new ArrayList<>();
|
|
|
|
for(WxUserChannel w:channels) {
|
|
|
|
vos.add(w.getChannelName());
|
|
|
|
}
|
|
|
|
return new ResultData(vos);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private long getCountByAge(EnumAgeInfo a,Calendar c, WxCuerBasicInfoDto dto ) {
|
|
|
|
|