Skip to content

Commit

Permalink
规范service调用
Browse files Browse the repository at this point in the history
  • Loading branch information
chopper711 committed Nov 29, 2021
1 parent 7170e3a commit db587fd
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
import cn.lili.modules.order.order.entity.dto.OrderSearchParams;
import cn.lili.modules.order.order.entity.vo.OrderDetailVO;
import cn.lili.modules.order.order.entity.vo.OrderSimpleVO;
import cn.lili.modules.order.order.entity.vo.PaymentLog;
import cn.lili.modules.statistics.entity.dto.StatisticsQueryParam;
import cn.lili.modules.system.entity.vo.Traces;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
Expand Down Expand Up @@ -235,4 +239,13 @@ public interface OrderService extends IService<Order> {
* @return 金额
*/
Double getPaymentTotal(String orderSn);

/**
* 查询订单支付记录
*
* @param page 分页
* @param queryWrapper 查询条件
* @return 订单支付记录分页
*/
IPage<PaymentLog> queryPaymentLogs(IPage<PaymentLog> page, Wrapper<PaymentLog> queryWrapper);
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import cn.lili.modules.order.order.entity.vo.OrderDetailVO;
import cn.lili.modules.order.order.entity.vo.OrderSimpleVO;
import cn.lili.modules.order.order.entity.vo.OrderVO;
import cn.lili.modules.order.order.entity.vo.PaymentLog;
import cn.lili.modules.order.order.mapper.OrderItemMapper;
import cn.lili.modules.order.order.mapper.OrderMapper;
import cn.lili.modules.order.order.service.*;
Expand All @@ -56,6 +57,7 @@
import cn.lili.trigger.model.TimeExecuteConstant;
import cn.lili.trigger.model.TimeTriggerMsg;
import cn.lili.trigger.util.DelayQueueTools;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
Expand Down Expand Up @@ -598,6 +600,11 @@ public Double getPaymentTotal(String orderSn) {
return order.getFlowPrice();
}

@Override
public IPage<PaymentLog> queryPaymentLogs(IPage<PaymentLog> page, Wrapper<PaymentLog> queryWrapper) {
return baseMapper.queryPaymentLogs(page, queryWrapper);
}

/**
* 循环检查批量发货订单列表
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import cn.lili.modules.order.order.entity.vo.PaymentLog;
import cn.lili.modules.order.order.mapper.OrderMapper;
import cn.lili.modules.order.order.service.OrderService;
import cn.lili.modules.payment.kit.CashierSupport;
import cn.lili.modules.payment.kit.dto.PaymentSuccessParams;
import cn.lili.modules.payment.kit.params.CashierExecute;
Expand Down Expand Up @@ -33,7 +34,7 @@ public class PaymentServiceImpl implements PaymentService {
@Autowired
private CashierSupport cashierSupport;
@Resource
private OrderMapper orderMapper;
private OrderService orderService;

@Override
public void success(PaymentSuccessParams paymentSuccessParams) {
Expand Down Expand Up @@ -63,6 +64,6 @@ public void adminPaySuccess(PaymentSuccessParams paymentSuccessParams) {

@Override
public IPage<PaymentLog> page(Page<PaymentLog> initPage, QueryWrapper<PaymentLog> initWrapper) {
return orderMapper.queryPaymentLogs(initPage, initWrapper);
return orderService.queryPaymentLogs(initPage, initWrapper);
}
}

0 comments on commit db587fd

Please sign in to comment.