package com.xxfc.platform.tour.biz;



import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.xxfc.platform.tour.entity.CompanyInfo;
import com.xxfc.platform.tour.mapper.CompanyInfoMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;


@Service
@Slf4j
public class CompanyInfoBiz extends BaseBiz<CompanyInfoMapper, CompanyInfo>{





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

}
