package com.yingpaipay.business.controller.applet;

import com.yingpaipay.business.domain.bo.AppletMyTaskDocumentBo;
import com.yingpaipay.business.domain.vo.AppletGetRejectionVo;
import com.yingpaipay.business.domain.vo.AppletMyTaskDocumentVo;
import com.yingpaipay.business.service.IDocumentService;
import lombok.RequiredArgsConstructor;
import org.dromara.common.core.domain.R;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.web.core.BaseController;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/applet/myTask")
@RequiredArgsConstructor
public class AppletMyTaskController extends BaseController {

    private final IDocumentService documentService;

    @GetMapping("/listDocument")
    public TableDataInfo<AppletMyTaskDocumentVo> listDocument(AppletMyTaskDocumentBo bo, PageQuery pageQuery) {
        return documentService.listDocument(bo, pageQuery);
    }

    @GetMapping("/getRejection")
    public R<AppletGetRejectionVo> getRejection(@RequestParam Long documentId) {
        return R.ok(documentService.getRejection(documentId));
    }

}
