package com.bonus.zlpt.company.controller;
import com.bonus.zlpt.company.api.domain.BmCoBank;
import com.bonus.zlpt.company.service.impl.BmCoBankServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
* bm_co_bank企业开户行信息(bm_co_bank)表控制层
*
* @author syruan
*/
@RestController
@RequestMapping("/company_bank")
@Api(value = "企业开户行信息",tags = {"企业开户行信息"})
public class BmCoBankController {

    /**
    * 服务对象
    */
    @Resource
    private BmCoBankServiceImpl bmCoBankServiceImpl;

    /**
    * 通过主键查询单条数据
    *
    * @param id 主键
    * @return 单条数据
    */
    @GetMapping("selectOne")
    @ApiOperation("通过主键查询单条数据")
    public BmCoBank selectOne(Integer id) {
    return bmCoBankServiceImpl.selectByPrimaryKey(id);
    }


    @PostMapping("insert")
    @ApiOperation("新增企业开户行信息")
    public int insert(@RequestBody BmCoBank bmCoBank){
        return bmCoBankServiceImpl.insert(bmCoBank);
    }

}
