package com.om.controller.user;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.om.entity.dto.AppBaseDTO;
import com.om.entity.dto.AppWxscDTO;
import com.om.entity.dto.AppWxscQueryPageDTO;
import com.om.entity.po.Wxsc;
import com.om.entity.vo.AppWxscQueryPageVO;
import com.om.entity.vo.WxscVO;
import com.om.service.IWxscService;
import com.om.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;


@RestController
@RequestMapping("app/wxsc")
@Api(tags = "维修手册管理模块")
public class APPWxscController {
    private final IWxscService wxscService;

    @Autowired
    public APPWxscController(IWxscService wxscService) {
        this.wxscService = wxscService;
    }

    @PostMapping("getPageList")
    @ApiOperation("获取维修资料列表")
    public Result<AppWxscQueryPageVO> appGetPageList(@RequestBody AppWxscQueryPageDTO dto){
        return wxscService.appGetPageList(dto);
    }

    @PostMapping("getById")
    @ApiOperation("根据ID和语言获取维修资料H5")
    public Result<Wxsc> appGetById(@RequestBody AppWxscDTO dto){
        return wxscService.appGetById(dto);
    }
}
