package com.njcn.harmonic.controller.upload;


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.harmonic.pojo.po.upload.RUploadDataLog;
import com.njcn.harmonic.service.upload.IRUploadDataLogService;
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.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import com.njcn.web.controller.BaseController;

/**
 * <p>
 * 调度算法执行结果记录表 前端控制器
 * </p>
 *
 * @author hongawen
 * @since 2024-06-06
 */
@RestController
@RequestMapping("/rUploadDataLog")
@RequiredArgsConstructor
@Api(tags = "上送国网日志管理")
public class RUploadDataLogController extends BaseController {

    private final IRUploadDataLogService rUploadDataLogService;

    /**
     * 获取上送日志
     * @author cdf
     * @date 2024/6/12
     */
    @OperateInfo(info = LogEnum.BUSINESS_COMMON)
    @PostMapping("/getList")
    @ApiOperation("查询国网上送数据日志")
    @ApiImplicitParam(name = "baseParam", value = "实体参数", required = true)
    public HttpResult<Page<RUploadDataLog>> getList(@RequestBody BaseParam baseParam) {
        String methodDescribe = getMethodDescribe("getList");
        Page<RUploadDataLog> list = rUploadDataLogService.getList(baseParam);
        return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
    }

}

