package org.framework.lazy.cloud.network.heartbeat.server.standalone.controller;

import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import org.wu.framework.web.spring.EasyController;
import org.springframework.web.bind.annotation.*;
import org.wu.framework.web.response.Result;
import org.wu.framework.web.response.ResultFactory;
import org.springframework.beans.factory.annotation.Autowired;
import jakarta.annotation.Resource;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.domain.model.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMapping;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMappingRemoveCommand;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMappingStoryCommand;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMappingUpdateCommand;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMappingQueryListCommand;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.command.lazy.internal.network.server.permeate.mapping.LazyInternalNetworkServerPermeateMappingQueryOneCommand;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.LazyInternalNetworkServerPermeateMappingApplication;
import org.framework.lazy.cloud.network.heartbeat.server.standalone.application.dto.LazyInternalNetworkServerPermeateMappingDTO;
import java.util.List;
import org.wu.framework.lazy.orm.database.lambda.domain.LazyPage;
/**
 * describe 服务端网络渗透映射 
 *
 * @author Jia wei Wu
 * @date 2024/09/17 01:35 下午
 * @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyController 
 **/
@Tag(name = "服务端网络渗透映射提供者")
@EasyController("/lazy/internal/network/server/permeate/mapping")
public class LazyInternalNetworkServerPermeateMappingProvider  {

    @Resource
    private LazyInternalNetworkServerPermeateMappingApplication lazyInternalNetworkServerPermeateMappingApplication;

    /**
     * describe 新增服务端网络渗透映射
     *
     * @param lazyInternalNetworkServerPermeateMappingStoryCommand 新增服务端网络渗透映射     
     * @return {@link Result<LazyInternalNetworkServerPermeateMapping>} 服务端网络渗透映射新增后领域对象     
     
     * @author Jia wei Wu
     * @date 2024/09/17 01:35 下午
     **/

    @Operation(summary = "新增服务端网络渗透映射")
    @PostMapping("/story")
    public Result<LazyInternalNetworkServerPermeateMapping> story(@RequestBody LazyInternalNetworkServerPermeateMappingStoryCommand lazyInternalNetworkServerPermeateMappingStoryCommand){
        return lazyInternalNetworkServerPermeateMappingApplication.story(lazyInternalNetworkServerPermeateMappingStoryCommand);
    }
    /**
     * describe 批量新增服务端网络渗透映射
     *
     * @param lazyInternalNetworkServerPermeateMappingStoryCommandList 批量新增服务端网络渗透映射     
     * @return {@link Result<List<LazyInternalNetworkServerPermeateMapping>>} 服务端网络渗透映射新增后领域对象集合     
     
     * @author Jia wei Wu
     * @date 2024/09/17 01:35 下午
     **/

    @Operation(summary = "批量新增服务端网络渗透映射")
    @PostMapping("/batchStory")
    public Result<List<LazyInternalNetworkServerPermeateMapping>> batchStory(@RequestBody List<LazyInternalNetworkServerPermeateMappingStoryCommand> lazyInternalNetworkServerPermeateMappingStoryCommandList){
        return lazyInternalNetworkServerPermeateMappingApplication.batchStory(lazyInternalNetworkServerPermeateMappingStoryCommandList);
    }
    /**
     * describe 更新服务端网络渗透映射
     *
     * @param lazyInternalNetworkServerPermeateMappingUpdateCommand 更新服务端网络渗透映射     
     * @return {@link Result<LazyInternalNetworkServerPermeateMapping>} 服务端网络渗透映射领域对象     
     
     * @author Jia wei Wu
     * @date 2024/09/17 01:35 下午
     **/

