package com.jwipc.supplier.controller.pc;

import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import static com.jwipc.supplier.constant.ModuleConst.MODULE_ROOT;

/**
 * 供应商注册信息选择查询银行信息页面
 *
 */
@Controller
@RequestMapping(MODULE_ROOT + "/bankInfo/page")
@RequiredArgsConstructor
public class BankInfoPageController {

    @GetMapping("select")
    public String select() {
        return MODULE_ROOT + "/bank/select";
    }

    /**
     * 供应商开户行选择界面
     * @param supplierId 供应商ID
     * @param model 页面回传数据
     * @return 页面
     */
    @GetMapping("selectorOfSupplierId")
    public String selectorOfSupplierId(@RequestParam(required = false) Long supplierId, Model model) {
        model.addAttribute("supplierId", supplierId);
        return MODULE_ROOT + "/bank/selectorOfSupplierId";
    }
}
