package com.nokia.domainb.controller;

import com.nokia.common.http.R;
import com.nokia.domainb.dto.*;
import com.nokia.domainb.service.DomainService;
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;

@RequestMapping("/domainB/api")
@RestController
public class DomainController {
    private final DomainService domainService;

    public DomainController(DomainService domainService) {
        this.domainService = domainService;
    }

    /**
     * 路由查询
     */
    @PostMapping("/route/")
    public R route(@RequestBody RouteDTO dto) {
        return domainService.route(dto);
    }

    /**
     * 5GSA查询
     */
    @PostMapping("/sa/")
    public R sa(@RequestBody SaDTO dto) {
        return domainService.sa(dto);
    }

    /**
     * 功能查询
     */
    @PostMapping("/product/saAndVolte/")
    public R saAndVolte(@RequestBody SaAndVolteDTO dto) {
        return domainService.saAndVolte(dto);
    }

    /**
     * 用户资料三户返回
     */
    @PostMapping("/threePart/userState/")
    public R userState(@RequestBody UserStateDTO dto) {
        return domainService.userState(dto);
    }

    /**
     * 欠费接口整合
     */
    @PostMapping("/acting/qryowefee/")
    public R qryowefee(@RequestBody QryowefeeDTO dto) {
        return domainService.qryowefee(dto);
    }
}
