商城:增加商城首页
parent
1ac2f2b5c2
commit
f5dac38ca5
@ -0,0 +1,2 @@
|
||||
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name)
|
||||
VALUES ('商城首页', '', 2, 1, 2362, 'home', 'ep:home-filled', 'mall/home/index', 'MallHome');
|
||||
@ -0,0 +1,49 @@
|
||||
package cn.iocoder.yudao.module.statistics.enums;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 时间范围类型的枚举
|
||||
*
|
||||
* @author owen
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum TimeRangeTypeEnum implements IntArrayValuable {
|
||||
|
||||
/**
|
||||
* 天
|
||||
*/
|
||||
DAY(1),
|
||||
/**
|
||||
* 周
|
||||
*/
|
||||
WEEK(7),
|
||||
/**
|
||||
* 月
|
||||
*/
|
||||
MONTH(30),
|
||||
/**
|
||||
* 年
|
||||
*/
|
||||
YEAR(365),
|
||||
;
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TimeRangeTypeEnum::getType).toArray();
|
||||
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private final Integer type;
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
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 MemberCountRespVO {
|
||||
|
||||
@Schema(description = "用户访问量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer visitUserCount;
|
||||
|
||||
@Schema(description = "新增用户数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer createUserCount;
|
||||
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package cn.iocoder.yudao.module.statistics.controller.admin.member.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.TIME_ZONE_DEFAULT;
|
||||
|
||||
@Schema(description = "管理后台 - 会员注册数量 Response VO")
|
||||
@Data
|
||||
public class MemberRegisterCountRespVO {
|
||||
|
||||
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY, timezone = TIME_ZONE_DEFAULT)
|
||||
@Schema(description = "日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private LocalDate date;
|
||||
|
||||
@Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer count;
|
||||
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package cn.iocoder.yudao.module.statistics.controller.admin.pay;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.statistics.service.pay.PayWalletStatisticsService;
|
||||
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 javax.annotation.Resource;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 支付统计")
|
||||
@RestController
|
||||
@RequestMapping("/statistics/pay")
|
||||
@Validated
|
||||
@Slf4j
|
||||
public class PayStatisticsController {
|
||||
|
||||
@Resource
|
||||
private PayWalletStatisticsService payWalletStatisticsService;
|
||||
|
||||
@GetMapping("/wallet-recharge-price")
|
||||
@Operation(summary = "获取充值金额")
|
||||
public CommonResult<Integer> getWalletRechargePrice() {
|
||||
return success(payWalletStatisticsService.getRechargePriceSummary());
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package cn.iocoder.yudao.module.statistics.controller.admin.trade.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 交易订单数量 Response VO")
|
||||
@Data
|
||||
public class TradeOrderCountRespVO {
|
||||
|
||||
@Schema(description = "待发货", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long undelivered;
|
||||
|
||||
@Schema(description = "待核销", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long pickUp;
|
||||
|
||||
@Schema(description = "退款中", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long afterSaleApply;
|
||||
|
||||
@Schema(description = "提现待审核", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long auditingWithdraw;
|
||||
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package cn.iocoder.yudao.module.statistics.controller.admin.trade.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 交易订单统计 Response VO")
|
||||
@Data
|
||||
public class TradeOrderSummaryRespVO {
|
||||
|
||||
@Schema(description = "支付订单商品数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer orderPayCount;
|
||||
|
||||
@Schema(description = "总支付金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer orderPayPrice;
|
||||
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package cn.iocoder.yudao.module.statistics.controller.admin.trade.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.validation.InEnum;
|
||||
import cn.iocoder.yudao.module.statistics.enums.TimeRangeTypeEnum;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 交易订单量趋势统计 Request VO")
|
||||
@Data
|
||||
public class TradeOrderTrendReqVO {
|
||||
|
||||
@Schema(description = "日期范围类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "日期范围类型不能为空")
|
||||
@InEnum(value = TimeRangeTypeEnum.class, message = "日期范围类型,必须是 {value}")
|
||||
private Integer type;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@Schema(description = "起始时间")
|
||||
private LocalDateTime beginTime;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@Schema(description = "截止时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package cn.iocoder.yudao.module.statistics.controller.admin.trade.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 订单量趋势统计 Response VO")
|
||||
@Data
|
||||
public class TradeOrderTrendRespVO {
|
||||
|
||||
@Schema(description = "日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private String date;
|
||||
|
||||
@Schema(description = "订单数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer orderPayCount;
|
||||
|
||||
@Schema(description = "订单支付金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer orderPayPrice;
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue