package com.jwipc.tender.controller.pc;


import com.jwipc.tender.dto.ExpertManageDTO;
import com.jwipc.tender.logic.ExpertManageLogic;
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 static com.jwipc.tender.constant.ModuleConst.MODULE_ROOT;

/**
 * @author Al
 * @create 2024-01-31 10:23
 * @desc 专家管理
 */
@Controller
@RequestMapping(MODULE_ROOT + "/expertManage")
@RequiredArgsConstructor
public class ExpertManagePageController {
    private final ExpertManageLogic expertManageLogic;
    @GetMapping("/index")
    public String index() {
        return MODULE_ROOT + "/expertManage/list";
    }
    @GetMapping("/detail")
    public String detail(Model model, Long id) {
        ExpertManageDTO expertManage;
        expertManage = expertManageLogic.getById(id);
        model.addAttribute("expertManage", expertManage);
        return MODULE_ROOT + "/expertManage/detail";
    }
}
