package com.dgtly.wxportal.controller;

import com.dgtly.common.core.controller.BaseController;
import com.dgtly.common.core.page.TableDataInfo;
import com.dgtly.wxportal.domain.OrderFile;
import com.dgtly.wxportal.service.IOrderFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;


/**
 * @author ZhangDing
 * @version 1.0
 * @descption: 签署文件表Controller
 * @company 神州数码通用软件（洛阳）有限公司
 * @copyright (c) 2019 LuoYang DGT Co'Ltd Inc. All rights reserved.
 * @date 2020-10-20 10:54
 * @since JDK1.8
 */
@Controller
@RequestMapping("/system/orderFile")
public class OrderFileController extends BaseController {
    private String prefix = "wxportal/orderfile";
    @Autowired
    private IOrderFileService orderFileService;

    @RequiresPermissions("system:file:view")
    @GetMapping()
    public String file()
    {
        return prefix + "/orderfile";
    }

    /**
     * @descption: 查询签署文件列表
     * @param:
     * @return:
     * @auther: ZhangDing
     * @date: 2020-10-20 10:59
     */
    @RequiresPermissions("system:file:list")
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(OrderFile orderFile)
    {
        startPage();
        List<OrderFile> list = orderFileService.selectOrderFileList(orderFile);
        return getDataTable(list);
    }

}
