package com.bonus.zlpt.company.service.impl;


import com.bonus.zlpt.company.api.domain.BusinessOpen;
import com.bonus.zlpt.company.api.domain.dto.BmCompanyDto;
import com.bonus.zlpt.company.api.domain.vo.BusinessOpenVo;
import com.bonus.zlpt.company.mapper.BusinessOpenMapper;
import com.bonus.zlpt.company.service.BusinessOpenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 企业业务开通管理
 */
@Service
public class BusinessOpenServiceImpl implements BusinessOpenService {


    @Autowired
    private BusinessOpenMapper businessOpenMapper;



    /**
     * 企业业务开通信息查询
     * @param bmCompanyDto
     * @return
     */
    @Override
    public List<BusinessOpenVo> selectList(BmCompanyDto bmCompanyDto) {

        return businessOpenMapper.selectList(bmCompanyDto);

    }

    /**
     * 企业业务开通数据修改
     * @return
     */
    @Override
    public int updateBusiness(BusinessOpen businessOpen) {


        return businessOpenMapper.updateBusiness(businessOpen);
    }

    /**
     * 新增业务开通请求
     * @param businessOpen
     * @return
     */
    @Override
    public int insertBusinessOpenInfo(BusinessOpen businessOpen) {

        businessOpen.setStatus("0");
        return businessOpenMapper.insertBusinessOpenInfo(businessOpen);
    }
}
