package com.fjhx.victoriatourist.controller.jd;

import com.fjhx.victoriatourist.entity.jd.bo.JdBackQualityWaitExcelBo;
import com.fjhx.victoriatourist.entity.jd.vo.JdBackQualityDetailsVo;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjhx.victoriatourist.entity.jd.vo.JdBackQualityWaitVo;
import com.fjhx.victoriatourist.entity.jd.dto.JdBackQualityWaitSelectDto;
import com.fjhx.victoriatourist.service.jd.JdBackQualityWaitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;


/**
 * <p>
 * 京东退货待质检 前端控制器
 * </p>
 *
 * @author 
 * @since 2023-04-19
 */
@RestController
@RequestMapping("/jdBackQualityWait")
public class JdBackQualityWaitController {

    @Autowired
    private JdBackQualityWaitService jdBackQualityWaitService;

    /**
     * 京东退货待质检分页
     */
    @PostMapping("/page")
    public Page<JdBackQualityWaitVo> page(@RequestBody JdBackQualityWaitSelectDto dto) {
        return jdBackQualityWaitService.getPage(dto);
    }

    /**
     * 京东退货待质检导出Excel
     */
//    @NonInterception
    @GetMapping("/exportExcel")
    public void exportExcel(HttpServletResponse httpServletResponse) {
        jdBackQualityWaitService.exportExcel(httpServletResponse);
    }

    /**
     * 京东退货待质检导入Excel
     *
     * @return
     */
    @PostMapping("/importExcel")
    public List<JdBackQualityWaitExcelBo> importExcel(@RequestParam("file") MultipartFile file) {
        return jdBackQualityWaitService.importExcel(file);
    }

}
