package com.liquidnet.client.admin.web.controller.zhengzai.adam;

import com.liquidnet.client.admin.common.core.controller.BaseController;
import com.liquidnet.client.admin.common.core.page.TableDataInfo;
import com.liquidnet.service.adam.entity.AdamMemberOrder;
import com.liquidnet.service.adam.service.admin.IAdamMemberOrderAdminService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
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.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author AnJiabin <anjiabin@zhengzai.tv>
 * @version V1.0
 * @Description: 会员订单Controller
 * @class: Test
 * @Package com.liquidnet.client.admin.web.controller.zhengzai.adam
 * @Copyright: LightNet @ Copyright (c) 2021
 * @date 2021/6/6 16:52
 */
@Controller
@RequestMapping("/adam/order")
public class AdamMemberOrderController extends BaseController
{
    private String prefix = "zhengzai/adam/order";

    @Autowired
    private IAdamMemberOrderAdminService adamMemberOrderAdminService;

    @RequiresPermissions("adam:order:orderlist:view")
    @GetMapping("/orderList")
    public String order()
    {
        return prefix + "/orderList/order";
    }

    /**
     * 查询【请填写功能名称】列表
     */
    @RequiresPermissions("adam:order:orderlist:list")
    @PostMapping("/orderList/list")
    @ResponseBody
    public TableDataInfo list(AdamMemberOrder adamMemberOrder)
    {
        startPage();
        List<AdamMemberOrder> list = adamMemberOrderAdminService.list();
        return getDataTable(list);
    }

//    /**
//     * 导出【请填写功能名称】列表
//     */
//    @RequiresPermissions("adam:order:export")
//    @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
//    @PostMapping("/export")
//    @ResponseBody
//    public AjaxResult export(AdamMemberOrder adamMemberOrder)
//    {
//        List<AdamMemberOrder> list = adamMemberOrderService.selectAdamMemberOrderList(adamMemberOrder);
//        ExcelUtil<AdamMemberOrder> util = new ExcelUtil<AdamMemberOrder>(AdamMemberOrder.class);
//        return util.exportExcel(list, "【请填写功能名称】数据");
//    }

//    /**
//     * 新增【请填写功能名称】
//     */
//    @GetMapping("/add")
//    public String add()
//    {
//        return prefix + "/add";
//    }

//    /**
//     * 新增保存【请填写功能名称】
//     */
//    @RequiresPermissions("adam:order:add")
//    @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
//    @PostMapping("/add")
//    @ResponseBody
//    public AjaxResult addSave(AdamMemberOrder adamMemberOrder)
//    {
//        return toAjax(adamMemberOrderService.insertAdamMemberOrder(adamMemberOrder));
//    }

//    /**
//     * 修改【请填写功能名称】
//     */
//    @GetMapping("/edit/{mid}")
//    public String edit(@PathVariable("mid") String mid, ModelMap mmap)
//    {
//        AdamMemberOrder adamMemberOrder = adamMemberOrderService.selectAdamMemberOrderById(mid);
//        mmap.put("adamMemberOrder", adamMemberOrder);
//        return prefix + "/edit";
//    }
//
//    /**
//     * 修改保存【请填写功能名称】
//     */
//    @RequiresPermissions("adam:order:edit")
//    @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
//    @PostMapping("/edit")
//    @ResponseBody
//    public AjaxResult editSave(AdamMemberOrder adamMemberOrder)
//    {
//        return toAjax(adamMemberOrderService.updateAdamMemberOrder(adamMemberOrder));
//    }
//
//    /**
//     * 删除【请填写功能名称】
//     */
//    @RequiresPermissions("adam:order:remove")
//    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
//    @PostMapping( "/remove")
//    @ResponseBody
//    public AjaxResult remove(String ids)
//    {
//        return toAjax(adamMemberOrderService.deleteAdamMemberOrderByIds(ids));
//    }
}
