package com.trade.client.credit.controller;

import com.trade.client.credit.service.CBizCreditApplyService;
import com.trade.service.credit.domain.vo.BizCreditApplyVO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * <p>
 * 授信申请 前端控制器
 * </p>
 *
 * @author zhangchenm
 * @since 2024-06-05
 */
@Controller
@RequestMapping("/bizCreditApply")
public class BizCreditApplyController {

    @Resource
    private CBizCreditApplyService creditApplyService;

    /**
     * 新增授信申请暂存
     */
    @RequestMapping("/tempSave")
    public void tempSave(@RequestBody BizCreditApplyVO bizCreditApplyVO) {
        creditApplyService.tempSave(bizCreditApplyVO);
    }

    /**
     * 新增授信申请提交
     */
    @RequestMapping("/submit")
    public Object submit(@RequestBody @Valid BizCreditApplyVO bizCreditApplyVO) {
        return creditApplyService.submit(bizCreditApplyVO);
    }
}
