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

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jeequan.jeepay.core.model.ApiRes;
import com.jeequan.jeepay.db.entity.RouteRecord;
import com.jeequan.jeepay.mgr.ctrl.CommonCtrl;
import com.jeequan.jeepay.service.impl.RouteRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 路由运行策略
 * @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);
        IPage<RouteRecord> pages = routeRecordService.pageList(getIPage(true), entity);
        return ApiRes.page(pages);
    }
}
