package com.ym.mec.web.controller;

import com.ym.mec.biz.dal.dto.WithdrawDto;
import com.ym.mec.biz.dal.entity.CooperationOrgan;
import com.ym.mec.biz.dal.entity.StudentWithdraw;
import com.ym.mec.biz.service.CooperationOrganService;
import com.ym.mec.biz.service.StudentWithdrawService;
import com.ym.mec.common.controller.BaseController;
import com.ym.mec.common.page.QueryInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Date;

@RequestMapping("studentWithdraw")
@Api(tags = "提现服务")
@RestController
public class StudentWithdrawController extends BaseController {

    @Autowired
    private StudentWithdrawService studentWithdrawService;

    @ApiOperation(value = "新增")
    @PostMapping("/add")
    public Object add(StudentWithdraw studentWithdraw) {
        studentWithdrawService.insert(studentWithdraw);
        return succeed();
    }

    @ApiOperation(value = "分页查询")
    @GetMapping("/queryPage")
    public Object queryPage(WithdrawDto queryInfo) {
        return succeed(studentWithdrawService.queryPage(queryInfo));
    }
}
