【同步】BOOT 和 CLOUD 的功能
This commit is contained in:
@@ -15,6 +15,8 @@ import org.apache.ibatis.annotations.Param;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils.toUnderlineCase;
|
||||
|
||||
/**
|
||||
* 商品统计 Mapper
|
||||
*
|
||||
@@ -49,16 +51,16 @@ public interface ProductStatisticsMapper extends BaseMapperX<ProductStatisticsDO
|
||||
private static MPJLambdaWrapperX<ProductStatisticsDO> buildWrapper(ProductStatisticsReqVO reqVO) {
|
||||
return new MPJLambdaWrapperX<ProductStatisticsDO>()
|
||||
.betweenIfPresent(ProductStatisticsDO::getTime, reqVO.getTimes())
|
||||
.selectSum(ProductStatisticsDO::getBrowseCount)
|
||||
.selectSum(ProductStatisticsDO::getBrowseUserCount)
|
||||
.selectSum(ProductStatisticsDO::getFavoriteCount)
|
||||
.selectSum(ProductStatisticsDO::getCartCount)
|
||||
.selectSum(ProductStatisticsDO::getOrderCount)
|
||||
.selectSum(ProductStatisticsDO::getOrderPayCount)
|
||||
.selectSum(ProductStatisticsDO::getOrderPayPrice)
|
||||
.selectSum(ProductStatisticsDO::getAfterSaleCount)
|
||||
.selectSum(ProductStatisticsDO::getAfterSaleRefundPrice)
|
||||
.selectAvg(ProductStatisticsDO::getBrowseConvertPercent);
|
||||
.selectSum(ProductStatisticsDO::getBrowseCount, toUnderlineCase(ProductStatisticsDO::getBrowseCount))
|
||||
.selectSum(ProductStatisticsDO::getBrowseUserCount, toUnderlineCase(ProductStatisticsDO::getBrowseUserCount))
|
||||
.selectSum(ProductStatisticsDO::getFavoriteCount, toUnderlineCase(ProductStatisticsDO::getFavoriteCount))
|
||||
.selectSum(ProductStatisticsDO::getCartCount, toUnderlineCase(ProductStatisticsDO::getCartCount))
|
||||
.selectSum(ProductStatisticsDO::getOrderCount, toUnderlineCase(ProductStatisticsDO::getOrderCount))
|
||||
.selectSum(ProductStatisticsDO::getOrderPayCount, toUnderlineCase(ProductStatisticsDO::getOrderPayCount))
|
||||
.selectSum(ProductStatisticsDO::getOrderPayPrice, toUnderlineCase(ProductStatisticsDO::getOrderPayPrice))
|
||||
.selectSum(ProductStatisticsDO::getAfterSaleCount, toUnderlineCase(ProductStatisticsDO::getAfterSaleCount))
|
||||
.selectSum(ProductStatisticsDO::getAfterSaleRefundPrice, toUnderlineCase(ProductStatisticsDO::getAfterSaleRefundPrice))
|
||||
.selectAvg(ProductStatisticsDO::getBrowseConvertPercent, toUnderlineCase(ProductStatisticsDO::getBrowseConvertPercent));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -76,8 +76,8 @@
|
||||
<select id="selectListByPayTimeBetweenAndGroupByMonth"
|
||||
resultType="cn.iocoder.yudao.module.statistics.controller.admin.trade.vo.TradeOrderTrendRespVO">
|
||||
SELECT DATE_FORMAT(pay_time, '%Y-%m') AS date,
|
||||
COUNT(1) AS orderPayCount,
|
||||
SUM(pay_price) AS orderPayPrice
|
||||
COUNT(1) AS order_pay_count,
|
||||
SUM(pay_price) AS order_pay_price
|
||||
FROM trade_order
|
||||
WHERE pay_status = TRUE
|
||||
AND create_time BETWEEN #{beginTime} AND #{endTime}
|
||||
@@ -95,8 +95,8 @@
|
||||
|
||||
<select id="selectPaySummaryByPayStatusAndPayTimeBetween"
|
||||
resultType="cn.iocoder.yudao.module.statistics.controller.admin.trade.vo.TradeOrderSummaryRespVO">
|
||||
SELECT IFNULL(SUM(pay_price), 0) AS orderPayPrice,
|
||||
COUNT(1) AS orderPayCount
|
||||
SELECT IFNULL(SUM(pay_price), 0) AS order_pay_price,
|
||||
COUNT(1) AS order_pay_count
|
||||
FROM trade_order
|
||||
WHERE pay_status = #{payStatus}
|
||||
AND pay_time BETWEEN #{beginTime} AND #{endTime}
|
||||
|
||||
Reference in New Issue
Block a user