package com.jwipc.order.controller.pc;

import com.jwipc.order.logic.DeliveryOrderLogic;
import com.jwipc.security.LoginUtil;
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.order.constant.ModuleConst.MODULE_ROOT;

/**
 * <p>送货单相关页面</p>
 *
 * @author ZhangJie
 * @version 1.0
 * @since JDK 1.8
 */
@Controller
@RequestMapping(MODULE_ROOT + "/deliveryOrderDetail/page")
@RequiredArgsConstructor
public class DeliveryOrderDetailPageController {
    private final DeliveryOrderLogic deliveryOrderLogic;

    /**
     * 送货单列表页面
     *
     * @return
     */
    @GetMapping("list")
    public String list(Model model) {
        model.addAttribute("isSupplier", LoginUtil.isSupplier());
        return MODULE_ROOT + "/deliveryOrderDetail/list";
    }
}
