package com.tongran.rocketmq.controller;

import com.tongran.common.core.domain.R;
import com.tongran.common.core.web.controller.BaseController;
import com.tongran.common.core.web.domain.AjaxResult;
import com.tongran.common.security.annotation.InnerAuth;
import com.tongran.common.security.annotation.RequiresPermissions;
import com.tongran.rocketmq.domain.RmNetworkInterfaceChild;
import com.tongran.rocketmq.service.IRmNetworkInterfaceChildService;
import org.springframework.beans.factory.annotation.Autowired;
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 java.util.List;

/**
 * 客户端网络接口子接口信息Controller
 * 
 * @author tongran
 * @date 2025-12-15
 */
@RestController
@RequestMapping("/networkInterfaceChild")
@RequiresPermissions("system:registration")
public class RmNetworkInterfaceChildController extends BaseController
{
    @Autowired
    private IRmNetworkInterfaceChildService rmNetworkInterfaceChildService;

    /**
     * 查询客户端网络接口子接口信息列表
     */
    @PostMapping("/list")
    public AjaxResult list(@RequestBody RmNetworkInterfaceChild rmNetworkInterfaceChild)
    {
        List<RmNetworkInterfaceChild> list = rmNetworkInterfaceChildService.selectRmNetworkInterfaceChildList(rmNetworkInterfaceChild);
        return success(list);
    }
    /**
     * 查询客户端网络接口子接口信息列表
     */
    @PostMapping("/innerGetChildList")
    @InnerAuth
    public R innerGetChildList(@RequestBody RmNetworkInterfaceChild rmNetworkInterfaceChild)
    {
        List<RmNetworkInterfaceChild> list = rmNetworkInterfaceChildService.selectRmNetworkInterfaceChildList(rmNetworkInterfaceChild);
        return R.ok(list);
    }

}
