package cn.pluss.platform.controller.device.order;

import cn.pluss.platform.api.Result;
import cn.pluss.platform.base.BaseModelController;
import cn.pluss.platform.device.MercOrderNewService;
import cn.pluss.platform.entity.MercOrderNew;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author SSS
 */
@RequestMapping("/mercOrderNew")
@Controller
public class MercOrderNewController extends BaseModelController<MercOrderNewService, MercOrderNew> {

    @GetMapping("/index")
    public String list() {
        return "device/order/list";
    }

    @Override
    public Result<Page<MercOrderNew>> page(Page<MercOrderNew> page, MercOrderNew condition, OrderItem orderItem) {
        orderItem.setColumn("createTime").setAsc(false);
        return super.page(page, condition, orderItem);
    }
}
