package com.sunxung.factoring.web.financing;

import com.sunxung.factoring.entity.ResponseJson;
import com.sunxung.factoring.entity.financing.apply.CFinancingBasicInfo;
import com.sunxung.factoring.service.financing.apply.FinancingApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Description : 融资申请对外接口
 * @Author : L.Jia
 * @Date: 2024-01-03 14:46
 */

@RestController
@RequestMapping("/api/financing")
public class FinancingApplyApiController {

    @Autowired
    private FinancingApplyService financingApplyService;

    /***
     * C端融资申请提交，B端开启审批流
     * @param financingBasicInfo
     * @return
     */
    @PostMapping("/startApply")
    public ResponseJson apply(@RequestBody CFinancingBasicInfo financingBasicInfo) {

        financingApplyService.startProcess(financingBasicInfo);
        return new ResponseJson("提交成功");
    }

}
