package com.jwipc.supplier.controller.pc;

import com.jwipc.supplier.constant.ModuleConst;
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;

/**
 * <p> </p>
 *
 * @author ZhangJie
 * @version 1.0
 * @since JDK 1.8
 */
@Controller
@RequestMapping(MODULE_ROOT + "/contact/page")
@RequiredArgsConstructor
public class SupplierContactPageController {
    @GetMapping("select")
    public String select(String supplierCode, @RequestParam(required = false, defaultValue = "0") Integer single,
                         String type, Model model)
    {
        model.addAttribute("supplierCode", supplierCode);
        model.addAttribute("single", single);
        model.addAttribute("type", type);
        return ModuleConst.MODULE_ROOT + "/supplier_contact";
    }
}
