package com.xxfc.platform.order.biz;



import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.xxfc.platform.order.entity.BranchCompany;
import com.xxfc.platform.order.mapper.BranchCompanyMapper;
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();
    }

}
