判空
This commit is contained in:
@@ -219,15 +219,15 @@ public interface ShopOrderStatisticMapper extends BaseMapper<ShopOrderStatistic>
|
||||
" SUM(CASE WHEN pay_type = 'main_scan' THEN 1 ELSE 0 END) as mainScanPayCount," +
|
||||
" SUM(CASE WHEN pay_type = 'credit_pay' THEN 1 ELSE 0 END) as creditPayCount," +
|
||||
" " +
|
||||
" SUM(refund_amount) as refundAmount," +
|
||||
" IFNULL(SUM(refund_amount), 0) as refundAmount," +
|
||||
" SUM(CASE WHEN refund_type = 'cash' or pay_type = 'cash_pay' THEN refund_amount ELSE 0 END) as cashRefundAmount," +
|
||||
" " +
|
||||
" SUM(new_customer_discount_amount) as newCustomerDiscountAmount," +
|
||||
" SUM(discount_act_amount) as fullDiscountAmount," +
|
||||
" SUM(product_coupon_discount_amount) + SUM(other_coupon_discount_amount) as couponDiscountAmount," +
|
||||
" SUM(points_discount_amount) as pointDiscountAmount," +
|
||||
" SUM(vip_discount_amount) as memberDiscountAmount," +
|
||||
" SUM(discount_amount) as orderPriceDiscountAmount ," +
|
||||
" IFNULL(SUM(new_customer_discount_amount), 0) as newCustomerDiscountAmount," +
|
||||
" IFNULL(SUM(discount_act_amount), 0) as fullDiscountAmount," +
|
||||
" IFNULL(SUM(product_coupon_discount_amount), 0) + IFNULL(SUM(other_coupon_discount_amount), 0) as couponDiscountAmount," +
|
||||
" IFNULL(SUM(points_discount_amount), 0) as pointDiscountAmount," +
|
||||
" IFNULL(SUM(vip_discount_amount), 0) as memberDiscountAmount," +
|
||||
" IFNULL(SUM(discount_amount), 0) as orderPriceDiscountAmount ," +
|
||||
" count(1) as orderCount," +
|
||||
" sum(CASE WHEN seat_num IS NULL OR seat_num <= 0 THEN 1 ELSE seat_num END) as customerCount " +
|
||||
"FROM" +
|
||||
|
||||
@@ -221,9 +221,6 @@ public class ShopOrderStatisticServiceImpl extends ServiceImpl<ShopOrderStatisti
|
||||
.add(creditPayAmount);
|
||||
result.setPayAmount(totalPayAmount);
|
||||
calculateShopOrderStatistic(result);
|
||||
calculateProfitInfo(result);
|
||||
calculateTurnoverRate(result);
|
||||
calculateAvgPayAmount(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user