|
|
|
@@ -7,6 +7,7 @@ import com.iformall.domain.po.*; |
|
|
|
import com.iformall.domain.vo.UserStructureVo; |
|
|
|
import com.iformall.enums.EnumAgeInfo; |
|
|
|
import com.iformall.enums.EnumCUserBaseInfoSex; |
|
|
|
import com.iformall.enums.EnumTag; |
|
|
|
import com.iformall.service.*; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
|
@@ -43,6 +44,9 @@ public class WxUserStructureController extends BaseController { |
|
|
|
@Autowired |
|
|
|
private WxCUserCarService wxCUserCarService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WxCUserTagsService wxCUserTagsService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WxUserChannelService wxUserChannelService; |
|
|
|
|
|
|
|
@@ -171,6 +175,42 @@ public class WxUserStructureController extends BaseController { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("查询会员手机品牌结构") |
|
|
|
@GetMapping("/findUserPhoneBandStructure") |
|
|
|
public ResultData findUserPhoneBandStructure(Date startTime, Date endTime) { |
|
|
|
|
|
|
|
WxCUserBasicInfoDto dto = new WxCUserBasicInfoDto(); |
|
|
|
dto.setTenantId(getTenantId()); |
|
|
|
dto.setStartTime(startTime); |
|
|
|
dto.setEndTime(endTime); |
|
|
|
long total = wxCUserBasicInfoService.findCount(dto); |
|
|
|
|
|
|
|
List<WxTags> tagList = new ArrayList<>(); |
|
|
|
|
|
|
|
EnumTag[] tags = {EnumTag.ID_49, |
|
|
|
EnumTag.ID_50, |
|
|
|
EnumTag.ID_51, |
|
|
|
EnumTag.ID_52, |
|
|
|
EnumTag.ID_53, |
|
|
|
EnumTag.ID_54}; |
|
|
|
|
|
|
|
for (int i = 0; i < tags.length; i++) { |
|
|
|
WxTags tag = new WxTags(); |
|
|
|
tag.setName(tags[i].getMessage()); |
|
|
|
tag.setCount(wxCUserTagsService.countUser(getTenantId(), tags[i].getCode(), startTime, endTime)); |
|
|
|
tagList.add(tag); |
|
|
|
total -= tag.getCount(); |
|
|
|
} |
|
|
|
|
|
|
|
WxTags tag = new WxTags(); |
|
|
|
tag.setName("暂未获取"); |
|
|
|
tag.setCount(total); |
|
|
|
tagList.add(tag); |
|
|
|
|
|
|
|
return new ResultData(tagList); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/********************************会员数据**************************************/ |
|
|
|
@ApiOperation("查询会员数量") |
|
|
|
@GetMapping("/findUserDataCount") |
|
|
|
|