package cn.pluss.platform.controller.deviceVoiceBox;


import cn.pluss.platform.api.Result;
import cn.pluss.platform.base.BaseModelController;
import cn.pluss.platform.deviceVoiceBox.DeviceVoiceBoxMsgService;
import cn.pluss.platform.entity.DeviceVoiceBoxMsg;
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.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * <p>
 * 设备消息推送记录表 前端控制器
 * </p>
 *
 * @author bzg
 * @since 2020-11-04
 */
@Controller
@RequestMapping("/deviceVoiceBoxMsg")
public class DeviceVoiceBoxMsgController extends BaseModelController<DeviceVoiceBoxMsgService, DeviceVoiceBoxMsg> {

    @RequestMapping(method = {RequestMethod.GET, RequestMethod.POST}, value = "/index")
    public String index() {
        return "deviceVoiceBox/msg/list";
    }

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