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

import cn.pluss.platform.api.Result;
import cn.pluss.platform.base.BaseModelController;
import cn.pluss.platform.device.MercOrderExpressDetailService;
import cn.pluss.platform.entity.MercOrderExpressDetail;
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.*;

import javax.servlet.http.HttpServletRequest;

/**
 * @author SSS
 */
@RequestMapping("/mercOrderExpressDetail")
@Controller
public class MercOrderExpressDetailController extends BaseModelController<MercOrderExpressDetailService, MercOrderExpressDetail> {

    @GetMapping("/index")
    public String list(HttpServletRequest request,String expressNo) {
        request.setAttribute("expressNo",expressNo);
        return "device/express/detailList";
    }

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