package com.jwipc.tender.controller.pc;

import com.jwipc.tender.constant.ModuleConst;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
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.tender.constant.ModuleConst.MODULE_ROOT;

/**
 * <p>保证金账号 管理相关页面</p>
 *
 * @author ZhangJie
 * @version 1.0
 * @since JDK 1.8
 */
@Controller
@RequiredArgsConstructor
@Slf4j
@RequestMapping(ModuleConst.MODULE_ROOT + "/securityDeposit/page")
public class SecurityDepositPageController {

    /**
     * 保证金账号 列表页面
     *
     * @return
     */
    @GetMapping("index")
    public String index() {
        return MODULE_ROOT + "/securityDeposit/index";
    }

    /**
     * 保证金账号 新增和编辑页面
     *
     * @param id 账号主键
     * @return
     */
    @GetMapping("detail")
    public String detail(@RequestParam(required = false, defaultValue = "0") Long id, Model model)
    {
        model.addAttribute("id", id);
        return MODULE_ROOT + "/securityDeposit/detail";
    }

    /**
     * 保证金审批页面
     *
     * @return
     */
    @GetMapping("approvelList")
    public String approvelList() {
        return MODULE_ROOT + "/securityDeposit/approvel_list";
    }
}
