package com.chy.borrow.controller;


import com.chy.borrow.entity.BorrowApply;
import com.chy.borrow.entity.BorrowExamine;
import com.chy.borrow.eum.BorrowStatusEnum;
import com.chy.borrow.eum.ExamineStatusEnum;
import com.chy.borrow.service.BorrowExamineService;
import com.shanghaigeography.Util.SnowflakeConfig;
import com.shanghaigeography.entity.ResultMsg;
import com.shanghaigeography.eum.ResultState;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import org.springframework.stereotype.Controller;
import com.chy.borrow.controller.BaseController;

import java.sql.Wrapper;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author 沈晔浩
 * @since 2022-03-25
 */
@Controller
@CrossOrigin
@RequestMapping("/borrowExamine")
public class BorrowExamineController extends BaseController {
    @Autowired
    BorrowExamineService borrowExamineService;

    @RequestMapping("/check")
    @ResponseBody
    public String check(@RequestBody BorrowExamine borrowExamine, @RequestHeader String userId) {
//        borrowExamine.setExamineType("1");
        return borrowExamineService.check(borrowExamine,userId);
    }

    @RequestMapping("/getCheckById")
    @ResponseBody
    public String getCheckById(@RequestBody BorrowExamine borrowExamine) {
//        borrowExamine.setExamineType("1");
        return borrowExamineService.getCheckById(borrowExamine,null);
    }

}