    @Operation(summary = "更新服务端网络渗透映射")
    @PutMapping("/updateOne")
    public Result<LazyInternalNetworkServerPermeateMapping> updateOne(@RequestBody LazyInternalNetworkServerPermeateMappingUpdateCommand lazyInternalNetworkServerPermeateMappingUpdateCommand){
        return lazyInternalNetworkServerPermeateMappingApplication.updateOne(lazyInternalNetworkServerPermeateMappingUpdateCommand);
    }
    /**
     * describe 查询单个服务端网络渗透映射
     *
     * @param lazyInternalNetworkServerPermeateMappingQueryOneCommand 查询单个服务端网络渗透映射     
     * @return {@link Result<LazyInternalNetworkServerPermeateMappingDTO>} 服务端网络渗透映射DTO对象     
     
     * @author Jia wei Wu
     * @date 2024/09/17 01:35 下午
     **/

    @Operation(summary = "查询单个服务端网络渗透映射")
    @GetMapping("/findOne")
    public Result<LazyInternalNetworkServerPermeateMappingDTO> findOne(@ModelAttribute LazyInternalNetworkServerPermeateMappingQueryOneCommand lazyInternalNetworkServerPermeateMappingQueryOneCommand){
        return lazyInternalNetworkServerPermeateMappingApplication.findOne(lazyInternalNetworkServerPermeateMappingQueryOneCommand);
    }
    /**
     * describe 查询多个服务端网络渗透映射
     *
     * @param lazyInternalNetworkServerPermeateMappingQueryListCommand 查询多个服务端网络渗透映射     
     * @return {@link Result<List<LazyInternalNetworkServerPermeateMappingDTO>>} 服务端网络渗透映射DTO对象     
     
     * @author Jia wei Wu
     * @date 2024/09/17 01:35 下午
     **/

    @Operation(summary = "查询多个服务端网络渗透映射")
    @GetMapping("/findList")
    public Result<List<LazyInternalNetworkServerPermeateMappingDTO>> findList(@ModelAttribute LazyInternalNetworkServerPermeateMappingQueryListCommand lazyInternalNetworkServerPermeateMappingQueryListCommand){
        return lazyInternalNetworkServerPermeateMappingApplication.findList(lazyInternalNetworkServerPermeateMappingQueryListCommand);
    }
    /**
     * describe 分页查询多个服务端网络渗透映射
     *
     * @param lazyInternalNetworkServerPermeateMappingQueryListCommand 分页查询多个服务端网络渗透映射     
     * @return {@link Result<LazyPage<LazyInternalNetworkServerPermeateMappingDTO>>} 分页服务端网络渗透映射DTO对象     
     
     * @author Jia wei Wu
     * @date 2024/09/17 01:35 下午
     **/

    @Operation(summary = "分页查询多个服务端网络渗透映射")
    @GetMapping("/findPage")
    public Result<LazyPage<LazyInternalNetworkServerPermeateMappingDTO>> findPage(@Parameter(description ="分页大小") @RequestParam(defaultValue = "10", value = "size") int size,
                           @Parameter(description ="当前页数") @RequestParam(defaultValue = "1", value = "current") int current,@ModelAttribute LazyInternalNetworkServerPermeateMappingQueryListCommand lazyInternalNetworkServerPermeateMappingQueryListCommand){
        return lazyInternalNetworkServerPermeateMappingApplication.findPage(size,current,lazyInternalNetworkServerPermeateMappingQueryListCommand);
    }
    /**
     * describe 删除服务端网络渗透映射
     *
     * @param lazyInternalNetworkServerPermeateMappingRemoveCommand 删除服务端网络渗透映射     
     * @return {@link Result<LazyInternalNetworkServerPermeateMapping>} 服务端网络渗透映射     
     
     * @author Jia wei Wu
     * @date 2024/09/17 01:35 下午
     **/

    @Operation(summary = "删除服务端网络渗透映射")
    @DeleteMapping("/remove")
    public Result<LazyInternalNetworkServerPermeateMapping> remove(@ModelAttribute LazyInternalNetworkServerPermeateMappingRemoveCommand lazyInternalNetworkServerPermeateMappingRemoveCommand){
        return lazyInternalNetworkServerPermeateMappingApplication.remove(lazyInternalNetworkServerPermeateMappingRemoveCommand);
    }
}