订单 统计
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
package com.czg.service.order.service.impl;
|
||||
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import com.czg.constants.PayTypeConstants;
|
||||
import com.czg.order.entity.OrderPayment;
|
||||
import com.czg.order.service.OrderPaymentService;
|
||||
import com.czg.service.order.mapper.OrderPaymentMapper;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 支付详情 服务层实现。
|
||||
@@ -14,6 +17,15 @@ import org.springframework.stereotype.Service;
|
||||
* @since 2025-02-15
|
||||
*/
|
||||
@DubboService
|
||||
public class OrderPaymentServiceImpl extends ServiceImpl<OrderPaymentMapper, OrderPayment> implements OrderPaymentService{
|
||||
public class OrderPaymentServiceImpl extends ServiceImpl<OrderPaymentMapper, OrderPayment> implements OrderPaymentService {
|
||||
|
||||
@Override
|
||||
public BigDecimal countMemberInAmount(Long shopId, Long shopUserId) {
|
||||
return getOneAs(QueryWrapper.create().select("sum(amount)")
|
||||
.eq(OrderPayment::getShopId, 143)
|
||||
.eq(OrderPayment::getSourceType, PayTypeConstants.SourceType.MEMBER_IN)
|
||||
.eq(OrderPayment::getPayType, PayTypeConstants.PayType.PAY)
|
||||
.eq(OrderPayment::getSourceId, 127452)
|
||||
.eq(OrderPayment::getPayStatus, PayTypeConstants.PayStatus.SUCCESS), BigDecimal.class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user