package com.njcn.device.pms.controller.ledgerManger;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.enums.common.LogEnum;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.common.utils.HttpResultUtil;
import com.njcn.device.pms.pojo.param.PmsTerminalLogParam;
import com.njcn.device.pms.pojo.param.PmsTerminalParam;
import com.njcn.device.pms.pojo.po.GeneratrixWire;
import com.njcn.device.pms.pojo.po.TerminalLog;
import com.njcn.device.pms.service.majornetwork.ITerminalLogService;
import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import com.njcn.web.controller.BaseController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author hongawen
 * @since 2023-02-23
 */
@RestController
@RequestMapping("/pms/terminalLog")
@RequiredArgsConstructor
@Api(tags = "台账-终端操作日志")
public class TerminalLogController extends BaseController {

    private final ITerminalLogService iTerminalLogService;


    /**
     * 查询所有日志
     * @author cdf
     * @date 2023/2/27
     */
    @OperateInfo(info = LogEnum.BUSINESS_COMMON)
    @PostMapping("/page")
    @ApiOperation("分页查询所有日志")
    @ApiImplicitParam(name = "pmsTerminalLogParam", value = "基本查询体", required = true)
    public HttpResult<Page<TerminalLog>> page(@RequestBody  PmsTerminalLogParam pmsTerminalLogParam) {
        String methodDescribe = getMethodDescribe("page");
        Page<TerminalLog> result = iTerminalLogService.page(pmsTerminalLogParam);
        return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
    }

}

