package com.jeequan.jeepay.mch.ctrl.route;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jeequan.jeepay.core.aop.MethodLog;
import com.jeequan.jeepay.core.entity.PayOrderCount;
import com.jeequan.jeepay.core.entity.SysUser;
import com.jeequan.jeepay.core.model.ApiRes;
import com.jeequan.jeepay.core.utils.SeqKit;
import com.jeequan.jeepay.db.entity.Route;
import com.jeequan.jeepay.db.entity.RouteRecord;
import com.jeequan.jeepay.mch.ctrl.CommonCtrl;
import com.jeequan.jeepay.service.impl.RouteRecordService;
import com.jeequan.jeepay.service.impl.RouteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

/**
 * 路由运行策略
 * @date 2021-06-16 09:15
 */
@RestController
@RequestMapping("/api/routeRecord")
public class RouteRecordController extends CommonCtrl {

    @Autowired
    private RouteRecordService routeRecordService;

    /**
     * @Description: 分页查询
     * @since 2024/04/19
     */
    @GetMapping
    public ApiRes list() {
        RouteRecord entity = getObject(RouteRecord.class).setMchNo(getCurrentMchNo());
        IPage<RouteRecord> pages = routeRecordService.pageList(getIPage(true), entity);
        return ApiRes.page(pages);
    }
}
