package com.jwipc.sys.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.sys.constant.ModuleConst.MODULE_ROOT;

/**
 * @author shenyang.ou
 * @date 2024/2/4 14:47
 * @desc
 */
@Controller
@RequestMapping(MODULE_ROOT + "/purchaseCategory")
@RequiredArgsConstructor
public class PurchaseCategoryPageController {
    @GetMapping("/index")
    public String index(@RequestParam(required = false, defaultValue = "0") Integer select,
                        @RequestParam(required = false, defaultValue = "") String inCodes,
                        @RequestParam(required = false, defaultValue = "") String notInCodes,
                        Model model)
    {
        model.addAttribute("inCodes", inCodes);
        model.addAttribute("notInCodes", notInCodes);
        model.addAttribute("select", select);
        return MODULE_ROOT + "/purchaseCategory/list";
    }
}
