package com.ruoyi.web.app;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ruoyi.bst.mchApply.domain.MchApplyVO;
import com.ruoyi.bst.mchApply.service.MchApplyService;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.enums.LogBizType;

import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping("/app/mchApply")
public class AppMchApply extends BaseController {

    @Autowired
    private MchApplyService mchApplyService;

    @ApiOperation("新增合作申请")
    @PostMapping
    @Log(title = "新增合作申请", businessType = BusinessType.INSERT, bizIdName = "arg0", bizType = LogBizType.MCH_APPLY)
    public AjaxResult add(@RequestBody MchApplyVO mchApply) {
        mchApply.setUserId(getUserId());
        return success(mchApplyService.insertMchApply(mchApply));
    }

}
