package com.ruoyi.web.app;

import com.ruoyi.bst.fault.domain.FaultVO;
import com.ruoyi.bst.mchApply.domain.MchApplyVO;
import com.ruoyi.bst.mchApply.service.MchApplyService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import io.swagger.annotations.ApiOperation;
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;

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

    @Autowired
    private MchApplyService mchApplyService;

    /**
     * 新增合作申请
     * @param mchApply
     * @return
     */
    @ApiOperation("故障申报")
    @PostMapping
    public AjaxResult add(@RequestBody MchApplyVO mchApply) {
        mchApply.setUserId(getUserId());
        return success(mchApplyService.insertMchApply(mchApply));
    }

}
