package com.bonus.zlpt.company.controller;
import com.bonus.zlpt.company.domain.BmCoBank;
import com.bonus.zlpt.company.service.impl.BmCoBankServiceImpl;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

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

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

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


    @PostMapping("insert")
    public int insert(@RequestBody BmCoBank bmCoBank){
        return bmCoBankServiceImpl.insert(bmCoBank);
    }

}
