stat:增加用户统计的设计
parent
c5824eedf7
commit
a37427c355
@ -0,0 +1,58 @@
|
||||
package cn.iocoder.yudao.module.statistics.controller.admin.member;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.statistics.controller.admin.member.vo.MemberAreaStatisticsRespVO;
|
||||
import cn.iocoder.yudao.module.statistics.controller.admin.member.vo.MemberSexStatisticsRespVO;
|
||||
import cn.iocoder.yudao.module.statistics.controller.admin.member.vo.MemberSummaryRespVO;
|
||||
import cn.iocoder.yudao.module.statistics.controller.admin.member.vo.MemberTerminalStatisticsRespVO;
|
||||
import cn.iocoder.yudao.module.statistics.controller.admin.trade.vo.TradeStatisticsComparisonRespVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Tag(name = "管理后台 - 会员统计")
|
||||
@RestController
|
||||
@RequestMapping("/statistics/member")
|
||||
@Validated
|
||||
@Slf4j
|
||||
public class MemberStatisticsController {
|
||||
|
||||
// TODO @疯狂:一个类似 getTradeTrendSummaryComparison 的接口
|
||||
// TODO @疯狂:一个类似 getTradeStatisticsList 的接口
|
||||
|
||||
@GetMapping("/summary")
|
||||
@Operation(summary = "获得会员统计")
|
||||
public CommonResult<TradeStatisticsComparisonRespVO<MemberSummaryRespVO>> getMemberSummary() {
|
||||
// TODO 疯狂:目前先直接计算;
|
||||
return null;
|
||||
}
|
||||
|
||||
@GetMapping("/get-area-statistics-list")
|
||||
@Operation(summary = "按照省份,获得会员统计列表")
|
||||
public CommonResult<List<MemberAreaStatisticsRespVO>> getMemberAreaStatisticsList() {
|
||||
// TODO 疯狂:目前先直接计算,进行统计;后续再考虑优化
|
||||
return null;
|
||||
}
|
||||
|
||||
@GetMapping("/get-sex-statistics-list")
|
||||
@Operation(summary = "按照性别,获得会员统计列表")
|
||||
public CommonResult<List<MemberSexStatisticsRespVO>> getMemberSexStatisticsList() {
|
||||
// TODO 疯狂:目前先直接计算,进行统计;后续再考虑优化
|
||||
return null;
|
||||
}
|
||||
|
||||
@GetMapping("/get-terminal-statistics-list")
|
||||
@Operation(summary = "按照终端,获得会员统计列表")
|
||||
public CommonResult<List<MemberTerminalStatisticsRespVO>> getMemberTerminalStatisticsList() {
|
||||
// TODO 疯狂:目前先直接计算,进行统计;后续再考虑优化
|
||||
// TODO 疯狂:这个可以晚点写,因为 user = = 上还没记录 terminal
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package cn.iocoder.yudao.module.statistics.controller.admin.member.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 会员地区统计 Response VO")
|
||||
@Data
|
||||
public class MemberAreaStatisticsRespVO {
|
||||
|
||||
@Schema(description = "省份编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer areaId;
|
||||
@Schema(description = "省份名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "浙江省")
|
||||
private String areaName;
|
||||
|
||||
@Schema(description = "会员数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer userCount;
|
||||
|
||||
@Schema(description = "订单创建数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer orderCreateCount;
|
||||
@Schema(description = "订单支付数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "512")
|
||||
private Integer orderPayCount;
|
||||
@Schema(description = "订单支付金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "622")
|
||||
private Integer orderPayPrice;
|
||||
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package cn.iocoder.yudao.module.statistics.controller.admin.member.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 会员性别统计 Response VO")
|
||||
@Data
|
||||
public class MemberSexStatisticsRespVO {
|
||||
|
||||
@Schema(description = "性别", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer sex;
|
||||
|
||||
@Schema(description = "会员数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer userCount;
|
||||
|
||||
@Schema(description = "订单创建数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer orderCreateCount;
|
||||
@Schema(description = "订单支付数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "512")
|
||||
private Integer orderPayCount;
|
||||
@Schema(description = "订单支付金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "622")
|
||||
private Integer orderPayPrice;
|
||||
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package cn.iocoder.yudao.module.statistics.controller.admin.member.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 会员统计 Response VO")
|
||||
@Data
|
||||
public class MemberSummaryRespVO {
|
||||
|
||||
@Schema(description = "会员数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer userCount;
|
||||
|
||||
@Schema(description = "充值会员数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "221")
|
||||
private Integer rechargeUserCount;
|
||||
|
||||
@Schema(description = "充值金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer rechargePrice;
|
||||
@Schema(description = "支出金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer expensePrice;
|
||||
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package cn.iocoder.yudao.module.statistics.controller.admin.member.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 终端性别统计 Response VO")
|
||||
@Data
|
||||
public class MemberTerminalStatisticsRespVO {
|
||||
|
||||
@Schema(description = "终端", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer terminal;
|
||||
|
||||
@Schema(description = "会员数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer userCount;
|
||||
|
||||
@Schema(description = "订单创建数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer orderCreateCount;
|
||||
@Schema(description = "订单支付数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "512")
|
||||
private Integer orderPayCount;
|
||||
@Schema(description = "订单支付金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "622")
|
||||
private Integer orderPayPrice;
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue