Merge branch 'feature/mall_product'
# Conflicts: # yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/task/ReplenishmentTask.javapull/17/head
commit
caaed12df4
|
@ -0,0 +1,53 @@
|
|||
package cn.iocoder.yudao.module.shop.request.order;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
/**
|
||||
* @Title:DataAnalysisRequest
|
||||
* @Description: 销售数据分析
|
||||
* @author: tangqian
|
||||
* @date: 2023/6/21 11:08
|
||||
* @version: V1.0.0
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@Schema( description="销售数据分析")
|
||||
public class DataAnalysisRequest implements Serializable {
|
||||
|
||||
@Schema(description = "开始执行时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@Schema(description = "结束执行时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Schema(description = "租户id")
|
||||
private Long tenantId;
|
||||
@Schema(description = "租户名称")
|
||||
private Long tenantName;
|
||||
@Schema(description = "销售金额排序1(降序desc);2(升序asc)")
|
||||
private Integer sortMoney;
|
||||
@Schema(description = "订单数量排序1(降序desc);2(升序asc)")
|
||||
private Integer sortNum;
|
||||
|
||||
|
||||
@Schema(description = "页码,从 1 开始")
|
||||
private Integer pageNo=1;
|
||||
|
||||
@Schema(description = "每页条数,最大值为 10000")
|
||||
private Integer pageSize=20;
|
||||
}
|
|
@ -1,50 +1,43 @@
|
|||
package cn.iocoder.yudao.module.shop.controller.admin.recharge;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated;
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||
import cn.iocoder.yudao.module.shop.controller.admin.recharge.method.Excel;
|
||||
import cn.iocoder.yudao.module.shop.convert.recharge.RechargeOrderInfoConvert;
|
||||
import cn.iocoder.yudao.module.shop.dal.dataobject.recharge.RechargeOrderInfoDO;
|
||||
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.*;
|
||||
import cn.iocoder.yudao.module.shop.convert.recharge.RechargeOrderConvert;
|
||||
import cn.iocoder.yudao.module.shop.dal.dataobject.recharge.RechargeOrderDO;
|
||||
import cn.iocoder.yudao.module.shop.request.member.RefundRequest;
|
||||
import cn.iocoder.yudao.module.shop.request.member.RemarkRequest;
|
||||
import cn.iocoder.yudao.module.shop.service.order.StoreOrderService;
|
||||
import cn.iocoder.yudao.module.shop.service.recharge.RechargeOrderInfoService;
|
||||
import cn.iocoder.yudao.module.shop.service.recharge.RechargeOrderService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.*;
|
||||
import cn.iocoder.yudao.module.shop.dal.dataobject.recharge.RechargeOrderDO;
|
||||
import cn.iocoder.yudao.module.shop.convert.recharge.RechargeOrderConvert;
|
||||
import cn.iocoder.yudao.module.shop.service.recharge.RechargeOrderService;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||
|
||||
@Tag(name = "管理后台 - 订单")
|
||||
@RestController
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
package cn.iocoder.yudao.module.shop.controller.admin.recharge.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @Title:AffiliationAnalysisExcelReqVO
|
||||
* @Description: TODO
|
||||
* @author: tangqian
|
||||
* @date: 2023/6/21 14:36
|
||||
* @version: V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class AffiliationAnalysisExcelReqVO implements Serializable {
|
||||
@ExcelProperty( "地区")
|
||||
private String name;
|
||||
@ExcelProperty( "金额")
|
||||
private BigDecimal money;
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package cn.iocoder.yudao.module.shop.controller.admin.recharge.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @Title:AffiliationAnalysisReqVO
|
||||
* @Description: TODO
|
||||
* @author: tangqian
|
||||
* @date: 2023/6/21 14:13
|
||||
* @version: V1.0.0
|
||||
*/
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class AffiliationAnalysisReqVO implements Serializable {
|
||||
private static final long serialVersionUID = -1691739114336421986L;
|
||||
@Schema(description = "地区")
|
||||
private String name;
|
||||
@Schema(description = "金额")
|
||||
private BigDecimal money;
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package cn.iocoder.yudao.module.shop.controller.admin.recharge.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @Title:DimensionalityAnalysisReqVO
|
||||
* @Description: TODO
|
||||
* @author: tangqian
|
||||
* @date: 2023/6/21 11:10
|
||||
* @version: V1.0.0
|
||||
*/
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class DimensionalityAnalysisReqVO implements Serializable {
|
||||
private static final long serialVersionUID = 9195908075161191001L;
|
||||
@Schema(description = "总销售金额")
|
||||
private BigDecimal totalMoney;
|
||||
@Schema(description = "总订单数量")
|
||||
private Integer totalNum;
|
||||
@Schema(description = "订单均价(总金额/订单数量)")
|
||||
private BigDecimal orderTotalMoney;
|
||||
@Schema(description = "客单价(总金额/客户数量)")
|
||||
private BigDecimal guestMoney;
|
||||
@Schema(description = "本金待返汇总")
|
||||
private BigDecimal toBeReturnedTotalMoney;
|
||||
@Schema(description = "销售已返金额")
|
||||
private BigDecimal haveReturnedMoney;
|
||||
@Schema(description = "销售待返金额")
|
||||
private BigDecimal toBeReturnedMoney;
|
||||
@Schema(description = "投诉单数")
|
||||
private Integer complaintTotalNum;
|
||||
@Schema(description = "投诉率")
|
||||
private BigDecimal complaintProportion;
|
||||
@Schema(description = "退款单数")
|
||||
private Integer refundTotalNum;
|
||||
@Schema(description = "退款率")
|
||||
private BigDecimal refundProportion;
|
||||
@Schema(description = "240档单数")
|
||||
private Integer threeTotalNum;
|
||||
@Schema(description = "240 占比")
|
||||
private BigDecimal threeProportion;
|
||||
@Schema(description = "400档单数")
|
||||
private Integer twoTotalNum;
|
||||
@Schema(description = "400 占比")
|
||||
private BigDecimal twoProportion;
|
||||
@Schema(description = "640档单数")
|
||||
private Integer oneTotalNum;
|
||||
@Schema(description = "640 占比")
|
||||
private BigDecimal oneProportion;
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package cn.iocoder.yudao.module.shop.controller.admin.recharge.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @Title:PromoterAnalysisReqVO
|
||||
* @Description: TODO
|
||||
* @author: tangqian
|
||||
* @date: 2023/6/21 14:51
|
||||
* @version: V1.0.0
|
||||
*/
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class PromoterAnalysisReqVO implements Serializable {
|
||||
private static final long serialVersionUID = -7630125949607067142L;
|
||||
@Schema(description = "租户名称")
|
||||
private String tenantName;
|
||||
@Schema(description = "推广员名称")
|
||||
private String promoterName;
|
||||
@Schema(description = "总销售金额")
|
||||
private BigDecimal totalMoney;
|
||||
@Schema(description = "总订单数量")
|
||||
private Integer totalNum;
|
||||
@Schema(description = "总退款金额")
|
||||
private BigDecimal totalWithdrawMoney;
|
||||
@Schema(description = "240档订单数量")
|
||||
private Integer threeTotalNum;
|
||||
@Schema(description = "400档订单数量")
|
||||
private Integer twoTotalNum;
|
||||
@Schema(description = "640档订单数量")
|
||||
private Integer oneTotalNum;
|
||||
}
|
|
@ -135,7 +135,9 @@ public class RechargeOrderExportReqVO {
|
|||
*/
|
||||
private Integer refundType;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime startApplyTime;
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime endApplyTime;
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,125 @@
|
|||
package cn.iocoder.yudao.module.shop.controller.admin.statement;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated;
|
||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.*;
|
||||
import cn.iocoder.yudao.module.shop.request.order.DataAnalysisRequest;
|
||||
import cn.iocoder.yudao.module.shop.service.order.StoreOrderService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||
|
||||
/**
|
||||
* @Title:DataAnalysisController
|
||||
* @Description: 数据分析
|
||||
* @author: tangqian
|
||||
* @date: 2023/6/21 11:01
|
||||
* @version: V1.0.0
|
||||
*/
|
||||
@Tag(name = "管理后台 - 数据分析")
|
||||
@RestController
|
||||
@RequestMapping("/system/analysis")
|
||||
@Validated
|
||||
public class DataAnalysisController {
|
||||
|
||||
@Autowired
|
||||
private StoreOrderService storeOrderService;
|
||||
|
||||
// 维度数据统计
|
||||
|
||||
@Operation(summary = "维度数据统计")
|
||||
@RequestMapping(value = "/dimensionalityAnalysis", method = RequestMethod.GET)
|
||||
@PreAuthenticated
|
||||
@TenantIgnore
|
||||
public CommonResult<DimensionalityAnalysisReqVO> dimensionalityAnalysis(@Validated DataAnalysisRequest request) {
|
||||
return CommonResult.success(storeOrderService.dimensionalityAnalysis(request));
|
||||
}
|
||||
|
||||
// 号码归属地分析
|
||||
@Operation(summary = "号码归属地分析")
|
||||
@RequestMapping(value = "/affiliationAnalysis", method = RequestMethod.GET)
|
||||
@PreAuthenticated
|
||||
@TenantIgnore
|
||||
public CommonResult<List<AffiliationAnalysisReqVO>> affiliation(@Validated DataAnalysisRequest request) {
|
||||
return CommonResult.success(storeOrderService.affiliation(request));
|
||||
}
|
||||
|
||||
@Operation(summary = "号码归属地分析-导出")
|
||||
@RequestMapping(value = "/affiliationAnalysis-excel", method = RequestMethod.GET)
|
||||
@PreAuthenticated
|
||||
@TenantIgnore
|
||||
@OperateLog(type = EXPORT)
|
||||
public void affiliationExcel(@Validated DataAnalysisRequest request
|
||||
, HttpServletResponse response) throws IOException {
|
||||
List<AffiliationAnalysisReqVO> affiliation = storeOrderService.affiliation(request);
|
||||
List<AffiliationAnalysisExcelReqVO> list = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(affiliation)) {
|
||||
affiliation.forEach(e -> {
|
||||
AffiliationAnalysisExcelReqVO vo = new AffiliationAnalysisExcelReqVO();
|
||||
BeanUtils.copyProperties(e, vo);
|
||||
list.add(vo);
|
||||
});
|
||||
}
|
||||
ExcelUtils.write(response, "号码归属地分析.xls", "数据", AffiliationAnalysisExcelReqVO.class, list);
|
||||
}
|
||||
|
||||
|
||||
// 销售(商铺维度)
|
||||
@Operation(summary = "销售(商铺维度)")
|
||||
@RequestMapping(value = "/statisticsAnalysisPage", method = RequestMethod.GET)
|
||||
@PreAuthenticated
|
||||
@TenantIgnore
|
||||
public CommonResult<PageResult<StatisticsPageVo>> statisticsAnalysis(@Validated DataAnalysisRequest request) {
|
||||
return CommonResult.success(storeOrderService.statisticsAnalysis(request));
|
||||
}
|
||||
|
||||
@Operation(summary = "销售(商铺维度)-导出")
|
||||
@RequestMapping(value = "/statisticsAnalysis-excel", method = RequestMethod.GET)
|
||||
@PreAuthenticated
|
||||
@TenantIgnore
|
||||
@OperateLog(type = EXPORT)
|
||||
public void statisticsAnalysisExcel(@Validated DataAnalysisRequest request
|
||||
, HttpServletResponse response) throws IOException {
|
||||
PageResult<StatisticsPageVo> statisticsPageVoPageResult = storeOrderService.statisticsAnalysis(request);
|
||||
List<StatisticsExcelVO> list = new ArrayList<>();
|
||||
if (null != statisticsPageVoPageResult && !CollectionUtils.isEmpty(statisticsPageVoPageResult.getList())) {
|
||||
statisticsPageVoPageResult.getList().forEach(e -> {
|
||||
StatisticsExcelVO vo = new StatisticsExcelVO();
|
||||
BeanUtils.copyProperties(e, vo);
|
||||
list.add(vo);
|
||||
});
|
||||
}
|
||||
ExcelUtils.write(response, "销售(商铺维度).xls", "数据", StatisticsExcelVO.class, list);
|
||||
}
|
||||
|
||||
|
||||
// 销售(推广员维度)
|
||||
@Operation(summary = "销售(推广员维度)")
|
||||
@RequestMapping(value = "/promoterAnalysis", method = RequestMethod.GET)
|
||||
@PreAuthenticated
|
||||
@TenantIgnore
|
||||
public CommonResult<PageResult<PromoterAnalysisReqVO>> promoterAnalysis(@Validated DataAnalysisRequest request) {
|
||||
return CommonResult.success(storeOrderService.promoterAnalysis(request));
|
||||
}
|
||||
|
||||
// 销售(推广员维度) 导出
|
||||
|
||||
// 退款原因分析
|
||||
}
|
|
@ -2,13 +2,15 @@ package cn.iocoder.yudao.module.shop.dal.mysql.order;
|
|||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.StatementAllReqDataVo;
|
||||
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.StatisticsPageVo;
|
||||
import cn.iocoder.yudao.module.shop.dal.dataobject.order.StoreOrder;
|
||||
import cn.iocoder.yudao.module.shop.request.order.DataAnalysisRequest;
|
||||
import cn.iocoder.yudao.module.shop.request.order.StoreOrderStaticsticsRequest;
|
||||
import cn.iocoder.yudao.module.shop.response.order.OrderBrokerageData;
|
||||
import cn.iocoder.yudao.module.shop.response.order.StoreOrderStatisticsChartItemResponse;
|
||||
import cn.iocoder.yudao.module.shop.vo.order.StoreDateRangeSqlPram;
|
||||
import cn.iocoder.yudao.module.shop.vo.order.StoreStaffDetail;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
@ -81,4 +83,6 @@ public interface StoreOrderMapper extends BaseMapperX<StoreOrder> {
|
|||
BigDecimal shoppingOrderCount(@Param("startDate") LocalDateTime startDate, @Param("endDate") LocalDateTime endDate, @Param("promoterId") Long promoterId);
|
||||
|
||||
List<StatementAllReqDataVo> statisticsAll(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime, @Param("tenantId") Long tenantId);
|
||||
|
||||
IPage<StatisticsPageVo> statisticsAnalysis(IPage<StatisticsPageVo> page, @Param("data")DataAnalysisRequest request);
|
||||
}
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
package cn.iocoder.yudao.module.shop.service.order;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.StatementAllReqVo;
|
||||
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.StatisticsPageVo;
|
||||
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.TenantListVo;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.*;
|
||||
import cn.iocoder.yudao.module.shop.dal.dataobject.order.StoreOrder;
|
||||
import cn.iocoder.yudao.module.shop.dal.dataobject.recharge.RechargeOrderDO;
|
||||
import cn.iocoder.yudao.module.shop.request.member.OrderContentRequest;
|
||||
|
@ -414,4 +413,12 @@ public interface StoreOrderService extends IService<StoreOrder> {
|
|||
List<TenantListVo> getTenantList();
|
||||
|
||||
void addPhone(RechargeOrderDO orderDO, String outTradeNo);
|
||||
|
||||
DimensionalityAnalysisReqVO dimensionalityAnalysis(DataAnalysisRequest request);
|
||||
|
||||
List<AffiliationAnalysisReqVO> affiliation(DataAnalysisRequest request);
|
||||
|
||||
PageResult<StatisticsPageVo> statisticsAnalysis(DataAnalysisRequest request);
|
||||
|
||||
PageResult<PromoterAnalysisReqVO> promoterAnalysis(DataAnalysisRequest request);
|
||||
}
|
||||
|
|
|
@ -21,10 +21,7 @@ import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
|||
import cn.iocoder.yudao.module.member.api.user.MemberUserApi;
|
||||
import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO;
|
||||
import cn.iocoder.yudao.module.member.api.user.dto.PromoterDTO;
|
||||
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.StatementAllReqDataVo;
|
||||
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.StatementAllReqVo;
|
||||
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.StatisticsPageVo;
|
||||
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.TenantListVo;
|
||||
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.*;
|
||||
import cn.iocoder.yudao.module.shop.controller.app.recharge.vo.PhoneRecordAdd;
|
||||
import cn.iocoder.yudao.module.shop.dal.dataobject.express.ExpressDO;
|
||||
import cn.iocoder.yudao.module.shop.dal.dataobject.order.StoreOrder;
|
||||
|
@ -88,18 +85,14 @@ import org.springframework.util.CollectionUtils;
|
|||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.DayOfWeek;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.time.temporal.TemporalAdjusters;
|
||||
import java.util.*;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.HEADER_TENANT_ID;
|
||||
|
||||
/**
|
||||
* StoreOrderServiceImpl 接口实现
|
||||
* +----------------------------------------------------------------------
|
||||
|
@ -1537,6 +1530,29 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
|||
addPhoneRecord(orderDO, outTradeNo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DimensionalityAnalysisReqVO dimensionalityAnalysis(DataAnalysisRequest request) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AffiliationAnalysisReqVO> affiliation(DataAnalysisRequest request) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<StatisticsPageVo> statisticsAnalysis(DataAnalysisRequest request) {
|
||||
com.baomidou.mybatisplus.extension.plugins.pagination.Page<StatisticsPageVo> page =
|
||||
new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(request.getPageNo(), request.getPageSize());
|
||||
mapper.statisticsAnalysis(page, request);
|
||||
return new PageResult<>(page.getRecords(), page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<PromoterAnalysisReqVO> promoterAnalysis(DataAnalysisRequest request) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private RechargeOrderDO initializeOrder(OrderContentRequest request, String code, MemberUserRespDTO user, PromoterDTO promoterDTO) {
|
||||
Long tenantId = TenantContextHolder.getTenantId();
|
||||
|
|
|
@ -10,6 +10,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
|
@ -45,8 +46,9 @@ public class ReplenishmentTask {
|
|||
/**
|
||||
* 每天上午8点和下午3点执行补单计划
|
||||
*/
|
||||
@Scheduled(cron = "0 0 8,15 * * ?")
|
||||
@TenantIgnore
|
||||
@Transactional
|
||||
@Scheduled(cron = "0 0 8,15 * * ?")
|
||||
public void replenishmentTask() {
|
||||
/**
|
||||
* 1.扫描表里面未付款的订单
|
||||
|
@ -274,7 +276,7 @@ public class ReplenishmentTask {
|
|||
// Map<String, String> params = new HashMap<>();
|
||||
// params.put("appid", appId);
|
||||
// params.put("mch_id", mchId);
|
||||
// params.put("out_trade_no", "MEMBER_1670049690502086657");
|
||||
// params.put("out_trade_no", "MEMBER_1669714426202210305");
|
||||
// params.put("nonce_str", nonceStr);
|
||||
// String sign = generateSign(params, key); // 生成签名
|
||||
// params.put("sign", sign);
|
||||
|
|
|
@ -108,4 +108,38 @@
|
|||
and info.tenant_id =#{tenantId}
|
||||
</if>
|
||||
</select>
|
||||
<select id="statisticsAnalysis"
|
||||
resultType="cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.StatisticsPageVo">
|
||||
SELECT
|
||||
t1.tenant_id AS tenantId,
|
||||
t3.`name` AS tenantName,
|
||||
SUM(t1.price) AS totalMoney,
|
||||
count(t1.id) AS totalNum,
|
||||
SUM(IF(t2.refund_status=2,t1.price,0)) AS totalWithdrawMoney,
|
||||
sum(t1.price = 240) AS threeTotalNum,
|
||||
sum(t1.price = 400) AS twoTotalNum,
|
||||
sum(t1.price = 640) AS oneTotalNum
|
||||
FROM
|
||||
cy_recharge_order_info t1
|
||||
JOIN cy_recharge_order t2 ON t1.recharge_order_id = t2.id
|
||||
LEFT JOIN system_tenant t3 ON t1.tenant_id = t3.id
|
||||
WHERE
|
||||
t2.paid != 0
|
||||
<if test="null != data.startTime">
|
||||
and t1.create_time >= #{startTime}
|
||||
</if>
|
||||
<if test="null != data.endTime">
|
||||
and t1.create_time < #{endTime}
|
||||
</if>
|
||||
GROUP BY
|
||||
t1.tenant_id
|
||||
<choose>
|
||||
<when test="data.sortMoney !=null and data.sortMoney=1">
|
||||
ORDER BY totalMoney DESC,totalNum DESC
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY totalMoney ASC,totalNum ASC
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue