package com.github.wxiaoqi.security.admin.biz;


import com.github.wxiaoqi.security.admin.mapper.BranchCompanyMapper;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.xxfc.platform.vehicle.entity.BranchCompany;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;


@Service
@Slf4j
public class BranchCompanyBiz extends BaseBiz<BranchCompanyMapper, BranchCompany>{





    public ObjectRestResponse addOrUpd(BranchCompany branchCompany){
        Long id = branchCompany.getId() == null ? 0L :branchCompany.getId();
        BranchCompany branchCompany1=selectById(id);
        if (branchCompany1 != null){
             updateSelectiveById(branchCompany);
        }else {
             insertSelective(branchCompany);
        }
        return  ObjectRestResponse.succ();
    }

}
